cryptography-rsa.html


* created: 2025-11-30T21:29
* modified: 2025-12-02T18:01

title

RSA

description

A asymmetric crypto method.

RSA

Steps:

  1. Choose two random k-bit prime numbers p and q (p \neq q)
  2. Calculate n = p \cdot q
  3. Calculate \varphi(n) = (p-1)(q-1)
  4. Choose an e with gcd(e, \varphi(n)) = 1
  5. Calculate d with ed \equiv 1 \pmod{\varphi(n)} using the extended euclidean algorithm

Parameter: