freebsd-dev/sys/crypto/blake2
John Baldwin 6113a08b98 cryptosoft: Fully support per-operation keys for auth algorithms.
Only pre-allocate auth contexts when a session-wide key is provided or
for sessions without keys.  For sessions with per-operation keys,
always initialize the on-stack context directly rather than
initializing the session context in swcr_authprepare (now removed) and
then copying that session context into the on-stack context.

This approach permits parallel auth operations without needing a
serializing lock.  In addition, the previous code assumed that auth
sessions always provided an initial key unlike cipher sessions which
assume either an initial key or per-op keys.

While here, fix the Blake2 auth transforms to function like other auth
transforms where Setkey is invoked after Init rather than before.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33316
2021-12-09 11:52:42 -08:00
..
blake2_cryptodev.c Add a <machine/fpu.h> for i386 that includes <machine/npx.h>. 2020-10-13 17:26:12 +00:00
blake2_kfreebsd.h
blake2-sw.c cryptosoft: Fully support per-operation keys for auth algorithms. 2021-12-09 11:52:42 -08:00
blake2b-avx.c
blake2b-sse2.c
blake2b-sse41.c
blake2b-ssse3.c
blake2b-xop.c
blake2s-avx.c
blake2s-sse2.c
blake2s-sse41.c
blake2s-ssse3.c
blake2s-xop.c
config.h
stddef.h
stdint.h
stdio.h
stdlib.h
string.h