0% found this document useful (0 votes)
16 views3 pages

Cryptology

The document discusses cryptology, focusing on the concepts of plaintext and ciphertext, as well as encryption methods such as cyclical coding schemes. It explains how to encode and decode messages using mathematical congruences and provides examples of encoding and decoding processes. Additionally, it highlights the limitations of simple coding schemes and introduces more complex methods involving multiplicative inverses.

Uploaded by

khnnmlndrz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

Cryptology

The document discusses cryptology, focusing on the concepts of plaintext and ciphertext, as well as encryption methods such as cyclical coding schemes. It explains how to encode and decode messages using mathematical congruences and provides examples of encoding and decoding processes. Additionally, it highlights the limitations of simple coding schemes and introduces more complex methods involving multiplicative inverses.

Uploaded by

khnnmlndrz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

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.

Plaintext- it is a message before it is coded.


Ciphertext- is the message after it has been written in code.
Example 1: From Lord Byron’s poem “She walks in beauty”, the line
SHE WALKS IN BEAUTY LIKE THE NIGHT
is the same line of the poem in ciphertext
ODA SWHGO EJ XAWQPU HEGA PDA JECDP

 The method of changing from plaintext to ciphertext is called encryption.


 In our example, the poem was encrypted by substituting each letter in plaintext with the letter that is 22
letters after that letter in the alphabet.
 This is called a cyclical coding scheme because each letter of the alphabet is shifted the same number of
positions.
 The original alphabet and the substitute alphabet are shown below.

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?

 Cyclical encrypting using the alphabet is related to modular arithmetic.

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.

 The letter Z is coded as 0 because 26 ≡ 0 mod 26.

 In Example 1, to code the plaintext letter S in the word SHE ,


m = 22 (each letter was shifted 22 positions)
p = 19 (S is the 19th letter).
Using the congruence c≡ (p + m)mod 26, we have
c ≡ (19 + 22) mod 26
c ≡41 mod 26
c ≡15
The 15th letter is O. Thus S is coded as O.

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

 Example 2: Write Messages Using Cyclical Coding


a. Use the cyclical alphabetic encrypting code that shifts each letter 8 positions to code THREE MUSKETEERS.
Solution:
The encrypting congruence is c≡(p + 8)mod 26. Replace p by the numerical equivalent of each letter of
plaintext and determine c. The results for THREE MUSKETEERS are shown:

T c≡(20+8) mod 26 ≡28 mod 26 ≡2, Code T as B


H c≡(8+8)mod 26 ≡16 mod 26 ≡16, Code H as P
R c≡(18+8)mod 26 ≡26 mod 26 ≡0, Code R as Z
E c≡(5+8)mod 26 ≡13 mod 26 ≡13, Code E as M
E c≡(5+8)mod 26 ≡13 mod 26 ≡13, Code E as M

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:

S c ≡¿ +8) mod 26 ≡27 mod 26 ≡1 , Decode S as A.


Y c ≡¿ +8) mod 26 ≡33 mod 26 ≡7 , Decode Y as G.
W c ≡¿ +8) mod 26 ≡31 mod 26 ≡5 , Decode W as E.
G c ≡¿ +8) mod 26 ≡15 mod 26 ≡15 , Decode G as O.
X c ≡¿ +8) mod 26 ≡32 mod 26 ≡6 , Decode X as F.

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.

O c≡(3·15+1) mod 26 ≡ 46mod 26 ≡20 , Code O as T.


L c≡(3·12+1) mod 26 ≡37 mod 26 ≡11, Code L as K.
O c≡(3·15+1) mod 26 ≡ 46 mod 26 ≡20 , Code O as T.
R c≡(3·18+1) mod 26 ≡55 mod 26 ≡3 , Code R as C.

Continuing, the plaintext is coded in ciphertext as JTKTC NTQBITC.

 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.

You might also like