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. 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_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_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_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_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.
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.
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 memory buffers storage. |
__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.
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_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_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_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.
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_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. |