Here is an excellent paper on the math of asymmetric key encryption: http://www.mathaware.org/mam/06/Kaliski.pdf

See the example on Page 6.

The public key = $55$ Primes used to calculate public key are $5$ and $11$.

$e = 3$

Now see the appendix: $L = \mathrm{LCM}(p-1, q-1) = 20$

The paper states $de = 1 \mod L$

I can't figure out how he gets the value of $d = 7$


marked as duplicate by D.W., rath, user6961, figlesquidge, DrLecter Jan 16 '14 at 9:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from security.stackexchange.com Jan 14 '14 at 11:23

This question came from our site for information security professionals.

  • $\begingroup$ Except for the value of $e$, and the use of $\varphi(n)=(p-1)\cdot(q-1)$ rather than $\mathrm{LCM}(p-1, q-1)$, this question is a duplicate of this one which has a fair answer, and others. $\endgroup$ – fgrieu Jan 14 '14 at 15:24

You compute the modular inverse of $e \pmod {20}$ with the Extended Euclidean Algorithm, but in this simple case with $e=3$ you can guess $d=7$ because $3\times 7 = 21$.

  • $\begingroup$ Is there any simple method to demonstrate the concept of public key/private key, i.e, just to illustrate the concept, not necessarily for security? $\endgroup$ – nilanjan Jan 15 '14 at 3:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.