← Back to section · Foundations of Cryptography

RSA Key Length and Safety Margin: Why Bits Grow So Slowly, and Why They Must Grow

From the factored RSA-129 challenge to the modern RSA-250 record, factoring capability advances along two curves — algorithms and compute. How security strength is converted, why 1024 bits is out, where 2048 bits' margin lies, and why longer keys are a dead end against quantum computing.

Published 22 November 2026 · 5 min read · PQ Frontier

RSA Key Length and Safety Margin: Why Bits Grow So Slowly, and Why They Must Grow
AI-generated site artwork
Video explainer · The RSA system: signing and verification

RSA’s safety-margin question is fundamentally a forecasting question: a key generated today must remain unfactorable for how many years? Answering it needs three things — where factoring technology stands now, how fast it is improving, and how different lengths convert into strength. This article takes them in turn.

A short history of factoring records: from prize challenge to routine

When RSA was proposed in 1977, Martin Gardner published the 129-decimal-digit challenge (RSA-129) in Scientific American; estimates at the time put factoring it with then-current techniques on timescales of tens of millions of years. Yet in 1994 a team of several hundred volunteers coordinating over the internet factored it in about eight months. The record kept moving: 155 digits (512 bits) in 1999, 768 bits in 2009, and by 2020 the public record reached 250 decimal digits (about 829 bits). All of these fell to the general number field sieve (GNFS), still the fastest known classical factoring algorithm, whose complexity is sub-exponential — slower than polynomial, faster than purely exponential.

Two details are worth noting. First, factoring 768 bits was a major academic project at the time, whereas 512 bits can today be factored on rented cloud compute with a hobbyist budget in hours to days — the same length feels completely different across eras. Second, the gaps between records are lengthening: each step up in length demands an order-of-magnitude jump in compute. That is the intuitive consequence of sub-exponential complexity.

Converting strength: what is 2048 bits actually worth?

Security strength is compared on a single scale — equivalent symmetric-key bits: the work needed to attack the scheme equals brute-forcing a symmetric key of that many bits. By the standard conversions used by NIST and similar bodies, RSA-1024 corresponds to roughly 80 bits, RSA-2048 to about 112, RSA-3072 to about 128, RSA-7680 to about 192, and RSA-15360 to about 256.

The table shows the cruelty of RSA’s length economics. Raising strength from 112 to 128 bits requires the modulus to grow from 2048 to 3072 bits — one and a half times — with a marked slowdown, since modular exponentiation costs grow superlinearly with length. The same 16-bit strength gain in a symmetric cipher is a trivial change from a 112-bit to a 128-bit key. This is why RSA struggles in performance-sensitive settings, and why the field has converged on “2048 by default, 3072 for long-lived systems”: 2048 bits, at about 112 bits of strength, is still considered to hold a margin measured in decades under the classical attack model, while 3072 bits aligns strength with the modern 128-bit baseline.

The retirement of 1024 bits was a standards action, not a panic: NIST ruled in the early 2010s that 80-bit strength was no longer approved for new applications, and 1024-bit RSA went with it. Corners of the real world still show 1024-bit keys — old devices, embedded certificates, systems unpatched for years — and they are the first items a migration inventory should clear.

Then why not use the longest keys everywhere?

Following the logic above, a natural question arises: if length buys security, why not run 4096 bits or more on every system? Because the length ledger has two sides. The benefit side shows diminishing returns: from 2048 to 3072 bits, strength rises from about 112 to 128 bits — a substantive gain; the next step to 192 bits costs 7680 bits, and for most systems’ threat models an attacker will never attack that hardest door anyway — they will go around it, through the implementation, the padding, the key storage. The cost side is concrete and superlinear: longer keys mean slower exponentiation (private-key operations scale roughly with the cube of the length), bigger certificates and signatures, more bytes per handshake, and noticeably longer generation and operation times on smart cards and embedded devices. History has its share of sites that moved from 2048 to 4096 bits, watched handshake latency climb, and moved back. The rational choice sizes the key to the data’s secrecy lifetime and the system’s service life: public-facing systems that will be naturally replaced within a decade have ample margin at 2048 bits; root certificates and code signing, where one signature must hold for twenty years, justify 3072 bits directly or a layered design (a long-lived root over short-lived intermediates). Length is insurance; the coverage should match what is being insured, not be maximal by default.

What the margin is racing against

Planning a key’s lifetime means outrunning two curves at once. The compute curve — hardware price-performance and the ability to organise computation at scale — has historically grown smoothly and can be extrapolated. The algorithm curve cannot: factoring algorithms have advanced in steps, from the quadratic sieve to the number field sieve, and the number field sieve itself keeps being optimised in its constants and variants. Prudent security assessment therefore never extrapolates from current records alone; it budgets a buffer for algorithmic surprise. “This length has not been factored today” and “this length will not be factored within twenty years” are different sentences, and the second needs a far larger margin.

The real exposure window also includes the secrecy lifetime of the data: traffic wrapped with RSA today can be recorded and opened later, once factoring capability — or a quantum computer — catches up. That is the harvest-now-decrypt-later problem. Key-length decisions should therefore be made against the lifetime of the data being protected, not the lifetime of the system.

Why lengthening is not the answer in the quantum era

Against Shor’s algorithm, the logic of longer keys collapses entirely. Shor’s algorithm factors nn at a cost growing polynomially with the number of bits: double the modulus and the quantum attack cost rises only gently, not by orders of magnitude as in the classical case. In other words, 2048 bits and 15360 bits differ only by “slightly more time” in front of a sufficiently large fault-tolerant quantum computer. Classical margin buys time with length; the quantum threat closes that shop altogether.

Key length therefore has a dual identity in this column. In the classical world it remains the main gauge of RSA’s remaining life, and the 2048/3072 choice decides directly whether a system is safe until quantum computers arrive. In the quantum context it is a reminder: every scheme rooted in factoring or discrete logarithms cannot renew its margin by parameters — the only renewal is migration to post-quantum algorithms on different mathematical foundations, such as lattices and hashes. Keeping those two layers distinct is what it means to really understand the question “how much longer is RSA good for?”

Tags: RSAkey lengthinteger factoring