• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _GPXE_AES_H
2 #define _GPXE_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 extern struct cipher_algorithm aes_algorithm;
25 extern struct cipher_algorithm aes_cbc_algorithm;
26 
27 int aes_wrap ( const void *kek, const void *src, void *dest, int nblk );
28 int aes_unwrap ( const void *kek, const void *src, void *dest, int nblk );
29 
30 #endif /* _GPXE_AES_H */
31