Generate two large random prime numbers, p and q.
Calculate n = p * q. For strong unbreakable encryption, let n be a large number, typically a minimum of 512 bits.
Choose an integer e, which must be greater than 1 and less than (p − 1)(q − 1). There must be no common factor for e and (p − 1)(q − 1) except for 1. In other words two numbers e and (p – 1)(q – 1) are coprime.
Calculate the private key d , where 1 < d < (p - 1)(q - 1) and d * e = 1 mod ((p - 1)(q - 1))       Or, d = e-1 mod ((p - 1)(q - 1))
Suppose the sender wish to send some text message to someone whose public key is (n , e). The sender then represents the plaintext message as a positive integer m which less than n.
Computes the ciphertext as C = me mod n.
The receiver uses his private key (n , d) to compute m and extracts the plaintext from it.
(m = Cd mod n)
Select two prime numbers, p = 7 and q = 17
Calculate n = p * q = 7 * 17 = 119 and (p - 1)(q - 1) = (7 - 1)(17 - 1) = 6 * 16 = 96
Let e = 5 So, d = 77       [ (77 * 5) mod 96 = 1 ]
Therefore the public key is = [119, 5] and the private key is = [119, 77]
Let m = 19 [plaintext message]
So the cipher text C = (me mod n) = (195 mod 119) = (2476099 mod 119) = 66
m = (Cd mod n) = (6677 mod 119) = 19
IGNOU Assignment Solution
IGNOU Question Paper Solution
Solutions of Different Questions
WHAT WE DO
Provide BCA, MCA Projects
Provide Assignment & Question Paper Solution