Ask HN: Is there a safe way to encrypt databases?
Is there a safe way to encrypt databases?
My understanding of the issue is that if it is encrypted, then the key has to exist on the same machine anyway, so there's not much point.
Is there a safe way to encrypt databases?
My understanding of the issue is that if it is encrypted, then the key has to exist on the same machine anyway, so there's not much point.
Consult an expert. I could give more details about effective encryption strategies, but I don't want a newbie finding my post, reading half of it, and implementing something dangerously bad. At least no encryption is at a known level of safety; data that's been encrypted incorrectly gives a huge false sense of security.
You can go hardware with a cryptographic accelerator PCI card (good luck integrating that in your webapp)
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.
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.