Public Key Cryptography
Encryption: C = M^e ( modulo n )
Decryption: M = C^d ( modulo n )
M = the plain-text message expressed as an integer number.
C = the encrypted message expressed as an integer number.
n = the product of two randomly selected, large primes p and q.
d = a large, random integer relatively prime to (p-1)*(q-1).
e = the multiplicative inverse of d, that is:
( e * d )
1 ( modulo ( p - 1 ) * ( q - 1 ) )
The public key is the pair of numbers ( n, e ).
The private key is the pair of numbers ( n, d ).