Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You wouldn't want to use a random number instead of a hash, because then it becomes easier for an attacker to guess your source and create his own "secret" (especially if you use the system clock, never do that. See <a href="https://stackoverflow.com/questions/15527706/is-using-microtime-to-generate-password-reset-tokens-bad-practice/15530476#15530476">Is using microtime() to generate password-reset tokens bad practice</a>). A truly random number is not any better from a randomization standpoint than a hash of a random number but it obscures the pattern such that a human would not be able to recognize any pattern of changes (such as a seed value). Additionally, it does enhance security because a brute force attack takes much longer when the attacker must hash each attempt before submitting. This is especially true with a strong hash like SHA-256. The amount of computational time required for a brute force attack increases significantly when processor intensive operations are required for each submission. This is the reason that Linux went from storing password hashes as MD5 to SHA.</p> <p>Additionally, SHAs and other hashes have some mathematical benefits that are good for security. Firstly, they always output the same length, regardless of the input length. Secondly, a small change in the input results in a large change in the output, and for a small change in the output, the corresponding input that would be required to obtain that output would differ much more than the previous input. This makes it really hard for an attacker to generate the hash they want by selectively feeding input, and it makes it virtually impossible for two similar inputs to result in the same or even very close outputs.</p> <p>This is a deep topic that can have an entire textbook written about it, but these are just some high level reasons.</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. 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