Cryptography Basics


We hear the term ‘encryption’ many times in our daily lives. For example, we have read that whenever HTTPS is used, our information is encrypted before it is transmitted over the internet. We have also heard about disk encryption and phone encryption which is basically done to protect our personal information which is present in laptop hard disk or phone, and no one can access our information in case our device is lost. Now the point is, do we really know how encryption and decryption works? Let’s start with cryptography basics

Caesar Cipher – Encryption is not a new technique or something which came into existence in the last century. In fact, encryption has been extensively used for a very long time. When we date back to history, Caesar cipher is one of the earliest and simplest uses of encryption techniques that was used in 100 BC. It was used by Julius Caesar for sending encrypted messages. It is basically a shift cipher, which shifts the alphabets with a particular number, these numbers were shared with the intended parties in advance. For example, number is 3 and message is ‘ABC’ so in this case the encrypted message will be ‘DEF’ – Each letter is shifted to three places. Accordingly, same information would be decrypted by the receiving party.

What is a Cipher? – A cipher is an algorithm or a system which is used to encrypt or decrypt data.

Symmetric and Asymmetric key ciphers – There is one major difference between symmetric and asymmetric key encryption, in symmetric key encryption, same key is used for encryption and decryption. However, in asymmetric key encryption, one key(public key) is used to encrypt the information and another key(private key) is used to decrypt the information

DES and AES algorithms – Let’s start discussing about history of DES(Default encryption standard) and AES(Advanced encryption standard) which are symmetric ciphers. DES came into the picture in the year 1971 and with time became unpopular and insecure as the computing power increased. To overcome this, AES was introduced in the year 2001 and it eventually replaced DES. AES is still considered as the gold standard for encryption today.

RSA Algorithm – Another asymmetric cipher which is widely used is RSA(named after its cofounders – Rivest, Shamir and Aldeman), it came into existence in 1977 and is based on public key cryptography.

Elliptic curve encryption – It is a new age and advanced encryption technique(based on public and private key) which is used to encrypt the information using mathematical elliptic curves. It is lightweight, consumes less computing power and creates small, faster and stronger cryptographic keys when compared to other algorithms. Bitcoin uses ECC for encrypting the information

Block Ciphers and Stream Ciphers – Both block and stream ciphers are used in symmetric cryptography and used to encrypt and decrypt the information. Major difference between block and stream ciphers is that block cipher first seggregates the information into a fixed sized blocks(64/128/256 bit) and starts the encryption process however stream ciphers encrypt 1 Byte of plaintext at a time, stream ciphers are not used anymore as they became insecure with time. Examples of block ciphers – DES, 3DES, AES etc
Examples of stream ciphers – RC4

Watch out this space! In the next post, we will discuss about working of AES algorithm in detail