]>
git.saurik.com Git - apple/ipsec.git/blob - ipsec-tools/racoon/Crypto/rijndael-alg-fst.h
1 /* $KAME: rijndael-alg-fst.h,v 1.4 2000/10/02 17:14:26 itojun Exp $ */
4 * rijndael-alg-fst.h v2.3 April '2000
6 * Optimised ANSI C code
8 * #define INTERMEDIATE_VALUE_KAT to generate the Intermediate Value Known Answer Test.
11 #ifndef __RIJNDAEL_ALG_FST_H__
12 #define __RIJNDAEL_ALG_FST_H__
14 #define RIJNDAEL_MAXKC (256/32)
15 #define RIJNDAEL_MAXROUNDS 14
17 int rijndaelKeySched(u_int8_t k
[RIJNDAEL_MAXKC
][4], u_int8_t rk
[RIJNDAEL_MAXROUNDS
+1][4][4], int ROUNDS
);
19 int rijndaelKeyEncToDec(u_int8_t W
[RIJNDAEL_MAXROUNDS
+1][4][4], int ROUNDS
);
21 int rijndaelEncrypt(u_int8_t a
[16], u_int8_t b
[16], u_int8_t rk
[RIJNDAEL_MAXROUNDS
+1][4][4], int ROUNDS
);
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 */
27 int rijndaelDecrypt(u_int8_t a
[16], u_int8_t b
[16], u_int8_t rk
[RIJNDAEL_MAXROUNDS
+1][4][4], int ROUNDS
);
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 */
33 #endif /* __RIJNDAEL_ALG_FST_H__ */