RSA
The first practical public-key cryptosystem — one key encrypts, a different key decrypts, and you can publish the encrypting key in the phone book.
Why This Matters
RSA provided an early practical construction for public-key encryption and digital signatures. These are different schemes built from related arithmetic, not merely one encryption operation run backwards. Secure encodings, key separation, authentication and application context are essential. A valid signature establishes a relationship to a key; it does not by itself establish a person's identity or resolve every non-repudiation dispute.
Rivest, Shamir and Adleman developed RSA at MIT in 1977, following the public-key research of Diffie and Hellman. Their construction was publicly described in 1977 and published in Communications of the ACM in 1978. Clifford Cocks had found a related construction at GCHQ in 1973, but that work remained classified until 1997.
Pick two large primes p and q (each ~1024 bits for RSA-2048). Compute n = p·q and φ(n) = (p−1)(q−1). Choose a public exponent e coprime to φ(n) — almost always 65537. Compute the private exponent d ≡ e−1 mod φ(n).
Public key is (n, e); private key is (n, d). To encrypt message m: c = me mod n. To decrypt: m = cd mod n. The math works because of Euler's theorem: med ≡ m mod n for any m coprime to n. Factoring n lets an attacker compute a private exponent. The Chinese remainder theorem extends this correctness argument to all message representatives from 0 to n−1, not only those coprime to n.
Factoring the modulus breaks RSA, but general RSA inversion has not been proved equivalent to factoring. Security claims must also specify the encoding and attack model: textbook RSA is deterministic and malleable. RFC 8017 defines schemes such as RSA-OAEP for encryption and RSA-PSS for signatures and recommends using a key pair for one scheme. A sufficiently capable quantum computer running Shor's algorithm would break RSA. NIST finalized ML-KEM for key establishment and ML-DSA and SLH-DSA for signatures in 2024; these serve different roles rather than providing one universal RSA replacement.
| Where | How RSA is Used |
|---|---|
| TLS / HTTPS certificates | RSA is supported alongside other certificate signature algorithms; key size and policy depend on the deployment |
| Code signing | RSA signatures are supported in several software-signing ecosystems; the selected scheme varies |
| PGP / GPG | RSA remains supported; modern OpenPGP implementations also support other key types |
| SSH host keys | RSA keys can use SHA-256 or SHA-512 signatures. OpenSSH 8.8 disabled the SHA-1-based ssh-rsa signature scheme by default |
| JWT signatures | RS256 is an RSA PKCS#1 v1.5 signature option; applications must restrict accepted algorithms |
| Era | Modern · 1977 |
| Status | In daily use; NIST is preparing a post-quantum migration (RSA breaks under Shor's algorithm on a sufficiently large quantum computer) |
| Origin | Ron Rivest, Adi Shamir, Leonard Adleman (MIT, 1977); Clifford Cocks (GCHQ, 1973, classified) |
| Year | 1977 |
| Type | Public-key encryption & digital signature (asymmetric) |
| Modern Role | TLS certificates, code signing, PGP/GPG, SSH host keys, JWT signatures, document signing |
Primary Sources
RFC 8017 (PKCS #1 v2.2, 2016); OpenSSH 8.8 release notes (2021); NIST FIPS 203, 204 and 205 (2024).