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