About RSA

  1. choose two primes, and
  2. calculate
  3. calculate
    • is the Eular function, represents the number of integers prime with
    • if is a prime, then obviously
  4. choose no more than and prime with
  5. calculate such that
  6. then is public key and is private key
  7. don’t forget to destroy and

Now Alice wants to send some message to Bob.

She needs to transform the message string into a integer no more then .

  • ciphertext

When Bob receive the ciphertext, he needs to decrypt it.

  • plaintext

How to show that Bob can get right raw message?

The key point is when

In fact, we can choose more than two primes at beginning.

For example, choose primes

calculate

and calculate

then everything is the same.

The difficulty to crack RSA decides to the difficulty to factoring a big intger.

The big intger is just and if we can factor it into some primes, then we can calculate , and get .