how does decryption differ from reversing a hash algorithm?

198 views

I am struggling to understand how one is fast enough to underly the entire internet and how the other is so slow as to be functionally impossible.

As an expansion, since the public key is known, how then is the encrypted message irreversible?

In: 4

8 Answers

Anonymous 0 Comments

A hash is a one way operation. Information is lost when you hash data. Even if you hashed a 256 bit number into a 256 bit hash, it is still a one way function. The sha256 hash algorithm is irreversible. It’s a trap door function.

In simple terms encryption is asymmetrical which means the private key and public key are different. A symmetrical schema is like if you password protect a zip file, you use the same password to decrypt it. Obviously this wouldn’t work in the real world of secure communication because how do you safely send the password to the intended recipient without it being intercepted?

To understand the basic functionality imagine the work it would require to figure out the product of the following:

2x9x11x1249x4259x6317

The answer is 6,653,438,480,106

Super easy, you can do it with a pen and paper.

Now imagine how hard it would be to take the final number (6,653,438,480,106) and determine the numbers that were multiplied to achieve it (2,9,11,1249,4259,6317).

There are so many possible ways to factor different numbers to arrive at 6,653,438,480,106 that it is currently computationally impossible.

2,9,11,1249,4259,6317 is your private key

6,653,438,480,106 is your public key

This is a crude example and not exactly how asymmetric encryption works but it demonstrates why it’s easy to multiply and verify a key, but practically impossible to factorize to find the original key.

Modern encryption uses elliptic curves as a method to generate public keys from private keys but that’s beyond the scope of this post.

As a side note a 256 bit number can be represented by a 16×16 grid. Each box in that grid is a bit. When drawn out it looks so simple and small and yet the possible combinations of filled and empty boxes in that grid is a number higher than the number of atoms in the universe. That’s mind boggling!

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