If we know the algorithm used for current day password hashing, how can we not just undo it to get the password?

1.30K views

I have read that SHA-2 is currently unbroken due to the amount of resources and time it would take to crack the hashing, but if we have the step by step algorithm, why can we not just do the steps backwards?

In: Technology

6 Answers

Anonymous 0 Comments

Because it is a one way function. This means that it is – at least – practically infeasible to invert it. Optimally it would be a function that doesn’t even have an inverse.

There is one operation called “modulo” where one basically divides a number x by y and receives the remainder.

So for example 7 mod 2 would be 1 because it is 3 with remainder 1.

This means I can have an infinite amount of numbers mapping to the same output, but you can’t reverse it.

If I give you 7 mod 2 you can easily see it’s 1.

But if I said “I received 1 when doing modulo 2” you can’t know it’s 7, it could as well be 9, 11 or literally any odd number there is.

So even though you know the “algorithm” to get from 7 to 1 by using modulo 2, you simply can’t reverse the process.

This is the main principle hashing functions use, thus you can’t just invert them.

You are viewing 1 out of 6 answers, click here to view all answers.