1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
3 * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
6 #ifndef _ZINC_POLY1305_H
7 #define _ZINC_POLY1305_H
10 enum poly1305_lengths {
11 POLY1305_BLOCK_SIZE = 16,
12 POLY1305_KEY_SIZE = 32,
13 POLY1305_MAC_SIZE = 16
17 u8 opaque[24 * sizeof(u64)];
19 u8 data[POLY1305_BLOCK_SIZE];
23 void poly1305_init(struct poly1305_ctx *ctx, const u8 key[POLY1305_KEY_SIZE]);
24 void poly1305_update(struct poly1305_ctx *ctx, const u8 *input, size_t len,
25 simd_context_t *simd_context);
26 void poly1305_final(struct poly1305_ctx *ctx, u8 mac[POLY1305_MAC_SIZE],
27 simd_context_t *simd_context);
29 #endif /* _ZINC_POLY1305_H */