rijndael.h revision 69587
1147072Sbrooks#ifndef _RIJNDAEL_H_ 2147072Sbrooks#define _RIJNDAEL_H_ 3147072Sbrooks 4147072Sbrooks/* 1. Standard types for AES cryptography source code */ 5147072Sbrooks 6147072Sbrookstypedef u_int8_t u1byte; /* an 8 bit unsigned character type */ 7147072Sbrookstypedef u_int16_t u2byte; /* a 16 bit unsigned integer type */ 8147072Sbrookstypedef u_int32_t u4byte; /* a 32 bit unsigned integer type */ 9147072Sbrooks 10147072Sbrookstypedef int8_t s1byte; /* an 8 bit signed character type */ 11147072Sbrookstypedef int16_t s2byte; /* a 16 bit signed integer type */ 12147072Sbrookstypedef int32_t s4byte; /* a 32 bit signed integer type */ 13147072Sbrooks 14147072Sbrookstypedef struct _rijndael_ctx { 15147072Sbrooks u4byte k_len; 16147072Sbrooks int decrypt; 17147072Sbrooks u4byte e_key[64]; 18147072Sbrooks u4byte d_key[64]; 19147072Sbrooks} rijndael_ctx; 20147072Sbrooks 21147072Sbrooks 22147072Sbrooks/* 2. Standard interface for AES cryptographic routines */ 23147072Sbrooks 24147072Sbrooks/* These are all based on 32 bit unsigned values and will therefore */ 25147072Sbrooks/* require endian conversions for big-endian architectures */ 26147072Sbrooks 27147072Sbrooksrijndael_ctx *rijndael_set_key __P((rijndael_ctx *, const u4byte *, u4byte, int)); 28147072Sbrooksvoid rijndael_encrypt __P((rijndael_ctx *, const u4byte *, u4byte *)); 29147072Sbrooksvoid rijndael_decrypt __P((rijndael_ctx *, const u4byte *, u4byte *)); 30147072Sbrooks 31147072Sbrooks#endif /* _RIJNDAEL_H_ */ 32147072Sbrooks