EVP_BLAKE2B512(3ossl)

πŸ’– EVP_BLAKE2B512 πŸ’–

okay bestie, so this is a page from the OpenSSL manual β€” the 3ossl collection, if you're keeping track β€” and it's all about the BLAKE2 hash functions you can grab through EVP. sit down, hydrate, let's go 🫢


✨ NAME ✨

EVP_blake2b512, EVP_blake2s256 β€” BLAKE2 For EVP

like. the name literally tells you. two little functions, one big job: getting BLAKE2 into your EVP era. πŸ’…


🌸 SYNOPSIS 🌸

#include <openssl/evp.h>

const EVP_MD *EVP_blake2b512(void);
const EVP_MD *EVP_blake2s256(void);

that's it. that's the whole vibe. no arguments, no drama, just two functions that hand you a digest. iconic behavior honestly ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so like, real talk: BLAKE2 is the glow-up version of BLAKE β€” and BLAKE was originally submitted to the NIST SHA-3 algorithm competition. not me getting into a whole government-sponsored cryptographic bake-off 😭. anyway, the BLAKE2s and BLAKE2b algorithms themselves are described in RFC 7693, which is where you go if you want the actual math. we're just here for the API, bestie.

πŸ’œ EVP_blake2s256()

The BLAKE2s algorithm that produces a 256-bit output from a given input.

small name, solid output, no cap. πŸŽ€

πŸ’œ EVP_blake2b512()

The BLAKE2b algorithm that produces a 512-bit output from a given input.

the big sister. more bits, more slay. πŸ‘‘


⭐ NOTES ⭐

okay this part is the "listen to me carefully" part, so ears up 🫢

  • Developers should be aware of the negative performance implications of calling these functions multiple times, and should consider using EVP_MD_fetch(3) with EVP_MD-BLAKE2(7) instead. See "Performance" in crypto(7) for further information.
fr fr, if you're calling these in a loop you're lowkey doing the most for no reason. use the fetch route, your benchmark will thank you πŸ’€
  • Both algorithms support a variable-length digest, but this is only available through EVP_MD-BLAKE2(7).
so like… yes, variable-length digests exist, but NOT through the two functions on this page. that's a different girl's job. don't come for these two asking for custom lengths πŸ™ˆ

πŸ’« RETURN VALUES πŸ’«

These functions return a EVP_MD structure that contains the implementation of the message digest. See EVP_MD_meth_new(3) for details of the EVP_MD structure.

so you get back an EVP_MD, it's holding the implementation, and if you're nosy about what's inside it, EVP_MD_meth_new(3) is your girl. πŸ”₯


🌈 CONFORMING TO 🌈

RFC 7693.

that's the one. the receipts. the source material. πŸ“œ


πŸ‘‘ SEE ALSO πŸ‘‘


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>.

ngl the lawyers made me say it, but the license really does live in the LICENSE file and at that URL. read it, respect it, that's the vibe check. ⭐

and that's the whole page, bestie!! πŸŽ€ written for OpenSSL 3.5.9, dated 2026-09-29, filed under EVP_BLAKE2B512(3ossl). go hash something cute πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from