Security – Store password AES encrypted in MySQL after creating a bcrypt hash

bcryptencryptionSecurity

I am building an application and storing user passwords in a table in MySQL. I am already using bcrypt but wondering, does it make any senses to AES_ENCRYT() the hashed password before storing into the database?

Example:

$bcrypt = new Bcrypt();
$hash = $bcrypt->hash('some-password-here');

Should I just store $hash as a varchar(60) or instead call MySQL AES_ENCRYPT('crypto_key', $hash) and store in a blob column?

Best Answer

No, a bcrypt hashed password with a reasonable work factor should be plenty secure on its own.

Related Topic