rijndael-alg-ref.h [plain text]
#ifndef __RIJNDAEL_ALG_H
#define __RIJNDAEL_ALG_H
#include "aesCommon.h"
#define MAXBC (MAX_AES_BLOCK_BITS/32)
#define MAXKC (MAX_AES_KEY_BITS/32)
#define MAXROUNDS 14
#ifdef __cplusplus
extern "C" {
#endif
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]);
#ifndef __APPLE__
int rijndaelEncryptRound (word8 a[4][MAXBC], int keyBits, int blockBits,
word8 rk[MAXROUNDS+1][4][MAXBC], int rounds);
#endif
int rijndaelDecrypt (word8 a[4][MAXBC], int keyBits, int blockBits,
word8 rk[MAXROUNDS+1][4][MAXBC]);
#ifndef __APPLE__
int rijndaelDecryptRound (word8 a[4][MAXBC], int keyBits, int blockBits,
word8 rk[MAXROUNDS+1][4][MAXBC], int rounds);
#endif
#if !GLADMAN_AES_128_ENABLE
#define ROUNDS_128_OPT 10
#define BC_128_OPT 4
#define KC_128_OPT 4
int rijndaelKeySched128 (word8 k[4][KC_128_OPT],
word8 rk[MAXROUNDS+1][4][MAXBC]);
int rijndaelEncrypt128 (word8 a[4][BC_128_OPT],
word8 rk[MAXROUNDS+1][4][MAXBC]);
int rijndaelDecrypt128 (word8 a[4][BC_128_OPT],
word8 rk[MAXROUNDS+1][4][MAXBC]);
#endif
#ifdef __cplusplus
}
#endif
#endif