Public Key vs Private Key

Although Public Keys and Private Keys are both referred to as keys, it helps to think of them a bit differently. Try to think of a Public Key as being like a padlock, and a Private Key as being like a key that unlocks the padlock.

An Example: Sending a Secret Message in a Box

Let's use an example to see how this works. Imagine that you want your friend to send you a secret message in a box. You could give your friend a box and a padlock, but only you would have the key that unlocks the padlock.

Your friend could put their message in the box, lock the padlock, and then send you the locked box in the mail. When you receive it, you would use your key to unlock the box.

This is similar to how a Public Key and a Private Key work. Like the padlock, you can freely give out your Public Key. This will make it easy for anyone to securely encrypt, or lock, a message that they want to send to you.

On the other hand, a Private Key is like the key that allows you to decrypt, or unlock, the padlock. Because the Private Key is used to decrypt secure messages, you will want to keep your Private Key safe.