Worked cipher examples
These notebooks-style samples match the definitions used by Cipher Portal so you can reproduce results on the main page without guessing parameters. Copy each triple into the web form: choose the cipher, paste plaintext or ciphertext, supply the key, toggle encrypt or decrypt, and press Run. Figures use uppercase for clarity; the implementation normalizes case consistently for English letters.
Caesar: encryption and decryption
A uniform shift of three positions forward turns A into D, B into E, through the alphabet with wraparound at Z. Decryption subtracts the same shift, so whoever knows the integer 3 reverses the histogram slide exactly.
Encrypt with Caesar, key 3, confirms the mapping. Feeding KHOOR back with mode Decrypt and key 3 should return HELLO letter for letter. Trying all other integers 0–25 is a teaching moment: only one shift produces coherent language for long texts, which is why brute force is an effective classroom demonstration rather than a credible attack on modern systems. The Frequency Analysis Lab visualizes that ranking in real time.
Vigenère: encryption and decryption
Each plaintext letter moves by the distance of the aligned key letter within the alphabet cycle. The keyword KEY repeats underneath HELLO as KEYKE until the message ends. Addition modulo 26 yields the ciphertext string below; decryption walks the inverse sequence using the same repeating key.
Observe that identical plaintext letters under different keyword positions can encrypt to unlike symbols—for example consecutive L transforms differ because adjacent key letters vary. Contrasting Caesar, whose repeated letter always maps to another fixed letter distance away, reinforces why frequency counts smear outward with good keyword length and diverse letters.
Rail Fence: encryption and decryption
Write HELLOWORLD in a three-rail zigzag, then concatenate rows left to right. No letter changes identity; reordering alone obscures readability. Recovering plaintext requires rewinding along the zigzag using the declared rail count of three—the same numeric key Cipher Portal prompts for Rail Fence operations.
Decrypt with Rails = 3 to verify the unscrambled greeting. Puzzle authors sometimes omit spaces in longer paragraphs; readability scores during key recovery help disambiguate two or more plausible counts when ciphertext length aligns with ambiguous patterns.
What key recovery means on this portal
Suppose someone hands you ciphertext without admitting the Caesar shift. Instead of probing all 26 options manually on short homework lines, decryption mode permits checking “Key recovery” with an empty key field (where allowed for the cipher). The backend walks candidate parameters, decrypts hypothetically under each guess, compares output to statistical fingerprints of fluent English—common letter percentages, plausible digraph bursts, weighted n-gram norms—and prefers the hypothesis that minimizes surprise.
Confidence labels and warning banners summarize uncertainty. If the ciphertext is two letters long or consists of coined acronyms, statistics misfire. Always cross-check readability with contextual knowledge Key recovery complements human judgment; it replaces neither recordkeeping of genuine keys nor professional cryptographic tooling for sensitive data.
Open the live tool, pick a cipher, and validate these examples yourself. For deeper theory, continue with How it works and the cipher reference.