Affine cryptosystem Affine cryptosystem The message THE wa

< Affine cryptosystem >

Affine cryptosystem The message THE was encrypted as the cipher text GEX using an affine cryptosystem. (a) Find the values of a, b in the encoding function f (p) ap b mod 26. (b) Find the decoding function for this cryptosystem. (c) Decrypt the message BFG You must solve (a), (b), and (c) in detail.

Solution

Alphabetically

A-->1
B-->2
C-->3
D-->4
E-->5
.........
Z-->26



T--->20
H-->8
E--->5


G-->7
E-->5
X-->24



a) So if we write it in the form of equations,
(20a + b)%26 = 7
   (8a + b)%26 = 5
   (5a + b)%26 = 24
So these are the three equation for THE-->GEX. And we know that a and b are prime to each other.

Solving equations and using hit and trial we can found out that a and b are 11 and 21

So lets verify it .

20 x 11 + 21 = 241 and 241%26 = 7
8 x 11 + 21 = 241 and 109%26 = 5
5 x 11 + 21 = 241 and 76%26 = 24



So a and b value is 11 and 21 and they are co prime of each other.



2) Coming to decrypting function

k*21 + 11 = 26x + c . [where k is the index of orignal text from 1-26 and c is the index of deciphered text from 1-26]

c) BFG
B-->2
F-->6
G-->7


For Decrypting B -->
k*11 + 21 = 26x + 2 (B)
Taking x = 2 , 11k + 21 = 54
=> 11k = 33 => k = 3
so Its C

For Decrypting F -->
k*11 + 21 = 26x + 6 (F)
Taking x = 1 , 11k + 21 = 32
=> 11k = 11 => k = 1
so Its A

For Decrypting G --> k*11 + 21 = 26x + 7 (G)
Taking x = 9, 11k = 220
=> k = 20
so Its T


Decrypted Messages is CAT




Thanks, let me know if there isa ny concern.

< Affine cryptosystem > Affine cryptosystem The message THE was encrypted as the cipher text GEX using an affine cryptosystem. (a) Find the values of a, b
< Affine cryptosystem > Affine cryptosystem The message THE was encrypted as the cipher text GEX using an affine cryptosystem. (a) Find the values of a, b

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site