SHA512/224 Hash Generator

Generate the 224-bit truncated SHA-512 digest specified in FIPS 180-4.

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

About the SHA512/224 Hash Generator

SHA-512/224 runs the full SHA-512 compression function and then keeps only the first 224 bits of the result, giving 56 hexadecimal characters. It is not simply SHA-512 cut short: FIPS 180-4 gives it a distinct set of eight starting words, derived by hashing the ASCII string SHA-512/224 with a SHA-512 whose initial values have every byte flipped by 0xA5. Because the starting point differs, no relationship exists between this digest and the SHA-512 digest of the same message.

Two things recommend it. On 64-bit processors the SHA-512 core is noticeably faster than the SHA-256 core, since it works on 64-bit words, so a 224-bit output obtained this way can beat SHA-224 while occupying the same space on the wire. Discarding most of the state also removes the length extension problem outright, because an attacker who sees the digest has nowhere near enough of the chaining value to resume hashing from it.

Support is thinner than the mainstream algorithms, so treat it as a considered choice rather than a default. OpenSSL, Java and the Go standard library all provide it; many smaller libraries do not. This page computes it in JavaScript from the FIPS initial values, and the digest for the standard vector abc is 4634270f707b6a54daae7530460842e20e37ed265ceee9a43e8924aa if you want to check it against another implementation. Output is offered as hex in either case or Base64, and nothing is transmitted. The sibling with a 256-bit output is the SHA512/256 Hash Generator, and for the SHA-2 route to the same length see SHA-224.

How to use

  1. Paste the value you want to fingerprint into the left hand pane.
  2. Check the implementation by hashing abc and comparing against the vector quoted above.
  3. Choose Base64 when the digest has to fit into a compact token field.
  4. Copy the 56 character digest.

Common questions

Is SHA-512/224 just SHA-512 truncated?
The truncation is real but the starting values are different, so you cannot derive this digest by cutting a SHA-512 result short. The two functions are independent.
How does it compare with SHA-224?
Both output 224 bits. SHA-224 is built on the 32-bit SHA-256 core, while this uses the 64-bit SHA-512 core, which is usually faster on desktop and server processors.
Is it affected by length extension?
No. Only 224 of the 512 state bits are published, so there is not enough information to continue the hash from the digest.
Which tools produce the same value?
OpenSSL with the sha512-224 digest name, Java MessageDigest with SHA-512/224, and Go crypto/sha512 all agree with the output here.