The Affine Cipher equation encrypts a string using the Affine cipher method and returns a string of ciphertext.
INSTRUCTIONS: Enter the following
Ciphertext (C): The encryption returns a string of ciphertext
First, convert your string of letters into numbers corresponding to their position in the alphabet (A = 0, B = 1, C = 2, etc...).
Then, plug each number (representing a letter) into the formula below (p = number, ak = key1, bk = key2).
C = [(ak x p) + bk] mod 26
This formula will result in a list of numbers; take these numbers and convert them back into letters based on their position (0 = A, 1 = B, 2 = C, etc...).
The resulting character string is your ciphertext.