Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As Johannes Gorset pointed out, <a href="http://www.securityfocus.com/blogs/262" rel="noreferrer">the post by Thomas Ptacek from Matasano Security</a> explains why <strong>simple, general-purpose hashing functions such as MD5, SHA1, SHA256 and SHA512 are poor password hashing choices</strong>.</p> <p>Why? They are too fast--you can calculate at least 1,000,000 MD5 hashes a second per core with a modern computer, so brute force is feasible against most passwords people use. And that's much less than a GPU-based cracking server cluster!</p> <p>Salting without key stretching only means that you cannot precompute the rainbow table, you need to build it ad hoc for that specific salt. But it won't really make things that much harder.</p> <p>User @Will says:</p> <blockquote> <p>Everyone is talking about this like they can be hacked over the internet. As already stated, limiting attempts makes it impossible to crack a password over the Internet and has nothing to do with the hash.</p> </blockquote> <p>They don't need to. Apparently, in <a href="http://nakedsecurity.sophos.com/2012/06/21/linkedin-slapped-with-5-million-class-action-suit-over-leaked-passwords/" rel="noreferrer">the case of LinkedIn</a> they used the common <a href="http://en.wikipedia.org/wiki/Sql_injection" rel="noreferrer">SQL injection vulnerability</a> to get the login DB table and cracked millions of passwords offline.</p> <p>Then he goes back to the offline attack scenario:</p> <blockquote> <p>The security really comes into play when the entire database is compromised and a hacker can then perform 100 million password attempts per second against the md5 hash. SHA512 is about 10,000 times slower.</p> </blockquote> <p>No, <strong>SHA512</strong> is not 10000 times slower than MD5--it only takes about twice as much. <strong>Crypt/SHA512</strong>, on the other hand, is a very different beast that, like its BCrypt counterpart, performs <a href="http://en.wikipedia.org/wiki/Key_stretching" rel="noreferrer">key stretching</a>, producing a very different hash with a random salt built-in and will take anything between 500 and 999999 times as much to compute (stretching is tunable).</p> <pre><code>SHA512 =&gt; aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d Crypt/SHA512 =&gt; $6$rounds=5000$usesomesillystri$D4IrlXatmP7rx3P3InaxBeoomnAihCKRVQP22JZ6EY47Wc6BkroIuUUBOov1i.S5KPgErtP/EN5mcO.ChWQW21 </code></pre> <p>So the choice for PHP is either Crypt/Blowfish (BCrypt), Crypt/SHA256 or Crypt/SHA512. Or at least Crypt/MD5 (PHK). See <a href="http://www.php.net/manual/en/function.crypt.php" rel="noreferrer">www.php.net/manual/en/function.crypt.php</a></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. 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.
    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