This is an encryption/decryption device for the Affine Cipher. The values a and b are the key, a must be coprime to 26 and b must be from 0-25. Coprime means to have no common factors besides 1. For example, 1, 3, 67 etc. All letters become numbers, so a=0, b=1, z=25 etc. Scroll down for all of it. The formula for encryption is c = ap + b (mod m). Instructions: Type the a and b values. Just pick 1, 3, 5, 7 for a and a random number from 0-25 if you don't understand. Press space to write a new character. TYPE ONLY SINGLE LETTERS OR NUMBERS! Do not type a phase or word. You can either write the letter or the corresponding number (see below). The encrypted letter will be shown on the right. The system is able to detect if b is not correct but not a. If x does not stop increasing when you type a, a is not coprime to 26. A=0 B=1 C=2 D=3 E=4 F=5 G=6 H=7 I=8 J=9 K=10 L=11 M=12 N=13 O=14 P=15 Q=16 R=17 S=18 T=19 U=20 V=21 W=22 Y=23 X=24 Z=25 Everything is by me.