Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Definition:</strong><br> <a href="http://en.wikipedia.org/wiki/Hash_function" rel="noreferrer">Hashing</a> is the application of a function <code>f()</code> to a variable sized input to produce a constant sized output.</p> <pre><code>A =&gt; f() =&gt; X B =&gt; f() =&gt; Y C =&gt; f() =&gt; Z </code></pre> <p>A hash is also a one-way function which means that there isn't a function to reverse or undo a hash. As well re-applying the hash <code>f(f(x))</code> isn't going to product <code>x</code> again.</p> <p><strong>The Details:</strong></p> <p>A hash function can be as simple as "add 13 to the input" or complex like a <a href="http://en.wikipedia.org/wiki/Cryptographic_hash_function" rel="noreferrer">Cryptographic Hash</a> such as <a href="http://en.wikipedia.org/wiki/MD5" rel="noreferrer">MD5</a> or <a href="http://en.wikipedia.org/wiki/SHA1" rel="noreferrer">SHA1</a>. There are many things that constitute a good hash function like:</p> <ul> <li><a href="http://en.wikipedia.org/wiki/Hash_function#Low_cost" rel="noreferrer">Low Cost</a>: Easy to compute</li> <li><a href="http://en.wikipedia.org/wiki/Hash_function#Determinism" rel="noreferrer">Deterministic</a>: if I hash the input <code>a</code> multiple times, I am going to get the same output each time</li> <li><a href="http://en.wikipedia.org/wiki/Hash_function#Uniformity" rel="noreferrer">Uniformity</a>: The input will be evenly distributed among the possible outputs. This falls in line with something called the <a href="http://en.wikipedia.org/wiki/Pigeonhole_principle" rel="noreferrer">Pigeonhole Principle</a>. Since there are a limited number of outputs we want <code>f()</code> to place those outputs evenly instead of in the same bucket. When two inputs compute to the same output this is known as a collision. It's a good thing for a hash function to produce fewer collisions.</li> </ul> <p><strong>Hashing applied to Passwords:</strong></p> <p>The hashing of passwords is the same process as described above, however it comes with some special considerations. Many of the properties that make up a good hash function are not beneficial when it comes to passwords.</p> <p>Take for example <em>determinism</em>, because hashes produce a deterministic result when two people use the same password the hash is going to look the same in the password store. This is a bad thing! However this is mitigated by something called a <a href="http://en.wikipedia.org/wiki/Salt_(cryptography)" rel="noreferrer">salt</a>.</p> <p><em>Uniformity</em> on the other hand is beneficial because the desire is for the algorithm to limit collisions. </p> <p>Because a hash is <em>One-Way</em> means the input cannot be determined from the output, which is why hashing is great for passwords!</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