diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2018-08-17 00:30:04 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2018-08-17 00:30:04 +0000 |
commit | 01d5de8fca77a55ddd9bc79db3078c9f2ccdbab1 (patch) | |
tree | 3415816ade3b3cca122229a69eaf66a993a50a9c /sys/opencrypto/xform_poly1305.h | |
parent | f36e41e20badf3af260e271a0fec6e7ffa07b1df (diff) | |
download | src-01d5de8fca77a55ddd9bc79db3078c9f2ccdbab1.tar.gz src-01d5de8fca77a55ddd9bc79db3078c9f2ccdbab1.zip |
Add xform-conforming auth_hash wrapper for Poly-1305
The wrapper is a thin shim around libsodium's Poly-1305 implementation. For
now, we just use the C algorithm and do not attempt to build the
SSE-optimized variant for x86 processors.
The algorithm support has not yet been plumbed through cryptodev, or added
to cryptosoft.
Notes
Notes:
svn path=/head/; revision=337939
Diffstat (limited to 'sys/opencrypto/xform_poly1305.h')
-rw-r--r-- | sys/opencrypto/xform_poly1305.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/opencrypto/xform_poly1305.h b/sys/opencrypto/xform_poly1305.h new file mode 100644 index 000000000000..7364ecdef117 --- /dev/null +++ b/sys/opencrypto/xform_poly1305.h @@ -0,0 +1,16 @@ +/* This file is in the public domain. */ +/* $FreeBSD$ */ +#pragma once + +#include <sys/types.h> + +struct poly1305_xform_ctx; + +void Poly1305_Init(struct poly1305_xform_ctx *); + +void Poly1305_Setkey(struct poly1305_xform_ctx *, + const uint8_t [__min_size(32)], size_t); + +int Poly1305_Update(struct poly1305_xform_ctx *, const void *, size_t); + +void Poly1305_Final(uint8_t [__min_size(16)], struct poly1305_xform_ctx *); |