Use mask instead of modulo, since bo->backoff is always power of 2
[dfdiff.git] / sys / crypto / rijndael / rijndael-alg-fst.h
blobc55cb1bdf0a6967e0af589120ff46b823e02a01c
1 /* $FreeBSD: src/sys/crypto/rijndael/rijndael-alg-fst.h,v 1.2.2.1 2001/07/03 11:01:35 ume Exp $ */
2 /* $DragonFly: src/sys/crypto/rijndael/rijndael-alg-fst.h,v 1.2 2003/06/17 04:28:20 dillon Exp $ */
3 /* $KAME: rijndael-alg-fst.h,v 1.4 2000/10/02 17:14:26 itojun Exp $ */
5 /*
6 * rijndael-alg-fst.h v2.3 April '2000
8 * Optimised ANSI C code
10 * #define INTERMEDIATE_VALUE_KAT to generate the Intermediate Value Known Answer Test.
13 #ifndef __RIJNDAEL_ALG_FST_H
14 #define __RIJNDAEL_ALG_FST_H
16 #define RIJNDAEL_MAXKC (256/32)
17 #define RIJNDAEL_MAXROUNDS 14
19 int rijndaelKeySched(u_int8_t k[RIJNDAEL_MAXKC][4], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
21 int rijndaelKeyEncToDec(u_int8_t W[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
23 int rijndaelEncrypt(u_int8_t a[16], u_int8_t b[16], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
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 */
29 int rijndaelDecrypt(u_int8_t a[16], u_int8_t b[16], u_int8_t rk[RIJNDAEL_MAXROUNDS+1][4][4], int ROUNDS);
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 */
35 #endif /* __RIJNDAEL_ALG_FST_H */