{
    "mode": "man",
    "parameter": "EVP_PKEY-HMAC",
    "section": "7SSL",
    "url": "https://www.chedong.com/phpMan.php/man/EVP_PKEY-HMAC/7SSL/json",
    "generated": "2026-05-30T06:08:21Z",
    "sections": {
        "NAME": {
            "content": "EVPPKEY-HMAC, EVPKEYMGMT-HMAC, EVPPKEY-Siphash, EVPKEYMGMT-Siphash, EVPPKEY-Poly1305,\nEVPKEYMGMT-Poly1305, EVPPKEY-CMAC, EVPKEYMGMT-CMAC - EVPPKEY legacy MAC keytypes and\nalgorithm support\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The HMAC and CMAC key types are implemented in OpenSSL's default and FIPS providers.\nAdditionally the Siphash and Poly1305 key types are implemented in the default provider.\nPerforming MAC operations via an EVPPKEY is considered legacy and are only available for\nbackwards compatibility purposes and for a restricted set of algorithms. The preferred way of\nperforming MAC operations is via the EVPMAC APIs. See EVPMACinit(3).\n\nFor further details on using EVPPKEY based MAC keys see EVPSIGNATURE-HMAC(7),\nEVPSIGNATURE-Siphash(7), EVPSIGNATURE-Poly1305(7) or EVPSIGNATURE-CMAC(7).\n",
            "subsections": [
                {
                    "name": "Common MAC parameters",
                    "content": "All the MAC keytypes support the following parameters.\n\n\"priv\" (OSSLPKEYPARAMPRIVKEY) <octet string>\nThe MAC key value.\n\n\"properties\" (OSSLPKEYPARAMPROPERTIES) <UTF8 string>\nA property query string to be used when any algorithms are fetched.\n"
                },
                {
                    "name": "CMAC parameters",
                    "content": "As well as the parameters described above, the CMAC keytype additionally supports the\nfollowing parameters.\n\n\"cipher\" (OSSLPKEYPARAMCIPHER) <UTF8 string>\nThe name of a cipher to be used when generating the MAC.\n\n\"engine\" (OSSLPKEYPARAMENGINE) <UTF8 string>\nThe name of an engine to be used for the specified cipher (if any).\n"
                },
                {
                    "name": "Common MAC key generation parameters",
                    "content": "MAC key generation is unusual in that no new key is actually generated. Instead a new\nprovider side key object is created with the supplied raw key value. This is done for\nbackwards compatibility with previous versions of OpenSSL.\n\n\"priv\" (OSSLPKEYPARAMPRIVKEY) <octet string>\nThe MAC key value.\n"
                },
                {
                    "name": "CMAC key generation parameters",
                    "content": "In addition to the common MAC key generation parameters, the CMAC key generation additionally\nrecognises the following.\n\n\"cipher\" (OSSLPKEYPARAMCIPHER) <UTF8 string>\nThe name of a cipher to be used when generating the MAC.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "EVPKEYMGMT(3), EVPPKEY(3), provider-keymgmt(7)\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.\n\nLicensed under the Apache License 2.0 (the \"License\").  You may not use this file except in\ncompliance with the License.  You can obtain a copy in the file LICENSE in the source\ndistribution or at <https://www.openssl.org/source/license.html>.\n\n\n\n3.0.2                                        2026-04-07                          EVPPKEY-HMAC(7SSL)",
            "subsections": []
        }
    },
    "summary": "EVPPKEY-HMAC, EVPKEYMGMT-HMAC, EVPPKEY-Siphash, EVPKEYMGMT-Siphash, EVPPKEY-Poly1305, EVPKEYMGMT-Poly1305, EVPPKEY-CMAC, EVPKEYMGMT-CMAC - EVPPKEY legacy MAC keytypes and algorithm support",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "EVPKEYMGMT",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/EVPKEYMGMT/3/json"
        },
        {
            "name": "EVPPKEY",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/EVPPKEY/3/json"
        },
        {
            "name": "provider-keymgmt",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/provider-keymgmt/7/json"
        }
    ]
}