Substitution, Atbash & Affine illustration

Substitution, Atbash & Affine

Encrypts and decrypts with monoalphabetic substitution: a full 26-letter custom alphabet, the self-inverse Atbash cipher that reverses the alphabet, and the Affine cipher (E(x) = ax + b mod 26). Shows the substitution mapping and validates that the key is a permutation.

Runs 100% in your browser — keys and data never leave your device.

Notes

  • Any monoalphabetic substitution — however scrambled the key — preserves letter frequencies, so it falls to frequency analysis on enough ciphertext.
  • The Affine cipher requires the multiplier a to be coprime with 26, otherwise the mapping is not reversible.
  • Runs 100% in your browser — keys and data never leave your device.

Explore the idea

This interactive demo needs JavaScript.