Functions | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_ProcessBlock (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *aesState, uint32_t *dstBlock, uint32_t const *srcBlock) |
Performs the AES block cipher. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Init (CRYPTOLITE_Type *base, uint8_t const *key, cy_stc_cryptolite_aes_state_t *aesState, cy_stc_cryptolite_aes_buffers_t *aesBuffers) |
Sets AES key and the buffers. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Free (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *aesState) |
Clears AES operation context. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ecb (CRYPTOLITE_Type *base, uint8_t *dst, uint8_t const *src, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES operation on one block. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ecb_Setup (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES ECB setup operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ecb_Update (CRYPTOLITE_Type *base, uint32_t srcSize, uint8_t *dst, uint8_t const *src, uint32_t *dstLength, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES ECB Multistage update operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ecb_Finish (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES ECB finish operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Cbc (CRYPTOLITE_Type *base, uint32_t srcSize, uint8_t *ivPtr, uint8_t *dst, uint8_t const *src, cy_stc_cryptolite_aes_state_t *aesState) |
Performs AES operation on a plain text with Cipher Block Chaining (CBC). More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Cbc_Setup (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CBC setup operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Cbc_Set_IV (CRYPTOLITE_Type *base, uint8_t const *iv, cy_stc_cryptolite_aes_state_t *aesState) |
Function to set AES CBC IV. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Cbc_Update (CRYPTOLITE_Type *base, uint32_t srcSize, uint8_t *dst, uint8_t const *src, uint32_t *dstLength, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CBC Multistage update operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Cbc_Finish (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CBC finish operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_CbcMac_Setup (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CBC MAC setup operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_CbcMac_Update (CRYPTOLITE_Type *base, uint32_t srcSize, uint8_t const *src, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CBC MAC Multistage update operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_CbcMac_Finish (CRYPTOLITE_Type *base, uint8_t *mac, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CBC MAC finish operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Cfb (CRYPTOLITE_Type *base, cy_en_cryptolite_dir_mode_t dirMode, uint32_t srcSize, uint8_t *ivPtr, uint8_t *dst, uint8_t const *src, cy_stc_cryptolite_aes_state_t *aesState) |
Performs AES operation on a plain text with the Cipher Feedback Block method (CFB). More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Cfb_Setup (CRYPTOLITE_Type *base, cy_en_cryptolite_dir_mode_t dirMode, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CFB setup operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Cfb_Set_IV (CRYPTOLITE_Type *base, uint8_t const *iv, cy_stc_cryptolite_aes_state_t *aesState) |
Sets IV for AES CFB mode. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Cfb_Update (CRYPTOLITE_Type *base, uint32_t srcSize, uint8_t *dst, uint8_t const *src, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CFB Multistage update operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Cfb_Finish (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CFB finish operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ctr (CRYPTOLITE_Type *base, uint32_t srcSize, uint32_t *srcOffset, uint8_t *ivPtr, uint8_t *dst, uint8_t const *src, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES operation on a plain text using the counter method (CTR). More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ctr_Setup (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CTR setup operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ctr_Set_IV (CRYPTOLITE_Type *base, const uint8_t *iv, cy_stc_cryptolite_aes_state_t *aesState) |
Sets IV for the AES CTR operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ctr_Update (CRYPTOLITE_Type *base, uint32_t srcSize, uint8_t *dst, uint8_t const *src, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CTR Multistage update operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ctr_Finish (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES CTR Finish operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ctr_Zeropad (CRYPTOLITE_Type *base, uint32_t srcSize, uint8_t *ivPtr, uint8_t *dst, uint8_t const *src, cy_stc_cryptolite_aes_state_t *aesState) |
Performs an AES operation on a plain text using the counter method (CTR). More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ccm_Init (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_ccm_buffers_t *aesCcm_buffer, cy_stc_cryptolite_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM Init operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ccm_SetKey (CRYPTOLITE_Type *base, uint8_t const *key, cy_stc_cryptolite_aes_ccm_state_t *aesCcmState) |
Sets AES CCM Key for the operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ccm_Set_Length (CRYPTOLITE_Type *base, uint32_t aadSize, uint32_t textSize, uint32_t tagLength, cy_stc_cryptolite_aes_ccm_state_t *aesCcmState) |
Sets the length for Additional authentication data, plain text and Tag for AES CCM operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ccm_Start (CRYPTOLITE_Type *base, cy_en_cryptolite_dir_mode_t dirMode, uint32_t ivSize, uint8_t const *iv, cy_stc_cryptolite_aes_ccm_state_t *aesCcmState) |
Function to set IV for the AES CCM operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ccm_Update_Aad (CRYPTOLITE_Type *base, uint32_t aadSize, uint8_t const *aad, cy_stc_cryptolite_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM update AAD Multistage operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ccm_Update (CRYPTOLITE_Type *base, uint32_t srcSize, uint8_t *dst, uint8_t const *src, cy_stc_cryptolite_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM Update Multistage update operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ccm_Finish (CRYPTOLITE_Type *base, uint8_t *tag, cy_stc_cryptolite_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM finish operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ccm_Encrypt_Tag (CRYPTOLITE_Type *base, uint32_t ivSize, uint8_t const *iv, uint32_t aadSize, uint8_t const *aad, uint32_t srcSize, uint8_t *cipherTxt, uint8_t const *plainTxt, uint32_t tagSize, uint8_t *tag, cy_stc_cryptolite_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM Encrypt operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ccm_Decrypt (CRYPTOLITE_Type *base, uint32_t ivSize, uint8_t const *iv, uint32_t aadSize, uint8_t const *aad, uint32_t srcSize, uint8_t *plainTxt, uint8_t const *cipherTxt, uint32_t tagSize, uint8_t *tag, cy_en_cryptolite_ccm_auth_result_t *isValid, cy_stc_cryptolite_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM Decrypt operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Aes_Ccm_Free (CRYPTOLITE_Type *base, cy_stc_cryptolite_aes_ccm_state_t *aesCcmState) |
Clears AES CCM operation context. More... | |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_ProcessBlock | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | aesState, | ||
uint32_t * | dstBlock, | ||
uint32_t const * | srcBlock | ||
) |
Performs the AES block cipher.
base | The pointer to the CRYPTOLITE instance. |
aesState | the pointer to the cy_stc_cryptolite_aes_state_t structure that stores all internal variables for Cryptolite driver. |
dstBlock | The pointer to the cipher text. |
srcBlock | The pointer to the plain text. Must be 4-Byte aligned! |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Init | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | key, | ||
cy_stc_cryptolite_aes_state_t * | aesState, | ||
cy_stc_cryptolite_aes_buffers_t * | aesBuffers | ||
) |
Sets AES key and the buffers.
base | The pointer to the CRYPTOLITE instance. |
key | The pointer to the encryption/decryption key. The key must align in 4 byte boundary. |
aesState | The pointer to the AES state structure allocated by the user. The user must not modify anything in this structure. |
aesBuffers | The pointer to the memory buffers storage. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Free | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Clears AES operation context.
base | The pointer to the CRYPTOLITE instance. |
aesState | 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_Aes_Ecb | ( | CRYPTOLITE_Type * | base, |
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES operation on one block.
base | The pointer to the CRYPTOLITE instance. |
dst | The pointer to a destination cipher block. |
src | The pointer to a source block. |
aesState | 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_Aes_Ecb_Setup | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES ECB setup operation.
base | The pointer to the CRYPTOLITE instance. |
aesState | 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_Aes_Ecb_Update | ( | CRYPTOLITE_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
uint32_t * | dstLength, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES ECB Multistage update operation.
base | The pointer to the CRYPTOLITE instance. |
srcSize | The size of the source block. |
dst | The pointer to a destination cipher block. |
src | The pointer to a source block. |
dstLength | The size of the calculated cipher block. |
aesState | 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_Aes_Ecb_Finish | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES ECB finish operation.
base | The pointer to the CRYPTOLITE instance. |
aesState | 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_Aes_Cbc | ( | CRYPTOLITE_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | ivPtr, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs AES operation on a plain text with Cipher Block Chaining (CBC).
base | The pointer to the CRYPTOLITE instance. |
srcSize | The size of the source plain text. |
ivPtr | The pointer to the initial vector. |
dst | The pointer to a destination cipher text. |
src | The pointer to a source plain text. |
aesState | 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_Aes_Cbc_Setup | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CBC setup operation.
base | The pointer to the CRYPTOLITE instance. |
aesState | 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_Aes_Cbc_Set_IV | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | iv, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Function to set AES CBC IV.
base | The pointer to the CRYPTOLITE instance. |
iv | The pointer to the IV. |
aesState | 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_Aes_Cbc_Update | ( | CRYPTOLITE_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
uint32_t * | dstLength, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CBC Multistage update operation.
base | The pointer to the CRYPTOLITE instance. |
srcSize | The size of the source block. |
dst | The pointer to a destination cipher block. |
src | The pointer to a source block. |
dstLength | The size of the calculated dst block. |
aesState | 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_Aes_Cbc_Finish | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CBC finish operation.
base | The pointer to the CRYPTOLITE instance. |
aesState | 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_Aes_CbcMac_Setup | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CBC MAC setup operation.
base | The pointer to the CRYPTOLITE instance. |
aesState | 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_Aes_CbcMac_Update | ( | CRYPTOLITE_Type * | base, |
uint32_t | srcSize, | ||
uint8_t const * | src, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CBC MAC Multistage update operation.
base | The pointer to the CRYPTOLITE instance. |
srcSize | The size of the source block. |
src | The pointer to a source block. |
aesState | 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_Aes_CbcMac_Finish | ( | CRYPTOLITE_Type * | base, |
uint8_t * | mac, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CBC MAC finish operation.
base | The pointer to the CRYPTOLITE instance. |
mac | The pointer to store the calculated mac. |
aesState | 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_Aes_Cfb | ( | CRYPTOLITE_Type * | base, |
cy_en_cryptolite_dir_mode_t | dirMode, | ||
uint32_t | srcSize, | ||
uint8_t * | ivPtr, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs AES operation on a plain text with the Cipher Feedback Block method (CFB).
base | The pointer to the CRYPTOLITE instance. |
dirMode | cy_en_cryptolite_dir_mode_t |
srcSize | The size of the source plain text. |
ivPtr | The pointer to the initial vector. |
dst | The pointer to a destination cipher text. |
src | The pointer to a source plain text. |
aesState | The pointer to the AES state structure allocated by the user. The user must must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Cfb_Setup | ( | CRYPTOLITE_Type * | base, |
cy_en_cryptolite_dir_mode_t | dirMode, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CFB setup operation.
base | The pointer to the CRYPTO instance. |
dirMode | Can be CY_CRYPTOLITE_ENCRYPT or CY_CRYPTO_DECRYPT (cy_en_cryptolite_dir_mode_t). |
aesState | 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_Aes_Cfb_Set_IV | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | iv, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Sets IV for AES CFB mode.
base | The pointer to the CRYPTO instance. |
iv | The pointer to iv. |
aesState | 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_Aes_Cfb_Update | ( | CRYPTOLITE_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CFB Multistage update operation.
base | The pointer to the CRYPTO instance. |
srcSize | The size of the source block. |
dst | The pointer to a destination cipher block. |
src | The pointer to a source block. |
aesState | 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_Aes_Cfb_Finish | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CFB finish operation.
base | The pointer to the CRYPTO instance. |
aesState | 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_Aes_Ctr | ( | CRYPTOLITE_Type * | base, |
uint32_t | srcSize, | ||
uint32_t * | srcOffset, | ||
uint8_t * | ivPtr, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES operation on a plain text using the counter method (CTR).
base | The pointer to the CRYPTOLITE instance. |
srcSize | The size of a source plain text. |
srcOffset | The size of an offset within the current block stream for resuming within the current cipher stream. |
ivPtr | The 128-bit initial vector that contains a 64-bit nonce and 64-bit counter. |
dst | The pointer to a destination cipher text. |
src | The pointer to a source plain text. Must be 4-Byte aligned. |
aesState | The pointer to the AES state structure allocated by the user. The user must must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ctr_Setup | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CTR setup operation.
base | The pointer to the CRYPTOLITE instance. |
aesState | 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_Aes_Ctr_Set_IV | ( | CRYPTOLITE_Type * | base, |
const uint8_t * | iv, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Sets IV for the AES CTR operation.
base | The pointer to the CRYPTOLITE instance. |
iv | The pointer to iv. |
aesState | 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_Aes_Ctr_Update | ( | CRYPTOLITE_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CTR Multistage update operation.
base | The pointer to the CRYPTOLITE instance. |
srcSize | The size of the source block. |
dst | The pointer to a destination cipher block. |
src | The pointer to a source block. |
aesState | 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_Aes_Ctr_Finish | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES CTR Finish operation.
base | The pointer to the CRYPTOLITE instance. |
aesState | 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_Aes_Ctr_Zeropad | ( | CRYPTOLITE_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | ivPtr, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_cryptolite_aes_state_t * | aesState | ||
) |
Performs an AES operation on a plain text using the counter method (CTR).
base | The pointer to the CRYPTOLITE instance. |
srcSize | The size of a source plain text. |
ivPtr | The 128-bit initial vector that contains a 64-bit nonce and 64-bit counter. |
dst | The pointer to a destination cipher text. |
src | The pointer to a source plain text. Must be 4-Byte aligned. |
aesState | The pointer to the AES state structure allocated by the user. The user must must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ccm_Init | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_ccm_buffers_t * | aesCcm_buffer, | ||
cy_stc_cryptolite_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM Init operation.
base | The pointer to the CRYPTOLITE instance. |
aesCcm_buffer | The buffers should be a SAHB mapped addresses. The pointer to the memory buffers storage. |
aesCcmState | The pointer to the AES CCM state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ccm_SetKey | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | key, | ||
cy_stc_cryptolite_aes_ccm_state_t * | aesCcmState | ||
) |
Sets AES CCM Key for the operation.
base | The pointer to the CRYPTOLITE instance. |
key | The pointer to the CCM key. |
aesCcmState | The pointer to the AES CCM state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ccm_Set_Length | ( | CRYPTOLITE_Type * | base, |
uint32_t | aadSize, | ||
uint32_t | textSize, | ||
uint32_t | tagLength, | ||
cy_stc_cryptolite_aes_ccm_state_t * | aesCcmState | ||
) |
Sets the length for Additional authentication data, plain text and Tag for AES CCM operation.
base | The pointer to the CRYPTOLITE instance. |
aadSize | The Size of the Additional Authentication Data. |
textSize | The Size of the Text. |
tagLength | The Size of the Tag. |
aesCcmState | The pointer to the AES CCM state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ccm_Start | ( | CRYPTOLITE_Type * | base, |
cy_en_cryptolite_dir_mode_t | dirMode, | ||
uint32_t | ivSize, | ||
uint8_t const * | iv, | ||
cy_stc_cryptolite_aes_ccm_state_t * | aesCcmState | ||
) |
Function to set IV for the AES CCM operation.
base | The pointer to the CRYPTOLITE instance. |
dirMode | Can be CY_CRYPTOLITE_ENCRYPT or CY_CRYPTOLITE_DECRYPT (cy_en_cryptolite_dir_mode_t) |
ivSize | The size of the IV. |
iv | The pointer to the IV. |
aesCcmState | The pointer to the AES CCM state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ccm_Update_Aad | ( | CRYPTOLITE_Type * | base, |
uint32_t | aadSize, | ||
uint8_t const * | aad, | ||
cy_stc_cryptolite_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM update AAD Multistage operation.
base | The pointer to the CRYPTOLITE instance. |
aadSize | The size of the AAD. |
aad | The pointer to a AAD. |
aesCcmState | The pointer to the AES CCM state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ccm_Update | ( | CRYPTOLITE_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_cryptolite_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM Update Multistage update operation.
base | The pointer to the CRYPTOLITE instance. |
srcSize | The size of the source block. |
dst | The pointer to a destination block. |
src | The pointer to a source block. |
aesCcmState | The pointer to the AES CCM state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ccm_Finish | ( | CRYPTOLITE_Type * | base, |
uint8_t * | tag, | ||
cy_stc_cryptolite_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM finish operation.
base | The pointer to the CRYPTOLITE instance. |
tag | The pointer to the CCM Tag. |
aesCcmState | The pointer to the AES CCM state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ccm_Encrypt_Tag | ( | CRYPTOLITE_Type * | base, |
uint32_t | ivSize, | ||
uint8_t const * | iv, | ||
uint32_t | aadSize, | ||
uint8_t const * | aad, | ||
uint32_t | srcSize, | ||
uint8_t * | cipherTxt, | ||
uint8_t const * | plainTxt, | ||
uint32_t | tagSize, | ||
uint8_t * | tag, | ||
cy_stc_cryptolite_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM Encrypt operation.
base | The pointer to the CRYPTOLITE instance. |
ivSize | The size of the IV. |
iv | The pointer to the IV. |
aadSize | The size of the AAD. |
aad | The pointer to a AAD. |
srcSize | The size of the source block. |
cipherTxt | The pointer to a cipher text block. |
plainTxt | The pointer to a plain text block. |
tagSize | The size of the Tag. |
tag | The pointer to the tags. |
aesCcmState | The pointer to the AES CCM state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ccm_Decrypt | ( | CRYPTOLITE_Type * | base, |
uint32_t | ivSize, | ||
uint8_t const * | iv, | ||
uint32_t | aadSize, | ||
uint8_t const * | aad, | ||
uint32_t | srcSize, | ||
uint8_t * | plainTxt, | ||
uint8_t const * | cipherTxt, | ||
uint32_t | tagSize, | ||
uint8_t * | tag, | ||
cy_en_cryptolite_ccm_auth_result_t * | isValid, | ||
cy_stc_cryptolite_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM Decrypt operation.
base | The pointer to the CRYPTOLITE instance. |
ivSize | The size of the IV. |
iv | The pointer to the IV. |
aadSize | The size of the AAD. |
aad | The pointer to a AAD. |
srcSize | The size of the source block. |
plainTxt | The pointer to a plain text block. |
cipherTxt | The pointer to a cipher text block. |
tagSize | The size of the Tag. |
tag | The pointer to the tags. |
isValid | The pointer Store the authentication status. |
aesCcmState | The pointer to the AES CCM state structure allocated by the user. The user must not modify anything in this structure. |
cy_en_cryptolite_status_t Cy_Cryptolite_Aes_Ccm_Free | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_aes_ccm_state_t * | aesCcmState | ||
) |
Clears AES CCM operation context.
base | The pointer to the CRYPTOLITE instance. |
aesCcmState | The pointer to the AES CCM state structure allocated by the user. The user must not modify anything in this structure. |