**Key Generation:**Whoever wants to receive secret messages creates a public key (which is published) and a private key (kept secret). The keys are generated in a way that conceals their construction and makes it 'difficult' to find the private key by only knowing the public key.**Encryption:**A secret message to any person can be encrypted by his/her public key (that could be officially listed like phone numbers).**Decryption:**Only the person being addressed can easily decrypt the secret message using the private key.

The computation of the cofactors is useful for finding the (multiplicative) inverse of a number n w.r.t. a module m. Given two relatively prime numbers m,n, such that their GCD is 1 we have for the cofactors:

math page | start page