]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: arm/ghash - use variably sized key struct
authorArd Biesheuvel <ardb@kernel.org>
Mon, 29 Jun 2020 07:39:25 +0000 (09:39 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Jul 2020 12:14:33 +0000 (22:14 +1000)
commit83c09dd2e615be2868e1e46619d3af1d060f6dbd
treeebf0362ea80e868dc0d6e6ccb90f8ee2c001bf7c
parent48fdd2a43fb4cca77ff35f26202596bb23368805
crypto: arm/ghash - use variably sized key struct

Of the two versions of GHASH that the ARM driver implements, only one
performs aggregation, and so the other one has no use for the powers
of H to be precomputed, or space to be allocated for them in the key
struct. So make the context size dependent on which version is being
selected, and while at it, use a static key to carry this decision,
and get rid of the function pointer.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/crypto/ghash-ce-glue.c