Caesar cipher and ROT variants
Caesar cipher is a shift cipher. See more on Wikipedia
The transformation can be represented by aligning two alphabets; the cipher is the plain alphabet rotated left or right by some number of positions. For instance, here is a Caesar cipher using a left rotation of three places, equivalent to a right shift of 23 (the shift parameter is used as the key):
Type Alphabet Plain ABCDEFGHIJKLMNOPQRSTUVWXYZ Cipher XYZABCDEFGHIJKLMNOPQRSTUVW When encrypting, a person looks up each letter of the message in the “plain” line and writes down the corresponding letter in the “cipher” line.
Type Data Plaintext THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG Ciphertext QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD Deciphering is done in reverse, with a right shift of 3.
Other ciphers that use the same shifting technique:
ROT5:
- Primarily for numbers with digits
0-9 - Shifts each digit 5 positions
- Primarily for numbers with digits
ROT13:
- Like Caesar Cipher
- Shift each letter 13 positions
ROT18:
- Similar to ROT13, but using the 36 alphanumeric characters,
A-Z0-9 - Shift letters using ROT13, and shift numbers using ROT5
- ROT18 = ROT13 + ROT5
- Similar to ROT13, but using the 36 alphanumeric characters,
ROT47:
- Uses an extended alphabet
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
- Uses an extended alphabet
ROT8000:
- Uses the Unicode character set
- Shifts by 0x8000 (32,768) positions