3.6 C
United States of America
Wednesday, January 22, 2025

The Easy Math Behind Public Key Cryptography


The unique model of this story appeared in Quanta Journal.

For 1000’s of years, for those who needed to ship a secret message, there was principally one option to do it. You’d scramble the message utilizing a particular rule, recognized solely to you and your meant viewers. This rule acted like the important thing to a lock. When you had the important thing, you would unscramble the message; in any other case, you’d want to choose the lock. Some locks are so efficient they’ll by no means be picked, even with infinite time and sources. However even these schemes undergo from the identical Achilles’ heel that plagues all such encryption techniques: How do you get that key into the correct arms whereas maintaining it out of the unsuitable ones?

The counterintuitive resolution, often known as public key cryptography, depends not on maintaining a key secret however reasonably on making it extensively out there. The trick is to additionally use a second key that you just by no means share with anybody, even the individual you’re speaking with. It’s solely by utilizing this mix of two keys—one public, one personal—that somebody can each scramble and unscramble a message.

To know how this works, it’s simpler to think about the “keys” not as objects that match right into a lock, however as two complementary components in an invisible ink. The primary ingredient makes messages disappear, and the second makes them reappear. If a spy named Boris desires to ship his counterpart Natasha a secret message, he writes a message after which makes use of the primary ingredient to render it invisible on the web page. (That is straightforward for him to do: Natasha has printed a simple and well-known formulation for disappearing ink.) When Natasha receives the paper within the mail, she applies the second ingredient that makes Boris’ message reappear.

On this scheme, anybody could make messages invisible, however solely Natasha could make them seen once more. And since she by no means shares the formulation for the second ingredient with anybody—not even Boris—she may be certain the message hasn’t been deciphered alongside the way in which. When Boris desires to obtain secret messages, he merely adopts the identical process: He publishes a simple recipe for making messages disappear (that Natasha or anybody else can use), whereas maintaining one other one only for himself that makes them reappear.

In public key cryptography, the “public” and “personal” keys work similar to the primary and second components on this particular invisible ink: One encrypts messages, the opposite decrypts them. However as a substitute of utilizing chemical compounds, public key cryptography makes use of mathematical puzzles referred to as trapdoor features. These features are straightforward to compute in a single course and very tough to reverse. However additionally they include “trapdoors,” items of knowledge that, if recognized, make the features trivially straightforward to compute in each instructions.

One frequent trapdoor perform entails multiplying two giant prime numbers, a simple operation to carry out. However reversing it—that’s, beginning with the product and discovering every prime issue—is computationally impractical. To make a public key, begin with two giant prime numbers. These are your trapdoors. Multiply the 2 numbers collectively, then carry out some extra mathematical operations. This public key can now encrypt messages. To decrypt them, you’ll want the corresponding personal key, which accommodates the prime elements—the required trapdoors. With these numbers, it’s straightforward to decrypt the message. Maintain these two prime elements secret, and the message will keep secret.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles