This is NOT a question regarding coding, it is a question concerning methodology.
I need to encrypt a database. The database being used does not contain any encryption abilities like TDE for SQL Server. I have therefore worked out a method to do symetric encryption and key storage etc.
My question is which method should I use for the encryption/decryption and executing SQL statements.
I am thinking to encrypt the database and then decrypt it when I need to run an SQL statement against the data. After I execute the SQL statement and get my return set I can encrypt it again.
I see a problem with this method as when the database is in the decrypted state all the data is in clear text. If the system crashed when the SQL statement is being executed the database would be left in a clear text state until I could encrypt it again. This is not acceptable.
I am not sure what the proper method would be to encrypt/decrypt and execute SQL statements against the database.
Any ideas or suggestions.. especially from anyone who has attempted this before.
*****
New thought
I have thought about encrypting and decrypting just the data rather than the database file but am unsure what would happen if for instance I had a column with a data type of DATE. After I encrypt the date it would I assume no longer look like a date and how would the system accept it in a date column?
Thanks....
I need to encrypt a database. The database being used does not contain any encryption abilities like TDE for SQL Server. I have therefore worked out a method to do symetric encryption and key storage etc.
My question is which method should I use for the encryption/decryption and executing SQL statements.
I am thinking to encrypt the database and then decrypt it when I need to run an SQL statement against the data. After I execute the SQL statement and get my return set I can encrypt it again.
I see a problem with this method as when the database is in the decrypted state all the data is in clear text. If the system crashed when the SQL statement is being executed the database would be left in a clear text state until I could encrypt it again. This is not acceptable.
I am not sure what the proper method would be to encrypt/decrypt and execute SQL statements against the database.
Any ideas or suggestions.. especially from anyone who has attempted this before.
*****
New thought
I have thought about encrypting and decrypting just the data rather than the database file but am unsure what would happen if for instance I had a column with a data type of DATE. After I encrypt the date it would I assume no longer look like a date and how would the system accept it in a date column?
Thanks....
Comment