{
  "slug": "rsa-encryption",
  "name": "RSA encryption",
  "aka": "RSA-OAEP, RSAES-PKCS1-v1_5, RSA key transport",
  "group": "key-establishment",
  "kind": "Public-key encryption",
  "summary": "RSA encryption is broken by Shor's algorithm. Its replacement is ML-KEM, a key-encapsulation mechanism: it establishes a shared secret and does not encrypt a message of the caller's choice.",
  "used_in": "Key transport in TLS 1.2 and earlier, S/MIME and CMS, OpenPGP, JOSE, and key wrapping in HSMs and key-management services.",
  "problem": "Integer factorization",
  "quantum": "broken",
  "attack": "Shor's algorithm",
  "exposure": "Shor's algorithm factors the modulus in polynomial time, so a larger key does not help. Ciphertexts recorded today can be decrypted once a large enough quantum computer exists.",
  "recorded": "Exposed. Recorded ciphertexts can be decrypted later.",
  "out_label": "Ciphertext",
  "sizes": [
    {
      "label": "RSA-2048",
      "pk": 256,
      "out": 256
    },
    {
      "label": "RSA-3072",
      "pk": 384,
      "out": 384
    }
  ],
  "replace": [
    {
      "slug": "ml-kem",
      "name": "ML-KEM",
      "standard": "FIPS 203",
      "status": "Final",
      "standardized": true,
      "note": "The general-purpose replacement. NIST recommends ML-KEM-768 as the default; CNSA 2.0 requires ML-KEM-1024.",
      "page": "https://quantum.zksecurity.xyz/algorithms/ml-kem/"
    }
  ],
  "alternatives": [
    {
      "slug": "hqc",
      "name": "HQC",
      "standard": "FIPS (no number yet)",
      "status": "Selected, in development",
      "standardized": false,
      "note": "Selected by NIST as the second KEM, on a code-based assumption. No standard or draft yet.",
      "page": "https://quantum.zksecurity.xyz/algorithms/hqc/"
    },
    {
      "slug": "frodokem",
      "name": "FrodoKEM",
      "standard": "ISO/IEC (in progress)",
      "status": "Recommended by BSI and ANSSI; not selected by NIST",
      "standardized": false,
      "note": "Unstructured lattices, at the cost of keys and ciphertexts of 10 to 20 KB. Recommended by BSI and ANSSI.",
      "page": "https://quantum.zksecurity.xyz/algorithms/frodokem/"
    },
    {
      "slug": "classic-mceliece",
      "name": "Classic McEliece",
      "standard": "ISO/IEC 18033-2 Amd 2",
      "status": "New attacks in 2026",
      "standardized": false,
      "note": "Standardized by ISO/IEC in 2026 and under active cryptanalysis since. Not advised for new deployments.",
      "page": "https://quantum.zksecurity.xyz/algorithms/classic-mceliece/"
    }
  ],
  "protocols": [
    "RFC 9936",
    "RFC 9935",
    "draft-ietf-lamps-pq-composite-kem",
    "RFC 9980"
  ],
  "changes": [
    "ML-KEM does not encrypt a message of the caller's choice. Formats that RSA-encrypt a content key move to encapsulate, derive, then wrap. RFC 9629 defines this for CMS; the post-quantum KEMs for HPKE are still a working group draft.",
    "ML-KEM-768 encapsulation keys and ciphertexts are 1,184 and 1,088 bytes, against 256 for RSA-2048.",
    "Key generation is fast, so ephemeral keys and forward secrecy are practical where RSA key transport had neither.",
    "An RSA key pair used for both encryption and signing needs two replacements: ML-KEM and a signature algorithm."
  ],
  "specified": [
    {
      "title": "RFC 8017, PKCS #1 v2.2",
      "url": "https://www.rfc-editor.org/info/rfc8017"
    },
    {
      "title": "NIST SP 800-56B Rev. 2",
      "url": "https://csrc.nist.gov/pubs/sp/800/56/b/r2/final"
    }
  ],
  "references": [
    {
      "title": "RFC 9629, Using Key Encapsulation Mechanism (KEM) Algorithms in the Cryptographic Message Syntax (CMS)",
      "url": "https://www.rfc-editor.org/info/rfc9629"
    }
  ],
  "tags": [
    "rsa-ecc"
  ],
  "timelines": [
    "nist-ir-8547",
    "cnsa-2-0",
    "australia-asd-ism"
  ],
  "proposed": [
    {
      "name": "Post-quantum and hybrid KEMs for HPKE",
      "url": "https://datatracker.ietf.org/doc/draft-ietf-hpke-pq/",
      "note": "ML-KEM and hybrid KEM identifiers for HPKE, the general-purpose public-key encryption scheme. An IETF working group draft."
    }
  ],
  "page": "https://quantum.zksecurity.xyz/replacements/rsa-encryption/",
  "reviewed": "2026-11-25",
  "standing": "standardized replacement"
}
