Cryptography is the **backbone of distributed ledger technologies** like blockchain and other consensus-oriented distributed networks. If you are interested in building decentralized applications, for example, it's essential to understand wallet generation and transaction signing processes. Both of these rely heavily on underlying cryptographic protocols for network security. With the advancements in cryptocurrency and defi, the question "What is cryptography?" leads directly to the cyber world.

Cryptography is a critical component of **cyber security**. With cybercrime on the rise and cyber attacks costing businesses an average of 2.3 Million dollars per malware attack, it is increasingly important to have your cybersecurity up to par. With the proper use of cryptography, you could save your business significantly, by ensuring the confidentiality of digitized sensitive information.

Modern cryptographic systems are mathematically robust. They **help to secure sensitive information** like your bank account numbers and Social Security number. While the mathematics may be complex, the concepts can be grasped without a complete understanding of encryption algorithms.

One of the key components of cryptography is **ciphers**. Ciphers are algorithms used to conceal (encrypt) and decrypt information. Encrypted information is called **ciphertext**, while decrypted information is called **plaintext**. There are two types of ciphers: *symmetric ciphers* and *asymmetric ciphers*. Let’s look at the difference and some examples.

## What are the three types of Cryptography?

### Symmetric key encryption

**Symmetric key cryptography**, also known as single key cryptography, means the same key is used both to encrypt and decrypt information. One of the earliest examples of symmetric encryption is known as **Caesar’s Cipher **or shift cipher.

The Caesar cipher works by mapping the **plaintext letter** to a character of a predetermined distance (the key) adjacent in the alphabet. For example, if the key is a right rotation by three, then “A" gets mapped to ”D". The whole keymap has been constructed below for your convenience. The plain-text, "CIRCERO," would be enciphered as "FLUFHUR."

Notice that the wraparound of the alphabet is modeled by **modulus arithmetic**. We can mathematically represent an encryption [En=(x + n)mod 26] and a corresponding decryption function [Dn= (x - n)mod 26]. Here is an excellent code repository of the implementation of this algorithm in several different languages. Below is an example constructed in JavaScript.

Plaintext | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |

Ciphertext | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C |