RSASHAAESKEYMOD0101LOCKDH
Classical Cryptography

Caesar Cipher

The Caesar Cipher is one of the simplest and oldest substitution ciphers. Each letter of the plaintext is shifted by a fixed number of positions.

Algorithm Steps

  1. 1Take plaintext input.
  2. 2Take shift key input.
  3. 3Convert each alphabetic character to its numeric position.
  4. 4Shift each character by the key.
  5. 5Apply modulo 26.
  6. 6Convert numbers back to letters.

Formula

Encryption: C = (P + K) mod 26
Decryption: P = (C - K) mod 26

Example

Plaintext: HELLO
Key: 3
Encrypted text: KHOOR
Decrypted text: HELLO