Affine

Similar to a Caesarian shift, but also adds in a multiplier to further scramble letters.

The Affine cipher is a monoalphabetic substitution cipher, and it is exactly the same as a standard Caesarian shift when a is 1. Mathematically, it is represented as \(e(x) = (ax + b) \bmod m\). Decryption is a slightly different formula, \(d(x) = a^{-1} (x - b) \bmod m\).

Examples:

  • - The example Wikipedia uses to show off the cipher.

To encode something, you need to pick an a, and it must be coprime with the length of the alphabet, which is the m value. To make this easier, the (+) and (-) buttons change the A field to the next higher or lower coprime number.