EVP_MAC-BLAKE2(7ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸ’– EVP_MAC-BLAKE2 β€” the OpenSSL manual, but make it group chat πŸ’–

okay so bestie, listen. this is the EVP_MAC-BLAKE2(7ossl) page from the OpenSSL manual (yep, that OpenSSL), and it's literally all about the BLAKE2 EVP_MAC implementations. it's short, it's cute, and you're gonna slay it. 🫢


✨ NAME ✨

EVP_MAC-BLAKE2, EVP_MAC-BLAKE2BMAC, EVP_MAC-BLAKE2SMAC β€” the BLAKE2 EVP_MAC implementations. that's the whole name section, no cap. πŸ‘‘


🌸 DESCRIPTION 🌸

so basically: support for computing BLAKE2 MACs through the EVP_MAC API. that's the vibe. πŸ’…

πŸŽ€ Identity πŸŽ€

these implementations are identified with one of these names and properties, to be used with EVP_MAC_fetch(). write these down, bestie:

"BLAKE2BMAC", "provider=default"
"BLAKE2SMAC", "provider=default"

like, that's their whole government name. πŸ“›

πŸ¦‹ Supported parameters πŸ¦‹

the general description of these parameters can be found in "PARAMETERS" in EVP_MAC(3). (go read it, i'll wait πŸ’œ)

all these parameters (except for "block-size") can be set with EVP_MAC_CTX_set_params(). furthermore, the "size" parameter can be retrieved with EVP_MAC_CTX_get_params(), or with EVP_MAC_CTX_get_mac_size(). and the length of the "size" parameter should not exceed that of a size_t β€” that's a real one, don't be messy. πŸ™ˆ

likewise, the "block-size" parameter can be retrieved with EVP_MAC_CTX_get_params(), or with EVP_MAC_CTX_get_block_size(). iconic symmetry, love that for them. ✨

  • "key" (OSSL_MAC_PARAM_KEY) <octet string> β€” sets the MAC key. it may be at most 64 bytes for BLAKE2BMAC or 32 for BLAKE2SMAC, and at least 1 byte in both cases. setting this parameter is identical to passing a key to EVP_MAC_init(3). same energy, different door. πŸ”‘
  • "custom" (OSSL_MAC_PARAM_CUSTOM) <octet string> β€” sets the customization/personalization string. it's an optional value of at most 16 bytes for BLAKE2BMAC or 8 for BLAKE2SMAC, and is empty by default. make it yours, it's giving personal branding. πŸ’…
  • "salt" (OSSL_MAC_PARAM_SALT) <octet string> β€” sets the salt. it's an optional value of at most 16 bytes for BLAKE2BMAC or 8 for BLAKE2SMAC, and is empty by default. a lil seasoning, optional but tasty. πŸ§‚
  • "size" (OSSL_MAC_PARAM_SIZE) <unsigned integer> β€” sets the MAC size. it can be any number between 1 and 32 for EVP_MAC_BLAKE2S or between 1 and 64 for EVP_MAC_BLAKE2B. it is 32 and 64 respectively by default. pick your size, main character. πŸ“
  • "block-size" (OSSL_MAC_PARAM_BLOCK_SIZE) <unsigned integer> β€” gets the MAC block size. it is 64 for EVP_MAC_BLAKE2S and 128 for EVP_MAC_BLAKE2B. note the word gets β€” this one's read-only, she's not taking requests. πŸ’€
quick vibe check: remember that "block-size" is the odd one out β€” it can't be set, only retrieved. don't come for me, that's just what the page says. 🌈

🌟 SEE ALSO 🌟

go touch some grass and also read these, bestie:


⭐ HISTORY ⭐

the macros and functions described here were added to OpenSSL 3.0. so yes, she's a 3.0 girly. πŸŽ€


Copyright 2018-2021 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>. read the license, it's free real estate. πŸ“


and that's the whole page, bestie, you ate. 🫢 this was EVP_MAC-BLAKE2(7ossl) from OpenSSL, source version 3.5.6, dated 2026-04-07 β€” mwah, go forth and MAC responsibly. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from