# Fundamentals of Symmetric Cryptography

**Encryption and Decryption**

Encryption is the process of converting plaintext to encrypted text. Since encrypted text cannot be read by anyone, encrypted text hides the original data from unauthorized users. The process entailing encryption and decryption together is called cryptography. The unencrypted data is called plaintext, while the encrypted data is called ciphertext. The algorithms used to encrypt and decrypt messages are called encryption algorithms.

Decryption is the process of converting encrypted data to plaintext. Basically, it is the reverse of encryption. It is used to decrypt the encrypted data so that only an authorized user can access and read the data. The authorized user uses a pre-shared secret key for converting encrypted data to plaintext.

**Private and Public Keys in Cryptography**

A key is a bit valued string which is used to convert the plaintext into cipher text and vice-versa. A key can be a word, number or phrase. Cryptography makes use of public and private keys. A public key is issued publicly by the organization and it is used by the end user to encrypt the data. The encrypted data, once received by the organization, is decrypted by using a private key and the data is converted to plaintext.

**Encryption Types – **Cryptography uses symmetric and asymmetric encryption for encryption and decryption of data. If the sender and the recipient of the data use the same key to encrypt and decrypt the data, it’s called symmetric encryption and if the keys are different for encryption and decryption then it’s asymmetric encryption.

In this post, we will be focusing on and discussing Symmetric Encryption in detail.

**Symmetric Encryption – **Symmetric Encryption is the one in which the sender and the recipient of the data uses the same key to encrypt and decrypt the data. The sender and receiver must exchange the key with each other over a secure channel to maintain confidentiality and using this key the sender and receiver encrypts and decrypts the data exchanged between them.

**Symmetric Encryption Types – **Symmetric Encryption algorithms can be categorized into 2 types.

They are as follows –

**Block Algorithms**– As the name suggests, the data is divided into small chunks of blocks and each block is encrypted using a designated private key. Each block is of fixed size and encryption happens over each block. While each block is being encrypted, system keeps the data in the memory until all the blocks are encrypted**Stream Algorithms**– Unlike Block algorithms, in stream algorithms data is encrypted as it streams. This is considered safer compared to Stream algorithms since the system does not retain data in the memory.

**Symmetric Encryption Algorithms**

Following algorithms uses symmetric encryption for encrypting the data –

- AES (Advanced Encryption Standard)
- DES (Data Encryption Standard)
- IDEA (International Data Encryption Algorithm)
- Blowfish (Drop-in replacement for DES or IDEA)
- RC4 (Rivest Cipher 4)
- RC5 (Rivest Cipher 5)
- RC6 (Rivest Cipher 6)

Block Ciphers – AES, DES, IDEA, Blowfish, RC5 and RC6

Stream Ciphers – RC4

**Symmetric Encryption Applications**

- Banking Sector – Payment applications like card transaction
- Random Number Generation
- Validation of sender’s message
- Digital Signatures

**Sources**

- https://www.cryptomathic.com/news-events/blog/symmetric-key-encryption-why-where-and-how-its-used-in-banking
- https://teachcomputerscience.com/symmetric-encryption/
- https://www.venafi.com/blog/what-are-best-use-cases-symmetric-vs-asymmetric-encryption