mirror_zfs/module/icp/algs
Attila Fülöp 8d9752569b
ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx()
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
2023-03-08 11:12:15 -08:00
..
aes Unify Assembler files between Linux and Windows 2023-01-17 11:09:19 -08:00
blake3 Restore ASMABI and other Unify work 2023-03-06 15:24:05 -08:00
edonr Fix Clang 15 compilation errors 2022-11-30 13:46:26 -08:00
modes ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx() 2023-03-08 11:12:15 -08:00
sha2 Fix detection of IBM Power8 machines (ISA 2.07) 2023-03-06 17:01:01 -08:00
skein Fix Clang 15 compilation errors 2022-11-30 13:46:26 -08:00