how is hashing a one way process (not reversible)?

297 views

how is hashing a one way process (not reversible)?

In: 8

5 Answers

Anonymous 0 Comments

It generally consists of a modulo(remainder) operator which reduces the information to a different space. Collisions also exist because of the same reason.

Anonymous 0 Comments

You can think of it like a shadow of a object. If you only see the shadow you cannot have the original object, but if you have the original object you always can create the exact shadow.

This is the reason you just save the shadow of a password in the database and compare the shadows.

Anonymous 0 Comments

Some of the math steps are non-reversible because of how processes like the XOR works. XOR takes 2 binary values (1 or 0) and compares them. If they are both 1 or both 0, the result is 0. If only a single one is a 1, then it results in a 1. There is no way to determine if input a or input b was 1 for a result of 1 or if both inputs were a 1 or a 0 based on the output 0. So you can’t reconstruct the input from the output.

Also, there are more possible inputs than outputs. A hash produces a set sized output no matter how much data you feed into it. So even if you try to brute force the original data by hashing a bunch of things until you get a matching hash value, there is no way to know if what you fed into the hash algorithm is what was fed into it originally. This is called a hash collision by the way.

Anonymous 0 Comments

I started to type out an explanation and stumbled across this.

https://auth0.com/blog/adding-salt-to-hashing-a-better-way-to-store-passwords/

Anonymous 0 Comments

Let’s say I’m thinking of some whole number, then I run it through a function that just takes the last digit of the function. The result is 7. What number was I thinking of? Was it 17? 27? 10,573,487?

This is an example of a “one-way” function. It’s easy to figure out the answer to the input, but impossible to know what the input was based purely on the output even though you know exactly what the function does.