- Published on
The Secrets and Keys of Classical Cryptography
- Authors
- Name
- Rosa Tiara
What is classical cryptography?
Before we start, we need to understand what cryptography is. Cryptography is a technique or process that we use to make our information or data unrecognizable. So basically, it's a process of turning something readable into something that only the right person can understand.
The term classical in classical cryptography refers to the earliest methods of encryption that were used before computers existed. These techniques were done by hand, and they mostly worked by rearranging or substituting characters in a message.
We already have computers now, why do we still study it?
Because classical cryptography is the basis for understanding modern cryptography. The core ideas of modern cryptography are still very much alive in the systems we use now.
Note: This blog will focus on classical cryptography and will not discuss about modern cryptography.
Two Big Concepts
There are 2 main concepts that we need to know in cryptography:
- Cryptosystem -> it's a process of making our information understandable to non-understandable.
- Cryptanalysis -> it's the process of making the non-understandable information to understandable.
In cryptography, there are also 2 kinds of message:
- plain text = the real text.
- cipher text = the ciphered version of the plaintext
Encryption vs Decryption
Now that we know the two types of messages, let's talk about how we actually go from one to the other.
- Encryption is the process of converting plain text into cipher text. This is where we make our message or information private by locking the message.
- Decryption is the opposite, which is the process of converting cipher text back into plain text, basically unlocking the message.
So the flow looks like:
Secret Key
To perform encryption or decryption, we need something called a secret key.
A secret key is a piece of information, like a string of characters or a number, that is used to carry out the encryption or decryption process. Without the right key, you cannot decrypt a message properly, even if you already know the algorithm being used
Symmetric vs Asymmetric Key
There are two ways to handle secret keys, and this is where things split into two categories.
Symmetric Key
In a symmetric key system, the same key is used for both encryption and decryption. Both the sender and the receiver need to have that same key and keep it secret between them.
This approach is fast and simple. The problem is getting the key to the other person safely in the first place. This is known as the key-sharing problem, or the key distribution problem.
If you want to send someone an encrypted message, you both need the same key. But to send that key securely, you would need to encrypt it first. And to encrypt it, you would need another key. It just keeps going in circles, and if someone intercepts the key during the handoff, they can decrypt everything! o_O
Asymmetric Key
In an asymmetric key system, there are two different keys: a public key and a private key.
- The public key is used for encryption and can be shared with anyone.
- The private key is used for decryption and should only be known by you.
So anyone can encrypt a message to you using your public key, but only you can decrypt it using your private key. This is what solves the key-sharing problem that symmetric key systems run into, though asymmetric encryption tends to be slower by comparison.
Wrapping up!
So, that's the foundation of classical cryptography! We have plain text and cipher text, encryption and decryption to move between them, and a secret key that makes all of it work. Whether that key is shared between two people (symmetric) or split into a public and private pair (asymmetric), the core idea of cryptography is to protect the information and control who can read it.
Interesting, right?
This is just the beginning though. Classical cryptography covers a bunch of specific ciphers and techniques built on top of these concepts, and things get a lot more interesting from here. I'll see you on the next blog!
Happy learning! 🎉
