The idea is that each person has a public key known to the world and a private key that only they know. You encode messages using someones public key, and they decode them using their private key.

Invertible / Bijection

A function is invertible if for every y in the span, there is an in the span such that .

Or every x in the domain has a mapping in the range.

Pick any two distinct prime numbers and let . For any e relatively prime to (or for an e, such that ):

  1. The mapping is invertible on
  2. The inverse mapping is defined as follows: let d be the multiplicative inverse of Then, for →

So for a given x, we can encode using computed with modexp, and decode using again using modexp.

The public key is with a secret key . and which compute are very large primes.

This is secure since this would take forever to factor.