17 lines
340 B
Plaintext
17 lines
340 B
Plaintext
= Affine =
|
|
|
|
Affine cipher is a type of [[substitution]] cipher.
|
|
|
|
The cipher is of model
|
|
|
|
f(x) = ax + b mod 26
|
|
|
|
Where x is some number corresponding to a letter, 0-25. a and b are variables.
|
|
|
|
To decipher, the formula is of form
|
|
|
|
f(y) = a^-1(y - b) mod 26
|
|
|
|
Where y is the ciphertext value, and a^-1 is the modular multiplicative inverse
|
|
of a
|