Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

To protect user\'s sensitive data, I am considering the following 2 approaches:

ID: 655939 • Letter: T

Question

To protect user's sensitive data, I am considering the following 2 approaches:

1. Create 1 data encrypting key (DEK) for each user, use it to encrypt (using AES CBC mode with a random IV for each encryption operation) all data of the same user. DEK is protected and stored separately from data.
2. Use multiple DEKs, 1 each time a new piece of user data needs to be encrypted (using AES/CBC with IVs like above). The DEK is then ecrypted using a KEK corresponding to that user, and stored side by side (e.g. same row in database) with the data that is ecrypted with it. The KEK is stored securely, separatedly from the data and DEK.

Is there known vulnerabilities in AES/CBC with good random IVs? What is the benefit of the 2nd approach, other than minimizing the amount of data encrypted with the same key, thus reduce the risk of being cryptanalyzed?

Explanation / Answer

Have you considered an encrypted filesystem? It works very similar to your second proposal.

Examples are eCryptfs in Unix and modes of NTFS in Windows. Secondly, there are no feasible ways to break AES other than a brute force attack; Serpent-256 cipher is slower but there is no known way to breach more than a few numbers.

As for why you would pick one over two, it's because of a thing called the cold boot attack: If a hacker gains access to a hibernating computer with an encrypted drive, he can take another computer with the same memory standard, remove the memory from the first computer after chilling it and place it in the second machine then booting it up before it degrades. Thus he can recover the keys for any files you were using, so if you only have one it is easy to decrypt the hard drive, while the using an individual file encryption system will only allow the hacker to decrypt what was open and running.

In sum, both will work unless you are worried about physical access attacks.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote