Modern · 1977

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.

OriginRon Rivest, Adi Shamir, Leonard Adleman (MIT, 1977); Clifford Cocks (GCHQ, 1973, classified)
Year1977
TypePublic-key encryption & digital signature (asymmetric)
StatusIn daily use; NIST is preparing a post-quantum migration (RSA breaks under Shor's algorithm on a sufficiently large quantum computer)
Modern RoleTLS certificates, code signing, PGP/GPG, SSH host keys, JWT signatures, document signing

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.

Historical Context

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.

How It Works

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.

Security & Cryptanalysis

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 You Use It Today
WhereHow RSA is Used
TLS / HTTPS certificatesRSA is supported alongside other certificate signature algorithms; key size and policy depend on the deployment
Code signingRSA signatures are supported in several software-signing ecosystems; the selected scheme varies
PGP / GPGRSA remains supported; modern OpenPGP implementations also support other key types
SSH host keysRSA keys can use SHA-256 or SHA-512 signatures. OpenSSH 8.8 disabled the SHA-1-based ssh-rsa signature scheme by default
JWT signaturesRS256 is an RSA PKCS#1 v1.5 signature option; applications must restrict accepted algorithms
Quick Facts
EraModern · 1977
StatusIn daily use; NIST is preparing a post-quantum migration (RSA breaks under Shor's algorithm on a sufficiently large quantum computer)
OriginRon Rivest, Adi Shamir, Leonard Adleman (MIT, 1977); Clifford Cocks (GCHQ, 1973, classified)
Year1977
TypePublic-key encryption & digital signature (asymmetric)
Modern RoleTLS certificates, code signing, PGP/GPG, SSH host keys, JWT signatures, document signing
← Previous Diffie-Hellman Key Exchange