RSA Public-Key Cryptography Lab

RSA asymmetric cryptography relies on the hardness of factoring n = pq while using Euler totient phi(n) = (p-1)(q-1) and the Extended Euclidean algorithm to pair public key (e, n) with private key (d, n).

Technical Reference & Equations

  • RSA Modulus & Euler Totient: n = p \cdot q, \quad \varphi(n) = (p - 1)(q - 1) (p, q: distinct prime numbers; n is public while p, q, and phi(n) remain secret.)
  • Private Exponent Congruence: e \cdot d \equiv 1 \pmod{\varphi(n)} (Computed via Extended Euclidean Algorithm whenever gcd(e, phi(n)) = 1.)
  • Modular Encryption & Decryption: C = M^e \bmod n, \quad M = C^d \bmod n (Evaluated in O(log e) steps via binary square-and-multiply modular exponentiation.)

View full Cryptography & Security Formula Sheet | Constants Table

Related Crypto & Security Calculators