18#define AES_BLOCK_SIZE 16
79 uint8_t blockCtr = 0);
103 uint8_t blockCtr = 0);
137 uint8_t blockCtr = 0);
142 nrf_ecb_hal_data_t
_block __attribute__((aligned(4)));
Class that implements AES encryption.
Definition: cs_AES.h:27
nrf_ecb_hal_data_t _block
Struct with key, and single block of encrypted and decypted data.
Definition: cs_AES.h:142
void operator=(AES const &)
cs_ret_code_t encryptCtr(cs_data_t key, cs_data_t nonce, cs_data_t prefix, cs_data_t input, cs_data_t output, cs_buffer_size_t &writtenSize, uint8_t blockCtr=0)
Encrypt data with given key in CTR mode.
cs_ret_code_t ctr(cs_data_t key, cs_data_t nonce, cs_data_t inputPrefix, cs_data_t input, cs_data_t outputPrefix, cs_data_t output, cs_buffer_size_t &writtenSize, uint8_t blockCtr=0)
Encrypt or decrypt data with given key in CTR mode.
cs_ret_code_t decryptCtr(cs_data_t key, cs_data_t nonce, cs_data_t input, cs_data_t prefix, cs_data_t output, cs_buffer_size_t &writtenSize, uint8_t blockCtr=0)
Decrypt data with given key in CTR mode.
cs_ret_code_t encryptEcb(cs_data_t key, cs_data_t prefix, cs_data_t input, cs_data_t output, cs_buffer_size_t &writtenSize)
Encrypt data with given key in ECB mode.
void init()
Initialize the class, reads from State.
static AES & getInstance()
Use static variant of singleton, no dynamic memory allocation.
Definition: cs_AES.h:30
uint16_t cs_buffer_size_t
Definition: cs_Typedefs.h:20
uint16_t cs_ret_code_t
Definition: cs_Typedefs.h:21
Packets (structs) that are used internally in the firmware, and can be changed freely.
Definition: cs_PacketsInternal.h:27