Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p><strong>Warning:</strong> Since this post was written in 2010, GPUs have been widely deployed to brute-force password hashes. Moderately-priced GPUs can run <em>ten billion</em> MD5s per second. This means that even a completely-random 8-character alphanumeric password (62 possible characters) can be brute forced in 6 hours. SHA-1 is only slightly slower, it'd take one day. Your user's passwords are much weaker, and (even with salting) will fall at a rate of thousands of passwords per second. Hash functions are <em>designed to be fast</em>. You don't want this for passwords. Use scrypt, bcrypt, or PBKDF-2.</p> </blockquote> <p><strong>MD5</strong> was found to be weak back in 1996, and <a href="http://www.schneier.com/blog/archives/2008/12/forging_ssl_cer.html" rel="noreferrer">should not be used anymore</a> for cryptographic purposes. <strong>SHA-1</strong> is a commonly used replacement, but <a href="http://www.schneier.com/blog/archives/2005/02/sha1_broken.html" rel="noreferrer">has similar problems</a>. The <a href="http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-2_family" rel="noreferrer"><strong>SHA-2</strong> family</a> of hash functions are the current <a href="http://csrc.nist.gov/groups/ST/hash/statement.html" rel="noreferrer">replacement</a> of SHA-1. The members of SHA-2 are individually referred to as SHA-224, SHA-256, SHA-384, and SHA-512.</p> <p>At the moment, several hash functions <a href="http://en.wikipedia.org/wiki/NIST_hash_function_competition" rel="noreferrer">are competing to become <strong>SHA-3</strong></a>, the next standardised cryptographic hashing algorithm. A winner will be chosen in 2012. None of these should be used yet!</p> <p><strong>For password hashing</strong>, you may also consider using something like <a href="http://en.wikipedia.org/wiki/Bcrypt" rel="noreferrer"><strong>bcrypt</strong></a>. It is designed to be slow enough to make large scale brute force attacks infeasible. You can tune the slowness yourself, so it can be made slower when computers are becoming faster. </p> <p><strong>Warning:</strong> bcrypt is based on an older two-way encryption algorithm, Blowfish, for which better alternatives exist today. I do not think that the cryptographic hashing properties of bcrypt are completely understood. Someone correct me if I'm wrong; I have never found a reliable source that discusses bcrypt's properties (other than its slowness) from a cryptographic perspective.</p> <p>It may be somewhat reassuring that the risk of collisions matters less for password hashing than it does for public-key cryptography or digital signatures. Using MD5 today is a <a href="http://news.cnet.com/8301-1009_3-10129693-83.html" rel="noreferrer">terrible idea</a> for SSL, but not equally disastrous for password hashing. But if you have the choice, simply pick a stronger one.</p> <p>Using a good hash function is <a href="http://md5.rednoize.com/about/" rel="noreferrer">not enough</a> to secure your passwords. You should hash the passwords together with <a href="http://en.wikipedia.org/wiki/Salt_(cryptography)" rel="noreferrer"><strong>salts</strong></a> that are long and <a href="http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator" rel="noreferrer">cryptographically random</a>. You should also help your users pick stronger passwords or pass phrases if possible. Longer always is better.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload