Need help, tech question (encryption, databases)I start a project where the database will be encrypted. I don't know how to do it correctly, I just know how much it is difficult. Yeah, I've read the articles from @soatok (and a big thanks for the quality of this blog). So, does anybody have ressources, articles, books on how to manage encryption of databases, with different keys depending on permissions, etc.? I understand some theory but I have no idea about how to do practically.
I don't want to argue with the utility of encryption or how to do without. I legally have to do. And I don't want to do in a bad way just to check "database encryption".
Need help, tech question (encryption, databases)@kujiu@soatok As with many things, it depends. One way to start is to define the threat model you want to address (ie: who the attacker is, what do they want, what resources they have).
Based on this, you'll start to have an idea of the granularity of the encryption, how to store the keys, how sensitive is the metadata, ...
Need help, tech question (encryption, databases)@etn@soatok I know which data and metadata are sensitive. The attacker is the admin of the server because we can't have a global habilitation for she/him to consult all data. And it must be impossible for the admin to use a key to decrypt manually (except if she/he owns the key and have the habilitation).
Need help, tech question (encryption, databases)@kujiu@soatok Evil admin scenarios usually mean that the encryption keys remain on the client side;, otherwise the evil admin can backdoor the server to record encryption keys and/or intercept clear data in transit. The consequence is that the server won't be able to run much queries (only testing for existence, usually) in the data, or do validation.
In your scenario, is the evil admin an active attacker? If that's the case, you want to think of the damage that could be done by sending back old data, or wrong data.
Need help, tech question (encryption, databases)@kujiu@soatok On the practical side, AEAD gives you encryption and message integrity. You can use and store client side a message counter to avoid repay attacks.
Need help, tech question (encryption, databases)@etn@soatok He can be an active attacker, but it's not the main risk (it's the case only for financial data). Here, the software is to improve access to culture for disabled people. And we have to manage with laws about intellectual property. So, it's really for confidentiality. I have a vague idea of cryptography products, and how they work. And I know how to design large application. My issue is learn how to design an application with hard security and encryption, without creating weaknesses. That's why I'm searching for books, revue or other documentation. I found a book that seems good but published in 2005 (so perhaps too old).