]> git.saurik.com Git - apple/network_cmds.git/blob - racoon.tproj/rijndael-alg-fst.h
network_cmds-245.19.tar.gz
[apple/network_cmds.git] / racoon.tproj / rijndael-alg-fst.h
1 /* $KAME: rijndael-alg-fst.h,v 1.4 2000/10/02 17:14:26 itojun Exp $ */
2
3 /*
4 * rijndael-alg-fst.h v2.3 April '2000
5 *
6 * Optimised ANSI C code
7 *
8 * #define INTERMEDIATE_VALUE_KAT to generate the Intermediate Value Known Answer Test.
9 */
10
11 #ifndef __RIJNDAEL_ALG_FST_H__
12 #define __RIJNDAEL_ALG_FST_H__
13
14 #define RIJNDAEL_MAXKC (256/32)
15 #define RIJNDAEL_MAXROUNDS 14
16
17 int rijndaelKeySched(u_int8_t k[RIJNDAEL_MAXKC][4], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
18
19 int rijndaelKeyEncToDec(u_int8_t W[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
20
21 int rijndaelEncrypt(u_int8_t a[16], u_int8_t b[16], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
22
23 #ifdef INTERMEDIATE_VALUE_KAT
24 int rijndaelEncryptRound(u_int8_t a[4][4], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS, int rounds);
25 #endif /* INTERMEDIATE_VALUE_KAT */
26
27 int rijndaelDecrypt(u_int8_t a[16], u_int8_t b[16], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
28
29 #ifdef INTERMEDIATE_VALUE_KAT
30 int rijndaelDecryptRound(u_int8_t a[4][4], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS, int rounds);
31 #endif /* INTERMEDIATE_VALUE_KAT */
32
33 #endif /* __RIJNDAEL_ALG_FST_H__ */
34