---
title: "SHA-2 and SHA-3 and quantum computers"
description: "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."
url: "https://quantum.zksecurity.xyz/replacements/sha2-sha3/"
site: "PQ Tracker, maintained by zkSecurity"
reviewed: "2026-11-25"
license: "https://creativecommons.org/licenses/by/4.0/"
---

# SHA-2 and SHA-3 (SHA-256, SHA-384, SHA-512, SHA3 and SHAKE)

Classical algorithm · Hash function

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.

**zkSecurity** · Reviewed 2026-11-25

## Against a quantum computer

> 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.

## Replacement

None needed. SHA-384 or longer where a policy requires it.

- [NIST IR 8547](https://quantum.zksecurity.xyz/timelines/nist-ir-8547/): 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.
- [CNSA 2.0](https://quantum.zksecurity.xyz/timelines/cnsa-2-0/): SHA-384 or SHA-512 is required for U.S. National Security Systems.

## Notes

- 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.

- **Type**: Hash function
- **Hard problem**: [Preimage and collision search](https://quantum.zksecurity.xyz/assumptions/hash-functions/)
- **Against a quantum computer**: Holds (Grover: square-root speedup at most)
- **Recorded data**: Not exposed.
- **Replacement**: None needed
- **Used in**: Signatures, certificates, key derivation, commitments and Merkle trees.

### Specified in

- [FIPS 180-4, Secure Hash Standard](https://csrc.nist.gov/pubs/fips/180-4/upd1/final)
- [FIPS 202, SHA-3 Standard](https://csrc.nist.gov/pubs/fips/202/final)

**Sources (1)**

- [Bernstein: Cost analysis of hash collisions: will quantum computers make SHARCS obsolete? (2009)](https://cr.yp.to/hash/collisioncost-20090823.pdf)

### Audit

zkSecurity audits post-quantum implementations and migrations. [Request an audit](https://www.zksecurity.xyz/contact.html).

### Data

[data.json](https://quantum.zksecurity.xyz/replacements/sha2-sha3/data.json)
