1 /* $NetBSD: aesxcbcmac.h,v 1.2 2020/06/29 23:34:48 riastradh Exp $ */
2 
3 #ifndef   _OPENCRYPTO_AESXCBCMAC_H
4 #define   _OPENCRYPTO_AESXCBCMAC_H
5 
6 #include <sys/types.h>
7 
8 #define AES_BLOCKSIZE   16
9 
10 typedef struct {
11           u_int8_t  e[AES_BLOCKSIZE];
12           u_int8_t  buf[AES_BLOCKSIZE];
13           size_t              buflen;
14           struct aesenc       r_k1s;
15           int                 r_nr; /* key-length-dependent number of rounds */
16           u_int8_t  k2[AES_BLOCKSIZE];
17           u_int8_t  k3[AES_BLOCKSIZE];
18 } aesxcbc_ctx;
19 
20 int aes_xcbc_mac_init(void *, const u_int8_t *, u_int16_t);
21 int aes_xcbc_mac_loop(void *, const u_int8_t *, u_int16_t);
22 void aes_xcbc_mac_result(u_int8_t *, void *);
23 
24 #endif    /* _OPENCRYPTO_AESXCBCMAC_H */
25