EVP_MAC-HMAC(7ossl)
π NAME π
EVP_MAC-HMAC β bestie, this is the HMAC implementation for the EVP_MAC API. That's it, that's the whole vibe. (We're in the OpenSSL man pages, section 7ossl β welcome to the group chat.)
β¨ DESCRIPTION β¨
So basically: this is the support for computing HMAC MACs through the EVP_MAC API. Lowkey iconic, no cap.
Under the hood, this implementation uses EVP_MD functions to get access to the underlying digest. That's the whole trick, and it slays.
π Identity π
This implementation is identified with this name and these properties, to be used with EVP_MAC_fetch():
"HMAC", "provider=default" or "provider=fips"
Like, that's its whole government name. Use it with EVP_MAC_fetch() and you're good.
π Supported parameters π
The general description of these parameters lives in "PARAMETERS" in EVP_MAC(3) β go read that if you want the big picture, bestie.
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 doorway. πͺ"digest"(OSSL_MAC_PARAM_DIGEST)<UTF8 string>β Sets the name of the underlying digest to be used. Pick your fighter. π₯"properties"(OSSL_MAC_PARAM_PROPERTIES)<UTF8 string>β Sets the properties to be queried when trying to fetch the underlying digest. Heads up though: this must be given together with the digest naming parameter ("digest", orOSSL_MAC_PARAM_DIGEST) to be considered valid. No digest name, no deal. π«Ά"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. Same ghost energy. π"tls-data-size"(OSSL_MAC_PARAM_TLS_DATA_SIZE)<unsigned integer>"key-check"(OSSL_MAC_PARAM_FIPS_KEY_CHECK)<integer>β See"Mac Parameters"inprovider-mac(7). (These last two are grouped together in the original, so we're keeping them together, periodt.)
Ngl, those two deprecated flags (digest-noinitanddigest-oneshot) are gonna get yeeted in a future release. Set them if you want, but they're literally being ignored right now. Don't build your whole personality on them. π
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. Two ways in, same answer, we love efficiency. β"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(). Again: double the doorways, zero the drama. π¦"fips-indicator"(OSSL_MAC_PARAM_FIPS_APPROVED_INDICATOR)<integer>β See"Mac Parameters"inprovider-mac(7). π
π¦ SEE ALSO π¦
Go touch these, bestie β they're all in the friend group:
EVP_MAC_CTX_get_params(3)EVP_MAC_CTX_set_params(3)"PARAMETERS"inEVP_MAC(3)OSSL_PARAM(3)HMAC(3)
π COPYRIGHT π
Copyright 2018-2026 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>.
Okay so that's the whole page, mwah π
β this was OpenSSL 3.5.9, dated 2026-09-29, and yes the manual name is EVP_MAC-HMAC(7ossl), we just folded it in at the top so it didn't have to sit through the whole read. Byeee πβ¨π«Ά
π¦ where this page comes from
- alpine 3.23: openssl-doc 3.5.9-r0 Β· Apache-2.0
- alpine 3.24: openssl-doc 3.5.9-r0 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms