A for ’asymmetric encryption’ – Qadre glossary series
Asymmetric encryption, also called public-key infrastructure is one of the cornerstones of blockchain technology. It is based on conventional cryptographic methods – applied to modern computing. Therefore, in order to understand blockchain, we need to first understand cryptography and specifically asymmetric encryption.
What is cryptography?
Cryptography is the study and practice of secure communication, concealing messages from third parties with logical and mathematical functions. It has been in use ever since 1900 BC in Ancient Egypt through to the Enigma – an encryption device used for military communication in World War II – up to today.
During encryption, a piece of secret information is converted into a cypher – seemingly unreadable coded text. To reveal the original message the code needs to be decrypted with the cypher key.
Modern technology enabled us to make increasingly complex cyphers, and also enhanced cryptanalysis – the science of breaking the encryption. With computers, we can encrypt not only language texts but any kind of digital information.
Many algorithms are designed around computational hardness assumptions – the hypothesis that a particular problem cannot be solved efficiently. Meaning that it is theoretically possible to break the decrypted information by brute force attack, i.e. guessing the correct key until you get it right. However, running all the possible solutions to decrypt the message is infeasible by our current means -it takes too much time and computational power.
Symmetric cryptography is a ‘simple’ form of cryptography which uses a single key to encrypt and decrypt data. This means that the same key is used both to encrypt and decrypt the information.
Blockchain technology applies asymmetric encryption, also known as public key cryptography. It has been first proposed by Whitfield Diffie and Martin Hellman, two researchers at Stanford University in their 1976 paper, “New Directions in Cryptography.” Opening with the prediction that “We stand today on the brink of a revolution in cryptography”, they introduced the ideas of public-key cryptography and digital signatures, which are the foundation for most security protocols online today.
Asymmetric encryption algorithms use a mathematically-related key pair for encryption and decryption; one is the public key and the other is the private key. If the public key is used for encryption of the data it would be only possible to decrypt it with the private key and vice versa. At the same time, it is impossible to efficiently derive a private key from a public key. The private key is kept by the owner who generated the key pair, while the public key can be safely distributed.
The easiest way to think about it is imagining asymmetric encryption as a postbox: while everyone can see the postbox and insert messages, only the owner would be able to unlock it and use what is inside.
If you would like to dive in the mathematical process more see this article here.
How it works:
Alice decides to send an encrypted message to Bob. Alice encrypts the message with Bob’s public key and sends him the data. When Bob receives the data, he will decrypt it with his private key, and get the original information from Alice.
We can produce digital signatures with the help of asymmetric encryption.
This is done by combining a user’s private key with the data they wish to sign, through a mathematical algorithm. The origin and integrity of the data can be verified by using the public key. If the encrypted data was tampered with in any manner the public key would not be able to unlock it anymore. Through this process, we can guarantee that any data being recorded is true, accurate and tamper-free.
Digital signatures do not only ensure the integrity of the data, but they tie it to the specific user who signs the information. The identity of the sender cannot be replicated by malicious parties because only the sender has access to the private key.
If you encrypt (“lock”) something with your private key, anyone can decrypt it (“unlock”), but this serves as a proof you encrypted it: it’s “digitally signed” by you.
— Panayotis Vryonis- Solutions Architect
Use of asymmetric cryptography in blockchain
Asymmetric encryption in blockchain technology creates the keypairs used to manage accounts, while other types of encryption (such as cryptographic hashing) are used to ensure message integrity. Digital signatures can be used to sign transactions, smart contracts, grant permissions or create multi-signature wallets.
For many decades various people from across the world have been working on the principles of blockchain technology. There have been multiple attempts to solve the complex issues surrounding cryptography, by arguably some of the most brilliant minds in this space. While both asymmetric cryptography and digital signatures have been popular since their invention, their true power came to light with blockchain as a reliable, safe and highly-functional data recording method.