Home | History | Annotate | Line # | Download | only in opencrypto
      1 /* $NetBSD: aesxcbcmac.h,v 1.4 2026/07/05 15:33:43 riastradh Exp $ */
      2 
      3 #ifndef	_OPENCRYPTO_AESXCBCMAC_H
      4 #define	_OPENCRYPTO_AESXCBCMAC_H
      5 
      6 #include <sys/types.h>
      7 
      8 #include <crypto/aes/aes.h>
      9 
     10 #define AES_BLOCKSIZE   16
     11 
     12 typedef struct {
     13 	uint8_t	e[AES_BLOCKSIZE];
     14 	uint8_t	buf[AES_BLOCKSIZE];
     15 	size_t		buflen;
     16 	struct aesenc	r_k1s;
     17 	int		r_nr; /* key-length-dependent number of rounds */
     18 	uint8_t	k2[AES_BLOCKSIZE];
     19 	uint8_t	k3[AES_BLOCKSIZE];
     20 } aesxcbc_ctx;
     21 
     22 int aes_xcbc_mac_init(void *, const uint8_t *, uint16_t);
     23 int aes_xcbc_mac_loop(void *, const uint8_t *, uint16_t);
     24 void aes_xcbc_mac_result(uint8_t *, void *);
     25 
     26 #endif	/* _OPENCRYPTO_AESXCBCMAC_H */
     27