ROT13
- •
What it is
- •
A Caesar cipher with a fixed shift of 13 letters. Since the Latin alphabet has 26 letters, applying ROT13 twice returns the original text, making it its own inverse. It carries no real secrecy (no key — the "shift" is always 13) and is mostly used to casually obscure text (spoilers, puzzle answers) rather than for actual security.
- •
- •
When to apply
- •
Text that looks like scrambled English with the same word lengths and punctuation intact — a strong tell it's just a letter substitution, not real encryption.
- •
- •
Worked example
- •
ROT13("crypto")→"pelcgb";ROT13("pelcgb")→"crypto"again.
- •
- •
Python
- •
import codecs encoded = codecs.encode("crypto", "rot_13") # 'pelcgb' decoded = codecs.decode(encoded, "rot_13") # 'crypto'
- •
- •