MFV: libb2: use native calls for secure memory clearanceDrop our local patch and restore full vanilla upstream code incontrib/libb2.No functional change intended. explicit_bzero() should contin
MFV: libb2: use native calls for secure memory clearanceDrop our local patch and restore full vanilla upstream code incontrib/libb2.No functional change intended. explicit_bzero() should continue to be used.Obtained from: libb2 b4b241a34824b51956a7866606329a065d397525Sponsored by: Dell EMC Isilon
show more ...
Import Blake2 algorithms (blake2b, blake2s) from libb2The upstream repository is on github BLAKE2/libb2. Files landed insys/contrib/libb2 are the unmodified upstream files, except for onediffere
Import Blake2 algorithms (blake2b, blake2s) from libb2The upstream repository is on github BLAKE2/libb2. Files landed insys/contrib/libb2 are the unmodified upstream files, except for onedifference: secure_zero_memory's contents have been replaced withexplicit_bzero() only because the previous implementation broke powerpclink. Preferential use of explicit_bzero() is in progress upstream, soit is anticipated we will be able to drop this diff in the future.sys/crypto/blake2 contains the source files needed to port libb2 to ourbuild system, a wrapped (limited) variant of the algorithm to match the APIof our auth_transform softcrypto abstraction, incorporation into the OpenCrypto Framework (OCF) cryptosoft(4) driver, as well as an x86 SSE/AVXaccelerated OCF driver, blake2(4).Optimized variants of blake2 are compiled for a number of x86 machines(anything from SSE2 to AVX + XOP). On those machines, FPU context will needto be explicitly saved before using blake2(4)-provided algorithms directly.Use via cryptodev / OCF saves FPU state automatically, and use via theauth_transform softcrypto abstraction does not use FPU.The intent of the OCF driver is mostly to enable testing in userspace via/dev/crypto. ATF tests are added with published KAT test vectors tovalidate correctness.Reviewed by: jhb, markjObtained from: github BLAKE2/libb2Differential Revision: https://reviews.freebsd.org/D14662