As someone extremely new to this; can this procedure be worked backwards to retrieve the original text? If no, why not?
How Hash Algorithms Work (2007)
11–20 of 61 posts
Re: How Hash Algorithms Work (2007)
#12As someone extremely new to this; can this procedure be worked backwards to retrieve the original text? If no, why not?
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.
Re: How Hash Algorithms Work (2007)
#13Re: How Hash Algorithms Work (2007)
#14As someone extremely new to this; can this procedure be worked backwards to retrieve the original text? If no, why not?
Not all operations are reversible, which makes it difficult to work out a simple inverse. Of course you could work backwards to find out which inputs could lead to a particular result, but this set of possible inputs would grow rapidly as you work your way back through the algorithm, making it nigh impossible to work out the original message, even if you have some idea what it's supposed to look like. Of course this…
AKA rainbow tables, which explains why it is important not to use just a single word from the dictionary as a password.
Re: How Hash Algorithms Work (2007)
#15As someone extremely new to this; can this procedure be worked backwards to retrieve the original text? If no, why not?
Re: How Hash Algorithms Work (2007)
#16Earlier quoted context omitted.
Not all operations are reversible, which makes it difficult to work out a simple inverse. Of course you could work backwards to find out which inputs could lead to a particular result, but this set of possible inputs would grow rapidly as you work your way back through the algorithm, making it nigh impossible to work out the original message, even if you have some idea what it's supposed to look like. Of course this…
> Of course you could work backwards to find out which inputs could lead to a particular result AKA rainbow tables, which explains why it is important not to use just a single word from the dictionary as a password. https://en.wikipedia.org/wiki/Rainbow_table
Re: How Hash Algorithms Work (2007)
#17>The word 'cat' will hash to something that no other word hashes too, but it will always hash to the same thing. Don't hashing functions have collisions?
> Don't hashing functions have collisions? They do. The text is somewhat misleading and not properly explaining that. All hash functions have collisions. But from a cryptographically secure hash function we expect that nobody is able to find such a collision. They exist, but the computational power to find one is not available to humans.
> Also, it should be computationally infeasible to find any other word which also hashes to '...'
Re: How Hash Algorithms Work (2007)
#18Re: How Hash Algorithms Work (2007)
#19>The word 'cat' will hash to something that no other word hashes too, but it will always hash to the same thing. Don't hashing functions have collisions?
> Don't hashing functions have collisions? They do. The text is somewhat misleading and not properly explaining that. All hash functions have collisions. But from a cryptographically secure hash function we expect that nobody is able to find such a collision. They exist, but the computational power to find one is not available to humans.
This is wrong. There is something called a perfect hash function:
https://en.wikipedia.org/wiki/Perfect_hash_function
>a perfect hash function for a set S is a hash function that maps distinct elements in S to a set of integers, with no collisions. In mathematical terms, it is a total injective function.
They are very handy for hash tables with constant worst-case lookup time.
Re: How Hash Algorithms Work (2007)
#20The title probably should be 'Cryptographic Hash Algorithms'. The definitions from the post are approximately true for cryptographic hashes but not really for hash functions in general.