Caesar Cipher

Classic shift cipher

What is Caesar Cipher?

Caesar cipher is one of the oldest and simplest encryption methods, said to have been used by Julius Caesar. In this method, each letter in the alphabet is encrypted by shifting it a certain number of positions. For example, with a shift of 3, the letter A becomes D, and B becomes E.

How Does Caesar Cipher Work?

  • Shift: Each letter is shifted forward by a certain number in the alphabet
  • Circular: When Z is shifted, it returns to A (modulo 26)
  • Symmetric: Encryption and decryption use the same key (shift amount)

Is Caesar Cipher Secure?

No, Caesar cipher is not secure by modern standards:

  • Only 25 different keys (shifts) are possible
  • Can be broken in seconds with brute force attacks
  • Should be used for educational and entertainment purposes only