Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
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.

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.
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.
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.
| Modulus size | Approximate symmetric strength | Status |
|---|---|---|
| 1024-bit | 80 bits | Disallowed; within reach of well-funded attackers |
| 2048-bit | 112 bits | Acceptable to 2030 under NIST SP 800-57 |
| 3072-bit | 128 bits | The sensible floor for anything built today |
| 4096-bit | 152 bits | Slower 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.
RSA keys are only as good as the randomness behind the primes.
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.
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.
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.
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.
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.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.