Accelerated AES block cipher for the mbed TLS API using the AES, CRYPTO, CRYPTOACC or SE peripheral.
|
void | mbedtls_aes_init (mbedtls_aes_context *ctx) |
| Initialize AES context.
|
|
void | mbedtls_aes_free (mbedtls_aes_context *ctx) |
| Clear AES context.
|
|
int | mbedtls_aes_setkey_enc (mbedtls_aes_context *ctx, const unsigned char *key, unsigned int keybits) |
| AES key schedule (encryption)
|
|
int | mbedtls_aes_setkey_dec (mbedtls_aes_context *ctx, const unsigned char *key, unsigned int keybits) |
| AES key schedule (decryption)
|
|
int | mbedtls_aes_crypt_ecb (mbedtls_aes_context *ctx, int mode, const unsigned char input[16], unsigned char output[16]) |
| AES-ECB block encryption/decryption.
|
|
int | mbedtls_internal_aes_encrypt (mbedtls_aes_context *ctx, const unsigned char input[16], unsigned char output[16]) |
| Internal AES block encryption function (Only exposed to allow overriding it, see MBEDTLS_AES_ENCRYPT_ALT)
|
|
int | mbedtls_internal_aes_decrypt (mbedtls_aes_context *ctx, const unsigned char input[16], unsigned char output[16]) |
| Internal AES block decryption function (Only exposed to allow overriding it, see MBEDTLS_AES_DECRYPT_ALT)
|
|
int mbedtls_aes_crypt_ecb |
( |
mbedtls_aes_context * |
ctx, |
|
|
int |
mode, |
|
|
const unsigned char |
input[16], |
|
|
unsigned char |
output[16] |
|
) |
| |
AES-ECB block encryption/decryption.
- Parameters
-
ctx | AES context |
mode | MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT |
input | 16-byte input block |
output | 16-byte output block |
- Returns
- 0 if successful
Clear AES context.
- Parameters
-
ctx | AES context to be cleared |
Initialize AES context.
- Parameters
-
ctx | AES context to be initialized |
int mbedtls_aes_setkey_dec |
( |
mbedtls_aes_context * |
ctx, |
|
|
const unsigned char * |
key, |
|
|
unsigned int |
keybits |
|
) |
| |
AES key schedule (decryption)
- Parameters
-
ctx | AES context to be initialized |
key | decryption key |
keybits | must be 128, 192 or 256 |
- Returns
- 0 if successful, or MBEDTLS_ERR_AES_INVALID_KEY_LENGTH
int mbedtls_aes_setkey_enc |
( |
mbedtls_aes_context * |
ctx, |
|
|
const unsigned char * |
key, |
|
|
unsigned int |
keybits |
|
) |
| |
AES key schedule (encryption)
- Parameters
-
ctx | AES context to be initialized |
key | encryption key |
keybits | must be 128, 192 or 256 |
- Returns
- 0 if successful, or MBEDTLS_ERR_AES_INVALID_KEY_LENGTH
int mbedtls_internal_aes_decrypt |
( |
mbedtls_aes_context * |
ctx, |
|
|
const unsigned char |
input[16], |
|
|
unsigned char |
output[16] |
|
) |
| |
Internal AES block decryption function (Only exposed to allow overriding it, see MBEDTLS_AES_DECRYPT_ALT)
- Parameters
-
ctx | AES context |
input | Ciphertext block |
output | Output (plaintext) block |
- Returns
- 0 if successful
int mbedtls_internal_aes_encrypt |
( |
mbedtls_aes_context * |
ctx, |
|
|
const unsigned char |
input[16], |
|
|
unsigned char |
output[16] |
|
) |
| |
Internal AES block encryption function (Only exposed to allow overriding it, see MBEDTLS_AES_ENCRYPT_ALT)
- Parameters
-
ctx | AES context |
input | Plaintext block |
output | Output (ciphertext) block |
- Returns
- 0 if successful