1. CMOX_CMAC

1.1. CMAC single-call algorithms

group CMOX_CMAC_ALGO

Variables

const cmox_mac_algo_t CMOX_CMAC_AESFAST_ALGO

Identifier of the CMAC using AES (fast implementation) for single-call function (Defined internally).

const cmox_mac_algo_t CMOX_CMAC_AESSMALL_ALGO

Identifier of the CMAC using AES (small implementation) for single-call function (Defined internally).

1.2. CMAC implementations

group CMOX_CMAC_IMPL

Variables

const cmox_cmac_impl_t CMOX_CMAC_AESSMALL

Implementation of CMAC using AES (small implementation) (Defined internally).

const cmox_cmac_impl_t CMOX_CMAC_AESFAST

Implementation of CMAC using AES (fast implementation) (Defined internally).

1.3. CMAC public method prototypes

group CMOX_CMAC_PUBLIC_METHODS

Functions

cmox_mac_handle_t * cmox_cmac_construct ( cmox_cmac_handle_t * P_pThis , cmox_cmac_impl_t P_impl )

CMAC constructor.

The function is used for specifying which block cipher algorithm to use in order to implement the CMAC algorithm.

Parameters :
  • P_pThis – Pointer to the CMAC handle to initialize

  • P_impl – Constant that specifies the implementation to use. This parameter must be set with the following value:

    • CMOX_CMAC_AESFAST

    • CMOX_CMAC_AESSMALL

Returns :

cmox_mac_handle_t* Pointer to a general MAC handle. This will be used by the general purpose MAC functions in order to perform the algorithm

1.4. CMAC public types

group CMOX_CMAC_PUBLIC_TYPES

Typedefs

typedef const struct cmox_cmac_implStruct_st * cmox_cmac_impl_t

CMAC implementation.

This type specifies the used block cipher for the CMAC construct. This type is defined as a pointer to a structure, that contains the functions needed for the specific implementation, defined in the library internally

struct cmox_cmac_handle_t
#include <cmox_cmac.h>

CMAC handle structure definition.

Public Members

cmox_mac_handle_t super

General MAC handle

cmox_blockcipher_handle_t blockCipher

Block cipher handle

uint32_t iv [ CMOX_CIPHER_BLOCK_SIZE ]

Buffer containing the Initialization Vector

uint8_t temp_buffer [ 16 ]

Temporary buffer to storing unprocessed data

uint32_t unprocessed_bytes

Number of bytes in the temporary buffer