crypto: arm64/aes-ccm - Merge finalization into en/decrypt asm helpers
authorArd Biesheuvel <ardb@kernel.org>
Thu, 18 Jan 2024 17:06:37 +0000 (18:06 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Jan 2024 08:39:32 +0000 (16:39 +0800)
commitf691d444f9a9094a5a89bb618495f2bfa9309f32
tree98de7d739a918db6af9b1b24d91733b11c09c114
parent715052884929cc29e2d09dbf1d530c6ada306ce8
crypto: arm64/aes-ccm - Merge finalization into en/decrypt asm helpers

The C glue code already infers whether or not the current iteration is
the final one, by comparing walk.nbytes with walk.total. This means we
can easily inform the asm helpers of this as well, by conditionally
passing a pointer to the original IV, which is used in the finalization
of the MAC. This removes the need for a separate call into the asm code
to perform the finalization.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/aes-ce-ccm-core.S
arch/arm64/crypto/aes-ce-ccm-glue.c