Use the RSA Method to encrypt ATTACK AT DAWN Use the prime n

Use the RSA Method to encrypt \"ATTACK AT DAWN\". Use the prime numbers p=17 and q=19. Calculate the totient (), and use e=5 as the public key exponent. Remember that \'e x d = 1mod\'.

Encryption: (message element)emod n = (encrypted element)

Decryption: (encrypted element)dmod n = (message element)

Show the encrypted elements and the modulo arithmetic needed to find them. Let A=1, B=2,C=3,....,Z=26.

Solution

p=17, q=19

n = p*q = 17*19 = 323

= (p-1)*(q-1) = 16*18 = 288

e = 5

e*d = 1 mod

=> 5d = 1 mod

d must be such that 5d gives the remainder 1 when divided by

one solution for d =173

Public key (e,n) => (5,323)

private key (d,n) => (173, 323)

A=1 encryption of A = 15%323=1

C=3 encryption of C = 35%323=243

D=4 encryption of D = 45%323=55

K=11 encryption of K = 115%323=197

N=14 encryption of N = 145%323=29

T=20 encryption of T = 205%323=39

W=23 encryption of W = 235%323=78

Therefore ATTACK AT DAWN encrypted as 1 39 39 1 243 197 1 39 55 1 78 29

From this encryption we can say that mudulo arithmatic is requied to find them

For decrypting it we need (cypher)d % n = (cypher)173%323=decrypted element

Use the RSA Method to encrypt \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site