AES for Password Hashing

Submitted by Bill St. Clair on Wed, 27 Jul 2011 13:54:27 GMT  <== Lisplog ==> 

Following a G+ discussion with Nikodemus Siivola, in which he recommended using bcrypt instead of a hash function for encoding passwords, I updated Lisplog to use AES, since I didn't have bcrypt handy. AES doesn't have the tuning parameters to make encryption take longer, as bcrypt does, but I figure it's at least slower than a simple hash, so it should help.

I initially used a simple MD5 hash, copying the Drupal mechanism so that I could just copy my Drupal data. I have not yet updated this blog with the new code. Soon.

Add comment Edit post Add post

Comments (2):

Turns out this is completely

Submitted by Bill St. Clair on Wed, 27 Jul 2011 21:45:22 GMT

Turns out this is completely misguided. The thing that makes bcrypt useful for hashing passwords is its string-to-key (S2K) mechanism, which salts and then hashes thousands of times. The encryption part hardly matters. Will fix.

Edit comment

On further thought

Submitted by Bill St. Clair on Thu, 28 Jul 2011 06:55:56 GMT

On further thought, I'm not going to bother making my password hashes really secure. I don't expect them to be compromised anyway (famous last words). I DID change the code to hash the AES output, so that it's a uniform length, not revealing the actual length of the user password.

Edit comment