1 1.1 drochner /* $NetBSD: aesxcbcmac.h,v 1.1 2011/05/24 19:10:09 drochner Exp $ */ 2 1.1 drochner 3 1.1 drochner #include <sys/types.h> 4 1.1 drochner 5 1.1 drochner #define AES_BLOCKSIZE 16 6 1.1 drochner 7 1.1 drochner typedef struct { 8 1.1 drochner u_int8_t e[AES_BLOCKSIZE]; 9 1.1 drochner u_int8_t buf[AES_BLOCKSIZE]; 10 1.1 drochner size_t buflen; 11 1.1 drochner u_int32_t r_k1s[(RIJNDAEL_MAXNR+1)*4]; 12 1.1 drochner u_int32_t r_k2s[(RIJNDAEL_MAXNR+1)*4]; 13 1.1 drochner u_int32_t r_k3s[(RIJNDAEL_MAXNR+1)*4]; 14 1.1 drochner int r_nr; /* key-length-dependent number of rounds */ 15 1.1 drochner u_int8_t k2[AES_BLOCKSIZE]; 16 1.1 drochner u_int8_t k3[AES_BLOCKSIZE]; 17 1.1 drochner } aesxcbc_ctx; 18 1.1 drochner 19 1.1 drochner int aes_xcbc_mac_init(void *, const u_int8_t *, u_int16_t); 20 1.1 drochner int aes_xcbc_mac_loop(void *, const u_int8_t *, u_int16_t); 21 1.1 drochner void aes_xcbc_mac_result(u_int8_t *, void *); 22