RSA being a block cipher the plaintext and cipher text must be integers between 0 and n-1 for some n. 

Encryption

  • Suppose A wants to send message M (M<n) to B.
  • Obtain the recipient B’s public key (n,e)
  • Find the exponentiation on M = Me [e is the B’s public key]
  • From the above value calculate the cipher text C of the plain text M

            C= Me mod n

  • Send this cipher text C to B. 

Decryption

  • B uses his private key (n,d) to compute the plain text M from the cipher text
  • I.e. M= Cd mod n.

Digital Signing/Signature Verification 

Digital Signature

  • Sender A creates a message digest of the chat message to be sent.
  • This digest should be an integer m between 0 and n-1.
  • Computes the signature S= md mod n using his private key (n, d).
  • Sends this signature S to B for verification.

 Deffi Hellman Key Exchange Algorithm

            This algorithm is developed by Whitfield Diffie and Martin Hellman in the year 1976, this is one of the oldest known algorithm used in most of the protocols (SSL, SSH, IPSec) for the secure exchange of shared secret between two parties over a network.

            This is a one kind of Symmetric key encryption algorithm in which both the parties use the same key for encryption and decryption. The algorithm is developed using fundamental mathematics that a high school student can understand. In this algorithm both the parties will agree up on a shared secret which is used to generate a symmetric key at both ends. The excellence of this algorithm is that a key won’t be travelling over a network by which eavesdropper can have accesses, only the shared secret used to develop the keys at both ends is travelled over a network.

This Project Paper is written & submitted by Deepak V.