{
    "content": [
        {
            "type": "text",
            "text": "# EVP_PKEY-HMAC(7SSL) (man)\n\n**Summary:** EVPPKEY-HMAC, EVPKEYMGMT-HMAC, EVPPKEY-Siphash, EVPKEYMGMT-Siphash, EVPPKEY-Poly1305, EVPKEYMGMT-Poly1305, EVPPKEY-CMAC, EVPKEYMGMT-CMAC - EVPPKEY legacy MAC keytypes and algorithm support\n\n## See Also\n\n- EVPKEYMGMT(3)\n- EVPPKEY(3)\n- provider-keymgmt(7)\n\n## Section Outline\n\n- **NAME** (4 lines)\n- **DESCRIPTION** (9 lines) — 4 subsections\n  - Common MAC parameters (8 lines)\n  - CMAC parameters (9 lines)\n  - Common MAC key generation parameters (7 lines)\n  - CMAC key generation parameters (6 lines)\n- **SEE ALSO** (2 lines)\n- **COPYRIGHT** (9 lines)\n\n## Full Content\n\n### NAME\n\nEVPPKEY-HMAC, EVPKEYMGMT-HMAC, EVPPKEY-Siphash, EVPKEYMGMT-Siphash, EVPPKEY-Poly1305,\nEVPKEYMGMT-Poly1305, EVPPKEY-CMAC, EVPKEYMGMT-CMAC - EVPPKEY legacy MAC keytypes and\nalgorithm support\n\n### DESCRIPTION\n\nThe 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\n#### Common MAC parameters\n\nAll 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\n#### CMAC parameters\n\nAs 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\n#### Common MAC key generation parameters\n\nMAC 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\n#### CMAC key generation parameters\n\nIn 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\n### SEE ALSO\n\nEVPKEYMGMT(3), EVPPKEY(3), provider-keymgmt(7)\n\n### COPYRIGHT\n\nCopyright 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)\n\n"
        }
    ],
    "structuredContent": {
        "command": "EVP_PKEY-HMAC",
        "section": "7SSL",
        "mode": "man",
        "summary": "EVPPKEY-HMAC, EVPKEYMGMT-HMAC, EVPPKEY-Siphash, EVPKEYMGMT-Siphash, EVPPKEY-Poly1305, EVPKEYMGMT-Poly1305, EVPPKEY-CMAC, EVPKEYMGMT-CMAC - EVPPKEY legacy MAC keytypes and algorithm support",
        "synopsis": null,
        "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": [
                    {
                        "name": "Common MAC parameters",
                        "lines": 8
                    },
                    {
                        "name": "CMAC parameters",
                        "lines": 9
                    },
                    {
                        "name": "Common MAC key generation parameters",
                        "lines": 7
                    },
                    {
                        "name": "CMAC key generation parameters",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            }
        ]
    }
}