1 #ifndef QEMU_AES_H
2 #define QEMU_AES_H
3 
4 #include <stdint.h>
5 
6 #define AES_MAXNR 14
7 #define AES_BLOCK_SIZE 16
8 
9 struct aes_key_st {
10     uint32_t rd_key[4 *(AES_MAXNR + 1)];
11     int rounds;
12 };
13 typedef struct aes_key_st AES_KEY;
14 
15 int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
16 	AES_KEY *key);
17 int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
18 	AES_KEY *key);
19 
20 void AES_encrypt(const unsigned char *in, unsigned char *out,
21 	const AES_KEY *key);
22 void AES_decrypt(const unsigned char *in, unsigned char *out,
23 	const AES_KEY *key);
24 void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
25 		     const unsigned long length, const AES_KEY *key,
26 		     unsigned char *ivec, const int enc);
27 
28 #endif
29