openssh/rijndael.h
Ben Lindstrom 01f8463b15 - markus@cvs.openbsd.org 2000/12/06 23:10:39
[rijndael.c]
     unexpand(1)
   - markus@cvs.openbsd.org 2000/12/06 23:05:43
     [cipher.c cipher.h rijndael.c rijndael.h rijndael_boxes.h]
     new rijndael implementation. fixes endian bugs
2000-12-07 05:57:27 +00:00

28 lines
668 B
C

/*
* rijndael-alg-fst.h v2.4 April '2000
* rijndael-api-fst.h v2.4 April '2000
*
* Optimised ANSI C code
*
*/
#ifndef RIJNDAEL_H
#define RIJNDAEL_H
#define RIJNDAEL_MAXKC (256/32)
#define RIJNDAEL_MAXROUNDS 14
#define RIJNDAEL_ENCRYPT 0
#define RIJNDAEL_DECRYPT 1
typedef struct {
int ROUNDS; /* key-length-dependent number of rounds */
u_int8_t keySched[RIJNDAEL_MAXROUNDS+1][4][4];
} rijndael_key;
int rijndael_encrypt(rijndael_key *key, u_int8_t a[16], u_int8_t b[16]);
int rijndael_decrypt(rijndael_key *key, u_int8_t a[16], u_int8_t b[16]);
int rijndael_makekey(rijndael_key *key, int direction, int keyLen, u_int8_t *keyMaterial);
#endif