RSA: weaknesses and attacks
Known attacks on RSA: keys that are too short, faulty random numbers, vulnerable padding, timing attacks and the threat of quantum computers.
RSA as a mathematical idea has held for almost fifty years. Almost all successful attacks have targeted flawed implementations and uses.
- Keys that are too short
- 512-bit keys were already factored at the end of the 1990s; 1024-bit keys are no longer considered secure.
- Faulty primes
- In 2012 two research groups found thousands of keys on the Internet sharing a prime factor, because of faulty random generators: a simple calculation was enough to break them.
- “Textbook” RSA
- Using RSA without a padding scheme makes encryption deterministic and malleable.
- Padding attacks
- In 1998 Daniel Bleichenbacher showed how to exploit a server’s error messages on the old PKCS#1 v1.5 padding to decrypt data; variants of this attack have resurfaced several times.
- Timing and side-channel attacks
- Measuring the time or power consumption of computations can reveal the private key if the implementation is not protected.
- Quantum computers
- Shor’s algorithm, on a large enough quantum computer, would factor quickly: this is the reason for the transition to post-quantum cryptography.
RSA today
Where RSA is still used — certificates, digital signatures, email and code — and why it is giving way to elliptic curves and post-quantum algorithms.
The pages of this topic
Back to the overviewRSA: how it works
Key generation, encryption, decryption and signing with RSA, explained step by step without complicated formulas.
RSA: history
From Diffie and Hellman’s 1976 revolution to the invention of RSA, from the patent to the discovery of the secret British precedent.
RSA: the maths
The formulas of RSA — modulus, Euler’s function, exponents, encryption and decryption — and the factoring problem on which security rests.
RSA: worked example
A complete RSA example with small numbers, from choosing the primes to encrypting and decrypting a number.
RSA: pitfalls to avoid
The most common mistakes developers and administrators make with RSA, from short keys to home-made implementations.
RSA: frequently asked questions
Short answers to the most common doubts about RSA, keys, security and quantum computers.