Functions | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Init (CRYPTO_Type *base, uint8_t const *key, cy_en_crypto_aes_key_length_t keyLength, cy_stc_crypto_aes_state_t *aesState) |
Initializes AES mode of operation and prepares an inverse key. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_InitContext (CRYPTO_Type *base, uint8_t const *key, cy_en_crypto_aes_key_length_t keyLength, cy_stc_crypto_aes_state_t *aesState, cy_stc_crypto_aes_buffers_t *aesBuffers) |
Initializes AES mode of operation and prepares an inverse key within a user specified buffer. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Free (CRYPTO_Type *base, cy_stc_crypto_aes_state_t *aesState) |
Clears AES operation context. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ecb (CRYPTO_Type *base, cy_en_crypto_dir_mode_t dirMode, uint8_t *dst, uint8_t const *src, cy_stc_crypto_aes_state_t *aesState) |
Performs the AES operation on a single block. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ecb_Setup (CRYPTO_Type *base, cy_en_crypto_dir_mode_t dirMode, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES ECB init operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ecb_Update (CRYPTO_Type *base, uint32_t srcSize, uint8_t *dst, uint8_t const *src, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES ECB Multistage update operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ecb_Finish (CRYPTO_Type *base, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES ECB finish operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Cbc (CRYPTO_Type *base, cy_en_crypto_dir_mode_t dirMode, uint32_t srcSize, uint8_t *ivPtr, uint8_t *dst, uint8_t const *src, cy_stc_crypto_aes_state_t *aesState) |
Performs the AES-CBC operation defined in the dirMode parameter on a plain text defined in the src parameter. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Cbc_Setup (CRYPTO_Type *base, cy_en_crypto_dir_mode_t dirMode, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CBC setup operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Cbc_Set_IV (CRYPTO_Type *base, uint8_t const *iv, cy_stc_crypto_aes_state_t *aesState) |
Function to set AES CBC IV. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Cbc_Update (CRYPTO_Type *base, uint32_t srcSize, uint8_t *dst, uint8_t const *src, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CBC Multistage update operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Cbc_Finish (CRYPTO_Type *base, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CBC finish operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_CbcMac_Setup (CRYPTO_Type *base, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CBC MAC setup operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_CbcMac_Update (CRYPTO_Type *base, uint32_t srcSize, uint8_t const *src, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CBC MAC Multistage update operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_CbcMac_Finish (CRYPTO_Type *base, uint8_t *mac, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CBC finish operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Cfb (CRYPTO_Type *base, cy_en_crypto_dir_mode_t dirMode, uint32_t srcSize, uint8_t *ivPtr, uint8_t *dst, uint8_t const *src, cy_stc_crypto_aes_state_t *aesState) |
Performs the AES-CFB operation defined in the dirMode parameter on a plain text defined in the SRC parameter. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Cfb_Setup (CRYPTO_Type *base, cy_en_crypto_dir_mode_t dirMode, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CFB setup operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Cfb_Set_IV (CRYPTO_Type *base, uint8_t const *iv, cy_stc_crypto_aes_state_t *aesState) |
Sets IV for AES CFB mode. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Cfb_Update (CRYPTO_Type *base, uint32_t srcSize, uint8_t *dst, uint8_t const *src, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CFB Multistage update operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Cfb_Finish (CRYPTO_Type *base, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CFB finish operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ctr (CRYPTO_Type *base, uint32_t srcSize, uint32_t *srcOffset, uint8_t *ivPtr, uint8_t *streamBlock, uint8_t *dst, uint8_t const *src, cy_stc_crypto_aes_state_t *aesState) |
Performs the AES-CTR operation on a plain text defined in the src parameter. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ctr_Setup (CRYPTO_Type *base, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CTR Multistage update operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ctr_Set_IV (CRYPTO_Type *base, const uint8_t *iv, cy_stc_crypto_aes_state_t *aesState) |
Sets IV for the AES CTR operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ctr_Update (CRYPTO_Type *base, uint32_t srcSize, uint8_t *dst, uint8_t const *src, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CTR Multistage update operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ctr_Finish (CRYPTO_Type *base, cy_stc_crypto_aes_state_t *aesState) |
Performs an AES CTR Finish operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_GCM_Init (CRYPTO_Type *base, cy_stc_crypto_aes_gcm_buffers_t *aesGCMBuffers, cy_stc_crypto_aes_gcm_state_t *aesGCMctx) |
The function to initialize AES GCM operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_GCM_SetKey (CRYPTO_Type *base, uint8_t const *aesKey, cy_en_crypto_aes_key_length_t keyLength, cy_stc_crypto_aes_gcm_state_t *aesGCMctx) |
The function to set AES GCM Key. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_GCM_Start (CRYPTO_Type *base, cy_en_crypto_dir_mode_t mode, uint8_t const *iv, uint32_t ivSize, cy_stc_crypto_aes_gcm_state_t *aesGCMctx) |
The function to start AES GCM operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_GCM_AAD_Update (CRYPTO_Type *base, uint8_t *aad, uint32_t aadSize, cy_stc_crypto_aes_gcm_state_t *aesGCMctx) |
The function to update the Additional Authentication Data. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_GCM_Update (CRYPTO_Type *base, const uint8_t *input, uint32_t inputSize, uint8_t *output, cy_stc_crypto_aes_gcm_state_t *aesGCMctx) |
The function to update the data For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters input & output must align and end in 32 byte boundary. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_GCM_Finish (CRYPTO_Type *base, uint8_t *p_tag, uint32_t tagSize, cy_stc_crypto_aes_gcm_state_t *aesGCMctx) |
The function to finish the AES GCM operation and to calculate the tag. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_GCM_Free (CRYPTO_Type *base, cy_stc_crypto_aes_gcm_state_t *aesGCMctx) |
The function to finish the encryption process and calculate tag. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_GCM_Encrypt_Tag (CRYPTO_Type *base, uint8_t const *aesKey, cy_en_crypto_aes_key_length_t keyLength, uint8_t const *iv, uint32_t ivSize, uint8_t *aad, uint32_t aadSize, const uint8_t *input, uint32_t inputSize, uint8_t *output, uint8_t *tag, uint32_t tagSize) |
Performs the AES GCM encryption operation on the input data, iv & aad data, generates the encrypted data and TAG. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_GCM_Decrypt_Tag (CRYPTO_Type *base, uint8_t const *aesKey, cy_en_crypto_aes_key_length_t keyLength, uint8_t const *iv, uint32_t ivSize, uint8_t *aad, uint32_t aadSize, const uint8_t *input, uint32_t inputSize, uint8_t *tag, uint32_t tagSize, uint8_t *output, cy_en_crypto_aesgcm_tag_verify_result_t *isVerified) |
Performs the AES GCM decryption operation on the input data and verifies the TAG. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ccm_Init (CRYPTO_Type *base, cy_stc_crypto_aes_ccm_buffers_t *aesCcmBuffer, cy_stc_crypto_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM Init operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ccm_SetKey (CRYPTO_Type *base, uint8_t const *key, cy_en_crypto_aes_key_length_t keyLength, cy_stc_crypto_aes_ccm_state_t *aesCcmState) |
Sets AES CCM Key for the operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ccm_Set_Length (CRYPTO_Type *base, uint32_t aadSize, uint32_t textSize, uint32_t tagLength, cy_stc_crypto_aes_ccm_state_t *aesCcmState) |
Sets the length for Additional authentication data, plain text and Tag for AES CCM operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ccm_Start (CRYPTO_Type *base, cy_en_crypto_dir_mode_t dirMode, uint32_t ivSize, uint8_t const *iv, cy_stc_crypto_aes_ccm_state_t *aesCcmState) |
Function to set IV for the AES CCM operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ccm_Update_Aad (CRYPTO_Type *base, uint32_t aadSize, uint8_t const *aad, cy_stc_crypto_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM update AAD Multistage operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ccm_Update (CRYPTO_Type *base, uint32_t srcSize, uint8_t *dst, uint8_t const *src, cy_stc_crypto_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM Update Multistage update operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ccm_Finish (CRYPTO_Type *base, uint8_t *tag, cy_stc_crypto_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM finish operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ccm_Encrypt_Tag (CRYPTO_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_crypto_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM Encrypt operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ccm_Decrypt (CRYPTO_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 const *tag, cy_en_crypto_aesccm_tag_verify_result_t *isValid, cy_stc_crypto_aes_ccm_state_t *aesCcmState) |
Performs an AES CCM Decrypt operation. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Aes_Ccm_Free (CRYPTO_Type *base, cy_stc_crypto_aes_ccm_state_t *aesCcmState) |
Clears AES CCM operation context. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Des (CRYPTO_Type *base, cy_en_crypto_dir_mode_t dirMode, uint8_t const *key, uint8_t *dst, uint8_t const *src) |
Performs the DES operation on a single block. More... | |
__STATIC_INLINE cy_en_crypto_status_t | Cy_Crypto_Core_Tdes (CRYPTO_Type *base, cy_en_crypto_dir_mode_t dirMode, uint8_t const *key, uint8_t *dst, uint8_t const *src) |
Performs the TDES operation on a single block. More... | |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Init | ( | CRYPTO_Type * | base, |
uint8_t const * | key, | ||
cy_en_crypto_aes_key_length_t | keyLength, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Initializes AES mode of operation and prepares an inverse key.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters key must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
key | The pointer to the encryption/decryption key. |
keyLength | cy_en_crypto_aes_key_length_t |
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_Aes_InitContext | ( | CRYPTO_Type * | base, |
uint8_t const * | key, | ||
cy_en_crypto_aes_key_length_t | keyLength, | ||
cy_stc_crypto_aes_state_t * | aesState, | ||
cy_stc_crypto_aes_buffers_t * | aesBuffers | ||
) |
Initializes AES mode of operation and prepares an inverse key within a user specified buffer.
base | The pointer to the CRYPTO instance. |
key | The pointer to the encryption/decryption key. |
keyLength | cy_en_crypto_aes_key_length_t |
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 AES buffer provided by the user. The user must not modify anything in this buffer during operation. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Free | ( | CRYPTO_Type * | base, |
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Clears AES operation context.
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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ecb | ( | CRYPTO_Type * | base, |
cy_en_crypto_dir_mode_t | dirMode, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs the AES operation on a single block.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters src & dst must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
dirMode | Can be CY_CRYPTO_ENCRYPT or CY_CRYPTO_DECRYPT (cy_en_crypto_dir_mode_t). |
dst | The pointer to the destination cipher block. |
src | The pointer to the source block. |
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_Aes_Ecb_Setup | ( | CRYPTO_Type * | base, |
cy_en_crypto_dir_mode_t | dirMode, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES ECB init operation.
base | The pointer to the CRYPTO instance. |
dirMode | Can be CY_CRYPTO_ENCRYPT or CY_CRYPTO_DECRYPT (cy_en_crypto_dir_mode_t). |
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_Aes_Ecb_Update | ( | CRYPTO_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES ECB Multistage update operation.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters src & dst must align and end in 32 byte boundary.
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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ecb_Finish | ( | CRYPTO_Type * | base, |
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES ECB 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Cbc | ( | CRYPTO_Type * | base, |
cy_en_crypto_dir_mode_t | dirMode, | ||
uint32_t | srcSize, | ||
uint8_t * | ivPtr, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs the AES-CBC operation defined in the dirMode parameter on a plain text defined in the src parameter.
base | The pointer to the CRYPTO instance. |
dirMode | Can be CY_CRYPTO_ENCRYPT or CY_CRYPTO_DECRYPT (cy_en_crypto_dir_mode_t) |
srcSize | The size of the source plain text. |
ivPtr | The pointer to the initial vector. |
dst | The pointer to the destination cipher text. |
src | The pointer to the source plain text. |
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_Aes_Cbc_Setup | ( | CRYPTO_Type * | base, |
cy_en_crypto_dir_mode_t | dirMode, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CBC setup operation.
base | The pointer to the CRYPTO instance. |
dirMode | Can be CY_CRYPTO_ENCRYPT or CY_CRYPTO_DECRYPT (cy_en_crypto_dir_mode_t). |
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_Aes_Cbc_Set_IV | ( | CRYPTO_Type * | base, |
uint8_t const * | iv, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Function to set AES CBC IV.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters iv must align and end in 32 byte boundary.
base | The pointer to the CRYPTO 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Cbc_Update | ( | CRYPTO_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CBC Multistage update operation.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters src & dst must align and end in 32 byte boundary.
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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Cbc_Finish | ( | CRYPTO_Type * | base, |
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CBC 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_CbcMac_Setup | ( | CRYPTO_Type * | base, |
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CBC MAC setup 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_CbcMac_Update | ( | CRYPTO_Type * | base, |
uint32_t | srcSize, | ||
uint8_t const * | src, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CBC MAC Multistage update operation.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters src must align and end in 32 byte boundary.
base | The pointer to the CRYPTO 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_CbcMac_Finish | ( | CRYPTO_Type * | base, |
uint8_t * | mac, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CBC finish operation.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters mac must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
mac | The pointer to the cbc-mac. |
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_Aes_Cfb | ( | CRYPTO_Type * | base, |
cy_en_crypto_dir_mode_t | dirMode, | ||
uint32_t | srcSize, | ||
uint8_t * | ivPtr, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs the AES-CFB operation defined in the dirMode parameter on a plain text defined in the SRC parameter.
base | The pointer to the CRYPTO instance. |
dirMode | Can be CY_CRYPTO_ENCRYPT or CY_CRYPTO_DECRYPT (cy_en_crypto_dir_mode_t) |
srcSize | The size of the source plain text. |
ivPtr | The pointer to the initial vector. |
dst | The pointer to the destination cipher text. |
src | The pointer to the source plain text. |
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_Aes_Cfb_Setup | ( | CRYPTO_Type * | base, |
cy_en_crypto_dir_mode_t | dirMode, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CFB setup operation.
base | The pointer to the CRYPTO instance. |
dirMode | Can be CY_CRYPTO_ENCRYPT or CY_CRYPTO_DECRYPT (cy_en_crypto_dir_mode_t). |
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_Aes_Cfb_Set_IV | ( | CRYPTO_Type * | base, |
uint8_t const * | iv, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Sets IV for AES CFB mode.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters iv must align and end in 32 byte boundary.
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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Cfb_Update | ( | CRYPTO_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CFB Multistage update operation.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters src & dst must align and end in 32 byte boundary.
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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Cfb_Finish | ( | CRYPTO_Type * | base, |
cy_stc_crypto_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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ctr | ( | CRYPTO_Type * | base, |
uint32_t | srcSize, | ||
uint32_t * | srcOffset, | ||
uint8_t * | ivPtr, | ||
uint8_t * | streamBlock, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs the AES-CTR operation on a plain text defined in the src parameter.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters iv must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
srcSize | The size of the 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. |
streamBlock | The saved stream-block for resuming. Is over-written by the function. |
dst | The pointer to the destination cipher text. |
src | The pointer to the source plain text. Must be 4-Byte aligned. |
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_Aes_Ctr_Setup | ( | CRYPTO_Type * | base, |
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CTR Multistage update 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ctr_Set_IV | ( | CRYPTO_Type * | base, |
const uint8_t * | iv, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Sets IV for the AES CTR operation.
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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ctr_Update | ( | CRYPTO_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CTR Multistage update operation.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters src & dst must align and end in 32 byte boundary.
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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ctr_Finish | ( | CRYPTO_Type * | base, |
cy_stc_crypto_aes_state_t * | aesState | ||
) |
Performs an AES CTR 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_GCM_Init | ( | CRYPTO_Type * | base, |
cy_stc_crypto_aes_gcm_buffers_t * | aesGCMBuffers, | ||
cy_stc_crypto_aes_gcm_state_t * | aesGCMctx | ||
) |
The function to initialize AES GCM operation.
base | The pointer to the CRYPTO instance. |
aesGCMBuffers | The pointer to the AES GCM buffer provided by the user. The user must not modify anything in this structure. |
aesGCMctx | The pointer to the AES GCM 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_Aes_GCM_SetKey | ( | CRYPTO_Type * | base, |
uint8_t const * | aesKey, | ||
cy_en_crypto_aes_key_length_t | keyLength, | ||
cy_stc_crypto_aes_gcm_state_t * | aesGCMctx | ||
) |
The function to set AES GCM Key.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters aeskey must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
aesKey | The pointer to the AES key. |
keyLength | cy_en_crypto_aes_key_length_t |
aesGCMctx | The pointer to the AES GCM 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_Aes_GCM_Start | ( | CRYPTO_Type * | base, |
cy_en_crypto_dir_mode_t | mode, | ||
uint8_t const * | iv, | ||
uint32_t | ivSize, | ||
cy_stc_crypto_aes_gcm_state_t * | aesGCMctx | ||
) |
The function to start AES GCM operation.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters iv must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
mode | cy_en_crypto_dir_mode_t |
iv | The pointer to the Initialization vector. |
ivSize | The length of the iv. |
aesGCMctx | The pointer to the AES GCM 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_Aes_GCM_AAD_Update | ( | CRYPTO_Type * | base, |
uint8_t * | aad, | ||
uint32_t | aadSize, | ||
cy_stc_crypto_aes_gcm_state_t * | aesGCMctx | ||
) |
The function to update the Additional Authentication Data.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters aad must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
aad | The pointer to the Additional Authentication Data. |
aadSize | The length of the Additional Authentication Data |
aesGCMctx | The pointer to the AES GCM 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_Aes_GCM_Update | ( | CRYPTO_Type * | base, |
const uint8_t * | input, | ||
uint32_t | inputSize, | ||
uint8_t * | output, | ||
cy_stc_crypto_aes_gcm_state_t * | aesGCMctx | ||
) |
The function to update the data For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters input & output must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
input | The pointer to the input data to be encrypted/decrypted. |
inputSize | The length of the input data. |
output | The pointer to the encrypted/decrypted output data. |
aesGCMctx | The pointer to the AES GCm 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_Aes_GCM_Finish | ( | CRYPTO_Type * | base, |
uint8_t * | p_tag, | ||
uint32_t | tagSize, | ||
cy_stc_crypto_aes_gcm_state_t * | aesGCMctx | ||
) |
The function to finish the AES GCM operation and to calculate the tag.
For CAT1C & CAT1D(CM55) devices when D-Cache is enabled parameters p_tag must align and end in 32 byte boundary.
base | The pointer to the CRYPTO instance. |
p_tag | The pointer to the buffer for storing tag. |
tagSize | The length of the p_tag. |
aesGCMctx | The pointer to the AES aesGCMctx structure allocated by the user. The user must not modify anything in this structure. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_GCM_Free | ( | CRYPTO_Type * | base, |
cy_stc_crypto_aes_gcm_state_t * | aesGCMctx | ||
) |
The function to finish the encryption process and calculate tag.
base | The pointer to the CRYPTO instance. |
aesGCMctx | The pointer to the AES aesGCMctx structure allocated by the user. The user must not modify anything in this structure. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_GCM_Encrypt_Tag | ( | CRYPTO_Type * | base, |
uint8_t const * | aesKey, | ||
cy_en_crypto_aes_key_length_t | keyLength, | ||
uint8_t const * | iv, | ||
uint32_t | ivSize, | ||
uint8_t * | aad, | ||
uint32_t | aadSize, | ||
const uint8_t * | input, | ||
uint32_t | inputSize, | ||
uint8_t * | output, | ||
uint8_t * | tag, | ||
uint32_t | tagSize | ||
) |
Performs the AES GCM encryption operation on the input data, iv & aad data, generates the encrypted data and TAG.
base | The pointer to the CRYPTO instance. |
aesKey | The pointer to the AES key. |
keyLength | cy_en_crypto_aes_key_length_t |
iv | The pointer to the Initialization vector. |
ivSize | The length of the iv. |
aad | The pointer to the Additional Authentication Data. |
aadSize | The length of the additional Authentication Data |
input | The pointer to the input data to be encrypted/decrypted. |
inputSize | The length of the input data. |
output | The pointer to the encrypted/decrypted output data. |
tag | The pointer to the tag. |
tagSize | The length of the p_tag. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_GCM_Decrypt_Tag | ( | CRYPTO_Type * | base, |
uint8_t const * | aesKey, | ||
cy_en_crypto_aes_key_length_t | keyLength, | ||
uint8_t const * | iv, | ||
uint32_t | ivSize, | ||
uint8_t * | aad, | ||
uint32_t | aadSize, | ||
const uint8_t * | input, | ||
uint32_t | inputSize, | ||
uint8_t * | tag, | ||
uint32_t | tagSize, | ||
uint8_t * | output, | ||
cy_en_crypto_aesgcm_tag_verify_result_t * | isVerified | ||
) |
Performs the AES GCM decryption operation on the input data and verifies the TAG.
base | The pointer to the CRYPTO instance. |
aesKey | The pointer to the AES key. |
keyLength | cy_en_crypto_aes_key_length_t |
iv | The pointer to the Initialization vector. |
ivSize | The length of the iv. |
aad | The pointer to the Additional Authentication Data. |
aadSize | The length of the additional Authentication Data |
input | The pointer to the input data to be encrypted/decrypted. |
inputSize | The length of the input data. |
tag | The pointer to the tag. |
tagSize | The length of the p_tag. |
output | The pointer to the encrypted/decrypted output data. |
isVerified | The status of the AES GCM verification. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ccm_Init | ( | CRYPTO_Type * | base, |
cy_stc_crypto_aes_ccm_buffers_t * | aesCcmBuffer, | ||
cy_stc_crypto_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM Init operation.
base | The pointer to the CRYPTO instance. |
aesCcmBuffer | 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ccm_SetKey | ( | CRYPTO_Type * | base, |
uint8_t const * | key, | ||
cy_en_crypto_aes_key_length_t | keyLength, | ||
cy_stc_crypto_aes_ccm_state_t * | aesCcmState | ||
) |
Sets AES CCM Key for the operation.
base | The pointer to the CRYPTO instance. |
key | The pointer to the CCM key. |
keyLength | cy_en_crypto_aes_key_length_t |
aesCcmState | The pointer to the AES CCM 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_Aes_Ccm_Set_Length | ( | CRYPTO_Type * | base, |
uint32_t | aadSize, | ||
uint32_t | textSize, | ||
uint32_t | tagLength, | ||
cy_stc_crypto_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 CRYPTO 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ccm_Start | ( | CRYPTO_Type * | base, |
cy_en_crypto_dir_mode_t | dirMode, | ||
uint32_t | ivSize, | ||
uint8_t const * | iv, | ||
cy_stc_crypto_aes_ccm_state_t * | aesCcmState | ||
) |
Function to set IV for the AES CCM operation.
base | The pointer to the CRYPTO instance. |
dirMode | Can be CY_CRYPTO_ENCRYPT or CY_CRYPTO_DECRYPT (cy_en_crypto_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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ccm_Update_Aad | ( | CRYPTO_Type * | base, |
uint32_t | aadSize, | ||
uint8_t const * | aad, | ||
cy_stc_crypto_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM update AAD Multistage operation.
base | The pointer to the CRYPTO 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ccm_Update | ( | CRYPTO_Type * | base, |
uint32_t | srcSize, | ||
uint8_t * | dst, | ||
uint8_t const * | src, | ||
cy_stc_crypto_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM Update Multistage update operation.
base | The pointer to the CRYPTO 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ccm_Finish | ( | CRYPTO_Type * | base, |
uint8_t * | tag, | ||
cy_stc_crypto_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM finish operation.
base | The pointer to the CRYPTO 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ccm_Encrypt_Tag | ( | CRYPTO_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_crypto_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM Encrypt operation.
base | The pointer to the CRYPTO 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ccm_Decrypt | ( | CRYPTO_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 const * | tag, | ||
cy_en_crypto_aesccm_tag_verify_result_t * | isValid, | ||
cy_stc_crypto_aes_ccm_state_t * | aesCcmState | ||
) |
Performs an AES CCM Decrypt operation.
base | The pointer to the CRYPTO 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. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Aes_Ccm_Free | ( | CRYPTO_Type * | base, |
cy_stc_crypto_aes_ccm_state_t * | aesCcmState | ||
) |
Clears AES CCM operation context.
base | The pointer to the CRYPTO instance. |
aesCcmState | The pointer to the AES CCM 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_Des | ( | CRYPTO_Type * | base, |
cy_en_crypto_dir_mode_t | dirMode, | ||
uint8_t const * | key, | ||
uint8_t * | dst, | ||
uint8_t const * | src | ||
) |
Performs the DES operation on a single block.
All addresses must be 4-byte aligned. Ciphertext (dst) may overlap with plaintext (src). This function is independent from the previous Crypto state.
base | The pointer to the CRYPTO instance. |
dirMode | Can be CY_CRYPTO_ENCRYPT or CY_CRYPTO_DECRYPT (cy_en_crypto_dir_mode_t) |
key | The pointer to the encryption/decryption key. |
dst | The pointer to the destination cipher block. |
src | The pointer to the source block. |
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Tdes | ( | CRYPTO_Type * | base, |
cy_en_crypto_dir_mode_t | dirMode, | ||
uint8_t const * | key, | ||
uint8_t * | dst, | ||
uint8_t const * | src | ||
) |
Performs the TDES operation on a single block.
All addresses must be 4-byte aligned. Ciphertext (dst) may overlap with plaintext (src). This function is independent from the previous Crypto state.
base | The pointer to the CRYPTO instance. |
dirMode | Can be CY_CRYPTO_ENCRYPT or CY_CRYPTO_DECRYPT (cy_en_crypto_dir_mode_t) |
key | The pointer to the encryption/decryption keys. |
dst | The pointer to the destination cipher block. |
src | The pointer to the source data block. |