I am writing an application App1
. This application uses SQLite database and I plan to encrypt it using AES256. For symmetric encryption I need a key, which I need to store somewhere.
From a similar questions I have a few options, but none is applicable in my case:
Tie the encryption key to your admin login
I don't trust the currently logged user. In fact, I want to hide this from anyone, but
App1
.Tie the encryption key to your hardware.
App1
is deployed to thousands of machines, some may not have needed hardware.Type in the encryption key when you start up, store it in memory.
User must not have access to
App1
key.Store the key on a different server.
Machine is allowed to be off line, while
App1
is running.Store the key elsewhere on the same server.
Then it can be found.
Store the key in the database.
I need to secure the database, which is kind of recursive in my case.
Possible solution is to store the key using Windows DPAPI, but
DPAPI is focused on providing data protection >for users<.
Whereas I need to protect an application. I also need that
App1
worked from different users on the same machineI can add secondary entropy, to restrict the currently logged user from accessing the data.
However, I need to store this secret data on the machine. How do I protect that... Appears to be recursion again.
Question: where do I securely store application-specific symmetric key?