What is a hash function?
A hash function turns any amount of data, a word or an entire archive, into a short fingerprint of fixed length. The same input always gives the same fingerprint, a one-character change gives a completely different one, and there's no practical way to work backwards from the fingerprint to the data. The most widely used today is SHA-256, from the SHA-2 family.
What a good hash guarantees
- One-way. Given a fingerprint, you can't find data that produces it.
- No collisions in practice. You can't find two different inputs with the same fingerprint.
- Sensitive. Any change to the input, however small, changes the fingerprint completely.
Where hashes are used
- Inside signatures. A digital signature is made over the message's hash, so it covers every character.
- Integrity checks. Comparing fingerprints shows whether a file, log or record has been altered.
- Passwords. Well-run systems store a slow, salted hash of each password rather than the password itself.
- Post-quantum signatures. SLH-DSA builds signatures entirely from hash functions, which is why it's the conservative backup.
What quantum computers do to hashes
Very little, in practice. Grover's algorithm could speed up the search for an input matching a given fingerprint, but only by a square root, and real quantum hardware would add large overheads on top. Finding collisions gains even less in practice. Current guidance treats SHA-256 and larger as remaining secure, and the US national security suite uses SHA-384 or larger for extra margin. Hashes need a size check, not a replacement.
Common confusions
- "Hashing is encryption." No. There's no key and no way to decrypt. A hash only fingerprints data.
- "MD5 and SHA-1 were broken by quantum computers." No. They were weakened by ordinary research years ago and shouldn't be used, but that's unrelated to quantum computing.
- "Quantum computers make hashes useless." No. They weaken them only modestly; modern sizes keep a comfortable margin.
Sources and further reading
Tags show what kind of source each one is (how sources are used). Checked against these sources on 12 October 2026. Spotted an error? Email hello@plainquantum.com and it will be corrected, with a note.
- StandardFIPS 180-4: Secure Hash Standard (SHS)NIST, 2015
- StandardFIPS 202: SHA-3 StandardNIST, 2015
- StandardFIPS 205: Stateless Hash-Based Digital Signature Standard (SLH-DSA)NIST, 2024
- Government guidanceNSA releases future quantum-resistant algorithm requirements for national security systems (CNSA 2.0)US National Security Agency, 2022