3
edits
(Using HMAC + bcrypt has absolutely zero advantage over using plain bcrypt. In fact, it's as stupid as hashing a hash. HMAC is meant for weak algorithms such as the SHA family.) |
|||
Line 73: | Line 73: | ||
===Password Storage=== | ===Password Storage=== | ||
Passwords stored in a database should use [https://en.wikipedia.org/wiki/Bcrypt | |||
bcrypt].Bcrypt is a hashing algorithm designer to keep up with Moore's law. | |||
General hashing algorithms such as SHA512 can be used to generate hashes very | |||
fast depending on the hardware used. If computer B is 10 times faster than | |||
computer A then a SHA512 hash will be generated 10 times faster on computer B | |||
than on computer A. With bcrypt this isn't the case as it introduces a cost | |||
factor. Using this cost factor you can specify how long it should take to | |||
generate a hash regardless of how powerful a computer is. | |||
There are quite a few resources available on the internet on Bcrypt, below are | |||
a few ones that I consider worth reading: | |||
* http://codahale.com/how-to-safely-store-a-password/ | |||
* http://yorickpeterse.com/articles/use-bcrypt-fool/ | |||
* https://en.wikipedia.org/wiki/Bcrypt | |||
==== Old Password Hashes ==== | ==== Old Password Hashes ==== |
edits