Public-key cryptography [00IE]
There is a different idea known as a public-key cryptosystem which does not have these drawbacks. We’ll start by outlining the general properties of such a system.
- Everyone who wants to communicate picks their own personal pair of keys: a private key and a public key.
- The private key should be kept absolutely, 100% secret.
- The public key should be published as widely as possible. You should put your public key on your website, in a public directory of public keys (like a phone book), and so on.
- In order to send a message, the sender looks up the public key of the recipient and uses it to encode the message.
- The recipient decodes the message using their private key.
In order for this to make sense the system should have a few properties:
- A public and private key work together so that messages encrypted using a public key can only be decrypted using the corresponding private key.
- It should be impossible to figure out someone's corresponding private key if you only know their public key.
It is not at all obvious that such a scheme is even possible! But it is possible using some clever mathematics.