Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / include / ipxe / aes.h
1 #ifndef _IPXE_AES_H
2 #define _IPXE_AES_H
3
4 FILE_LICENCE ( GPL2_OR_LATER );
5
6 struct cipher_algorithm;
7
8 /** Basic AES blocksize */
9 #define AES_BLOCKSIZE 16
10
11 #include "crypto/axtls/crypto.h"
12
13 /** AES context */
14 struct aes_context {
15         /** AES context for AXTLS */
16         AES_CTX axtls_ctx;
17         /** Cipher is being used for decrypting */
18         int decrypting;
19 };
20
21 /** AES context size */
22 #define AES_CTX_SIZE sizeof ( struct aes_context )
23
24 /* AXTLS functions */
25 extern void axtls_aes_encrypt ( const AES_CTX *ctx, uint32_t *data );
26 extern void axtls_aes_decrypt ( const AES_CTX *ctx, uint32_t *data );
27
28 extern struct cipher_algorithm aes_algorithm;
29 extern struct cipher_algorithm aes_cbc_algorithm;
30
31 int aes_wrap ( const void *kek, const void *src, void *dest, int nblk );
32 int aes_unwrap ( const void *kek, const void *src, void *dest, int nblk );
33
34 #endif /* _IPXE_AES_H */