]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libcrypto/include/private/aes_linux.h
Inital import
[l4.git] / l4 / pkg / libcrypto / include / private / aes_linux.h
1 /*
2  * \brief   Private header Linux AES functions.
3  * \date    2006-07-26
4  * \author  Carsten Weinhold <weinhold@os.inf.tu-dresden.de>
5  */
6 /*
7  * Copyright (C) 2006-2007  Carsten Weinhold <weinhold@os.inf.tu-dresden.de>
8  * Technische Universitaet Dresden, Operating Systems Research Group
9  *
10  * This file is part of the libcrypto package, which is distributed under
11  * the  terms  of the  GNU General Public Licence 2.  Please see the
12  * COPYING file for details.
13  */
14
15 #ifndef __CRYPTO_AES_LINUX_H
16 #define __CRYPTO_AES_LINUX_H
17
18 #include "linux.h"
19
20 /* AES C implementation */
21
22 struct aes_c_ctx {
23         int key_length;
24         u32 E[60];
25         u32 D[60];
26 };
27
28 /* AES i586 ASM implementation */
29
30 #define AES_MIN_KEY_SIZE        16
31 #define AES_MAX_KEY_SIZE        32
32 #define AES_BLOCK_SIZE          16
33 #define AES_KS_LENGTH           4 * AES_BLOCK_SIZE
34 #define RC_LENGTH               29
35
36 struct aes_586_ctx {
37         u32 ekey[AES_KS_LENGTH];
38         u32 rounds;
39         u32 dkey[AES_KS_LENGTH];
40 };
41 #endif /* __CRYPTO_AES_LINUX_H */
42