Blockchain 101

Public-Key Cryptography

Public and Private Keys

Communication between nodes is a key part of decentralized networks. Nodes used a method known as asymmetric encryption in order to ensure secure communication between nodes. The public and private keys are absolutely essential for the encryption and decryption of messages. Public keys can be dispersed widely, whereas private keys are only known to the owner.

In this type of cryptographic system, public keys can be used by anyone to encrypt or verify a message for a particular receiver; they function as addresses. Private keys are used to decrypt or sign a message; only the private key of the receiver can decrypt that message.

For asymmetric encryption to work, the user must be able to securely generate and store a private key that acts as a password. From this private key, a public key is also generated. Security relies upon the private key staying private, while the public key can be published without compromising the security of the private key. This is often accomplished through hashing, which we’ll explore later.

Asymmetric encryption

Asymmetric encryption is a cryptographic system that uses both public keys and private keys.

  • Public-key encryption is when a message is encrypted with a recipient’s public key. The message can only be decrypted with the corresponding private key. The public-key encryption system attempts to provide confidentiality while providing an avenue to communicate.
  • A digital signature is a message or transaction signed with the sender’s private key, and it can be verified by anyone who has access to the sender’s public key. This process verifies that the sender has access to the needed corresponding private key, and is therefore likely to be associated with the public key as well. This encryption ensures that the message is unchanged between the sender and the receiver.