Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Not a complete answer but an expansion of how salting works that was too long for a comment..</p> <p>The salt shouldn't be treated as a string to be compared, it should be a part of the password that the end user doesn't have to type but is unique to that user. It's used to prevent a single compromised password breaching multiple accounts.</p> <p>Eg let's say we've got a really simple system on which Bob has the password <code>ABCDEF</code>.</p> <p>Passing <code>ABCDEF</code> through our hashing algorithm results in (say) <code>ED6522687</code></p> <p>If an attacker gets access to the password list, they can only see the stored hash.</p> <p>Of course, if Jane also uses the same password, her hash is going to be <code>ED6522687</code> too - which means if you break into either account (through brute-force, social engineering, etc) you're going to get access to <em>both</em> accounts as you can see their hashes match.</p> <p>Salting is where something is done to the password before hashing that's unique to each user and repeatable. Salt should be predictable so let's say Bob and Jane's salts are random numbers.</p> <p>Now if you hash the password for bob <code>ABCDEF123</code>, you get a different hash to Jane's <code>ABCDEF456</code>.</p> <p>Note that this <strong>isn't</strong> a complete explanation. Some other things to consider:</p> <ul> <li>There's no such thing as a random number in this context, only cryptographically secure random numbers - and how random they are is complex, related to entropy and other fun stuff.</li> <li>How quickly the hash is computed is a major factor with regards to hampering brute-forcing - hash algorithms like <code>bcrypt</code> are designed to be computationally expensive. unlike (say) <code>SHA2</code></li> <li>There's no reason for the user to submit (or even know) their salt.</li> </ul> <p>Another observation which isn't usually emphasised enough... You should never trust anything you read on the internet about a topic like this - there are too many people who have incomplete understanding (I consider myself among them). So take this as reasons not to do it yourself, not a guide on how to do it.</p>
    singulars
    1. This table or related slice is empty.
    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. 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