1295367Sdes/* $OpenBSD: poly1305.h,v 1.4 2014/05/02 03:27:54 djm Exp $ */
2261287Sdes
3261287Sdes/*
4261287Sdes * Public Domain poly1305 from Andrew Moon
5261287Sdes * poly1305-donna-unrolled.c from https://github.com/floodyberry/poly1305-donna
6261287Sdes */
7261287Sdes
8261287Sdes#ifndef POLY1305_H
9261287Sdes#define POLY1305_H
10261287Sdes
11261287Sdes#include <sys/types.h>
12261287Sdes
13261287Sdes#define POLY1305_KEYLEN		32
14261287Sdes#define POLY1305_TAGLEN		16
15261287Sdes
16261287Sdesvoid poly1305_auth(u_char out[POLY1305_TAGLEN], const u_char *m, size_t inlen,
17261287Sdes    const u_char key[POLY1305_KEYLEN])
18261287Sdes    __attribute__((__bounded__(__minbytes__, 1, POLY1305_TAGLEN)))
19261287Sdes    __attribute__((__bounded__(__buffer__, 2, 3)))
20261287Sdes    __attribute__((__bounded__(__minbytes__, 4, POLY1305_KEYLEN)));
21261287Sdes
22261287Sdes#endif	/* POLY1305_H */
23