Cryptography Explained: How It Protects Our Digital World
A basic article on what's encryption and types of encryption methods
Actually I wrote this for a inter college competition conducted by Coders Forum (A coding community in my college), even before this competition I wanted to write and publish something. Like I will get random ideas to write and publish but I never did. Thanks to this competition, it pushed me to finally write my first article and publish on LinkedIn and Medium. I really wanted to write more after this but never did due to university and stuff. iykwim. Anyways now republishing it my blog section on my personal website with my very own domain. Yes, I bought it :)
Cryptography is a method of securing information and communicating through the use of codes. Simply put, it is the study of encrypting and decrypting information for secure transmission between two people. Encryption is the process of converting plain text to ciphered text. Decryption is vice versa, converting that ciphered text to plain text. We’ll see more about encryption later in this article. Without cryptography, there would be no secrets in this digital world. Your texts, emails, and bank records would be easily hackable.
History of cryptography📜
Cryptography has existed long before the computer era. Histiaeus, a Greek tyrant tattooed secret information onto a slave’s shaved head. Once hair grows back it remains hidden until the recipient shaves his/her head to reveal the information. Later in Rome, Julius Caesar used simple shifting of alphabets to send secret messages to military generals creating what’s known as Caesar cipher. If you want to know more about Caesar cipher and how it works, Check out my code.
What is a cryptographic key❓
A key is a group of random characters in a particular order. The cryptographic key is a String of characters used within an encryption algorithm to alter the plain text into a random string. It works exactly like a physical key which locks the data (encrypts) and it can be unlocked (decrypted) only with the right key. For example, the key in Caesar’s cipher is just a simple integer (shift value) whereas now the key is a long and random string.
What is encryption❓
Encryption is a process of altering the data into a ciphered text using an encryption algorithm so that only the authorized person can view it. It is a mathematical process. For example imagine you are sending a message saying “Hi, how are you?” to your friend, with the help of an encryption algorithm the message will be altered and decrypted at the receiver’s side.
“Hi, how are you?” -> “SJjagnr=aixl”
ie. message -> encrypted text
Types of Encryption
There are two types of encryption, symmetric and asymmetric.
Symmetric encryption
In symmetric encryption, there is only one key involved. The same key is used to encrypt and decrypt the data. It is fast and easy provided that the key stays secret. The strength of the key depends on the length and randomness in creating it. Symmetric algorithms can be in blocks(Encrypts data in block) or streams(Encrypts data one bit at a time). A popular algorithm is AES which stands for Advanced Encryption Standard which is a block cipher, here the key length is around 128–256 bits which is quite long.
Asymmetric Encryption
In asymmetric encryption, there are two keys involved namely public key and private key. The sender and receiver will have two keys each. If a sender wants to send something to the receiver, only the receiver can decrypt and view it and no one else can. The sender encrypts the data using the public key of the receiver, now it can be only decrypted with the private key of the receiver. But how the sender will get the public key of the receiver is pretty complex, before the data transmission the sender will get it through some other secure channel. The channel here has a broad meaning.
To name but a few real-world examples of what can be used to exchange keys:
- A trusted key server or repository, e.g. OpenPGP public key servers like sks-keyservers.net
- A file downloaded from a website that is trusted to belong to the person whose public key you wish to obtain, and the connection to this website is secure and properly authenticated (i.e. using HTTPS).
- The receiver sends the public key on the same channel as the one it intends to receive the message, but the key’s authenticity can be verified by a trusted external party such as a PKI (Public Key Infrastructure).
- A USB stick, disk, piece of paper, or some other type of media is handed over in person.
Some common encryption algorithms 💻
Commonly used symmetric encryption algorithms include:
- AES
- 3-DES
- SNOW
Commonly used asymmetric encryption algorithms include:
- RSA
- Elliptic curve cryptography
Conclusion
The field of encryption is vast. As the technology evolves, cryptography will also evolve to safeguard the digital world. With emerging fields like quantum computing, the future of cryptography will focus on even more robust algorithms to stay ahead of threats.
✍️ Article written by: Shabeshvaran S
📧 E-mail: shabeshvaran@gmail.com