Answer the question
In order to leave comments, you need to log in
How to store encryption keys for user data with processing on the server?
Hello. Suppose there is a database that stores user data (logins and passwords for third-party resources that do not have an API). For obvious reasons, you want to save these accesses, but at the same time they will be used by the server to collect data from these resources.
I plan to encrypt this data in the database with a key that is unique for each user. The question arises where to store the encryption keys. If on the server, then there are two options:
Answer the question
In order to leave comments, you need to log in
There are 2 obvious high-probability risks in your threat model:
1) obtaining administrative privileges on the server (no encryption will save you from this, since your server is forced to send the password to the polled server in clear text, and, therefore, the attacker "hung" for a day-week-month will still intercept all passwords in the clear);
2) stealing the database and / or code without obtaining administrative privileges - then decide for yourself - either you encrypt the data on the key information of the client, or, for example, on hardware tokens (but then when you restart the service, please enter the PIN manually every time - this is done on serious HSM modules)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question