SEcube
SEcube Open Source Library - Device
|
SE3_ALGO_AES_HMACSHA256 crypto handlers. More...
Go to the source code of this file.
Functions | |
uint16_t | se3_algo_AesHmacSha256s_init (se3_flash_key *key, uint16_t mode, uint8_t *ctx) |
SE3_ALGO_AES_HMACSHA256 init handler. More... | |
uint16_t | se3_algo_AesHmacSha256s_update (uint8_t *ctx, uint16_t flags, uint16_t datain1_len, const uint8_t *datain1, uint16_t datain2_len, const uint8_t *datain2, uint16_t *dataout_len, uint8_t *dataout) |
SE3_ALGO_AES_HMACSHA256 update handler. More... | |
SE3_ALGO_AES_HMACSHA256 crypto handlers.
uint16_t se3_algo_AesHmacSha256s_init | ( | se3_flash_key * | key, |
uint16_t | mode, | ||
uint8_t * | ctx | ||
) |
SE3_ALGO_AES_HMACSHA256 init handler.
Supported modes Any combination of one of {SE3_DIR_ENCRYPT, SE3_DIR_DECRYPT} and one of {SE3_FEEDBACK_ECB, SE3_FEEDBACK_CBC, SE3_FEEDBACK_CFB, SE3_FEEDBACK_OFB, SE3_FEEDBACK_CTR}
Supported key sizes 128-bit, 192-bit, 256-bit
uint16_t se3_algo_AesHmacSha256s_update | ( | uint8_t * | ctx, |
uint16_t | flags, | ||
uint16_t | datain1_len, | ||
const uint8_t * | datain1, | ||
uint16_t | datain2_len, | ||
const uint8_t * | datain2, | ||
uint16_t * | dataout_len, | ||
uint8_t * | dataout | ||
) |
SE3_ALGO_AES_HMACSHA256 update handler.
Supported operations SE3_CRYPTO_FLAG_SETNONCE: set nonce for AES and HMAC key derivation. Optional. If used, it must be the first operation performed after initialization. Otherwise, the keys will be derived from the master key without any salt. Cannot be combined with any other operation. (default): encrypt/decrypt datain2 and update HmacSha256 context with datain2. Not executed if datain2 is empty (zero-length) SE3_CRYPTO_FLAG_RESET: set new IV from datain1 and reset the HmacSha256 context, also authenticating the IV. If the IV is empty (zero-length), no IV will be set, and the HmacSha256 will be reset. SE3_CRYPTO_FLAG_AUTH: produce authentication tag and append to dataout SE3_CRYPTO_FLAG_FINIT: release session
Combined operations are executed in the following order: SE3_CRYPTO_FLAG_RESET (default) SE3_CRYPTO_FLAG_AUTH SE3_CRYPTO_FLAG_FINIT
Contribution of each operation to the output size: (default): + datain2_len SE3_CRYPTO_FLAG_AUTH: + B5_SHA256_DIGEST_SIZE Others: + 0