CryptoAuthLib
Microchip CryptoAuthentication Library
atca_basic_aes_ctr.c File Reference

CryptoAuthLib Basic API methods for AES CTR mode. More...

#include "basic/atca_basic.h"

Functions

ATCA_STATUS atcab_aes_ctr_init (atca_aes_ctr_ctx_t *ctx, uint16_t key_id, uint8_t key_block, uint8_t counter_size, const uint8_t *iv)
 Initialize context for AES CTR operation with an existing IV, which is common when start a decrypt operation. More...
 
ATCA_STATUS atcab_aes_ctr_init_rand (atca_aes_ctr_ctx_t *ctx, uint16_t key_id, uint8_t key_block, uint8_t counter_size, uint8_t *iv)
 Initialize context for AES CTR operation with a random nonce and counter set to 0 as the IV, which is common when starting an encrypt operation. More...
 
ATCA_STATUS atcab_aes_ctr_increment (atca_aes_ctr_ctx_t *ctx)
 Increments AES CTR counter value. More...
 
ATCA_STATUS atcab_aes_ctr_block (atca_aes_ctr_ctx_t *ctx, const uint8_t *input, uint8_t *output)
 Process a block of data using CTR mode and a key within the ATECC608A device. atcab_aes_ctr_init() or atcab_aes_ctr_init_rand() should be called before the first use of this function. More...
 
ATCA_STATUS atcab_aes_ctr_encrypt_block (atca_aes_ctr_ctx_t *ctx, const uint8_t *plaintext, uint8_t *ciphertext)
 Encrypt a block of data using CTR mode and a key within the ATECC608A device. atcab_aes_ctr_init() or atcab_aes_ctr_init_rand() should be called before the first use of this function. More...
 
ATCA_STATUS atcab_aes_ctr_decrypt_block (atca_aes_ctr_ctx_t *ctx, const uint8_t *ciphertext, uint8_t *plaintext)
 Decrypt a block of data using CTR mode and a key within the ATECC608A device. atcab_aes_ctr_init() or atcab_aes_ctr_init_rand() should be called before the first use of this function. More...
 

Detailed Description

CryptoAuthLib Basic API methods for AES CTR mode.

The AES command supports 128-bit AES encryption or decryption of small messages or data packets in ECB mode. Also can perform GFM (Galois Field Multiply) calculation in support of AES-GCM.

Note
List of devices that support this command - ATECC608A. Refer to device datasheet for full details.