Does some of my crypto-nerd friends know of technology to encrypt a relational database?

I’m looking for technology so it is not possible to extract any information with a database dump, but the database should still perform quickly. Furthermore, it should not be possible to do data-mining, so preferably primary keys should be encrypted as well (though I’ve a hard time seeing how that would be possible within a single table while maintaining search speed).

I’ve a table of users, each have an identity and a hashed password. There’s bunch of tables associated with users. The nature of these tables very, but include a time-series and a key-value mapping. We can assume the user has a secret (password) that can be used for encryption.

My first attempt would be to use the password and table name as key for encrypting tables, row by row. Then it would not be possible to compare primary keys between tables but I could still look them up quickly. I would lose sorting on time series and would be able to do intra-table data mining. I guess I could move the dates unencrypted to another table and get some sortability back. My concerns are that I can still mine amounts of data as user identity is preserved, and I might also have collision on primary keys (as I use different keys for each user).

Any better suggestions, papers, libraries? I’m using MySQL but I’ve a couple other databases running as well so that’s not too important.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.