Multiplication CipherThis page defines a Multiplication Cipher Theory. In this case we take each letter (P) and multiple it by a value (a). For example "c" becomes 2, and multiplied by 2 gives 4, which gives "e". As the value may be greater than 25, we take a modulu 26 operation to make sure we end up with a letter, such as: C = (a * P) mod 26 In order to create unique cipher characters, we must use a multiplier which is co-prime (the values do not share any factors when dividing - see Try GCD of 5) in relation to the size of the alphabet (26), so you should use either 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23 or 25. For example if we use "abcdefghijklmnopqrstuvwxyz" and a multiplier of 3, gives "adgjmpsvybehknqtwzcfilorux" You can try the sample button which uses a multiplication of 3, and a message of "knowledgeispower" gives enqohmjsmyctqomz. |
Examples
- Try "abcdefghijklmnopqrstuvwxyz" with a key of "3". Try!, which should give: adgjmpsvybehknqtwzcfilorux
- Try "abcdefghijklmnopqrstuvwxyz" with a key of "11". Try!, which should give: alwhsdozkvgrcnyjufqbmxitep
- Try "abcdefghijklmnopqrstuvwxyz" with a key of "5". Try!, which should give: afkpuzejotydinsxchmrwbglqv Check answer (a=5)
- Try "more" with a key of "19". Try!, which should give: ugly
Incorrect Examples
If we use a value which is not co-prime, such as 2, we will not get unique characters for the mapping:
- Try "abcdefghijklmnopqrstuvwxyz" with a key of "2" (Try GCD of 2). Try!, which should give: acegikmoqsuwyacegikmoqsuwy, where we can see there are repeated cipher text characters (such as "m" and "z" mapping to "y").