diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-01-31 13:12:02 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-01-31 13:12:02 +0000 |
commit | f7167e0ea0bf5aaabff9490453b3b71b3f1b4d51 (patch) | |
tree | d32fb61cec38c52314210c3459fd436685dacdba /crypto/openssh/poly1305.h | |
parent | 9e90c870232242ab23aa7d473996f68cb1fe449d (diff) | |
parent | 02d4c2ac3daa0f36264392972709ccd7676ab3e8 (diff) | |
download | src-f7167e0ea0bf5aaabff9490453b3b71b3f1b4d51.tar.gz src-f7167e0ea0bf5aaabff9490453b3b71b3f1b4d51.zip |
Notes
Diffstat (limited to 'crypto/openssh/poly1305.h')
-rw-r--r-- | crypto/openssh/poly1305.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crypto/openssh/poly1305.h b/crypto/openssh/poly1305.h new file mode 100644 index 000000000000..221efc462e1b --- /dev/null +++ b/crypto/openssh/poly1305.h @@ -0,0 +1,22 @@ +/* $OpenBSD: poly1305.h,v 1.2 2013/12/19 22:57:13 djm Exp $ */ + +/* + * Public Domain poly1305 from Andrew Moon + * poly1305-donna-unrolled.c from https://github.com/floodyberry/poly1305-donna + */ + +#ifndef POLY1305_H +#define POLY1305_H + +#include <sys/types.h> + +#define POLY1305_KEYLEN 32 +#define POLY1305_TAGLEN 16 + +void poly1305_auth(u_char out[POLY1305_TAGLEN], const u_char *m, size_t inlen, + const u_char key[POLY1305_KEYLEN]) + __attribute__((__bounded__(__minbytes__, 1, POLY1305_TAGLEN))) + __attribute__((__bounded__(__buffer__, 2, 3))) + __attribute__((__bounded__(__minbytes__, 4, POLY1305_KEYLEN))); + +#endif /* POLY1305_H */ |