Pulsars
0 %
Log inSign up

The concept of public-key cryptography

The problem of key exchange

All the encryption methods discussed so far are symmetric: the same key is used for both encryption and decryption. They therefore share a common flaw, and it is a serious one.

The problem

To communicate in secret, two people must first share a key. But how do they transmit it? If they already had a secure channel, they would simply send the message through it directly.

This vicious circle has long necessitated face-to-face meetings, diplomatic pouches and code books.

The scalability problem

It gets worse. With n people all wanting to communicate in pairs, you need:

n × (n - 1) / 2  clés

For 1,000 people, that amounts to 499,500 keys to create, distribute and protect. For the global web, that’s absurd.

The mind-blowing idea

In 1976, Diffie and Hellman asked a question that no one had dared to ask: what if the two keys were different?

Everyone has a pair:

  • a public key, which they distribute widely — on their website, in a directory;
  • a private key, which they never show to anyone.

Anything encrypted with the public key can only be decrypted with the corresponding private key.

Why this changes everything

Anyone can write to you in secret without ever having met you: they take your public key, encrypt the message, and only you can read it. No prior arrangement is needed, and no secure channel needs to be established.

And the number of keys becomes linear: n people, n pairs. Not 499,500.

It is this idea that makes the padlock in your browser possible: your computer has never met your bank’s server, and yet they establish a secret in a matter of milliseconds.