4 ms·
Question, though... If your columns have types, how can you encrypt them using custom keys for each one? Is it possible? I want the keys to reside on the clie
by EGreg 9y ago
Question, though...
If your columns have types, how can you encrypt them using custom keys for each one? Is it possible?
I want the keys to reside on the client and search for encrypted data. Basically single row lookups at a time.
- pandapunchpower 9y agoThe column type would have to be the type of the encrypted value. The type of the unencrypted data could not be enforced by the DB and you would have to rely on code doing the correct thing. I am however extremely wary of doing it that way. I don't know your requirements of course.
- EGreg 9y agoHere is the thing - encrypted stuff is just a weird encoded string. So I can’t really use columns normally. What I really need is just a huge table with two fields: “token”, “content” And the token is basically the primary key but encrypted with whatever encryption. You could even do foreign keys this way. Hmm I suddenly have an idea. What about a layer above the database that basically enforces foreign keys and joins in this way to support end to end encryption? The content would reference ENCRYPTED foreign keys. Only clients would decrypt stuff.
- pandapunchpower 9y ago>What I really need is just a huge table with two fields: “token”, “content” Sounds more like a key value store and less like a relational database. Although you can store key value data in a relational db of course, there may be a better tool for the job.
- JoachimSchipper 9y agoYou'll be interested in CryptDB.
- nurettin 9y agoAlso, how do you index that?
- LgWoodenBadger 9y agoAre you sure you aren't better off searching for hashed data? The only thing it doesn't really support is non-exact matches.