previous | start | next

RSA Example -- Key Generation

To create the public key, select two large positive prime numbers p and q p = 7, q = 17
Large enough for us!
Compute (p-1) * (q-1) x = 96
Choose an integer E which is relatively prime to x E = 5
Compute n = p * q n = 119
Kp is then n concatenated with E Kp = 119, 5

 
To create the secret key, compute D such that (D * E) mod x = 1 Ks = 119, 77

 


previous | start | next