CRM_MAC_CREATE_AESCMAC

C

typedef int (*FUNC_CRM_MAC_CREATE_AESCMAC)(struct crmmac *c, const struct crmkeyref *key);
#define CRM_MAC_CREATE_AESCMAC                          ((FUNC_CRM_MAC_CREATE_AESCMAC)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_CRM_MAC_CREATE_AESCMAC)))

Description

Prepares an AES CMAC generation.

This function initializes the user allocated object \p c with a new AES CMAC operation context needed to run the CMAC generation. After successful execution of this function, the context \p c can be passed to any of the CMAC functions. @pre - key reference provided by \p key must be initialized using CRM_KEYREF_LOAD_MATERIAL() or CRM_KEYREF_LOAD_BY_ID()

Parameters

ParamDescription
cCMAC operation context
keyKey used for the CMAC generation operation, expected size 16, 24 or 32 bytes

Returns

CRM_OK CRM_ERR_INVALID_KEYREF CRM_ERR_INVALID_KEY_SZ CRM_ERR_INCOMPATIBLE_HW CRM_ERR_RETRY