RSA ALGO
1. Calculate value of N = P x Q, where P and Q are large prime nos.(given)
2. Calculate Z = (P - 1) x (Q - 1)
3. Choose a value for E (Public key) such that E & Z has no common factors other than 1 between them.
4. Calculate value of D (Private key) such that (E*D - 1 ) MOD Z = 0 , OR (E*D MOD Z = 1)
5. A's Public key becomes a tuple pair of <N,E>
6. A's Private key becomes a tuple-pair of <N,D>
7. Encryption formula (Cipher text): C = messageE MOD N
8. Decryption formula (Message): message = CD MOD N
So in the prob. we have P,Q. So we can calc. N & Z
Now,
E*D MOD N = 1
35*D MOD 192 = 1 ....(eqn)
The above eqn can be written as:
35*D = 1 + 192 * K ( K = some positive int.)
If we analyse the above eqn. it can be seen that D > 5 since we get a remainder of 1 on MODULUS.
Find a int. value for K such that , 192 * K + 1= 35*D.
Take K = 2, 1 + 192*2=385;
35*11 which implies D = 11 (ANS)