Cryptology
Cryptology
Introduction
Related to codes on books and grocery items are secret codes.
These codes are used to send messages between people, companies or nations.
It is hoped that by devising a code that is difficult to break, the sender can prevent the communication from
being read if it is intercepted by an unauthorized person.
Table 1
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
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
Question: Using the cyclical coding scheme described above, where each letter is replaced by the one 22
letters after the letter, what is the plaintext word that corresponds to the ciphertext YKZA?
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
If the encrypting code is to shift each letter of the plaintext message m positions, then the corresponding
letter in the ciphertext message is given by c≡ (p + m)mod 26, where p is the numerical equivalent of the
plaintext letter and c is the numerical equivalent of the ciphertext letter.
1
To decode the letter O (which is in ciphertext), we use the congruence,
p ≡ (c + n) mod 26, where n = 26 – m.
Now we have
• c = 15 (O is the 15th letter.)
p ≡ (15 + 4) mod 26
n =26 -m = 26 -22 = 4
p ≡19 mod 26
p ≡ 19
The 19th letter is S. Thus O is decoded as S
M
U
S
K
E
T
E
E
R
S
b. Use the cyclical alphabetic encrypting code that shifts each letter 18 positions to decode the encrypted message
SYW GX WFDAYZLWFEWFL.
Solution:
Because m=18, n = 26 – 18=8. The ciphertext is decoded by using the congruence p ≡ (c + 8) mod 26. The
results for SYW are shown:
W
F
D
A
Y
.
.
.
.
.
2
• The practicality of a cyclical alphabetic coding scheme is limited because it is relatively easy for a cryptologist
to determine the coding scheme.
• A coding scheme that is a little more difficult to break is based on the congruence c ≡¿ ap+m) mod 26,
where a and 26 do not have a common
factor.
• The reason why a and 26 cannot have a common factor is related to the procedure for determining the
decoding congruence.
Example 3: Use the congruence c ≡(3p+1) mod 26 to encode the message COLOR MONITOR.
Solution:
The encrypting congruence is c ≡(3p+1) mod 26. Replace p by the numerical equivalent of each letter from
Table 2 and determine c. The results for COLOR MONITOR are shown below.
C c≡(3·3+1) mod 26 ≡10 mod 26 ≡10 , Code C as J.
Decoding a message that was encrypted using the congruence c ≡ (ap+m) mod n requires solving the
congruence for p.
This method relies on multiplicative inverses.
Here we solve the congruence used in Example 3 for p.
c = 3p + 1
c – 1 = 3p • Subtract 1 from each side of the equation.
9 (c – 1) = 9 (3p) • Multiply each side of the equation by the multiplicative inverse of 3.
Because 9·3≡ 1 mod 26, multiply each side by 9.
[9 (c – 1)] mod 26 ≡ p
Using the preceding congruence equation, we can decode the ciphertext message JTKTC NTQBITC. The
method for decoding JTKTC is shown below.
J [9 (10– 1)] mod 26 ≡ 81 mod 26 ≡ 3, Decode J as C.
T [9 (20– 1)] mod 26 ≡ 171 mod 26 ≡ 15, Decode T as O.
K [9 (11– 1)] mod 26 ≡ 90 mod 26 ≡ 12, Decode K as L.
T [9 (20– 1)] mod 26 ≡ 171 mod 26≡ 15, Decode T as O.
C [9 (3– 1)] mod 26 ≡ 18 mod 26 ≡ 18, Decode C as R.
Exercises:
A. Encode the message by using a cyclical alphabetic encrypting code that shifts the message the stated number of
positions.
1. 6 positions: FLY TONIGHT
2. 9 positions: MEET AT NOON
B. Use a cyclical alphabetic encrypting code that shifts the letters the stated number of positions to decode the
encrypted message.
1. 8 positions: VWJWLG QA XMZNMKB
C. Use a cyclical alphabetic encrypting code to decode the encrypted message.
1. YBZAM HK YEBZAM
2. AOB HVS HCFDSRCSG
D. Use the encrypting congruence
c ≡ (3p+2) mod 26 to code the message TOWER OF LONDON.