The Caesar Cipher is one of the simplest and most widely known encryption techniques. It is a substitution cipher where each letter in the plaintext is shifted a certain number of places down or up the alphabet.
- Shift Letters: Each letter in the plaintext is shifted by a fixed number of positions down the alphabet.
- Wrapping: If the shift extends past 'z', it wraps around to the beginning of the alphabet.
- Maintaining Case: Preserve the case (uppercase or lowercase) of each letter in the plaintext.
- Reverse Shift: Each letter in the ciphertext is shifted back by the same number of positions to recover the original plaintext.
- Handling Wrapping: If the shift extends past 'a', it wraps around to the end of the alphabet.
- Alphabet Representation: The alphabet is represented as a string of lowercase letters.
- Encryption Function: Each letter in the plaintext is shifted by the specified key using modular arithmetic.
- Decryption Function: Each letter in the ciphertext is shifted back by the specified key to recover the original plaintext.