27 #ifndef POLARSSL_AES_H
28 #define POLARSSL_AES_H
34 #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
36 typedef UINT32 uint32_t;
45 #define POLARSSL_ERR_AES_INVALID_KEY_LENGTH -0x0020
46 #define POLARSSL_ERR_AES_INVALID_INPUT_LENGTH -0x0022
48 #if !defined(POLARSSL_AES_ALT)
106 const unsigned char input[16],
107 unsigned char output[16] );
109 #if defined(POLARSSL_CIPHER_MODE_CBC)
127 unsigned char iv[16],
128 const unsigned char *input,
129 unsigned char *output );
153 unsigned char iv[16],
154 const unsigned char *input,
155 unsigned char *output );
176 unsigned char iv[16],
177 const unsigned char *input,
178 unsigned char *output );
205 unsigned char nonce_counter[16],
206 unsigned char stream_block[16],
207 const unsigned char *input,
208 unsigned char *output );
int aes_crypt_cfb128(aes_context *ctx, int mode, size_t length, size_t *iv_off, unsigned char iv[16], const unsigned char *input, unsigned char *output)
AES-CFB128 buffer encryption/decryption.
Configuration options (set of defines)
int aes_setkey_dec(aes_context *ctx, const unsigned char *key, unsigned int keysize)
AES key schedule (decryption)
int aes_crypt_cbc(aes_context *ctx, int mode, size_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output)
AES-CBC buffer encryption/decryption Length should be a multiple of the block size (16 bytes) ...
int aes_self_test(int verbose)
Checkup routine.
int aes_crypt_cfb8(aes_context *ctx, int mode, size_t length, unsigned char iv[16], const unsigned char *input, unsigned char *output)
AES-CFB8 buffer encryption/decryption.
int aes_setkey_enc(aes_context *ctx, const unsigned char *key, unsigned int keysize)
AES key schedule (encryption)
int aes_crypt_ecb(aes_context *ctx, int mode, const unsigned char input[16], unsigned char output[16])
AES-ECB block encryption/decryption.
int aes_crypt_ctr(aes_context *ctx, size_t length, size_t *nc_off, unsigned char nonce_counter[16], unsigned char stream_block[16], const unsigned char *input, unsigned char *output)
AES-CTR buffer encryption/decryption.