vimwiki/tech/Affine.wiki

17 lines
340 B
Plaintext
Raw Normal View History

2021-11-09 19:45:01 +00:00
= 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
2021-11-09 20:00:01 +00:00
Where y is the ciphertext value, and a^-1 is the modular multiplicative inverse
of a