The private key is made of two randomly generated prime numbers: and . How such large primes are found: how large primes are found for RSA.
The public key is made of:
n = p*q
- a randomly chosen integer exponent between
e_max = lcm(p -1, q -1), where
lcmis the Least common multiple
The inverse operation of finding the private
mfrom the public
eand is however believed to be a hard problem without knowing the factors of
However, if we know the private
q, we can solve the problem. As follows.
First we calculate the modular multiplicative inverse. TODO continue.
- https://www.comparitech.com/blog/information-security/rsa-encryption/ has a numeric example