RSA key generation starts with two primes and multiplies them into one modulus. This lesson keeps the numbers tiny so the public modulus can be checked directly.
highlighted = computed this step
Why RSA starts with primes
RSA starts by multiplying two primes into one modulus. The table shows the primes and the public modulus recomputed from them.
n=pq
Pick the two primes
The toy primes are p=5 and q=11. They are tiny so every arithmetic step can be checked.
p=5,q=11
Multiply into the modulus
Multiplying p by q gives n=55. The modulus is the shared arithmetic space for encryption and decryption.
5⋅11=55
What is public and what stays secret
The modulus n can be public. The primes p and q must stay secret because they make the private exponent derivable.
npublic,p,qsecret
Summary
Two primes make the modulus n=55. NOTE: toy-modulus; no-padding; no-side-channel; no-production; never-roll-your-own. Exact arithmetic on deliberately tiny toy keys; real RSA uses 2048+ bit keys with padding in reviewed libraries.