There are two options for user-level key stores on Linux:
- GnomeKeyring
- KWallet
This does not address the need for a system-level key store.
Answer from Matthew Rodatus on Stack OverflowThere are two options for user-level key stores on Linux:
- GnomeKeyring
- KWallet
This does not address the need for a system-level key store.
DPAPI does not exist on Linux.
Windows uses a special machine-id to deviate a machine key. You can emulate this behavior by looking into HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography reading the value MachineGuid and deviate your special key by using any encryption library you want.
Under Linux on the other hand this machine-id is stored in the file "/etc/machine-id". You can read it's contents and deviate your special key from it. Be aware this key may be the same when using fast deployment VMs.
Encrypt your data with this special machine-id and it cannot not be read across other machines. Read at first the machine-id (Linux or Windows) and then try to decrypt the contents of your data. On another machine the result will obviously be different and not correct.
You can code your platform independent wrapper class by using the information from above.
Hope this helps someone in the future.
Cheers
Best way for cross-platform reversible encryption
security - Linux (Ubuntu) equivalent to Windows DPAPI - Stack Overflow
security - DPAPI / MacOS-style Keyring for Linux or BSD? - Unix & Linux Stack Exchange
Need ProtectedData support on non-Windows
I am porting a library to .NET Core from Framework and the bit that I don't have a good answer for at the moment is credential storage for a backend API. I need to be able to store a large set of credentials with reversible encryption, modifiable by the consumer of the library. With classic .NET on Windows I used DPAPI with serialization to JSON. Is there a cross platform equivalent?
» pip install dpapi-ng