EVP_MAC-HMAC(7ossl)
π EVP_MAC-HMAC π
ok so this is a page from the OpenSSL manual, bestie β like, the official docs, section 7, and it's literally all about the HMAC implementation of EVP_MAC. iykyk.
β¨ NAME β¨
EVP_MAC-HMAC β the HMAC EVP_MAC implementation. that's it, that's the whole vibe π«Ά
πΈ DESCRIPTION πΈ
so basically this gives you support for computing HMAC MACs through the EVP_MAC API. slay.
and the way it works? this implementation uses EVP_MD functions to get access to the underlying digest. that's the whole trick π
π Identity π
this implementation is identified with this name and these properties, to be used with EVP_MAC_fetch():
"HMAC", "provider=default" or "provider=fips"
no cap, that's the fetch string. iconic.
π¦ Supported parameters π¦
the general description of these parameters can be found in "PARAMETERS" in EVP_MAC(3). go look if you want the big picture π
ok so the following parameters can be set with EVP_MAC_CTX_set_params():
"key"(OSSL_MAC_PARAM_KEY) <octet string> β sets the MAC key. setting this parameter is identical to passing a key toEVP_MAC_init(3). same thing, different door π"digest"(OSSL_MAC_PARAM_DIGEST) <UTF8 string> β sets the name of the underlying digest to be used. pick your fave πΈ"properties"(OSSL_MAC_PARAM_PROPERTIES) <UTF8 string> β sets the properties to be queried when trying to fetch the underlying digest. β οΈ this must be given together with the digest naming parameter ("digest", orOSSL_MAC_PARAM_DIGEST) to be considered valid. they're a package deal, fr fr."digest-noinit"(OSSL_MAC_PARAM_DIGEST_NOINIT) <integer> β a flag to set the MAC digest to not initialise the implementation specific data. the value0or1is expected. π« this option is deprecated and will be removed in a future release. it may be set but is currently ignored."digest-oneshot"(OSSL_MAC_PARAM_DIGEST_ONESHOT) <integer> β a flag to set the MAC digest to be a one-shot operation. the value0or1is expected. π« this option is deprecated and will be removed in a future release. it may be set but is currently ignored too."tls-data-size"(OSSL_MAC_PARAM_TLS_DATA_SIZE) <unsigned integer> β see"Mac Parameters" in provider-mac(7). π"key-check"(OSSL_MAC_PARAM_FIPS_KEY_CHECK) <integer> β see"Mac Parameters" in provider-mac(7). π
π heads up: both"digest-noinit"and"digest-oneshot"are deprecated, destined for removal, and honestly just... ignored right now. don't build your whole personality around them.
and the following parameters can be retrieved with EVP_MAC_CTX_get_params():
"size"(OSSL_MAC_PARAM_SIZE) <unsigned integer> β the"size"parameter can also be retrieved withEVP_MAC_CTX_get_mac_size(). the length of the"size"parameter is equal to that of anunsigned int. π"block-size"(OSSL_MAC_PARAM_BLOCK_SIZE) <unsigned integer> β gets the MAC block size. the"block-size"parameter can also be retrieved withEVP_MAC_CTX_get_block_size(). π"fips-indicator"(OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR) <integer> β see"Mac Parameters" in provider-mac(7). π
π₯ SEE ALSO π₯
go read these next, bestie, they're all connected:
EVP_MAC_CTX_get_params(3)EVP_MAC_CTX_set_params(3)"PARAMETERS" in EVP_MAC(3)OSSL_PARAM(3)HMAC(3)
π COPYRIGHT π
Copyright 2018-2024 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>.
ok that's the whole page, mwah π this was version 3.5.6, dated 2026-04-07 β go forth and MAC responsibly, bestie π§π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms