‘Cryptography’ is the ability to hide messages from intermediate persons and ensure effective and secure communication between different parties. ‘Cryptography’s’ origins can be traced back to 2000 B.C. Egypt (when hieroglyphics were used) and to the time of Julius Caesar where alphabets were shifted to encrypt a message. We also see various instances of cryptography in movies such as ‘The Da Vinci code’, ‘The Imitation game’, ‘Pi’, ‘Enigma’ among others.
We will see the two different types of encryption – symmetric and asymmetric algorithms and primarily focus our discussion on the symmetric algorithm.
Introduction:
The key terms that are associated with cryptographic systems are
- Plain text
- Cipher text
- Algorithm
- Key
- Encryption
“Encryption” is converting “plain text” (or text that is ordinarily read by everybody) into “cipher text”. “Cipher text” is text that is not readable by humans or machines. Reconverting the “cipher text” into “plaintext” is “decryption”. The entire process of encryption and decryption is possible due to the “algorithm” and the “key”.
The “algorithm” is a set of rules which are complex mathematical formulae that enable encryption and decryption. Popular cryptographic algorithms include DES (Data encryption standard), AES (Advanced encryption standard) and MD5.
The “key” is a value that consists of random bits which is used for encryption and decryption. The longer the key, the more difficult it will be for the attacker to guess the message.
Types of cryptography:
In asymmetric cryptography there are two keys – one is a public key and one is a private key to encrypt and decrypt.
Symmetric cryptography on the other hand is when both the sender and receiver use two instances of the same “key” (also known as “secret keys”) to encrypt and decrypt messages. In traditional parlance, if Bob and Alice were to communicate then, they need two instances of the same key.
There are two types of symmetric ciphers – substitution ciphers and transposition ciphers.
- Substitution ciphers:
In substitution ciphers, the alphabets in the plain text are replaced by shifting the alphabets ‘n’ number of places. For example, in the Caesar cipher, if this algorithm were followed,
ABCDEFGHIJKLMNOPQRSTUVWXYZ being replaced by:
CDEFGHIJKLMNOPQRSTUVWXYZAB
Plaintext: WHIZLABS will be replaced by
Cipher text: YKLBNCDU
In the above algorithm, the alphabets are shifted by ‘2’ places. The key is the number of places the alphabets are shifted (which is ‘2’ here)
This is the simplest implementation of the substitution cipher.
2. Transposition ciphers
In the transposition cipher, the letters are re-arranged in a way to mask the original message. The ‘rail fence cipher’ is a simple example of the transposition cipher, where the alphabets are written diagonally and read off horizontally. ‘JAVA PROGRAMMING’ is written diagonally,
J P R I
A R A N
V O M G
A G M X
This can be written horizontally in cipher text as:
JPRI ARAN VOMG AGMX
We have seen simple illustrations of the substitution cipher and the transposition cipher.
Advantages and Disadvantages of the symmetric algorithm:
The advantages of symmetric algorithms include speed and with a larger key size – harder to crack algorithm. However, there are traditional problems associated with symmetric ciphers are:
- Key distribution problem : The “key” is the crucial part of the symmetric algorithm, but distributing the key through secure channels is a challenge. The key cannot be emailed or couriered as each of them is susceptible to snooping.
- Symmetric ciphers only ensure confidentiality but not authentication and non-repudiation.
Confidentiality or ensuring that the message is seen only by the required person is possible by symmetric ciphers. Non-repudiation (or a sender retracting that they not sent the message) is not guaranteed by symmetric ciphers.
We have seen the exciting concept of cryptography and have discussed basic cryptographic algorithms. We will discuss another technical topic in the next post.
- Top 20 Questions To Prepare For Certified Kubernetes Administrator Exam - August 16, 2024
- 10 AWS Services to Master for the AWS Developer Associate Exam - August 14, 2024
- Exam Tips for AWS Machine Learning Specialty Certification - August 7, 2024
- Best 15+ AWS Developer Associate hands-on labs in 2024 - July 24, 2024
- Containers vs Virtual Machines: Differences You Should Know - June 24, 2024
- Databricks Launched World’s Most Capable Large Language Model (LLM) - April 26, 2024
- What are the storage options available in Microsoft Azure? - March 14, 2024
- User’s Guide to Getting Started with Google Kubernetes Engine - March 1, 2024
Hey, great artice about monitising your website. Nothing is really free thought right?