2001-06-11 12:39:29 +00:00
|
|
|
/* $FreeBSD$ */
|
2003-10-19 21:28:34 +00:00
|
|
|
/* $KAME: rijndael-alg-fst.h,v 1.4 2000/10/02 17:14:26 itojun Exp $ */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* rijndael-alg-fst.h v2.3 April '2000
|
2000-10-30 11:03:32 +00:00
|
|
|
*
|
2003-10-19 21:28:34 +00:00
|
|
|
* Optimised ANSI C code
|
2003-10-12 21:05:05 +00:00
|
|
|
*
|
2003-10-19 21:28:34 +00:00
|
|
|
* #define INTERMEDIATE_VALUE_KAT to generate the Intermediate Value Known Answer Test.
|
2000-10-30 11:03:32 +00:00
|
|
|
*/
|
2003-10-19 21:28:34 +00:00
|
|
|
|
2000-10-30 11:03:32 +00:00
|
|
|
#ifndef __RIJNDAEL_ALG_FST_H
|
|
|
|
#define __RIJNDAEL_ALG_FST_H
|
|
|
|
|
2003-10-19 21:28:34 +00:00
|
|
|
#define RIJNDAEL_MAXKC (256/32)
|
|
|
|
#define RIJNDAEL_MAXROUNDS 14
|
|
|
|
|
|
|
|
int rijndaelKeySched(u_int8_t k[RIJNDAEL_MAXKC][4], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
|
|
|
|
|
|
|
|
int rijndaelKeyEncToDec(u_int8_t W[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
|
|
|
|
|
|
|
|
int rijndaelEncrypt(u_int8_t a[16], u_int8_t b[16], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
|
|
|
|
|
|
|
|
#ifdef INTERMEDIATE_VALUE_KAT
|
|
|
|
int rijndaelEncryptRound(u_int8_t a[4][4], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS, int rounds);
|
|
|
|
#endif /* INTERMEDIATE_VALUE_KAT */
|
|
|
|
|
|
|
|
int rijndaelDecrypt(u_int8_t a[16], u_int8_t b[16], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
|
2000-10-30 11:03:32 +00:00
|
|
|
|
2003-10-19 21:28:34 +00:00
|
|
|
#ifdef INTERMEDIATE_VALUE_KAT
|
|
|
|
int rijndaelDecryptRound(u_int8_t a[4][4], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS, int rounds);
|
|
|
|
#endif /* INTERMEDIATE_VALUE_KAT */
|
2000-10-30 11:03:32 +00:00
|
|
|
|
|
|
|
#endif /* __RIJNDAEL_ALG_FST_H */
|