Skip to content

New to public-key crypto? Start here.

The public key is an open padlock that anyone can snap shut on a box; the private key is the only key that opens it. So anyone can lock a message to you, but only you can read it. RSA builds that padlock out of a single number n that is the product of two secret prime numbers — easy to multiply together, but effectively impossible to pull back apart. That one-way difficulty is the whole trick: it is called a , and everything below is built on it.

Below you can generate real keys, encrypt and decrypt, add the padding (, ) that makes RSA safe in practice, and then break the versions that skip it. Hover or tap any dotted term for a plain-language definition.

Textbook RSA

NEVER USE DIRECTLY

RSA in its raw form: real primes, real modular exponentiation, real key generation — but no padding. See exactly why determinism makes textbook RSA completely insecure.

Do not use textbook RSA for real data
Textbook RSA is deterministic. The same plaintext always produces the same ciphertext, enabling trivial chosen-plaintext attacks. Real-world RSA requires OAEP padding — see Panel 2.

Step 1 — Generate RSA Key Parameters

Generate real prime numbers p and q, then compute all RSA parameters step by step. Use small primes (~32-bit) for visual clarity, or 256-bit primes (a 512-bit modulus) to see the numbers grow. Both are teaching sizes: this panel's key generation is naive BigInt Miller-Rabin, not production keygen. Real 2048/4096-bit RSA lives in the OAEP and PSS panels, where WebCrypto generates the keys. The chain below turns the two secret primes into a public lock (n, e) and a private key (d) via , and the whole point of is that it only inverts if you know d.

Side-by-Side — Textbook vs OAEP, Same Plaintext, Twice Each

Encrypt the same plaintext twice with textbook RSA and twice with RSA-OAEP. Compare byte-by-byte. Textbook collides on every byte (deterministic). OAEP differs on every byte (randomized). This is the single picture that makes "use OAEP" non-negotiable.

Why Textbook RSA Is Broken

  • Deterministic: Same plaintext always → same ciphertext. Attacker can build an encryption oracle and test known messages.
  • weakness: c₁ · c₂ mod n = Enc(m₁ · m₂) — ciphertexts can be multiplied to produce the encryption of the product.
  • Small message space: Low-entropy messages (like symmetric keys) are vulnerable to brute-force with an encryption oracle.
  • No ciphertext integrity: Any integer is a valid ciphertext — malleability attacks are trivial.
