3 ms·
What if they lose their password? The password has to be hashed in the database, so there is no way to decrypt the data. Furthermore, it introduces problems f
by alexchamberlain 15y ago
What if they lose their password?
The password has to be hashed in the database, so there is no way to decrypt the data.
Furthermore, it introduces problems for sharing between users.
- mike-cardwell 15y agoGenerate a key for each user. Encrypt the users key with their password, but then create a second backup encrypted copy using public key crypto. If the user loses their password, then you can have systems in place to retrieve the key from the backup encrypted container. The process of retrieving the key could involve somebody manually approving the decryption of it on a secondary system where the private key lives, and then copying it over to the original server to be re-encrypted with the users new password. EDIT: If data needs to be shared between users, then a new sharing key can be created, and encrypted with both users passwords and the backup public key. That data can then be re-encrypted with the shared key.
- davidw 15y agoIt's nice to read this, because I have recently been involved in creating just such a system, and it's pretty close to how you describe it.
- mike-cardwell 15y agoI'd be interested to read about such a system if you ever have the motivation and opportunity.