EVP_PKEY-HMAC(7ossl)
π NAME π
Okay bestie, welcome to the EVP_PKEY-HMAC(7ossl) manual page β this one is serving EVP_PKEY-HMAC, EVP_KEYMGMT-HMAC, EVP_PKEY-Siphash, EVP_KEYMGMT-Siphash, EVP_PKEY-Poly1305, EVP_KEYMGMT-Poly1305, EVP_PKEY-CMAC, and EVP_KEYMGMT-CMAC. Together they're the EVP_PKEY legacy MAC keytypes and algorithm support. β¨
πΈ DESCRIPTION πΈ
Okay so HMAC and CMAC key types are implemented in OpenSSL's default and FIPS providers. And Siphash and Poly1305 key types? They're implemented in the default provider too. π«Ά
Doing MAC operations via an EVP_PKEY is considered legacy β it's only available for backwards compatibility purposes and for a restricted set of algorithms. The preferred way of performing MAC operations is via the EVP_MAC APIs. See EVP_MAC_init(3). π
For further details on using EVP_PKEY based MAC keys, see EVP_SIGNATURE-HMAC(7), EVP_SIGNATURE-Siphash(7), EVP_SIGNATURE-Poly1305(7), or EVP_SIGNATURE-CMAC(7). π
π Common MAC parameters π
All the MAC keytypes support these parameters, no cap:
"priv"(OSSL_PKEY_PARAM_PRIV_KEY) β<octet string>. The MAC key value. π"properties"(OSSL_PKEY_PARAM_PROPERTIES) β<UTF8 string>. A property query string to be used when any algorithms are fetched. π
π¦ CMAC parameters π¦
As well as the parameters described above, the CMAC keytype additionally supports these:
"cipher"(OSSL_PKEY_PARAM_CIPHER) β<UTF8 string>. The name of a cipher to be used when generating the MAC. π₯"engine"(OSSL_PKEY_PARAM_ENGINE) β<UTF8 string>. The name of an engine to be used for the specified cipher (if any). π οΈ
π Common MAC key generation parameters π
MAC key generation is unusual in that no new key is actually generated. Instead a new provider side key object is created with the supplied raw key value. This is done for backwards compatibility with previous versions of OpenSSL. π
"priv"(OSSL_PKEY_PARAM_PRIV_KEY) β<octet string>. The MAC key value. π
π§ CMAC key generation parameters π§
In addition to the common MAC key generation parameters, the CMAC key generation additionally recognises this one:
"cipher"(OSSL_PKEY_PARAM_CIPHER) β<UTF8 string>. The name of a cipher to be used when generating the MAC. π
π SEE ALSO π
π COPYRIGHT π
Copyright 2020 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>. π
Final cute sign-off: this page is from OpenSSL 3.5.0, dated 2026-09-25, and its manual name is EVP_PKEY-HMAC(7ossl) β slay, bye bestie! π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms