CMAC Functions
The Intel IPP CMAC primitive functions use CMAC schemes based on block ciphers described in the
Symmetric Cryptography Primitive Functions.
A CMAC scheme is implemented as a set of primitive functions.
Typical application code for computing CMAC of an input message stream should follow the sequence of operations as outlined below:
- Call the functionAES_CMACGetSizeto get the size required to configure theIppsAES_CMACStatecontext.
- Ensure that the required memory space is properly allocated. With the allocated memory, call the functionAES_CMACInitto initialize the context.
- Keep calling the functionAES_CMACUpdateto update the MAC value of the incoming message stream in the queue till its completion. To determine the current MAC value, callAES_CMACGetTagbetween each two calls toAES_CMACUpdate.
- Call the functionAES_CMACFinalto complete computation of the MAC value of the streaming message and prepare the context for computation of MAC of another message.
- Clean up secret data stored in the context.
- Call the operating system memory free service function to release theIppsAES_CMACStatecontext.