EVP_SHA224(3ossl)

✨ EVP_SHA224 β€” the SHA-2 glow-up, but for EVP ✨

okay bestie, welcome to the EVP_SHA224 page from the 3ossl manual πŸ’– this is your group chat briefing on the whole SHA-2 family, so grab a strawberry πŸ“ and let's get into it.


🌸 NAME 🌸

EVP_sha224, EVP_sha256, EVP_sha512_224, EVP_sha512_256, EVP_sha384, EVP_sha512 β€” SHA-2 For EVP. that's it, that's the whole vibe. six functions, one iconic family. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <openssl/evp.h>

const EVP_MD *EVP_sha224(void);
const EVP_MD *EVP_sha256(void);
const EVP_MD *EVP_sha512_224(void);
const EVP_MD *EVP_sha512_256(void);
const EVP_MD *EVP_sha384(void);
const EVP_MD *EVP_sha512(void);

no arguments, no drama, just vibes and a const EVP_MD * return. periodt. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so. SHA-2. aka Secure Hash Algorithm 2. it's a whole family of cryptographic hash functions, standardized in NIST FIPS 180-4, and it first hit the scene in 2001. yes she's been that girl for decades. no cap. 🌈

πŸ’œ the functions, one by one πŸ’œ

EVP_sha224(), EVP_sha256(), EVP_sha512_224, EVP_sha512_256, EVP_sha384(), EVP_sha512()

these are the SHA-2 algorithms SHA-224, SHA-256, SHA-512/224, SHA512/256, SHA-384 and SHA-512. and how many bits of output do they each squeeze out of a given input? literally in order: 224, 256, 224, 256, 384 and 512 bits respectively. slay. ✨

and now the plot twist that trips everyone up: those two, SHA-512/224 and SHA512/256? they're truncated forms of the SHA-512 algorithm. so even though their outputs are the same size as SHA-224 and SHA-256, they are distinct from them. do not mix them up, bestie, that's not the same algorithm just because the number matches. πŸ™ˆ


🫢 NOTES 🫢

okay listen, this is the part where I hold your hand. πŸ₯Ί

developers should be aware of the negative performance implications of calling these functions multiple times. like, it's giving "why are you like this." instead, you should consider using EVP_MD_fetch(3) with EVP_MD-SHA2(7) instead. for further information, go peek at "Performance" in crypto(7). iykyk. πŸ’€

fr fr, don't spam these calls when there's a fetch option sitting right there.

πŸ’– RETURN VALUES πŸ’–

these functions return an EVP_MD structure that contains the implementation of the message digest. wanna know the details of the EVP_MD structure? see EVP_MD_meth_new(3). she's got layers, and that page has them. πŸŽ€


🌟 CONFORMING TO 🌟

NIST FIPS 180-4. iconic standard behavior only. ⭐


πŸ”₯ SEE ALSO πŸ”₯

go read them, they're part of the lore. πŸ“š


Copyright 2017-2023 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


that's the whole page bestie, and that's on periodt πŸ’…πŸ¦‹πŸŒΈ

OpenSSL 3.5.9 β€” dated 2026-09-29 β€” signing off from the EVP_SHA224(3ossl) page, mwah πŸ’‹

πŸ“¦ where this page comes from