Data Structures | |
struct | ctr_blk_t |
Support and FAQ: visit Microchip Support More... | |
Functions | |
void | cbc_decrypt (uint8_t *cipherText, uint8_t *plainText, uint8_t *init_vector, uint32_t size) |
This function performs CBC decryption on input cipher text blocks. More... | |
void | cbc_encrypt (uint8_t *plainText, uint8_t *cipherText, uint8_t *init_vector, uint32_t size) |
This function performs CBC encryption on input plain text blocks. More... | |
void | cfb_decrypt (uint8_t *cipherText, uint8_t *plainText, uint8_t *init_vector, uint8_t mode, uint32_t size) |
This function performs CFB decryption on input cipher text blocks. More... | |
void | cfb_encrypt (uint8_t *plainText, uint8_t *cipherText, uint8_t *init_vector, uint8_t mode, uint32_t size) |
This function performs CFB encryption on input plain text blocks. More... | |
void | ctr_encrypt_decrypt (uint8_t *input_block, uint8_t *output_block, ctr_blk_t *counter, uint32_t size) |
This function performs CTR encryption/decryption on input blocks. Note: Both encryption and decryption is same for CTR mode. In both the cases, the input block to the cipher process is the counter. The resulting output is XOR-ed with plain text for encryption. For decryption case, it is XOR-ed with cipher text to retrieve the actual data. More... | |
void | ctr_inc_counter (ctr_blk_t *counter) |
Performs counter increment to prepare input for next round. More... | |
void | ecb_decrypt (uint8_t *cipherText, uint8_t *plainText, uint32_t size) |
This function performs ECB decryption on input cipher text blocks. More... | |
void | ecb_encrypt (uint8_t *plainText, uint8_t *cipherText, uint32_t size) |
This function performs ECB encryption on input plain text blocks. More... | |
void | ofb_decrypt (uint8_t *cipherText, uint8_t *plainText, uint8_t *init_vector, uint32_t size) |
This function performs OFB decryption on input cipher text blocks. More... | |
void | ofb_encrypt (uint8_t *plainText, uint8_t *cipherText, uint8_t *init_vector, uint32_t size) |
This function performs OFB encryption on input plain text blocks. More... | |
void cbc_decrypt | ( | uint8_t * | cipherText, |
uint8_t * | plainText, | ||
uint8_t * | init_vector, | ||
uint32_t | size | ||
) |
This function performs CBC decryption on input cipher text blocks.
cipherText | pointer to the array containing the cipher text bytes |
plainText | pointer to the array where the decrypted plain text has to be stored |
init_vector | pointer to the array containing the unique initialization vector |
size | size of the input plain text |
References AES_BLOCK_SIZE, and aes_inverse_cipher().
Referenced by main().
void cbc_encrypt | ( | uint8_t * | plainText, |
uint8_t * | cipherText, | ||
uint8_t * | init_vector, | ||
uint32_t | size | ||
) |
This function performs CBC encryption on input plain text blocks.
plainText | pointer to the array containing the plain text bytes |
cipherText | pointer to the array where the encrypted cipher output has to be stored |
init_vector | pointer to the array containing the unique initialization vector |
size | size of the input plain text |
References AES_BLOCK_SIZE, and aes_cipher().
Referenced by main().
void cfb_decrypt | ( | uint8_t * | cipherText, |
uint8_t * | plainText, | ||
uint8_t * | init_vector, | ||
uint8_t | mode, | ||
uint32_t | size | ||
) |
This function performs CFB decryption on input cipher text blocks.
cipherText | pointer to the array containing the cipher text bytes |
plainText | pointer to the array where the decrypted plain text has to be stored |
init_vector | pointer to the array containing the unique initialization vector |
mode | CFB mode in bits - can be 8, 64, 128. |
size | size of the input plain text |
References AES_BLOCK_SIZE, and aes_cipher().
Referenced by main().
void cfb_encrypt | ( | uint8_t * | plainText, |
uint8_t * | cipherText, | ||
uint8_t * | init_vector, | ||
uint8_t | mode, | ||
uint32_t | size | ||
) |
This function performs CFB encryption on input plain text blocks.
plainText | pointer to the array containing the plain text bytes |
cipherText | pointer to the array where the encrypted cipher output has to be stored |
init_vector | pointer to the array containing the unique initialization vector |
mode | CFB mode in bits - can be 8, 16, 32, 64, 128. |
size | size of the input plain text |
References AES_BLOCK_SIZE, and aes_cipher().
Referenced by main().
void ctr_encrypt_decrypt | ( | uint8_t * | input_block, |
uint8_t * | output_block, | ||
ctr_blk_t * | counter, | ||
uint32_t | size | ||
) |
This function performs CTR encryption/decryption on input blocks. Note: Both encryption and decryption is same for CTR mode. In both the cases, the input block to the cipher process is the counter. The resulting output is XOR-ed with plain text for encryption. For decryption case, it is XOR-ed with cipher text to retrieve the actual data.
plainText | pointer to the array containing the plain text bytes |
cipherText | pointer to the array where the encrypted cipher output has to be stored |
init_vector | pointer to the array containing the unique initialization vector |
size | size of the input plain text |
This function performs CTR encryption/decryption on input blocks. Note: Both encryption and decryption is same for CTR mode. In both the cases, the input block to the cipher process is the counter. The resulting output is XOR-ed with plain text for encryption. For decryption case, it is XOR-ed with cipher text to retrieve the actual data.
plainText | pointer to the array containing the plain text bytes |
cipherText | pointer to the array where the encrypted cipher output has to be stored |
counter | pointer to the structure containing the counter block |
size | size of the input plain text |
References AES_BLOCK_SIZE, aes_cipher(), ctr_blk_t::counter, counter_block, ctr_inc_counter(), ctr_blk_t::i_vector, and ctr_blk_t::nonce.
Referenced by main().
void ctr_inc_counter | ( | ctr_blk_t * | counter | ) |
Performs counter increment to prepare input for next round.
counter | value of counter used in CTR mode |
References ctr_blk_t::counter, counter_block, ctr_blk_t::i_vector, and ctr_blk_t::nonce.
Referenced by ctr_encrypt_decrypt().
void ecb_decrypt | ( | uint8_t * | cipherText, |
uint8_t * | plainText, | ||
uint32_t | size | ||
) |
This function performs ECB decryption on input cipher text blocks.
cipherText | pointer to the array containing the cipher text bytes |
plainText | pointer to the array where the decrypted plain text has to be stored |
size | size of the input plain text |
References AES_BLOCK_SIZE, and aes_inverse_cipher().
Referenced by main().
void ecb_encrypt | ( | uint8_t * | plainText, |
uint8_t * | cipherText, | ||
uint32_t | size | ||
) |
This function performs ECB encryption on input plain text blocks.
plainText | pointer to the array containing the plain text bytes |
cipherText | pointer to the array where the encrypted cipher output has to be stored |
size | size of the input plain text |
References AES_BLOCK_SIZE, and aes_cipher().
Referenced by main().
void ofb_decrypt | ( | uint8_t * | cipherText, |
uint8_t * | plainText, | ||
uint8_t * | init_vector, | ||
uint32_t | size | ||
) |
This function performs OFB decryption on input cipher text blocks.
cipherText | pointer to the array containing the cipher text bytes |
plainText | pointer to the array where the decrypted plain text has to be stored |
init_vector | pointer to the array containing the unique initialization vector |
size | size of the input plain text |
References AES_BLOCK_SIZE, and aes_cipher().
void ofb_encrypt | ( | uint8_t * | plainText, |
uint8_t * | cipherText, | ||
uint8_t * | init_vector, | ||
uint32_t | size | ||
) |
This function performs OFB encryption on input plain text blocks.
plainText | pointer to the array containing the plain text bytes |
cipherText | pointer to the array where the encrypted cipher output has to be stored |
init_vector | pointer to the array containing the unique initialization vector |
size | size of the input plain text |
References AES_BLOCK_SIZE, and aes_cipher().
Referenced by main().