Back to Tools

Affine Cipher

Monoalphabetic substitution cipher using two numeric keys.

The Affine cipher is a monoalphabetic substitution cipher and it can be the exact same as a standard Caesarian shift when "A" is 1. The translation alphabet is determined by mapping each letter through the formula (ax + b) mod m, where m is the number of letters in the alphabet and a and b are the secret keys of the cipher. To ensure that no two letters are mapped to the same letter, A and B must be coprimes (no common divisors).

Enter keyword and alphabet will be calculated for you.