MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClMac_Types

Defines all types of the mcuxClMac component. More...

Macros

#define MCUXCLMAC_ERRORCODE_OK
 Mac operation successful. More...
 
#define MCUXCLMAC_ERRORCODE_ERROR
 Error occurred during Mac operation. More...
 
#define MCUXCLMAC_ERRORCODE_FAULT_ATTACK
 Fault attack (unexpected behaviour) detected. More...
 
#define MCUXCL_HMAC_SIZE_OF_LENGTH_FIELD
 Size of HMAC length field. More...
 
#define MCUXCL_HMAC_MIN_PADDING_LENGTH
 Size of minimum HMAC padding length. More...
 
#define MCUXCLMAC_GET_HMAC_INPUTBUFFER_LENGTH(dataLength)
 Formula to calculate input buffer size for HMAC with SHA-256. More...
 

Typedefs

typedef uint32_t mcuxClMac_Status_t
 Type for Mac component error codes. More...
 
typedef uint64_t mcuxClMac_Status_Protected_t
 Type for error codes used by code-flow protected Mac component functions. More...
 
typedef struct mcuxClMac_Mode mcuxClMac_Mode_t
 Mac Mode type. More...
 
typedef struct mcuxClMac_Context mcuxClMac_Context_t
 Mac context type. More...
 
typedef struct mcuxClMac_WaCpu_t mcuxClMac_WaCpu_t
 Mac Cpu Work Area type. More...
 

Variables

const mcuxClMac_Mode_t mcuxClMac_Mode_CMAC
 Mode definition for CMAC. More...
 
const mcuxClMac_Mode_t mcuxClMac_Mode_HMAC_SHA2_256
 Mode definition for HMAC_SHA2_256. More...
 

Detailed Description

Defines all types of the mcuxClMac component.

Macro Definition Documentation

◆ MCUXCLMAC_ERRORCODE_OK

#define MCUXCLMAC_ERRORCODE_OK

Mac operation successful.

Examples
mcuxClMac_cmac_oneshot_example.c.

◆ MCUXCLMAC_ERRORCODE_ERROR

#define MCUXCLMAC_ERRORCODE_ERROR

Error occurred during Mac operation.

◆ MCUXCLMAC_ERRORCODE_FAULT_ATTACK

#define MCUXCLMAC_ERRORCODE_FAULT_ATTACK

Fault attack (unexpected behaviour) detected.

◆ MCUXCL_HMAC_SIZE_OF_LENGTH_FIELD

#define MCUXCL_HMAC_SIZE_OF_LENGTH_FIELD

Size of HMAC length field.

◆ MCUXCL_HMAC_MIN_PADDING_LENGTH

#define MCUXCL_HMAC_MIN_PADDING_LENGTH

Size of minimum HMAC padding length.

◆ MCUXCLMAC_GET_HMAC_INPUTBUFFER_LENGTH

#define MCUXCLMAC_GET_HMAC_INPUTBUFFER_LENGTH (   dataLength)

Formula to calculate input buffer size for HMAC with SHA-256.

Typedef Documentation

◆ mcuxClMac_Status_t

typedef uint32_t mcuxClMac_Status_t

Type for Mac component error codes.

◆ mcuxClMac_Status_Protected_t

typedef uint64_t mcuxClMac_Status_Protected_t

Type for error codes used by code-flow protected Mac component functions.

◆ mcuxClMac_Mode_t

typedef struct mcuxClMac_Mode mcuxClMac_Mode_t

Mac Mode type.

This internal type provides all implementation details for a mode to the top level mcuxClMac functions

◆ mcuxClMac_Context_t

typedef struct mcuxClMac_Context mcuxClMac_Context_t

Mac context type.

This type captures all the information that the Mac interface needs to know for a particular Mac mode/algorithm to work.

The size of the context depends on the mode used (see mcuxClMac_MemoryConsumption).

◆ mcuxClMac_WaCpu_t

Mac Cpu Work Area type.

Variable Documentation

◆ mcuxClMac_Mode_CMAC

const mcuxClMac_Mode_t mcuxClMac_Mode_CMAC

Mode definition for CMAC.

Examples
mcuxClMac_cmac_oneshot_example.c.

◆ mcuxClMac_Mode_HMAC_SHA2_256

const mcuxClMac_Mode_t mcuxClMac_Mode_HMAC_SHA2_256

Mode definition for HMAC_SHA2_256.

HMAC_SHA2_256 can only be executed in Oneshot mode. Partial processing is not supported.

The input buffer will be modified by applying padding to it. The caller must ensure that the input buffer is large enough by determining its size using MCUXCLMAC_GET_HMAC_INPUTBUFFER_LENGTH on the input.

Also note that HMAC only works with keys loaded into coprocessor (see mcuxClKey for details).