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
You have a treasure chest with three locks on. It is designed in such a way that you only need to to unlock two of the locks to open the chest. One of the two unlocked has to be the middle (number two) lock though.
You have the only key to lock number one. This is your private key. No one else gets to see its shape or touch it. Even I don’t know what it looks like.
The key for the middle lock, lock two, is available to anyone. This is the public key. Hell, you can leave it in the lock for all to see. People can only open one lock with it, it doesn’t help them.
I have the only key to lock three. This is my private key. No one else gets to see or touch it. You don’t know what it looks like.
You are therefore able to unlock two locks (1 & 2), place a message or treasure inside, lock the two locks again and safely send the box to me, knowing I am the only other person who can unlock two locks (2 & 3) and access the contents. I can of course be certain I can do the same and safely send it back to you.
Also:
All three keys are cut from the same piece of metal so their shapes are bound together, as are the locks. From the public key you can determine the shape of only one side of the private keys, so you cannot copy them.
The keys were all made by the same locksmiths (key registry). They made a note in their logbook of the unique shape of the original piece of metal they cut them from, and the shape they cut out (from your key request) . They have to keep this logbook extremely safe, otherwise someone could reverse engineer the keys and break into your box. If this ever happens, your locks would be flagged as compromised and no longer safe and you would have to throw the pair of locks & keys away and start again.
Latest Answers