In order to truly grasp the concept of digital signatures, we must first understand how encryption works.
Encryption is a key concept in cryptography.
In order to understand the process of how transactions are “signed“, which is required to be able to spend your bitcoins (and other cryptocurrencies), you need to be familiar with the concept of encryption and the role it plays.
Cryptocurrencies make use of encryption in a neat way, but in order to understand how it works, we must first learn about the conventional use of encryption.
In cryptography, encryption is a technique used to protect the privacy of a message by transforming it into a form that can ONLY be read by the intended recipient.Everyone else will see it as incoherent gobbledygook of random characters.
What is encryption?
Encryption is the process of transforming data like readable text (referred to as “plaintext”) using an algorithm (called a “cipher”) to make it unreadable to anyone except those possessing special knowledge, usually referred to as a “key”.
The result of the process is encrypted text (referred to as “ciphertext”).
In the most basic sense, encryption means using “fancy math” and a set of instructions followed by a computer (an “algorithm”) to disguise and protect data.
For example, if you’re sending a message and encrypting it, it is encoded in a format that can’t be read or understood by an eavesdropper.
These algorithms scramble plaintext data into an incomprehensible text known as ciphertext, which looks like gibberish without the use of a special key that decrypts it.
Here’s an example of ciphertext that looks like gibberish:
EjQbCXilQmoEssL0tP1395IKLEAwSEhptF6ogdoHGZ1LHgpeon7PFWcADod/ir78LKdc72r17ZzwGCpQbd5XU7Tha7ESBhWe6EzGjxthdGBL+tSsj343yFTp6PgBOcZO
(If you’ve ever had one too many drinks, you’ve probably typed something similar. 🤣)
This means once the data is encrypted using an algorithm, you can’t interpret it or guess the original content of the data from the ciphertext. This is how your message is kept secure from unintended, prying eyes.
So to summarize:
- Encryption is the process of converting plaintext to encrypted text. This encrypted text is incomprehensible text known as “ciphertext”. Since encrypted text can’t be read by anyone, encrypted text hides the original message from people who aren’t supposed to see it.
- Decryption is the process of converting encrypted text to plaintext. Basically, it is the reverse of encryption. It is used to decrypt the ciphertext so that only people who are supposed to access and read the message are the only ones who can.
How does encryption work?
In the illustration below, you can see how the data changes from plaintext to ciphertext and back to plaintext through the use of encryption and decryption “keys“.
The keys can either be identical (“symmetric”) or unique (“asymmetric”).
Which means there are two main types of encryption:
- Symmetric encryption: This type of encryption is reciprocal, meaning that the SAME key is used to encrypt and decrypt data.
- Asymmetric encryption: This type of encryption uses two SEPARATE keys for encryption and decryption: a private key and a public key.
Basically, if the sender and the recipient of the data use the SAME key to encrypt and decrypt the data, it’s called symmetric encryption.
And if the keys are DIFFERENT for encryption and decryption, then it’s asymmetric encryption.
In cryptography, a “key” is just a large number (big, long number with many digits) or string of numbers and letters.A key is used to convert the plaintext into ciphertext and vice versa (ciphertext into plaintext).
Cryptocurrencies only make use of asymmetric encryption, so I’m going to focus solely on asymmetric encryption going forward.