Cypher Discovery

The Affine Cypher

Input Text:
Key:
x +

Output Text: Key:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z

The Affine Cypher is a Shift Cypher, meaning it encrypts messages by shifting the letters of the alphabet to correspond to different ones. However, where the Caesar Shift cypher used a key formula of x -> x+b (where b is the constant the alphabet is shifted by). The affine cypher uses a key formula of x -> ax+b (where a and b are both constant keys).

This cypher is a method for obscuring the text so that it cannot be decyphered using the first exploit, as even if you know what 'e' cyphers to, there are many different key combinations that match this.

Like the Caesar Cypher, it is still possible to brute force the Affine cypher. However, in total there are 312 possible combinations (12 for a and 26 for b). However, this is far from practical. (There are only 12 options for a as a must be coprime to 26 (meaning they share no common factors) for the translation to work)