I'm pretty sure this is a really bad approach (in theory), but one of my clients is doing this and I was wondering… How bad it is to perform pbkdf-2 in this way (with 2000 iterations)?
a = PBKDF2(x, y) b = PBKDF2(y, x) x is the username (password in pbkdf2) y is the password (salt in pbkdf2) 2000 iterations
a is then used for some authentication in the system and "b" is used for encryption.
x are also stored and therefore known.
Is it subject to some class of attacks or is it just a really bad crypto nightmare which is only subject to brute-force attacks?
a is used as key to retrieve user data from the DB (thus, a is sent to server), data is returned and partially encrypted. You need
b to decrypt what you get.
Let's say that an attacker gets access to the database where these hashes are stored. What kind of attacks could he perpetrate?