Caesar, shift 3
- Input
- HELLO
- Expected output
- KHOOR
Only 26 possible keys exist; a simple script tests every one of them in under 1 millisecond.
classical ciphers
Classical ciphers solve a problem that no longer exists: hiding a message from someone without a computer. Each one has a mathematical structure simple enough to break by hand, which makes them great for learning the reasoning behind cryptography and terrible for protecting any real data today.
Only 26 possible keys exist; a simple script tests every one of them in under 1 millisecond.
The canonical example of the cipher: the 5-letter key repeats until it covers all 12 letters of the plaintext.
Atbash swaps A for Z, B for Y and so on, with no key at all: spotting the rule is enough to decode any message.
Yes. It is meant for experimenting with classical ciphers locally and understanding how simple text transformations behave in practice.
Only educational and recreational: ROT13, a special case of Caesar with shift 13, still shows up on forums to hide a spoiler reversibly for any reader, not to protect sensitive information, since anyone can decode it by applying the same shift again.
Because the repeating key introduces a period: once Kasiski examination uncovers the likely key length from repeated sequences in the ciphertext, the problem reduces to solving several independent Caesar ciphers, one per key position, each trivial to break on its own.
It works well on simple substitution with text long enough for the original language letter distribution to show up; on very short texts, or on ciphers that mix multiple shifts per position, like Vigenère, direct analysis fails and requires first uncovering the key period.
Modern symmetric ciphers like AES, with 128, 192 or 256-bit keys, run in an authenticated mode like GCM, which combines secrecy and integrity verification in a single step, something no classical cipher ever considered, since all of them predate the idea of an automated computational attack by centuries.
Ciphers run locally. Do not use classical ciphers to protect real data.