Cryptography Concepts for Beginners

Varshini
4 min readJul 5, 2023

--

Now a days most of the people uses internet to communicate with each other without thinking about the security of the data. This paves way to cryptography. The main intention of cryptography is to protect and secure information from unintended persons. To understand it better You can consider the situation where you need to tell your best friend a secret which no one should know. You have decided to send it via any social media platform but that can be read by anyone. To convey this secret, you can use cryptography. Cryptography is used in many applications like banking transactions cards, computer passwords, and e- commerce transactions.

Basic Terminologies in cryptography:

Encryption:

Encryption is the process of converting a human readable plain text to unreadable text (cipher text) which can be decrypted only by the authorised persons with the key. Encryption is most important to provide end-to-end security for any data transmitted.

Decryption:

Decryption is the process of converting the cipher text to plain text using keys.

Initial vector (IV):

IV is used to prevent creating same cipher text for a word with the same key. The main purpose of IV is to prevent figuring out the plain text based on the repetitive cipher.

Padding:

Padding will add bits to the plain text so that plain text can be divided into equal blocks. If the plain text size is 14 bytes and the key size is 8 bytes, the plain text will be divided into two blocks of size 8. But in this case the second block will have only 6 bytes, it needs 2 more bytes to complete the block. Here padding will add those 2 bytes and make it a complete block.

Types of cryptography:

Symmetric Key Cryptography:

In symmetric Key Cryptography, only one key will be used for both encryption and decryption. The plain text will be divided into blocks of 64 or 128 bits. If the plain text size is not a multiplier of key size, then plain text will be padded. Most popular symmetric key cryptography are AES encryption, DES encryption and Blowfish.

Asymmetric Key Cryptography:

Asymmetric key cryptography uses two different keys for encryption and decryption. Public key is used for encryption and a private key is used for decryption. Some asymmetric key cryptography are RSA encryption, Elliptical Curve Cryptography, DSA encryption. In this type the public key will be shared with the sender to encrypt the message and private key will be with the receiver to decrypt.

Block Cipher:

Block Cipher works on a fixed length of bits called blocks. In this type, we will divide the plain text into blocks and will encrypt each block to produce cipher text. If the plain text cannot be divided into equal blocks, then padding will be used. Block size will be 64 or 128 bits.

Stream Cipher:

Stream cipher works on each bit in the plain text. It will encrypt each bit and produces the cipher text using pseudorandom bit generator. pseudorandom bit generator accepts a key as input, and it produces an 8-bit output called keystream. Keystream will be XORed with the plain text to produce the cipher text.

Transposition Cipher:

In transposition cipher the bits position will be reordered to form cipher text. In this the cipher text will have the same length as plain text.

Substitution Cipher:

Substitution cipher works by replacing each bit (character) with other characters including numbers and symbols. In this the character identity is changed but the position remains same. In the below example each character is replaced with the subsequent alphabet.

Conclusion:

Information security is one of the biggest concerns for businesses operating companies in the modern business environment. In this fast-growing world there are lot of sensitive messages available in the public communications which needs to be protected from unintended users. Thus, cryptography helps to safeguard the intellectual property by preventing those data from cyber threats and threat actors.

--

--