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