SEcube
SEcube Open Source Library - Device
|
AES functions | |
int32_t | B5_Aes256_Init (B5_tAesCtx *ctx, const uint8_t *Key, int16_t keySize, uint8_t aesMode) |
Initialize the AES context. More... | |
int32_t | B5_Aes256_SetIV (B5_tAesCtx *ctx, const uint8_t *IV) |
Set the IV for the current AES context. More... | |
int32_t | B5_Aes256_Update (B5_tAesCtx *ctx, uint8_t *encData, uint8_t *clrData, int16_t nBlk) |
Encrypt/Decrypt data based on the status of current AES context. More... | |
int32_t | B5_Aes256_Finit (B5_tAesCtx *ctx) |
De-initialize the current AES context. More... | |
int32_t B5_Aes256_Finit | ( | B5_tAesCtx * | ctx | ) |
De-initialize the current AES context.
ctx | Pointer to the AES context to de-initialize. |
int32_t B5_Aes256_Init | ( | B5_tAesCtx * | ctx, |
const uint8_t * | Key, | ||
int16_t | keySize, | ||
uint8_t | aesMode | ||
) |
Initialize the AES context.
ctx | Pointer to the AES data structure to be initialized. |
Key | Pointer to the Key that must be used for encryption/decryption. |
keySize | Key size. See AES Key, IV, Block Sizes for supported sizes. |
aesMode | AES mode. See AES modes for supported modes. |
int32_t B5_Aes256_SetIV | ( | B5_tAesCtx * | ctx, |
const uint8_t * | IV | ||
) |
Set the IV for the current AES context.
ctx | Pointer to the AES data structure to be initialized. |
IV | Pointer to the IV. |
int32_t B5_Aes256_Update | ( | B5_tAesCtx * | ctx, |
uint8_t * | encData, | ||
uint8_t * | clrData, | ||
int16_t | nBlk | ||
) |
Encrypt/Decrypt data based on the status of current AES context.
ctx | Pointer to the current AES context. |
encData | Encrypted data. |
clrData | Clear data. |
nBlk | Number of AES blocks to process. |