Functions | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Cmac_Init (CRYPTOLITE_Type *base, uint8_t const *key, cy_stc_cryptolite_aes_state_t *cmacState, cy_stc_cryptolite_aes_buffers_t *aesBuffers) |
The function for initialization of CMAC operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Cmac_Start (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *cmacState) |
Starts CMAC calculation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Cmac_Update (CRYPTOLITE_Type *base, uint8_t const *message, uint32_t messageSize, cy_stc_cryptolite_aes_state_t *cmacState) |
Performs cmac update for multi stage operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Cmac_Finish (CRYPTOLITE_Type *base, uint8_t *cmac, cy_stc_cryptolite_aes_state_t *cmacState) |
Completes CMAC calculation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Cmac_Free (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *cmacState) |
Clears CMAC operation context. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Cmac (CRYPTOLITE_Type *base, uint8_t const *key, uint8_t const *message, uint32_t messageSize, uint8_t *cmac, cy_stc_cryptolite_aes_state_t *cmacState) |
Performs CMAC(Cipher-based Message Authentication Code) operation on a message to produce message authentication code using AES. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Hmac_Sha256_Init (CRYPTOLITE_Type *base, cy_stc_cryptolite_context_hmac_sha256_t *cfContext) |
The function to initialize the HMAC operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Hmac_Sha256_Start (CRYPTOLITE_Type *base, uint8_t const *key, uint32_t keyLength, cy_stc_cryptolite_context_hmac_sha256_t *cfContext) |
Initializes the initial Hash vector. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Hmac_Sha256_Update (CRYPTOLITE_Type *base, uint8_t const *message, uint32_t messageSize, cy_stc_cryptolite_context_hmac_sha256_t *cfContext) |
Performs the HMAC update on message. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Hmac_Sha256_Finish (CRYPTOLITE_Type *base, uint8_t *hmac, cy_stc_cryptolite_context_hmac_sha256_t *cfContext) |
Completes the HMAC SHA256 calculation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Hmac_Sha256_Free (CRYPTOLITE_Type *base, cy_stc_cryptolite_context_hmac_sha256_t *cfContext) |
Clears the used memory and context data. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Hmac_Sha256_Run (CRYPTOLITE_Type *base, uint8_t const *key, uint32_t keyLength, uint8_t const *message, uint32_t messageSize, uint8_t *hmac, cy_stc_cryptolite_context_hmac_sha256_t *cfContext) |
This function performs the HMAC SHA256 function. More... | |
cy_en_cryptolite_status_t Cy_Cryptolite_Cmac_Init | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | key, | ||
cy_stc_cryptolite_aes_state_t * | cmacState, | ||
cy_stc_cryptolite_aes_buffers_t * | aesBuffers | ||
) |
The function for initialization of CMAC operation.
base | The pointer to the CRYPTOLITE instance. |
key | The pointer to the CMAC key. |
cmacState | The pointer to the AES state structure allocated by the user. The user must not modify anything in this structure. |
aesBuffers | The buffers should be a SAHB mapped addresses. The pointer to the memory buffers storage. |
cy_en_cryptolite_status_t Cy_Cryptolite_Cmac_Start | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | cmacState | ||
) |
Starts CMAC calculation.
base | The pointer to the CRYPTOLITE instance. |
cmacState | The pointer to the structure which stores the CMAC context. |
cy_en_cryptolite_status_t Cy_Cryptolite_Cmac_Update | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
cy_stc_cryptolite_aes_state_t * | cmacState | ||
) |
Performs cmac update for multi stage operation.
base | The pointer to the CRYPTOLITE instance. |
message | The pointer to the message whose CMAC is being computed. |
messageSize | The size of the message whose CMAC is being computed. |
cmacState | The pointer to the structure which stores the CMAC context. |
cy_en_cryptolite_status_t Cy_Cryptolite_Cmac_Finish | ( | CRYPTOLITE_Type * | base, |
uint8_t * | cmac, | ||
cy_stc_cryptolite_aes_state_t * | cmacState | ||
) |
Completes CMAC calculation.
base | The pointer to the CRYPTOLITE instance. |
cmac | The pointer to the computed CMAC value. |
cmacState | The pointer to the structure which stores the CMAC context. |
cy_en_cryptolite_status_t Cy_Cryptolite_Cmac_Free | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | cmacState | ||
) |
Clears CMAC operation context.
base | The pointer to the CRYPTOLITE instance. |
cmacState | The pointer to the AES state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Cmac | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | key, | ||
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
uint8_t * | cmac, | ||
cy_stc_cryptolite_aes_state_t * | cmacState | ||
) |
Performs CMAC(Cipher-based Message Authentication Code) operation on a message to produce message authentication code using AES.
base | The pointer to the CRYPTOLITE instance. |
message | The pointer to a source plain text. |
messageSize | The size of a source plain text. |
key | The pointer to the encryption key. |
cmac | The pointer to the calculated CMAC. |
cmacState | The pointer to the AES state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Hmac_Sha256_Init | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_context_hmac_sha256_t * | cfContext | ||
) |
The function to initialize the HMAC operation.
base | The pointer to the Cryptolite instance. |
cfContext | The pointer to the cy_stc_cryptolite_context_hmac_sha256_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Hmac_Sha256_Start | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | key, | ||
uint32_t | keyLength, | ||
cy_stc_cryptolite_context_hmac_sha256_t * | cfContext | ||
) |
Initializes the initial Hash vector.
base | The pointer to the CRYPTOLITE instance. |
key | The pointer to the HMAC key. |
keyLength | The length of the HMAC key. |
key The pointer to the HMAC key.
keyLength The length of the HMAC key.
cfContext | The pointer to the cy_stc_cryptolite_context_hmac_sha256_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Hmac_Sha256_Update | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
cy_stc_cryptolite_context_hmac_sha256_t * | cfContext | ||
) |
Performs the HMAC update on message.
base | The pointer to the CRYPTOLITE instance. |
message | The address pointer to the message whose Hash is being computed. |
messageSize | The size of the message whose Hash is being computed. |
cfContext | The pointer to the cy_stc_cryptolite_context_hmac_sha256_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Hmac_Sha256_Finish | ( | CRYPTOLITE_Type * | base, |
uint8_t * | hmac, | ||
cy_stc_cryptolite_context_hmac_sha256_t * | cfContext | ||
) |
Completes the HMAC SHA256 calculation.
base | The pointer to the CRYPTOLITE instance. |
hmac | The address pointer to the calculated Hmac. |
cfContext | The pointer to the cy_stc_cryptolite_context_hmac_sha_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Hmac_Sha256_Free | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_context_hmac_sha256_t * | cfContext | ||
) |
Clears the used memory and context data.
base | The pointer to the CRYPTOLITE instance. |
cfContext | The pointer to the cy_stc_cryptolite_context_hmac_sha256_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Hmac_Sha256_Run | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | key, | ||
uint32_t | keyLength, | ||
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
uint8_t * | hmac, | ||
cy_stc_cryptolite_context_hmac_sha256_t * | cfContext | ||
) |
This function performs the HMAC SHA256 function.
Provide the required parameters and the pointer to the context structure when making this function call. It is independent of the previous Crypto state because it already contains preparation, calculation, and finalization steps.
base | The pointer to the CRYPTOLITE instance. |
key | The pointer to the HMAC key. |
keyLength | The length of the HMAC key. |
message | The address pointer to a message whose hash value is being computed. |
messageSize | The size of a message in bytes. |
hmac | The address pointer to the hmac. |
cfContext | The pointer to the cy_stc_cryptolite_context_hmac_sha256_t structure that stores all internal variables for Cryptolite driver. |