mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-10-24 17:05:01 +03:00
gmac_init_ctx() duplicates most of the code in gcm_int_ctx() while
it just needs to set its own IV length and AAD tag length.
Introduce gcm_init_ctx_impl() which handles the GCM and GMAC
differences while reusing the duplicated code.
While here, fix a flaw where the AVX implementation would accept a
context using a byte swapped key schedule which it could not
handle. Also constify the IV and AAD pointers passed to
gcm_init{,_avx}().
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Closes #14529
|
||
|---|---|---|
| .. | ||
| cbc.c | ||
| ccm.c | ||
| ctr.c | ||
| ecb.c | ||
| gcm_generic.c | ||
| gcm_pclmulqdq.c | ||
| gcm.c | ||
| modes.c | ||