debuggers.hg

view tools/blktap2/drivers/aes.h @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents 1c627434605e
children
line source
1 #ifndef QEMU_AES_H
2 #define QEMU_AES_H
4 #include <stdint.h>
6 #define AES_MAXNR 14
7 #define AES_BLOCK_SIZE 16
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;
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);
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);
28 #endif