# man > EVP_MAC-CMAC(7ssl)

---
type: CommandReference
command: EVP_MAC-CMAC
mode: man
section: 7ssl
source: man-pages
---

## Quick Reference
- Fetch the CMAC implementation: `EVP_MAC_fetch(NULL, "CMAC", NULL)`
- Set the MAC key via `EVP_MAC_CTX_set_params()` with `"key"` parameter (equivalent to passing key to `EVP_MAC_init()`)
- Select the underlying cipher with `"cipher"` parameter (UTF8 string)
- Optionally set cipher fetch properties with `"properties"` parameter
- Retrieve the MAC output size: `EVP_MAC_CTX_get_mac_size()` or `"size"` param
- Retrieve the block size: `EVP_MAC_CTX_get_block_size()` or `"block-size"` param

## Name
EVP_MAC-CMAC - The CMAC EVP_MAC implementation

## Synopsis
Support for computing CMAC MACs through the **EVP_MAC** API. This implementation uses `EVP_CIPHER` functions to access the underlying cipher. The implementation is identified by the name `"CMAC"` and can be fetched via `EVP_MAC_fetch()`.

## Options
### Set Parameters
- `"key"` (OSSL_MAC_PARAM_KEY) <octet string> — Sets the MAC key. Identical to passing a key to `EVP_MAC_init()`.
- `"cipher"` (OSSL_MAC_PARAM_CIPHER) <UTF8 string> — Sets the name of the underlying cipher to be used.
- `"properties"` (OSSL_MAC_PARAM_PROPERTIES) <UTF8 string> — Sets the properties to be queried when fetching the underlying cipher. Must be given together with the cipher naming parameter.

### Get Parameters
- `"size"` (OSSL_MAC_PARAM_SIZE) <unsigned integer> — Retrieves the MAC output size. Also available via `EVP_MAC_CTX_get_mac_size()`.
- `"block-size"` (OSSL_MAC_PARAM_SIZE) <unsigned integer> — Retrieves the MAC block size. Also available via `EVP_MAC_CTX_get_block_size()`.

## See Also
- [EVP_MAC_CTX_get_params(3)](http://localhost/phpMan.php/man/params/3/markdown)
- [EVP_MAC_CTX_set_params(3)](http://localhost/phpMan.php/man/params/3/markdown)
- "PARAMETERS" in [EVP_MAC(3)](http://localhost/phpMan.php/man/MAC/3/markdown)
- [OSSL_PARAM(3)](http://localhost/phpMan.php/man/PARAM/3/markdown)