crypto: poly1305 - use structures for key and accumulator
authorEric Biggers <ebiggers@google.com>
Sat, 17 Nov 2018 01:26:27 +0000 (17:26 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Nov 2018 06:26:56 +0000 (14:26 +0800)
commit878afc35cd28bcd93cd3c5e1985ef39a104a4d45
treee17291b3c2ea1c786fceb3ee4f78cf175273a0cc
parentbdb063a79f6da589af1de3f10a7c8f654fba9ae8
crypto: poly1305 - use structures for key and accumulator

In preparation for exposing a low-level Poly1305 API which implements
the ε-almost-∆-universal (εA∆U) hash function underlying the Poly1305
MAC and supports block-aligned inputs only, create structures
poly1305_key and poly1305_state which hold the limbs of the Poly1305
"r" key and accumulator, respectively.

These structures could actually have the same type (e.g. poly1305_val),
but different types are preferable, to prevent misuse.

Acked-by: Martin Willi <martin@strongswan.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/poly1305_glue.c
crypto/poly1305_generic.c
include/crypto/poly1305.h