Encryption Explained: why do cryptocurrencies need it?
One of the earliest encryption devices in history is that used by the Greek Spartan military, called the scytale. The Spartans used scytales (pronounced “Sk-Italy”) between 900 BC and 192 BC to convey secret military messages.
A scytale is a transposition cipher made from a wooden staff and a thin strip of parchment or leather. Basically, the sender and recipient both have staffs the same length and diameter, wrap parchment around it, and write their message along the scytale. When unwound, the letters won’t make any sense until wrapped around the matching scytale.
Nowadays, encryption techniques have advanced drastically through the invention of computers. Cryptography is now a branch of mathematics, and there are two main categories – symmetric and asymmetric. Symmetric systems use the same secret key to encrypt and decrypt messages. Conversely, asymmetric systems use one to encrypt, and another to decrypt.
Cryptocurrencies use asymmetric systems where the encryption key is your public key, and the decryption key is your private key. So, what are some of the more common cryptocurrency encryption techniques used today?
Public key encryption and cryptocurrency
Addresses, Keys, and Wallets
Cryptographic proofs such as digital signatures and fingerprints are essential to cryptocurrencies, take Bitcoin for example. The ownership of bitcoin is established using digital addresses, keys, and wallets. Further, the use of public and private keys is how Bitcoin generates decentralised trust and validation.
Technically speaking, the mathematical relationship between the key pair allows the private key to generate “signatures”. These signatures validate the public key in a transaction without revealing the private key.
For a transaction to be included in the blockchain, a digital signature generated by a private key is needed. It is for this reason that it is imperative to keep one’s private key secure always! Ultimately, anyone who has the private key has access to the bitcoins stored in the corresponding wallet.
With public key cryptography, aka asymmetric cryptography, the private key is what generates a unique public key. This public key, or address, is what is used to receive coins, and the private key is used to send coins.
Addresses and Hashing
Cryptocurrency addresses are strings of numbers and letters that you share with someone who wants to send you coins. Address formats vary from coin to coin.
To use Bitcoin as an example again, a one-way hash function, or fingerprint, derives the address from the public key. In other words, it takes the private key string, which can be variable in length, and turns it into a binary code of fixed-length. This code is computationally infeasible to calculate in the other direction.
Hence, public key cryptography plays a considerable role in cryptocurrency encryption. It is through hashing that block mining is possible as it maintains the data structure in the blockchain.
“You can compare hashing to getting answers from politicians. Information you provide to them is clear and understandable, while the output they provide looks like a random stream of words.” Demir Selmanovic, Toptal.
Elliptic Curve Cryptography
Elliptic curve cryptography (ECC) is used by Bitcoin to generate a public key from a private key. Practically, ECC is irreversible - easy to calculate in one direction (multiplication) but computationally infeasible to calculate in the opposite direction (division).
As well as wide use in cryptocurrencies, ECC is used to secure HTTPS connections and data centres.
Additionally, Arjen Lenstra surmised that to break a 228-bit elliptic curve key requires the same amount of energy as needed to boil ALL the water on Earth!
Secure Hash Algorithm 256 (SHA-256) is a “one-way” cryptographic hash function based on ECC. Basically, it creates the 64-character (256-bit) fingerprint used to authenticate blockchain transactions.
To clarify, SHA-256 isn’t an encryption method per se, but more a way of identifying something based on encryption methods.
If you’re interested in what the hashes look like, have a play with this text to SHA256 generator.
In summary, asymmetric cryptography is one of the founding features of cryptocurrencies. Without it, cryptocurrencies wouldn’t function the way they do, let alone be nearly as secure. Ultimately, we have come a long way from winding a message on parchment around a wooden staff! As blockchain technology and the field of mathematics evolves, the potential encryption methods used in the future may very well be uncrackable.
Want to know more about blockchain technology?
Learn about the 5 Key Differences Between Hard and Soft Forks
Disclaimer: The above references an opinion and is for informational purposes only. It is not intended as personalised financial or investment advice. The opinions expressed by the author do not represent the opinion of BitPrime.
Last updated: 17/06/2018