Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is the RSA Algorithm?

RSA is a public-key cryptosystem whose security rests on the difficulty of factoring large numbers. It still signs most certificates, software packages, and documents in daily use.

Illustration for the cybersecurity term RSA Algorithm
Home / Blog / Cybersecurity Terms / What Is the RSA Algorithm?
17 November 2026

What Is the RSA Algorithm?

What Is the RSA Algorithm?

RSA is a public-key cryptosystem whose security rests on how hard it is to factor the product of two large prime numbers. Ron Rivest, Adi Shamir, and Leonard Adleman published it in 1977, giving the world its first practical way for two parties who had never met to exchange confidential messages and verify each other’s signatures. Clifford Cocks had described an equivalent construction at GCHQ in 1973, but that work stayed classified until 1997.

Almost fifty years later RSA still signs a large share of TLS certificates, software packages, and signed PDFs—and it is also the algorithm we most often find misconfigured during an assessment.

The Mathematics in One Paragraph

Key generation picks two large random primes, p and q, and multiplies them to produce the modulus n. A public exponent e is chosen (almost always 65537) together with a private exponent d, such that raising a number to the power e and then to the power d, modulo n, returns the original number. The public key is the pair (n, e) and the private key is d. Anyone can encrypt or verify with the public key; only the holder of d can decrypt or sign. Recovering d means factoring n, and no efficient classical algorithm for that is known.

What RSA Is Actually Used For

RSA is slow. Encrypting a 1 MB file directly with a 2048-bit key would be thousands of times slower than AES, and the plaintext cannot exceed the modulus size anyway. Real systems therefore use a hybrid design: a fast symmetric cipher protects the data and RSA protects the symmetric key or signs a hash of the message.

Key Sizes and Padding Matter More Than the Algorithm

Modulus sizeApproximate symmetric strengthStatus
1024-bit80 bitsDisallowed; within reach of well-funded attackers
2048-bit112 bitsAcceptable to 2030 under NIST SP 800-57
3072-bit128 bitsThe sensible floor for anything built today
4096-bit152 bitsSlower signing; rarely worth the cost over 3072

The public record shows how the margin is eroding: RSA-250, an 829-bit modulus, was factored in February 2020 using roughly 2,700 core-years of computation. Padding is the other half of the story. Textbook RSA is deterministic and trivially attacked, and the long-serving PKCS#1 v1.5 padding fell to Daniel Bleichenbacher’s adaptive chosen-ciphertext attack in 1998. Nineteen years later the ROBOT research showed that load balancers and application delivery controllers from several major vendors were still vulnerable to variants of the same attack. Use RSA-OAEP for encryption and RSA-PSS for signatures.

When Key Generation Goes Wrong

RSA keys are only as good as the randomness behind the primes.

The Quantum Clock

Peter Shor showed in 1994 that a sufficiently large quantum computer could factor integers efficiently, which ends RSA outright rather than merely weakening it. NIST standardised ML-KEM and ML-DSA as FIPS 203 and FIPS 204 in August 2024, and the NCSC published migration timelines in March 2025 asking UK organisations to complete discovery by 2028, migrate their highest-priority systems by 2031, and finish the transition by 2035. Data that must stay confidential into the 2030s is already at risk from harvest-now-decrypt-later collection, so cryptographic inventory work should start before the deadline, not at it.

Our Infrastructure Security Testing Services map the key sizes, padding modes, and certificate lifetimes in use across your estate so that the weak RSA deployments are known before an attacker finds them.

FAQ – Frequently Asked Questions

Is 2048-Bit RSA Still Safe?

For most purposes, yes, for now. NIST treats 2048-bit RSA as acceptable until 2030, and no public factorisation has come close to that size. The caution is lifespan: a certificate or signing key created today may still be trusted in 2032. If you are generating a new long-lived key, choose 3072 bits or move to elliptic curve cryptography instead.

Why Is the Public Exponent Always 65537?

65537 is prime and has only two bits set, which makes encryption and signature verification fast while avoiding the small-exponent problems that affect e=3. Very small exponents allowed attacks on badly padded messages, notably the 2006 Bleichenbacher signature forgery against PKCS#1 v1.5 implementations that did not parse padding strictly. 65537 has become the universal default for good reason.

Should We Replace RSA With Elliptic Curve Cryptography?

For new systems, elliptic curve keys give equivalent security at a fraction of the size: a 256-bit ECDSA or Ed25519 key matches 3072-bit RSA. That means smaller certificates, faster handshakes, and lower power use. RSA remains necessary where compatibility demands it, such as older appliances and some code-signing ecosystems, so plan a gradual move rather than a single cutover.

Does RSA Encrypt the Whole Message?

Almost never. RSA can only encrypt data smaller than the modulus, minus the padding overhead, so a 2048-bit key handles about 190 bytes with OAEP. Protocols therefore generate a random symmetric key, encrypt the message with AES or ChaCha20, and use RSA only on that key. Signing works the same way, over a hash rather than the full document.

Related Terms

You May Be Interested In These

What Is Token Impersonation?

Cybersecurity Terms

17 November 2026

What Is Token Impersonation?

Read More
What Is Mobile Data Leakage?

Cybersecurity Terms

17 November 2026

What Is Mobile Data Leakage?

Read More
What Is Telecom Fraud and Revenue Leakage?

Cybersecurity Terms

17 November 2026

What Is Telecom Fraud and Revenue Leakage?

Read More