man > EVP_MAC-CMAC(7SSL)

📛 NAME

EVP_MAC-CMAC - The CMAC EVP_MAC implementation

🚀 Quick Reference

Use CaseCommandDescription
🔑 Fetch CMAC algorithmEVP_MAC_fetch(NULL, "CMAC", NULL)Obtain the CMAC implementation
🧰 Create contextEVP_MAC_CTX_new(mac)Allocate a new MAC context
🔐 Initialize with keyEVP_MAC_init(ctx, key, key_len, params)Set key and optional cipher via params
📨 Feed dataEVP_MAC_update(ctx, data, data_len)Hash message in chunks
✅ Finalize MACEVP_MAC_final(ctx, out, &out_len, out_size)Produce the authentication tag
📏 Get MAC sizeEVP_MAC_CTX_get_mac_size(ctx)Retrieve expected tag length
âš™ī¸ Set cipherEVP_MAC_CTX_set_params(ctx, {OSSL_MAC_PARAM_CIPHER, "aes-128-cbc"})Choose the underlying cipher
â™ģī¸ Clean upEVP_MAC_CTX_free(ctx); EVP_MAC_free(mac)Release resources

📖 DESCRIPTION

Support for computing CMAC MACs through the EVP_MAC API.

This implementation uses EVP_CIPHER functions to get access to the underlying cipher.

🆔 Identity

This implementation is identified with this name and properties, to be used with EVP_MAC_fetch():

"CMAC", "provider=default" or "provider=fips"

âš™ī¸ Supported parameters

The general description of these parameters can be found in "PARAMETERS" in EVP_MAC(3).

The following parameter can be set with EVP_MAC_CTX_set_params():

The following parameters can be retrieved with EVP_MAC_CTX_get_params():

🔗 SEE ALSO

EVP_MAC_CTX_get_params(3), EVP_MAC_CTX_set_params(3), "PARAMETERS" in EVP_MAC(3), OSSL_PARAM(3)

ÂŠī¸ COPYRIGHT

Copyright 2018-2021 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>.

EVP_MAC-CMAC(7SSL)
📛 NAME 🚀 Quick Reference 📖 DESCRIPTION
🆔 Identity âš™ī¸ Supported parameters
🔗 SEE ALSO ÂŠī¸ COPYRIGHT

Generated by phpman v4.9.29 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-21 00:08 @2600:1f28:365:80b0:d8a5:c3c6:bf94:28c0
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format