]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
crypto: geniv - convert to new way of freeing instances
authorEric Biggers <ebiggers@google.com>
Fri, 3 Jan 2020 04:04:36 +0000 (20:04 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Jan 2020 03:30:57 +0000 (11:30 +0800)
commit0f8f6d86d415f9d88dc0f7847f11d0c52dba1965
treee79feacf27694487fa630a32b7939b2d0af9860c
parent48fb3e5785be7ef69a43c04f617a1c05000ee2d0
crypto: geniv - convert to new way of freeing instances

Convert the "seqiv" template to the new way of freeing instances where a
->free() method is installed to the instance struct itself.  Also remove
the unused implementation of the old way of freeing instances from the
"echainiv" template, since it's already using the new way too.

In doing this, also simplify the code by making the helper function
aead_geniv_alloc() install the ->free() method, instead of making seqiv
and echainiv do this themselves.  This is analogous to how
skcipher_alloc_instance_simple() works.

This will allow removing support for the old way of freeing instances.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/echainiv.c
crypto/geniv.c
crypto/seqiv.c
include/crypto/internal/geniv.h