796 views

1 Answer

1 votes
1 votes

Given Plain text (m)=5, P=3, Q=11

where P and Q are two prime integer

n=P*Q

n=3*11=33

Z=(P-1)*(Q-1)

Z=(3-1)*(11-1)=20

Now selecting the public key(i.e encryption key) E such that it is not a factor of (P-1) and (Q-1)

say E=3 

Now selecting the private key (i.e the decryption key) D such that the following equation is true:

(D*E) mod Z =1

Say D=7

(7*3) mod 20 =1

For encryption calculating the cipher text (CT) from the plain text (PT) is as follows:

CT = (PT)^E mod n

CT = 5^3 mod 33

Cipher Text =26

Now Sender will send this cipher text (26)  to the receiver

For decryption calculating the plain text PT from the cipher text CT as follows:

PT = (CT)^D mod n

      = (26^7) mod 33

      = 5

Related questions

1 votes
1 votes
0 answers
4
rahul sharma 5 asked Aug 13, 2017
300 views
Message digest provides only message authentication or can it provide user authentication also?MDC is a digest for message authentication.Can i also say MAC is also a dig...