Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

The Simple Math Behind Public Keys


The original version about This article appeared inside Quanta Magazine.

For thousands of years, if you wanted to send a secret message, there was one way to do it. You can block the message using a special command, known only to you and the people you want. This command acted as a key to a lock. If you have the key, you can unlock the message; otherwise, you must choose a lock. Other locks they are so useful that they cannot be chosen, even with unlimited time and resources. But even those tactics suffer from the Achilles’ heel that plagues all encryption systems: How do you get the keys into the right hands while keeping them out of the wrong ones?

The counterintuitive solution, called public key cryptographyit does not depend on keeping a great secret but on being available everywhere. The trick is to use a second key that you don’t share with anyone, not even the person you’re talking to. By using a combination of two keys – one public, one private – one can decrypt and decrypt a message.

To understand how this works, it’s easy to think of “keys” not as things that fit into a lock, but as two ingredients in invisible ink. The first makes messages disappear, and the second makes them reappear. If a spy named Boris wants to send a secret message to his friend Natasha, he writes a message and then uses the first element to hide himself from the page. (This is easy for him to do: Natasha has printed a simple and well-known process of missing ink.) When Natasha receives a piece of paper in the mail, she uses a second element that causes Boris’s message to come back.

In this scheme, anyone can make invisible messages, but only Natasha can make them visible. And because he doesn’t share the second option with anyone – not even Boris – he can be sure that the message is not clear. When Boris wants to receive private messages, he takes the same approach: He prints out a simple way to make messages disappear (which Natasha or anyone else can use), and saves them for someone else to come back to.

In public encryption, the “public” and “private” keys act as the first and second keys in this private key: One stores messages, the other encrypts them. But instead of using chemicals, key cryptography uses so-called math trapdoor operations. These functions are easy to calculate in one direction and very difficult to change. But it also has “trapdoors,” information that, if known, makes the process easier to calculate on both sides.

One well-known trapdoor operation involves multiplying two large numbers, an easy task to perform. But to change it—that is, to start with the thing and find something more important—is impossible. To create a public key, start with two large numbers. These are your doors. Multiply the two numbers together, then do the addition math tasks. This common key can now encrypt messages. To unlock them, you need a corresponding secret key, which contains the most important things – the necessary doors. With those numbers, it is easy to decrypt the message. Keep these two things private, and the message will remain private.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *