• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*	$NetBSD: rijndael-alg-fst.h,v 1.4 2006/09/09 16:22:36 manu Exp $	*/
2 
3 /*	$KAME: rijndael-alg-fst.h,v 1.1.1.1 2001/08/08 09:56:23 sakane Exp $	*/
4 
5 /*
6  * rijndael-alg-fst.h   v2.3   April '2000
7  *
8  * Optimised ANSI C code
9  *
10  * #define INTERMEDIATE_VALUE_KAT to generate the Intermediate Value Known Answer Test.
11  */
12 
13 #ifndef __RIJNDAEL_ALG_FST_H
14 #define __RIJNDAEL_ALG_FST_H
15 
16 #define RIJNDAEL_MAXKC			(256/32)
17 #define RIJNDAEL_MAXROUNDS		14
18 
19 int rijndaelKeySched(u_int8_t k[RIJNDAEL_MAXKC][4], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
20 
21 int rijndaelKeyEncToDec(u_int8_t W[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
22 
23 int rijndaelEncrypt(u_int8_t a[16], u_int8_t b[16], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
24 
25 #ifdef INTERMEDIATE_VALUE_KAT
26 int rijndaelEncryptRound(u_int8_t a[4][4], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS, int rounds);
27 #endif /* INTERMEDIATE_VALUE_KAT */
28 
29 int rijndaelDecrypt(u_int8_t a[16], u_int8_t b[16], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
30 
31 #ifdef INTERMEDIATE_VALUE_KAT
32 int rijndaelDecryptRound(u_int8_t a[4][4], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS, int rounds);
33 #endif /* INTERMEDIATE_VALUE_KAT */
34 
35 #endif /* __RIJNDAEL_ALG_FST_H */
36