-
Notifications
You must be signed in to change notification settings - Fork 6
/
rijndael-alg-ref.h
29 lines (24 loc) · 951 Bytes
/
rijndael-alg-ref.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* rijndael-alg-ref.h v2.0 August '99
* Reference ANSI C code
* authors: Paulo Barreto
* Vincent Rijmen, K.U.Leuven
*/
#ifndef __RIJNDAEL_ALG_H
#define __RIJNDAEL_ALG_H
#define MAXBC (128/32)
#define MAXKC (256/32)
#define MAXROUNDS 14
typedef unsigned char word8;
typedef unsigned short word16;
typedef unsigned long word32;
int rijndaelKeySched (word8 k[4][MAXKC], int keyBits, int blockBits,
word8 rk[MAXROUNDS+1][4][MAXBC]);
int rijndaelEncrypt (word8 a[4][MAXBC], int keyBits, int blockBits,
word8 rk[MAXROUNDS+1][4][MAXBC]);
int rijndaelEncryptRound (word8 a[4][MAXBC], int keyBits, int blockBits,
word8 rk[MAXROUNDS+1][4][MAXBC], int rounds);
int rijndaelDecrypt (word8 a[4][MAXBC], int keyBits, int blockBits,
word8 rk[MAXROUNDS+1][4][MAXBC]);
int rijndaelDecryptRound (word8 a[4][MAXBC], int keyBits, int blockBits,
word8 rk[MAXROUNDS+1][4][MAXBC], int rounds);
#endif /* __RIJNDAEL_ALG_H */