xref: /dragonfly/crypto/openssh/poly1305.h (revision 36e94dc5)
1*36e94dc5SPeter Avalos /* $OpenBSD: poly1305.h,v 1.4 2014/05/02 03:27:54 djm Exp $ */
2*36e94dc5SPeter Avalos 
3*36e94dc5SPeter Avalos /*
4*36e94dc5SPeter Avalos  * Public Domain poly1305 from Andrew Moon
5*36e94dc5SPeter Avalos  * poly1305-donna-unrolled.c from https://github.com/floodyberry/poly1305-donna
6*36e94dc5SPeter Avalos  */
7*36e94dc5SPeter Avalos 
8*36e94dc5SPeter Avalos #ifndef POLY1305_H
9*36e94dc5SPeter Avalos #define POLY1305_H
10*36e94dc5SPeter Avalos 
11*36e94dc5SPeter Avalos #include <sys/types.h>
12*36e94dc5SPeter Avalos 
13*36e94dc5SPeter Avalos #define POLY1305_KEYLEN		32
14*36e94dc5SPeter Avalos #define POLY1305_TAGLEN		16
15*36e94dc5SPeter Avalos 
16*36e94dc5SPeter Avalos void poly1305_auth(u_char out[POLY1305_TAGLEN], const u_char *m, size_t inlen,
17*36e94dc5SPeter Avalos     const u_char key[POLY1305_KEYLEN])
18*36e94dc5SPeter Avalos     __attribute__((__bounded__(__minbytes__, 1, POLY1305_TAGLEN)))
19*36e94dc5SPeter Avalos     __attribute__((__bounded__(__buffer__, 2, 3)))
20*36e94dc5SPeter Avalos     __attribute__((__bounded__(__minbytes__, 4, POLY1305_KEYLEN)));
21*36e94dc5SPeter Avalos 
22*36e94dc5SPeter Avalos #endif	/* POLY1305_H */
23