{
  "slug": "sha2-sha3",
  "name": "SHA-2 and SHA-3",
  "aka": "SHA-256, SHA-384, SHA-512, SHA3 and SHAKE",
  "group": "symmetric",
  "kind": "Hash function",
  "summary": "SHA-2 and SHA-3 are not broken by quantum computers and need no replacement. Some policies require SHA-384 or longer. Hash-based signatures rest on these functions alone.",
  "used_in": "Signatures, certificates, key derivation, commitments and Merkle trees.",
  "problem": "Preimage and collision search",
  "assumption": "hash-functions",
  "quantum": "holds",
  "attack": "Grover: square-root speedup at most",
  "exposure": "Not broken. Grover's algorithm finds a preimage of an n-bit hash in about 2^(n/2) evaluations. Quantum collision search needs about 2^(n/3) queries and as much quantum memory, and is not cheaper than classical collision search once hardware is counted.",
  "recorded": "Not exposed.",
  "keep": "SHA-384 or longer where a policy requires it",
  "guidance": [
    {
      "who": "NIST IR 8547",
      "href": "/timelines/nist-ir-8547/",
      "text": "NIST does not expect to transition away from its symmetric standards. Primitives with at least 128 bits of classical security meet category 1; the 112-bit level is disallowed in 2030."
    },
    {
      "who": "CNSA 2.0",
      "href": "/timelines/cnsa-2-0/",
      "text": "SHA-384 or SHA-512 is required for U.S. National Security Systems."
    }
  ],
  "replace": [],
  "alternatives": [],
  "changes": [
    "No migration. SLH-DSA, LMS and XMSS rest on these functions alone.",
    "SHA-1 and MD5 are retired because of classical collision attacks. That is unrelated to quantum computers."
  ],
  "specified": [
    {
      "title": "FIPS 180-4, Secure Hash Standard",
      "url": "https://csrc.nist.gov/pubs/fips/180-4/upd1/final"
    },
    {
      "title": "FIPS 202, SHA-3 Standard",
      "url": "https://csrc.nist.gov/pubs/fips/202/final"
    }
  ],
  "references": [
    {
      "title": "Bernstein: Cost analysis of hash collisions: will quantum computers make SHARCS obsolete? (2009)",
      "url": "https://cr.yp.to/hash/collisioncost-20090823.pdf"
    }
  ],
  "tags": [],
  "page": "https://quantum.zksecurity.xyz/replacements/sha2-sha3/",
  "reviewed": "2026-11-25",
  "standing": "no replacement needed"
}
