Chooses the value of \( a \) and \( b \):
Encrypts the message \( m \):
Enter a message (a sentence containing only whitespace and the letters A-Z) that Alice wants to send encrypted to Bob:
Hit enter to generate the parameters and use the left and right arrow keys to navigate.
Alice first chooses the values \( a \) and \( b \) at random such that \( \gcd(a, 26)=1 \) and then she computes the inverse \( a^{-1} \) of \( a \) with the extended Euclidean algorithm.
She then sends the values \( a \), \( a^{-1} \) and \( b \) through a secure channel to Bob.
Before Alice can encrypt the message \( m \) she needs the index in the English alphabet of each letter in the message \( m \) with the letter \( a \) starting at index \( 0 \).
Alice then use \( a \) and \( b \) to encrypt the message \( m \).
Before Bob can decrypt the ciphertext \( c \) he needs the index in the English alphabet of each letter in the ciphertext \( c \) with the letter \( a \) starting at index \( 0 \).
Decryption is almost identical to encryption: Instead of \( a \) is the inverse \( a^{-1} \) used.
Receives the values
Receives the ciphertext \( c \)
Decrypts the ciphertext \( c \):