Private and Public Key
There are two important items that every wallet has: a private key and a public key.
A public key is like your username that everyone can see; it is a way to identify you. It is important to note that a public key is unique, only you will have your username.
A private key is like the password to your account or wallet. Your private key should never be given out to anyone, as it is a way to verify that you are the owner of the wallet.
The combination of your public and private key provides a way to sign a transaction, verifying that you are the one who has initiated the request. This is similar to signing your initials on a document (but more secure).
Your private key has only one accompanying public key, like a wooden door only being able to be unlocked with one key. In a way, the private keys are what uniquely identifies you, like your DNA, and public keys communicate about what makes you unique, like your visible physical traits.
Let’s say Alice wants to send a message to Bob on the blockchain. Here is how that would work:
- Alice uses Bob’s public key to encrypt, or hide, the information in the message.
- The transaction is then signed by using Alice’s private key, proving that the transaction has not been tampered with.
- The transaction is then sent to Bob. He can use his private key to decrypt, or reveal, the contents of the message.