Hacker News new | ask | show | jobs
by kyledrake 4266 days ago
That's what it currently does.
1 comments

The code seems to suggest this was written by someone that isn't all that versed in crypto, which is more than a little worrying for an ATM:

hash_pbkdf2('sha256', $password, $salt, self::ITERATIONS, $saltSize, true);

where self::ITERATIONS is 500. That's extremely low.

Furthermore, they're using CBC mode encryption for the 'config' file rather than an authenticated cipher. The only 'authentication' there is is whether the file inflates. Because the IV is in the encrypted file (and I can pick any password), I can make the first block decrypt as anything. Depending on when gzinflate throws an error, I could potentially make the decrypt succeed with just control over the first block.

Neither of the issues is (in this case, because it's 'just' the config file encryption) probably anything to especially worry about, but it does show that other, more critical, parts of the codebase might not be up to snuff.