RFC 8017 (PKCS#1 v2.2), Section 7.1 — RSA-OAEP is the recommended encryption scheme. Textbook RSA is described only to explain the mathematical structure.

Oracle Without Factoring — √eNFS (2026)

DELAYED-TARGET RSA

Shea, Haller, Suhl, Heninger, and Thomé showed that a temporary raw-RSA oracle can be used to produce an e-th root for random targets without factoring N or recovering the private key. This is the delayed-target RSA model in §1 and §2 of ePrint 2026/2131, with the precise oracle/games in Fig. 6 and the one-more RSA comparison in §5. The paper is explicit that this is not plain RSA inversion, not ordinary factoring, and not a general one-more RSA break.

Source of truth: Shea, Haller, Suhl, Heninger, Thomé. "Forging 1024-bit RSA signatures in nearly SNFS time." IACR ePrint 2026/2131. Background: Joux–Naccache–Thomé, ASIACRYPT 2007 / ePrint 2007/424. Code: ucsd-hacc/NSNFSSSFSFN. The §4.5 trip report states the key was generated outside the HSM and imported; the attack then used black-box HSM responses without needing the factors or private key.

Threat model: delayed-target RSA (DT-RSA) vs OM-RSA

DT-RSA (the §1/§2 / Fig. 6 game)
  • Order of events: public key and precomputation first, then temporary access to a raw RSA signing oracle for approximately 4.07 billion oracle queries.
  • Oracle access ends; the attacker is then given a random target t and must produce t1/e mod N offline.
  • Forgery can be repeated offline for any target after the oracle window closes.
  • The private key and primes are not recovered; the paper's point is the temporary ability to forge chosen targets without factoring the modulus.
OM-RSA (the older, stricter game)
  • One-more RSA is a different chosen-target/one-more inversion assumption used in blind-signature proofs.
  • In the paper's §5 discussion they show √eNFS solves DT-RSA, while a straightforward adaptation for OM-RSA is much worse than GNFS.
  • Their point is precise: √eNFS does not solve plain RSA, factoring, or (efficiently) one-more RSA.
Figure 6 / §1 / §2 / §5: the paper names this setting “delayed-target RSA” and explicitly separates it from the ordinary factoring task and the OM-RSA assumption. This is not “break RSA by factoring”; it is a temporary oracle-assisted forgery model that leaves N unbroken. The measured 1024-bit computation is real; the paper's larger-key estimates are extrapolations and upper bounds, as §6 states.

Complexity: √eNFS vs GNFS vs SNFS

The paper uses the same LN(1/3, c) notation as the classical factoring literature. For this attack the relevant costs are: √eNFS = LN(1/3, 1.577), GNFS = LN(1/3, 1.923), and SNFS = LN(1/3, 1.526). The reason is that sieving is one-sided: the “other side” is traded for a large number of oracle queries, exactly as discussed in §3.1.

Ref: §3.1 and Fig. 7. The paper is explicit that this is a one-sided sieving speedup for the delayed-target setting, not a universal improvement for ordinary factoring or plain RSA.

Pipeline: from precomputation to forgery

The attack pipeline matches Fig. 3 and the timeline in Fig. 4: public key and precomputation first → temporary oracle access (approximately 4.07 billion raw-RSA queries) → oracle access ends → target arrives → offline forgery (descent, linear algebra mod e, e-th root in the number field).

Precomputation
~1200 core-years
Paper Fig. 4, Fig. 1; depends only on N, e.
Oracle queries
4,067,419,331 HSM queries
~232 raw queries; Fig. 4.
Per forgery
~180 core-years
Descent + linear algebra + e-th root; Fig. 4.
Wall time
~5 months
March 13 – Aug 31, 2026; Fig. 1, Fig. 4.

LIVE VERIFICATION — real math from §4

The paper gives the exact public key and forgery example in §4. This is the 1024-bit HSM test key they forged against; §4.5 states the researchers generated the key outside the HSM and imported it. The button below verifies the published equation s65537 mod N = t; it does not rerun the number-field sieve computation or independently establish how the paper derived s.

e
65537
N (1024-bit modulus, paper §4)
0xaa8bb728... (see source paper §4)
t (random target)
0x804fbc7e...
s = t^(1/e) mod N
0x944678c4...

Security table (Fig. 7) and caveats

Key length GNFS bit security √eNFS bit security Oracle queries
10248065232
204811290243
3072128105251
4096144–152119257

The paper explicitly says these are extrapolated security estimates and that the costs are upper bounds (§6). The takeaway is not “RSA is dead tomorrow,” but that in this model, 2048–4096-bit RSA falls short of a 128-bit security target even before considering ordinary factoring or the usual signature security reductions.

Who is exposed? What is not.

  • Exposed in practice: HSM raw-operation configurations and blind-RSA deployments can create the kind of oracle the paper exploits, including PKCS#11 CKM_RSA_X_509 behavior with FIPS mode off. This was the paper's actual oracle: Thales Luna K6 and remote Luna S750. That is a conditional exposure scenario, not proof that every RSA deployment is vulnerable.
  • Also exposed: RSA blind signatures: RFC 9474 RSABSSA, Privacy Pass publicly-verifiable tokens, iCloud Private Relay, GNU Taler RSA-FDH.
  • Bleichenbacher chaining: a PKCS#1 v1.5 padding oracle can be used to answer each raw query, so an attacker can maintain decryption ability after the bug is patched. This is the link back to the Bleichenbacher section above (§7.3).
  • Not exposed by default: normal PKCS#1 v1.5 / PSS signing is not, by itself, the raw oracle this attack needs. The paper separately discusses the padded/AMR variant in §5.2, which is a distinct and more expensive setting; it does not imply that all padded RSA signing is categorically safe or categorically broken. The results also do not carry to ECDSA or Ed25519.

Toy live piece: raw-oracle malleability at teaching size

This is not √eNFS. It is a tiny sanity check of one exact malleability ingredient the paper exploits at scale: if a raw RSA oracle signs m₁ and m₂, then it also implicitly signs m₁·m₂. Here the browser does only the textbook arithmetic the attack relies on; it is not a replica of the full 1,380 core-year computation.

Honesty panel

  • Academic CPUs only: no GPUs, no AI assistance in the attack itself. The authors estimate 2–9 GPU-years for 1024-bit with GPU sieving (§1.3).
  • Publication status: the paper was published on ePrint on Sept. 20, 2026 and is still a preprint at the moment of writing; the paper is a research result, not an emergency patch note.
  • Takeaway: the authors say this is not immediate alarm for most deployments, but that 2048–4096-bit RSA falls short of a 128-bit security target in this delayed-target model (§6); the estimate is an extrapolation, not a general factoring breakthrough.