sys: Remove $FreeBSD$: one-line sh patternRemove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
Move all sources from the llvm project into contrib/llvm-project.This uses the new layout of the upstream repository, which was recentlymigrated to GitHub, and converted into a "monorepo". That i
Move all sources from the llvm project into contrib/llvm-project.This uses the new layout of the upstream repository, which was recentlymigrated to GitHub, and converted into a "monorepo". That is, most ofthe earlier separate sub-projects with their own branches and tags wereconsolidated into one top-level directory, and are now branched andtagged together.Updating the vendor area to match this layout is next.
show more ...
Add an AESNI-optimized version of the CCM/CBC cryptographic and authenticationcode. The primary client of this is probably going to be ZFS encryption.Reviewed by: jhb, cemSponsored by: iXsystems
Add an AESNI-optimized version of the CCM/CBC cryptographic and authenticationcode. The primary client of this is probably going to be ZFS encryption.Reviewed by: jhb, cemSponsored by: iXsystems Inc, Kithrup EnterprisesDifferential Revision: https://reviews.freebsd.org/D19298
aesni(4): Add support for x86 SHA intrinsicsSome x86 class CPUs have accelerated intrinsics for SHA1 and SHA256.Provide this functionality on CPUs that support it.This implements CRYPTO_SHA1, CR
aesni(4): Add support for x86 SHA intrinsicsSome x86 class CPUs have accelerated intrinsics for SHA1 and SHA256.Provide this functionality on CPUs that support it.This implements CRYPTO_SHA1, CRYPTO_SHA1_HMAC, and CRYPTO_SHA2_256_HMAC.Correctness: The cryptotest.py suite in tests/sys/opencrypto has beenenhanced to verify SHA1 and SHA256 HMAC using standard NIST test vectors.The test passes on this driver. Additionally, jhb's cryptocheck tool hasbeen used to compare various random inputs against OpenSSL. This test alsopasses.Rough performance averages on AMD Ryzen 1950X (4kB buffer):aesni: SHA1: ~8300 Mb/s SHA256: ~8000 Mb/scryptosoft: ~1800 Mb/s SHA256: ~1800 Mb/sSo ~4.4-4.6x speedup depending on algorithm choice. This is consistent withthe results the Linux folks saw for 4kB buffers.The driver borrows SHA update code from sys/crypto sha1 and sha256. Theintrinsic step function comes from Intel under a 3-clause BSDL.[0] Theintel_sha_extensions_sha<foo>_intrinsic.c files were renamed and lightlymodified (added const, resolved a warning or two; included the sha_sseheader to declare the functions).[0]: https://software.intel.com/en-us/articles/intel-sha-extensions-implementationsReviewed by: jhbSponsored by: Dell EMC IsilonDifferential Revision: https://reviews.freebsd.org/D12452
sys/modules: normalize .CURDIR-relative paths to SRCTOPThis simplifies make output/logicTested with: `cd sys/modules; make ALL_MODULES=` on amd64MFC after: 1 monthSponsored by: Dell EMC Isilon
improve dependencies for this module a bit... not great, but atleast gives some basics... I would add them to DPSRC, but due to theintrinsics headers, they can't be added...
For clang, disable -Wcast-qual warnings for specific aesni files, sinceclang 3.6.0 will emit a number of such warnings for those files, andthey are partially contributed code.
Add some new modes to OpenCrypto. These modes are AES-ICM (can be usedfor counter mode), and AES-GCM. Both of these modes have been added tothe aesni module.Included is a set of tests to valida
Add some new modes to OpenCrypto. These modes are AES-ICM (can be usedfor counter mode), and AES-GCM. Both of these modes have been added tothe aesni module.Included is a set of tests to validate that the software and aesnimodule calculate the correct values. These use the NIST KAT testvectors. To run the test, you will need to install a soon to becommitted port, nist-kat that will install the vectors. Using a portis necessary as the test vectors are around 25MB.All the man pages were updated. I have added a new man page, crypto.7,which includes a description of how to use each mode. All the new modesand some other AES modes are present. It would be good for someoneelse to go through and document the other modes.A new ioctl was added to support AEAD modes which AES-GCM is one of them.Without this ioctl, it is not possible to test AEAD modes from userland.Add a timing safe bcmp for use to compare MACs. Previously we were usingbcmp which could leak timing info and result in the ability to forgemessages.Add a minor optimization to the aesni module so that single segmentmbufs don't get copied and instead are updated in place. The aesnimodule needs to be updated to support blocked IO so segmented mbufsdon't have to be copied.We require that the IV be specified for all calls for both GCM and ICM.This is to ensure proper use of these functions.Obtained from: p4: //depot/projects/opencryptoRelnotes: yesSponsored by: FreeBSD FoundationSponsored by: NetGate
Back out r255440. /usr/bin/gcc @r255185 (2013-09-03) can build this.Approved by: re (kib)
Only use a clang'ism if ${CC} is clang.Reviewed by: sjgApproved by: re (kib)
Use the fact that the AES-NI instructions can be pipelined to improveperformance... Use SSE2 instructions for calculating the XTS tweekfactor... Let the compiler do more work and handle register a
Use the fact that the AES-NI instructions can be pipelined to improveperformance... Use SSE2 instructions for calculating the XTS tweekfactor... Let the compiler do more work and handle register allocationby using intrinsics, now only the key schedule is in assembly...Replace .byte hard coded instructions w/ the proper instructions nowthat both clang and gcc support them...On my machine, pulling the code to userland I saw performance go from~150MB/sec to 2GB/sec in XTS mode. GELI on GNOP saw a more modestincrease of about 3x due to other system overhead (geom andopencrypto)...These changes allow almost full disk io rate w/ geli...Reviewed by: -current, -securityThanks to: Mike Hamburg for the XTS tweek algorithm
style.Makefile(5)
Crypto(4) driver for AESNI.The aeskeys_{amd64,i386}.S content was mostly obtained from OpenBSD,no objections to the license from core.Hardware provided by: Sentex CommunicationsTested by: fabie
Crypto(4) driver for AESNI.The aeskeys_{amd64,i386}.S content was mostly obtained from OpenBSD,no objections to the license from core.Hardware provided by: Sentex CommunicationsTested by: fabient, pho (previous versions)MFC after: 1 month