Though pretty interested, I'm everything but an expert in Information Security, please redirect me to any helpful resources if my question is stupid or correct me if my assumptions are wrong.
When reading through the Keepass Security page it seemed to me that the workflow of generating the password that's actually used to encrypt the kdbx file from the user-entered password (assuming no keyfiles or Windows user account is used) is as follows:
- Take user-entered password and hash it (SHA-256)
- Generate random password/retreive it from kdbx file
- Encrypt the hash from 1
N
times using the key from 2 - Hash the output of 3 using SHA-256 again
Then, the output of 4 is the key to be actually used to encrypt the database.
What I'm wondering about is: Why the hassle with the key stored in plain and encryption? Why not just omit steps 2 and 3 and hash the user-entered password N
(or maybe C*N
, with C
being the time relation between AES-encrypting and SHA-256-hashing) times? I'm pretty sure I'm overlooking something important here and I'd be grateful if you could enlighten me.