3 ms·
No, one important property of hashes in security applications is irreversibility (except for brute force, i.e. try and error). For example, user passwords on a
by blauditore 10y ago
No, one important property of hashes in security applications is irreversibility (except for brute force, i.e. try and error).
For example, user passwords on a server should only be stored in hashed form (ideally with salt[1]). If an attacker gets access to that database, they will not be able to restore the original passwords without enormous computation costs.
The "why not" is harder two answer and I don't know all the details either.
But the general idea is that the hashing algorithm contains irreversible operations where multiple (intermediate) inputs would result in the same (intermediate) output, so you cannot derive a unique input from the output.
A simple example for this is the modulo function: 9 mod 7 = 2, but also 16 mod 7 = 2.
If you now see the result 2, the original number could have been 2, 9, 16, 23 or anything else of the form n*7 + 2.
[1]: https://en.wikipedia.org/wiki/Salt_(cryptography) https://en.wikipedia.org/wiki/Salt_(cryptography)