Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/lib/crypto/poly1305-generic.c
26278 views
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
/*
3
* Poly1305 authenticator algorithm, RFC7539
4
*
5
* Copyright (C) 2015 Martin Willi
6
*
7
* Based on public domain code by Andrew Moon and Daniel J. Bernstein.
8
*/
9
10
#include <crypto/internal/poly1305.h>
11
#include <linux/export.h>
12
#include <linux/kernel.h>
13
#include <linux/module.h>
14
15
void poly1305_block_init_generic(struct poly1305_block_state *desc,
16
const u8 raw_key[POLY1305_BLOCK_SIZE])
17
{
18
poly1305_core_init(&desc->h);
19
poly1305_core_setkey(&desc->core_r, raw_key);
20
}
21
EXPORT_SYMBOL_GPL(poly1305_block_init_generic);
22
23
MODULE_LICENSE("GPL");
24
MODULE_AUTHOR("Martin Willi <[email protected]>");
25
MODULE_DESCRIPTION("Poly1305 algorithm (generic implementation)");
26
27