Without a central authority within a network, trust on the blockchain is established through consensus and cryptography. Cryptography is used to shift the burden of trust from intermediaries to cryptographic algorithms.
Components of cryptography include:
- Message or Payload (also called plaintext): The actual data or payload within the message that the sender and/or receiver wish to keep secret
- Secret Key: Data used for encrypting and decrypting the message. In DLT, reference is often made to public and private keys
- Cipher (also called ciphertext): The output of the encryption function, which is the encrypted version of the message that is sent between the sender and receiver.
- Encryption/Decryption Algorithm: Algorithm pair used to convert between the plaintext message and ciphertext message
In general, cryptography is often used to encode or encrypt data so that intermediaries or outside actors cannot decipher a message. It enables a confidential two-way exchange, where each party can encrypt or decrypt the cipher to access the message payload. With blockchain, cryptography is also used to validate data integrity.
The cryptographic algorithm uses the message and the key to create the encrypted version of the message called the cipher. The cipher can be exchanged by the sender and receiver. A key is then used to decrypt the cipher back into the original message.
Types of Cryptography in Blockchain
Blockchain uses a number of different types of cryptography to validate data integrity: