Algorithm

  1. choose and primes
    • Miller-Rabin
  2. calculate modulo
  3. choose such that
  4. calculate $d=e-1 (p-1) (q-1)$1
    • private key

Usage

  • Cypher:
  • Decypher:

using Euler’s Theorem2, modulo used is :

while, with the multiplicative inverse of the private key :

we can conclude

Example with Bob and Alice:

  • modulus and base are agreed publicly
  • private Alice key
  • public Alice key
  • private Bob key
  • public Bob key

Security

  • hard - decypher without knowing
  • hard - calculating knowing without knowing
  • hard - calculating knowing , with sufficiently big (at least 1024 bits)

Footnotes

  1. The algorithm used is Generalized Euclid’s Algorithm,

  2. for primes: