New ask Hacker News story: Ask HN: The way to encrypt and protect sensitive data in database

Ask HN: The way to encrypt and protect sensitive data in database
14 by flashu | 3 comments on Hacker News.
Hey! I would like to create a feature in an existing application where users can keep very sensitive data. I need a solution to encrypt and protect data from leakage in case of unauthorized access to the machine(s) and/or application bug which can expose the data. I was thinking about a simple solution to encrypt data using the non-shared key generated per user (to avoid decryption of the whole dataset using one key) and keeping those keys in some kind of vault. But the thing is there must be a place and time when those keys are revealed to decrypt data from database/storage. The app itself is written in PHP, so I came to another idea to use ionCube or Zend Encoder to protect the file with cypher keys, but the question is: is it safe enough?

No comments