Classical Cryptography Workbench

CipherLab

Encrypt, decrypt, and inspect every step behind Caesar, Vigenere, Affine, Hill, and Playfair ciphers.

Session history

Recent operations

No encryption or decryption history yet.
C

Monoalphabetic shift

Caesar Cipher

Formula: E(x) = (x + k) mod 26, D(y) = (y - k) mod 26

Encrypted Output
Run Caesar to see the shift formula and character-by-character steps.
V

Polyalphabetic keyword

Vigenere Cipher

Formula: E(x) = (x + k_i) mod 26, D(y) = (y - k_i) mod 26

Encrypted Output
Run Vigenere to see keyword shifts aligned with each letter.
A

Linear substitution

Affine Cipher

Formula: E(x) = (ax + b) mod 26, D(y) = a^-1(y - b) mod 26

Valid a values: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25

Encrypted Output
Run Affine to see modular arithmetic for each transformed letter.