1
$\begingroup$

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$

$\endgroup$
1
  • $\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, 2014 at 15:24

1 Answer 1

1
$\begingroup$

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

$\endgroup$
2
  • $\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, 2014 at 3:24
  • $\begingroup$ Can d be 47 instead of 7? de % L = 47*3 % 20 = 121 % 20 = 1 $\endgroup$
    – IgNite
    Oct 4, 2022 at 20:40

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