In encryption, how is it you can decrypt with a private key what was encrypted with a public key, or decrypt with a public key what was encrypted with a private key, but not private-to-private or public-to-public?

777 views

I am having a complete mental block understanding decryption with public and private keys. In my head, I am (apparently) falsely equating decryption to using a *Little Orphan Annie* decoder ring like in the movie *A Christmas Story*.

If a block of data was encrypted with a key, I can’t understand how a another key that is completely different is able to decrypt that data. I know there’s a fair bit of complex math involved, but if you multiple X by Y to get Z, then the only way to get X back from Z is to divide by Y.

* data->public key->encrypted->private key->data
* data->private key->encrypted->public key->data
* data->public key->encrypted->public key->error
* data->private key->encrypted->private key->error

In: 2

11 Answers

Anonymous 0 Comments

The decoder ring example is symmetric; “A” => “G” and “G” => “A”.

Those sorts of systems can be attacked, particularly through chosen plain-text attacks, so they are not very secure. Modern systems use a more complex mathematics. You can think of the Public and Private keys as large numbers, and the encryption as a complex mathematical operation. The private key is the “inverse” of the public key, and the math is chosen so that finding the inverse if you have only the public key is very hard.

A not very secure encryption could be multiplication. You multiple the message times the public key to get the encrypted message. Then you multiply the message times the private key to get the message back. This isn’t secure because finding the public key by computing 1/public_key isn’t hard enough. They use more more complex in order to get this inversion process to be very hard.

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