Algorithms

SHA-512/224

SHA-512 from its own start values cut to 28 bytes. Faster than SHA-224 on 64-bit machines and it has HMAC
IDsha512-22405 / 38SHA · 224-bit
Hash / Cryptographic

SHA-512/224

SHA-512 doing SHA-224's job, faster on 64 bits.

Digest
224-bit · 28 bytes
HMAC
takes a key
Security
112-bit collision resistance
Family
12 in SHA
4 options, 0 required

Sample

hex
22e0d52336f64a998085078b05a6e37b26f8120f43bf4db4c43a64ee
base64
IuDVIzb2SpmAhQeLBabjeyb4Eg9Dv020xDpk7g==

Options

encodingstring
default hex
Output encoding: hex, base64, base64url, binary
keystring
optional
HMAC key; enables HMAC mode
roundsnumber
default 1
How many times to hash, each round hashing the previous digest
chainstring
default bytes
What each round after the first hashes: bytes of the digest, or its lowercase hex

Access

Createcreate("sha512-224")
CLIhashes sha512-224 'hello world'
Tryplayground with the sample above
Kinsha256, sha384, sha512, sha224 +7

SHA-512 doing SHA-224's job. FIPS 180-4 added it in 2012, together with SHA-512/256. The idea is simple. SHA-512 works on 64-bit words, so on a 64-bit CPU it chews through more bytes per round than SHA-256 does.

ts
create("sha512-224").hash("abc").digest;
// "4634270f707b6a54daae7530460842e20e37ed265ceee9a43e8924aa"

Where do the start values come from? NIST hashes the name. It runs SHA-512 with its initial values XORed by a5a5a5a5… over the text SHA-512/224. A different name gives different values, so no truncation of SHA-512 lands here by accident.

Same 112-bit collision resistance as SHA-224, different digest. Pick the one your spec names. Both are honest, neither is popular.