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