SHA512/256 Hash Generator

Generate the 256-bit truncated SHA-512 digest defined in FIPS 180-4.

Text
SHA-512/256 digest
Runs locally in your browser

About the SHA512/256 Hash Generator

SHA-512/256 gives a 256-bit digest, 64 hexadecimal characters, by running SHA-512 from a purpose built set of starting words and publishing only the first four output words. The starting words come from hashing the label SHA-512/256 under a modified SHA-512, which is what keeps it independent of both SHA-512 and SHA-256 despite sharing machinery with one and a length with the other.

It exists because on 64-bit hardware SHA-512 processes roughly a third more bytes per cycle than SHA-256, yet many protocols only ever wanted 256 bits. Taking the faster core and cutting the output gives the speed without inflating the field. The truncation is not a compromise either: publishing half the state is precisely what blocks the length extension trick, so a construction as naive as hashing a secret followed by a message is sound here even though it is dangerous with plain SHA-256.

The catch is availability. Anything speaking to constrained devices or older libraries may not recognise the algorithm name, and hardware acceleration for SHA-256 on recent chips has narrowed the speed advantage that motivated the design. Where both ends support it, though, it is a clean choice. The value for the vector abc is 53048e2681941ef99b2e29b76b4c7dabe4c2d0c634fc6d46e0e2f13107e7af23, which you can use to confirm this page agrees with OpenSSL. Digests are calculated in the tab and never uploaded. The 224-bit sibling lives at the SHA512/224 Hash Generator, and the untruncated parent at the SHA-512 Hash Generator.

How to use

  1. Enter the text, identifier or record you want to hash on the left.
  2. Hash abc once to confirm the digest matches the reference value shown above.
  3. Pick Hex uppercase or Base64 if the receiving format demands it.
  4. Copy the 64 character digest out of the right hand pane.

Common questions

Is SHA-512/256 as strong as SHA-256?
Yes. Both give about 128 bits of collision resistance, and the truncated variant additionally resists length extension attacks.
Will it match a SHA-256 digest?
Never. The two use different compression cores and different initial values, so identical input produces two unrelated 64 character strings.
Why choose it over SHA-256?
Speed on 64-bit software implementations and the removal of length extension. If your platform has SHA-256 instructions in hardware, that advantage largely disappears.
What identifier do libraries use?
OpenSSL calls it sha512-256, Java calls it SHA-512/256, and Go exposes it as Sum512_256 in crypto/sha512.