Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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$

share|improve this question

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

This question came from our site for Information security professionals.

marked as duplicate by D.W., rath, e-sushi, figlesquidge, DrLecter Jan 16 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.

    
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. –  fgrieu Jan 14 at 15:24

1 Answer 1

up vote 1 down vote accepted

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$.

share|improve this answer
    
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? –  nilanjan Jan 15 at 3:24

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