In Review: Using Public Key Cryptography
Let’s review. Public key cryptography lets you encrypt and send messages safely to anyone whose public key you know.
If others know your public key:
- They can send you secret messages that only you can decode using your matching private key and,
- You can sign your messages with your private key so that the recipients know the messages could only have come from you.
And if you know someone else’s public key:
- You can decode a message signed by them and know that it only came from them.
It should be clear by now that public key cryptography becomes more useful when more people know your public key. The public key is shareable, in that it’s a file that you can treat like an address in a phone book: it’s public, people know to find you there, you can share it widely, and people know to encrypt messages to you there. You can share your public key with anyone who wants to communicate with you; it doesn’t matter who sees it.
The public key comes paired with a file called a private key. You can think of the private key like an actual key that you have to protect and keep safe. Your private key is used to encrypt and decrypt messages.