freebsd-dev/sys/opencrypto/xform_poly1305.h
Conrad Meyer 01d5de8fca 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.
2018-08-17 00:30:04 +00:00

17 lines
418 B
C

/* 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 *);