Functions | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Cmac (CRYPTO_Type *base, uint8_t const *message, uint32_t messageSize, uint8_t const *key, cy_en_crypto_aes_key_length_t keyLength, uint8_t *cmac, cy_stc_crypto_aes_state_t *aesState) |
Calculates the AES Cipher-based Message Authentication Code (CMAC) on the input message with the provided key. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Cmac_Init (CRYPTO_Type *base, void *cmacState, void *buffer) |
The function for initialization of CMAC operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Cmac_Start (CRYPTO_Type *base, void *cmacState, uint8_t const *aesKey, cy_en_crypto_aes_key_length_t keyLength) |
Starts CMAC calculation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Cmac_Update (CRYPTO_Type *base, void *cmacState, uint8_t const *message, uint32_t messageSize) |
Performs cmac update for multi stage operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Cmac_Finish (CRYPTO_Type *base, void *cmacState, uint8_t *cmac) |
Completes CMAC calculation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Cmac_Free (CRYPTO_Type *base, void *cmacState) |
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameter cmac must align and end in 32 byte boundary. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Hmac (CRYPTO_Type *base, uint8_t *hmac, uint8_t const *message, uint32_t messageSize, uint8_t const *key, uint32_t keyLength, cy_en_crypto_sha_mode_t mode) |
Performs the HMAC calculation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Hmac_Init (CRYPTO_Type *base, cy_stc_crypto_hmac_state_t *hmacState, cy_en_crypto_sha_mode_t mode, void *hmacBuffer) |
The function to initialize the HMAC operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Hmac_Start (CRYPTO_Type *base, cy_stc_crypto_hmac_state_t *hmacState, uint8_t const *key, uint32_t keyLength) |
Initializes the HMAC key. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Hmac_Update (CRYPTO_Type *base, cy_stc_crypto_hmac_state_t *hmacState, uint8_t const *message, uint32_t messageSize) |
Performs the multipart hmac operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Hmac_Finish (CRYPTO_Type *base, cy_stc_crypto_hmac_state_t *hmacState, uint8_t *hmac) |
Finishes the hmac operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Hmac_Free (CRYPTO_Type *base, cy_stc_crypto_hmac_state_t *hmacState) |
Frees the internally stored buffers in hmac context. More... | |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Cmac | ( | CRYPTO_Type * | base, |
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
uint8_t const * | key, | ||
cy_en_crypto_aes_key_length_t | keyLength, | ||
uint8_t * | cmac, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Calculates the AES Cipher-based Message Authentication Code (CMAC) on the input message with the provided key.
base | The pointer to the CRYPTO instance. |
message | The pointer to the source plain text. Must be 4-byte aligned. |
messageSize | The size of the source plain text in bytes. |
key | The pointer to the encryption key. Must be 4-byte aligned. |
keyLength | cy_en_crypto_aes_key_length_t |
cmac | The pointer to the calculated CMAC. |
aesState | The pointer to the AES state structure allocated by the user. The user must not modify anything in this structure. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Cmac_Init | ( | CRYPTO_Type * | base, |
void * | cmacState, | ||
void * | buffer | ||
) |
The function for initialization of CMAC operation.
base | The pointer to the CRYPTO instance. |
cmacState | The pointer to the structure which stores the CMAC context. |
buffer | The pointer to the cmac buffer. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Cmac_Start | ( | CRYPTO_Type * | base, |
void * | cmacState, | ||
uint8_t const * | aesKey, | ||
cy_en_crypto_aes_key_length_t | keyLength | ||
) |
Starts CMAC calculation.
base | The pointer to the CRYPTO instance. |
cmacState | The pointer to the structure which stores the CMAC context. |
aesKey | The pointer to the cmac key. |
keyLength | cy_en_crypto_aes_key_length_t |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Cmac_Update | ( | CRYPTO_Type * | base, |
void * | cmacState, | ||
uint8_t const * | message, | ||
uint32_t | messageSize | ||
) |
Performs cmac update for multi stage operation.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameter message must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
cmacState | The pointer to the structure which stores the CMAC context. |
message | The pointer to the message whose CMAC is being computed. |
messageSize | The size of the message whose CMAC is being computed. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Cmac_Finish | ( | CRYPTO_Type * | base, |
void * | cmacState, | ||
uint8_t * | cmac | ||
) |
Completes CMAC calculation.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameter cmac must align and end in 32 byte boundary.
cmacState | The pointer to the structure which stores the CMAC context. |
base | The pointer to the CRYPTO instance. |
cmac | The pointer to the computed CMAC value. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Cmac_Free | ( | CRYPTO_Type * | base, |
void * | cmacState | ||
) |
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameter cmac must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
cmacState | The pointer to the structure which stores the CMAC context. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Hmac | ( | CRYPTO_Type * | base, |
uint8_t * | hmac, | ||
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
uint8_t const * | key, | ||
uint32_t | keyLength, | ||
cy_en_crypto_sha_mode_t | mode | ||
) |
Performs the HMAC calculation.
base | The pointer to the CRYPTO instance. |
hmac | The pointer to the calculated HMAC. Must be 4-byte aligned. |
message | The pointer to the message whose hash value is being computed. |
messageSize | The size of the message. |
key | The pointer to the key. |
keyLength | The length of the key. |
mode | cy_en_crypto_sha_mode_t |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Hmac_Init | ( | CRYPTO_Type * | base, |
cy_stc_crypto_hmac_state_t * | hmacState, | ||
cy_en_crypto_sha_mode_t | mode, | ||
void * | hmacBuffer | ||
) |
The function to initialize the HMAC operation.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters hmacState and hmacBuffer must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
hmacState | The pointer to the HMAC state. |
hmacBuffer | The pointer to the chmac buffer structure that stores all buffers for HMAC operation. |
mode | cy_en_crypto_sha_mode_t |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Hmac_Start | ( | CRYPTO_Type * | base, |
cy_stc_crypto_hmac_state_t * | hmacState, | ||
uint8_t const * | key, | ||
uint32_t | keyLength | ||
) |
Initializes the HMAC key.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters key & hmacState (m0Key) must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
hmacState | The pointer to the HMAC state. |
key | the pointer to the hmac key |
keyLength | the length of the key |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Hmac_Update | ( | CRYPTO_Type * | base, |
cy_stc_crypto_hmac_state_t * | hmacState, | ||
uint8_t const * | message, | ||
uint32_t | messageSize | ||
) |
Performs the multipart hmac operation.
base | The pointer to the CRYPTO instance. |
hmacState | The pointer to the HMAC state. |
message | the pointer to the message |
messageSize | the length of the message |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Hmac_Finish | ( | CRYPTO_Type * | base, |
cy_stc_crypto_hmac_state_t * | hmacState, | ||
uint8_t * | hmac | ||
) |
Finishes the hmac operation.
base | The pointer to the CRYPTO instance. |
hmacState | The pointer to the HMAC state. |
hmac | the pointer to store the hmac. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Hmac_Free | ( | CRYPTO_Type * | base, |
cy_stc_crypto_hmac_state_t * | hmacState | ||
) |
Frees the internally stored buffers in hmac context.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters hmacState must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
hmacState | The pointer to the HMAC state. |