This article was first published on Chainlink
As part of the Chainlink Virtual Hackathon, developers Kyle Santiago, Thomas Potter, William Santiago, and Thomas Greco used Chainlink VRF to create secure one-time pad encryption keys. Using blockchain RNG to secure message encryption is an exciting use case as encryption relies on random number generation as a core mathematical and security assumption. In this post, Kyle Santiago explain how their team generated verifiably random encryption keys on-chain using Chainlink VRF.
Before the advent of asymmetric cryptography, which enables blockchain technology, there was no real way to trustlessly send messages over insecure channels. The way most encryption algorithms worked before this innovation was by using symmetric cryptography. One significant encryption method using symmetric cryptography is the One-Time Pad (OTP).
One-Time Pads are unbreakable ciphers where a random key, which is at least the same length of the message, is used to encrypt a message. As the name suggests, the key is used only once to ensure that it remains uncrackable.
How to Encrypt Plaintext Messages
Encrypting a plaintext message is straightforward. First, we convert the letters of the original message into numbers. Then we generate a random key to add to the original message, creating a new and encrypted version of the original plaintext message. Only the people who know the key can decrypt the message.
For example, to encrypt the message “hello there”, the message needs to be converted to its number equivalent of the 26 letter alphabet and split up into pairs. In this case, that message would become “08 05 12 12 15 20 08 05 18 05”. Then we generate a random number key of at least the same length as the message to add to the original message. Let’s say we generate a key that is “07 15 12 09 01 ...
To keep reading, please go to the original article at: