Multiplicative
Ciphers
ENCODING
The first level of complexity we can add is to use a multiplicative cipher. Instead of adding a key to each letter, we multiply the position of each letter by the key. Using a multiplicative key of 5 would result in the encryption scheme shown at below.
Table 2: Multiplicative Cipher with Key = 5
|
PlainText |
# |
# x 5 |
Mod 26 |
CodeText |
|
a |
1 |
5 |
5 |
E |
|
b |
2 |
10 |
10 |
J |
|
c |
3 |
15 |
15 |
O |
|
d |
4 |
20 |
20 |
T |
|
e |
5 |
25 |
25 |
Y |
|
f |
6 |
30 |
4 |
D |
|
g |
7 |
35 |
9 |
I |
|
h |
8 |
40 |
14 |
N |
|
i |
9 |
45 |
19 |
S |
|
j |
10 |
50 |
24 |
X |
|
k |
11 |
55 |
3 |
C |
|
l |
12 |
60 |
8 |
H |
|
m |
13 |
65 |
13 |
M |
|
n |
14 |
70 |
18 |
R |
|
o |
15 |
75 |
23 |
W |
|
p |
16 |
80 |
2 |
B |
|
q |
17 |
85 |
7 |
G |
|
r |
18 |
90 |
12 |
L |
|
s |
19 |
95 |
17 |
Q |
|
t |
20 |
100 |
22 |
V |
|
u |
21 |
105 |
1 |
A |
|
v |
22 |
110 |
6 |
F |
|
w |
23 |
115 |
11 |
K |
|
x |
24 |
120 |
16 |
P |
|
y |
25 |
125 |
21 |
U |
|
z |
26 |
130 |
26 or 0 |
Z |
“the world is green and blue” then becomes VNY KWL HTS QIL YYR ERT JHA Y. We notice very quickly that this is more sophisticated scheme, and would be harder to break. One detail we should mention is that only certain keys work. Any odd number greater than 1 and less than 26 other than 13 will work. (What happens with 4 or 8 or 13?)
DECODING
If we knew a message had been encrypted with a multiplicative key of 5, how would we decipher the message? With the additive scheme we had to add the inverse of the encoding key. Similarly, with the multiplicative scheme we have to multiply by the inverse. Table 3 shows the inverse keys. If you know a message is encoded with a multiplicative key of 7, to decode it you must multiply the value of each letter by the inverse key which is 15 and find mod 26. This may not be intuitive, but (7 x 15) mod 26 = 105 mod 26 = 1.
BREAKING THE CODE
If we didn’t know the key, we would try the same trick we did with additive ciphers. The most frequent letter is e,
Table 3: Multiplicative Keys and Inverses
|
Plaintext e is |
Encode Key |
Decode Key |
|
O |
3 |
9 |
|
Y |
5 |
21 |
|
I |
7 |
15 |
|
S |
9 |
3 |
|
C |
11 |
19 |
|
W |
15 |
7 |
|
G |
17 |
23 |
|
Q |
19 |
11 |
|
A |
21 |
5 |
|
K |
23 |
17 |
|
U |
25 |
25 |
So we would find the most frequent encrypted letter and associate it with the plaintext letter e. We then need to find the key that was used to change e into the encrypted letter.
If we intercept a message encoded with a multiplicative ciphering scheme and the most frequent letter is C, then e the fifth letter got changed into C the third letter. The equation would be 5x = 3 mod 26. We would then start multiplying 5 by the possible multiplicative keys and finding mod 26 until we get a 3.
5 x 3 = 15 mod 26 = 15 nope
5 x 5 = 25 mod 26 = 25 nope
5 x 7 = 35 mod 26 = 9 nope
5 x 9 = 45 mod 26 = 19 nope
5 x 11 = 55 mod 26 = 3 yep
In the first column of table 3, I have put the encrypted version of e for each possible multiplicative key.
Once we know the key that was to used to encrypt the message, we want to use the inverse key to decrypt it as explained in the DECODING section. As an example, say we intercept a message which reads: MGG BMG QBB FGH GQY F
We first count the number of each letter and find that there are 5 Gs, and 3 Bs. Using table 3 we see that e → G when a key of 17 is used so we would use the inverse key 23. Multiplying each letter by 23 mod 26 yields the message “meet me at the beach”. If that hadn’t made sense we would have tried e → B which doesn’t have an inverse key, and then tried e → Q.
Table 4: Multiplicative Decryption
|
Cipher Text |
M |
G |
G |
B |
M |
G |
Q |
B |
B |
F |
G |
H |
G |
Q |
Y |
F |
|
value |
13 |
7 |
7 |
2 |
13 |
7 |
17 |
2 |
2 |
6 |
7 |
8 |
7 |
17 |
25 |
6 |
|
x 23 |
299 |
161 |
161 |
46 |
299 |
161 |
391 |
46 |
46 |
138 |
161 |
184 |
161 |
391 |
575 |
138 |
|
mod 26 |
13 |
5 |
5 |
20 |
13 |
5 |
1 |
20 |
20 |
8 |
5 |
2 |
5 |
1 |
3 |
8 |
|
Plain Text |
m |
e |
e |
t |
m |
e |
a |
t |
t |
h |
e |
b |
e |
a |
c |
h |
You try it!
Multiplicative Encryption: Encrypt the following message with a multiplicative key of 7.
Plain Text |
t |
h |
e |
s |
k |
y |
i |
s |
b |
l |
u |
e |
|
Value |
|
|
|
|
|
|
|
|
|
|
|
|
|
x 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
mod 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
Cipher Text |
|
|
|
|
|
|
|
|
|
|
|
|
Multiplicative Decryption: You intercept this message from the enemy and think it uses an multiplicative cipher.
Cipher Text |
B |
C |
K |
H |
C |
L |
J |
C |
A |
J |
C |
C |
L |
J |
C |
P |
C |
|
Value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x inverse |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mod 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Plain Text |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|