]>
Commit | Line | Data |
---|---|---|
dfe89252 | 1 | /* |
2 | * rijndael-alg-fst.h v2.4 April '2000 | |
3 | * rijndael-api-fst.h v2.4 April '2000 | |
4 | * | |
5 | * Optimised ANSI C code | |
6 | * | |
7 | */ | |
94ec8c6b | 8 | |
dfe89252 | 9 | #ifndef RIJNDAEL_H |
10 | #define RIJNDAEL_H | |
4d670c24 | 11 | |
dfe89252 | 12 | #define RIJNDAEL_MAXKC (256/32) |
13 | #define RIJNDAEL_MAXROUNDS 14 | |
94ec8c6b | 14 | |
dfe89252 | 15 | #define RIJNDAEL_ENCRYPT 0 |
16 | #define RIJNDAEL_DECRYPT 1 | |
94ec8c6b | 17 | |
dfe89252 | 18 | typedef struct { |
19 | int ROUNDS; /* key-length-dependent number of rounds */ | |
20 | u_int8_t keySched[RIJNDAEL_MAXROUNDS+1][4][4]; | |
21 | } rijndael_key; | |
94ec8c6b | 22 | |
dfe89252 | 23 | int rijndael_encrypt(rijndael_key *key, u_int8_t a[16], u_int8_t b[16]); |
24 | int rijndael_decrypt(rijndael_key *key, u_int8_t a[16], u_int8_t b[16]); | |
25 | int rijndael_makekey(rijndael_key *key, int direction, int keyLen, u_int8_t *keyMaterial); | |
94ec8c6b | 26 | |
dfe89252 | 27 | #endif |