MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Functions | |
status_t | LTC_AES_EncryptEcbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size) |
Encrypts AES using the ECB block mode. More... | |
status_t | LTC_AES_DecryptEcbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size) |
Decrypts AES using ECB block mode. More... | |
status_t | LTC_AES_EncryptCbcDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[LTC_DPA_AES_IV_SIZE]) |
Encrypts AES using CBC block mode. More... | |
status_t | LTC_AES_DecryptCbcDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[LTC_DPA_AES_IV_SIZE]) |
Decrypts AES using CBC block mode. More... | |
status_t | LTC_AES_CryptCtrDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *input, uint8_t *output, size_t size, uint8_t counter[LTC_DPA_AES_BLOCK_SIZE], uint8_t counterlast[LTC_DPA_AES_BLOCK_SIZE], size_t *szLeft) |
Encrypts or decrypts AES using CTR block mode. More... | |
status_t | LTC_AES_EncryptTagCcmDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t *iv, size_t ivSize, const uint8_t *aad, size_t aadSize, uint8_t *tag, size_t tagSize) |
Encrypts AES and tags using CCM block mode. More... | |
status_t | LTC_AES_DecryptTagCcmDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t *iv, size_t ivSize, const uint8_t *aad, size_t aadSize, const uint8_t *tag, size_t tagSize) |
Decrypts AES and authenticates using CCM block mode. More... | |
status_t LTC_AES_EncryptEcbDPA | ( | LTC_Type * | base, |
ltc_dpa_handle_t * | handle, | ||
const uint8_t * | plaintext, | ||
uint8_t * | ciphertext, | ||
size_t | size | ||
) |
Encrypts AES using the ECB block mode.
base | LTC peripheral base address | |
handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. | |
plaintext | Input plain text to encrypt | |
[out] | ciphertext | Output cipher text |
size | Size of input and output data in bytes. Must be multiple of 16 bytes. |
status_t LTC_AES_DecryptEcbDPA | ( | LTC_Type * | base, |
ltc_dpa_handle_t * | handle, | ||
const uint8_t * | ciphertext, | ||
uint8_t * | plaintext, | ||
size_t | size | ||
) |
Decrypts AES using ECB block mode.
base | LTC peripheral base address | |
handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. | |
ciphertext | Input cipher text to decrypt | |
[out] | plaintext | Output plain text |
size | Size of input and output data in bytes. Must be multiple of 16 bytes. |
status_t LTC_AES_EncryptCbcDPA | ( | LTC_Type * | base, |
ltc_dpa_handle_t * | handle, | ||
const uint8_t * | plaintext, | ||
uint8_t * | ciphertext, | ||
size_t | size, | ||
const uint8_t | iv[LTC_DPA_AES_IV_SIZE] | ||
) |
base | LTC peripheral base address | |
handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. | |
plaintext | Input plain text to encrypt | |
[out] | ciphertext | Output cipher text |
size | Size of input and output data in bytes. Must be multiple of 16 bytes. | |
iv | Input initial vector to combine with the first input block. |
status_t LTC_AES_DecryptCbcDPA | ( | LTC_Type * | base, |
ltc_dpa_handle_t * | handle, | ||
const uint8_t * | ciphertext, | ||
uint8_t * | plaintext, | ||
size_t | size, | ||
const uint8_t | iv[LTC_DPA_AES_IV_SIZE] | ||
) |
base | LTC peripheral base address | |
handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. | |
ciphertext | Input cipher text to decrypt | |
[out] | plaintext | Output plain text |
size | Size of input and output data in bytes. Must be multiple of 16 bytes. | |
iv | Input initial vector to combine with the first input block. | |
key | Input key to use for decryption |
status_t LTC_AES_CryptCtrDPA | ( | LTC_Type * | base, |
ltc_dpa_handle_t * | handle, | ||
const uint8_t * | input, | ||
uint8_t * | output, | ||
size_t | size, | ||
uint8_t | counter[LTC_DPA_AES_BLOCK_SIZE], | ||
uint8_t | counterlast[LTC_DPA_AES_BLOCK_SIZE], | ||
size_t * | szLeft | ||
) |
Encrypts or decrypts AES using CTR block mode. AES CTR mode uses only forward AES cipher and same algorithm for encryption and decryption. The only difference between encryption and decryption is that, for encryption, the input argument is plain text and the output argument is cipher text. For decryption, the input argument is cipher text and the output argument is plain text.
base | LTC peripheral base address | |
handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. | |
input | Input data for CTR block mode | |
[out] | output | Output data for CTR block mode |
size | Size of input and output data in bytes | |
[in,out] | counter | Input counter (updates on return) |
[out] | counterlast | Output cipher of last counter, for chained CTR calls. NULL can be passed if chained calls are not used. |
[out] | szLeft | Output number of bytes in left unused in counterlast block. NULL can be passed if chained calls are not used. |
status_t LTC_AES_EncryptTagCcmDPA | ( | LTC_Type * | base, |
ltc_dpa_handle_t * | handle, | ||
const uint8_t * | plaintext, | ||
uint8_t * | ciphertext, | ||
size_t | size, | ||
const uint8_t * | iv, | ||
size_t | ivSize, | ||
const uint8_t * | aad, | ||
size_t | aadSize, | ||
uint8_t * | tag, | ||
size_t | tagSize | ||
) |
Encrypts AES and optionally tags using CCM block mode.
base | LTC peripheral base address | |
handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. | |
plaintext | Input plain text to encrypt | |
[out] | ciphertext | Output cipher text. |
size | Size of input and output data in bytes. Zero means authentication only. | |
iv | Nonce | |
ivSize | Length of the Nonce in bytes. Must be 7, 8, 9, 10, 11, 12, or 13. | |
aad | Input additional authentication data. Can be NULL if aadSize is zero. | |
aadSize | Input size in bytes of AAD. Zero means data mode only (authentication skipped). | |
[out] | tag | Generated output tag. Set to NULL to skip tag processing. |
tagSize | Input size of the tag to generate, in bytes. Must be 4, 6, 8, 10, 12, 14, or 16. |
status_t LTC_AES_DecryptTagCcmDPA | ( | LTC_Type * | base, |
ltc_dpa_handle_t * | handle, | ||
const uint8_t * | ciphertext, | ||
uint8_t * | plaintext, | ||
size_t | size, | ||
const uint8_t * | iv, | ||
size_t | ivSize, | ||
const uint8_t * | aad, | ||
size_t | aadSize, | ||
const uint8_t * | tag, | ||
size_t | tagSize | ||
) |
Decrypts AES and optionally authenticates using CCM block mode.
base | LTC peripheral base address | |
handle | pointer to ltc_dpa_handle_t structure which stores the transaction state. | |
ciphertext | Input cipher text to decrypt | |
[out] | plaintext | Output plain text. |
size | Size of input and output data in bytes. Zero means authentication only. | |
iv | Nonce | |
ivSize | Length of the Nonce in bytes. Must be 7, 8, 9, 10, 11, 12, or 13. | |
aad | Input additional authentication data. Can be NULL if aadSize is zero. | |
aadSize | Input size in bytes of AAD. Zero means data mode only (authentication skipped). | |
tag | Received tag. Set to NULL to skip tag processing. | |
tagSize | Input size of the received tag to compare with the computed tag, in bytes. Must be 4, 6, 8, 10, 12, 14, or 16. |