Common AES functions used by all PSA Crypto wrappers for the CryptoCell 310 AES APIs. More...
Common AES functions used by all PSA Crypto wrappers for the CryptoCell 310 AES APIs.
Definition in file psa_cryptocell_310_aes_common.h.
#include "psa/crypto.h"
Go to the source code of this file.
psa_status_t | cryptocell_310_common_aes_setup (SaSiAesUserContext_t *ctx, SaSiAesEncryptMode_t direction, SaSiAesOperationMode_t mode, SaSiAesPaddingType_t padding, const uint8_t *iv, const uint8_t *key_buffer, size_t key_size) |
Common setup function for AES operations. | |
psa_status_t | cryptocell_310_common_aes_encrypt_decrypt (SaSiAesUserContext_t *ctx, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_buffer_size, size_t *output_length) |
Common function for an AES encryption. | |
psa_status_t cryptocell_310_common_aes_encrypt_decrypt | ( | SaSiAesUserContext_t * | ctx, |
const uint8_t * | input, | ||
size_t | input_length, | ||
uint8_t * | output, | ||
size_t | output_buffer_size, | ||
size_t * | output_length | ||
) |
Common function for an AES encryption.
ctx | AES context of the type SaSiAesUserContext_t |
input | Constant input buffer of plain text to encrypt |
input_length | Length of the input buffer |
output | Output buffer to write the cipher |
output_buffer_size | Size of the output buffer. Must be at least input_length |
output_length | Pointer to output length. Will contain actual length of cipher |
psa_status_t cryptocell_310_common_aes_setup | ( | SaSiAesUserContext_t * | ctx, |
SaSiAesEncryptMode_t | direction, | ||
SaSiAesOperationMode_t | mode, | ||
SaSiAesPaddingType_t | padding, | ||
const uint8_t * | iv, | ||
const uint8_t * | key_buffer, | ||
size_t | key_size | ||
) |
Common setup function for AES operations.
ctx | Driver specific AES context of the type SaSiAesUserContext_t |
direction | Encrypt or decrypt direction of type SaSiAesEncryptMode_t |
mode | Operation mode (e.g. CBC, CCM) of type SaSiAesOperationMode_t |
padding | Operation padding type of type SaSiAesPaddingType_t |
iv | Constant buffer containing the IV for the operation |
key_buffer | Constant buffer containing an AES key |
key_size | Size of AES key in use. |