]> 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)
commit13279acd33caba7e341ab4cda65146f7c0206175
treeebf0362ea80e868dc0d6e6ccb90f8ee2c001bf7c
parentda15203f2ad39d1f1b953370cf59d3d9da5aaaf3
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