Why can’t sha256 be reversed easily?

1.03K viewsMathematicsOther

Can’t the steps be reversed one by one to get back the original?

In: Mathematics

25 Answers

Anonymous 0 Comments

There is one very obvious way to answer your question.

You can take the sha256 of any size of data. That means you can take the sha256 of a huge video file that’s many gigabytes. The result is a hash that is only a few hundred bits.

It should be obvious that you can’t take a few hundred bits of data and somehow “reverse” it into a file that’s many gigabytes in size. This is because any general-purpose hash algorithm that takes arbitrary input *must* lose information along the way.

Many mathematical operations lose information. For example, the remainder function (called “modulus” by us nerds). If I asked you, “I divided a number by 7 and the remainder is 3, what was the original number?” Could you answer? You might get lucky, but there are infinite possible numbers I might have used. Even knowing the answer and knowing exactly what mathematical operation I performed, you can’t reverse it and get the original number.

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