26 #if !defined(MBEDTLS_CONFIG_FILE)
29 #include MBEDTLS_CONFIG_FILE
36 #define MBEDTLS_AES_ENCRYPT 1
37 #define MBEDTLS_AES_DECRYPT 0
39 #define MBEDTLS_ERR_AES_INVALID_KEY_LENGTH -0x0020
40 #define MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH -0x0022
42 #if !defined(MBEDTLS_AES_ALT)
90 unsigned int keybits );
102 unsigned int keybits );
116 const unsigned char input[16],
117 unsigned char output[16] );
119 #if defined(MBEDTLS_CIPHER_MODE_CBC)
145 unsigned char iv[16],
146 const unsigned char *input,
147 unsigned char *output );
150 #if defined(MBEDTLS_CIPHER_MODE_CFB)
180 unsigned char iv[16],
181 const unsigned char *input,
182 unsigned char *output );
211 unsigned char iv[16],
212 const unsigned char *input,
213 unsigned char *output );
216 #if defined(MBEDTLS_CIPHER_MODE_CTR)
242 unsigned char nonce_counter[16],
243 unsigned char stream_block[16],
244 const unsigned char *input,
245 unsigned char *output );
258 const unsigned char input[16],
259 unsigned char output[16] );
271 const unsigned char input[16],
272 unsigned char output[16] );
int mbedtls_aes_self_test(int verbose)
Checkup routine.
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.
Compatibility names (set of defines)
void mbedtls_aes_init(mbedtls_aes_context *ctx)
Initialize AES context.
int mbedtls_aes_setkey_enc(mbedtls_aes_context *ctx, const unsigned char *key, unsigned int keybits)
AES key schedule (encryption)
void mbedtls_aes_free(mbedtls_aes_context *ctx)
Clear AES context.
int mbedtls_aes_setkey_dec(mbedtls_aes_context *ctx, const unsigned char *key, unsigned int keybits)
AES key schedule (decryption)