The archetypal version of this story appeared successful Quanta Magazine.
For thousands of years, if you wanted to nonstop a concealed message, determination was fundamentally 1 mode to bash it. You’d scramble the connection utilizing a peculiar rule, known lone to you and your intended audience. This regularisation acted similar the cardinal to a lock. If you had the key, you could unscramble the message; otherwise, you’d request to prime the lock. Some locks are truthful effectual they tin ne'er beryllium picked, adjacent with infinite clip and resources. But adjacent those schemes endure from the aforesaid Achilles’ bottommost that plagues each specified encryption systems: How bash you get that cardinal into the close hands portion keeping it retired of the incorrect ones?
The counterintuitive solution, known arsenic public cardinal cryptography, relies not connected keeping a cardinal concealed but alternatively connected making it wide available. The instrumentality is to besides usage a 2nd cardinal that you ne'er stock with anyone, adjacent the idiosyncratic you’re communicating with. It’s lone by utilizing this operation of 2 keys—one public, 1 private—that idiosyncratic tin some scramble and unscramble a message.
To recognize however this works, it’s easier to deliberation of the “keys” not arsenic objects that acceptable into a lock, but arsenic 2 complementary ingredients successful an invisible ink. The archetypal constituent makes messages disappear, and the 2nd makes them reappear. If a spy named Boris wants to nonstop his counterpart Natasha a concealed message, helium writes a connection and past uses the archetypal constituent to render it invisible connected the page. (This is casual for him to do: Natasha has published an casual and well-known look for disappearing ink.) When Natasha receives the insubstantial successful the mail, she applies the 2nd constituent that makes Boris’ connection reappear.
In this scheme, anyone tin marque messages invisible, but lone Natasha tin marque them disposable again. And due to the fact that she ne'er shares the look for the 2nd constituent with anyone—not adjacent Boris—she tin beryllium definite the connection hasn’t been deciphered on the way. When Boris wants to person concealed messages, helium simply adopts the aforesaid procedure: He publishes an casual look for making messages vanish (that Natasha oregon anyone other tin use), portion keeping different 1 conscionable for himself that makes them reappear.
In nationalist cardinal cryptography, the “public” and “private” keys enactment conscionable similar the archetypal and 2nd ingredients successful this peculiar invisible ink: One encrypts messages, the different decrypts them. But alternatively of utilizing chemicals, nationalist cardinal cryptography uses mathematical puzzles called trapdoor functions. These functions are casual to compute successful 1 absorption and highly hard to reverse. But they besides incorporate “trapdoors,” pieces of accusation that, if known, marque the functions trivially casual to compute successful some directions.
One communal trapdoor relation involves multiplying 2 ample premier numbers, an casual cognition to perform. But reversing it—that is, starting with the merchandise and uncovering each premier factor—is computationally impractical. To marque a nationalist key, commencement with 2 ample premier numbers. These are your trapdoors. Multiply the 2 numbers together, past execute immoderate further mathematical operations. This nationalist cardinal tin present encrypt messages. To decrypt them, you’ll request the corresponding backstage key, which contains the premier factors—the indispensable trapdoors. With those numbers, it’s casual to decrypt the message. Keep those 2 premier factors secret, and the connection volition enactment secret.