MATHEMATICAL SUBSTITUTION

Affine Cipher

A mathematical substitution cipher using modular arithmetic.

Formula

E(x) = (ax + b) mod 26

The value of a must be relatively prime to 26 for the transformation to be reversible.

Why It Matters

The Affine Cipher is an excellent introduction to modular arithmetic and mathematical cryptography.