aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/aesni/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-231-1/+0
| | | | | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/ Similar commit in current: (cherry picked from commit 031beb4e239b)
* Move all sources from the llvm project into contrib/llvm-project.Dimitry Andric2019-12-201-1/+1
| | | | | | | | | | | | | This uses the new layout of the upstream repository, which was recently migrated to GitHub, and converted into a "monorepo". That is, most of the earlier separate sub-projects with their own branches and tags were consolidated into one top-level directory, and are now branched and tagged together. Updating the vendor area to match this layout is next. Notes: svn path=/head/; revision=355940
* Add an AESNI-optimized version of the CCM/CBC cryptographic and authenticationSean Eric Fagan2019-05-251-2/+7
| | | | | | | | | | | code. The primary client of this is probably going to be ZFS encryption. Reviewed by: jhb, cem Sponsored by: iXsystems Inc, Kithrup Enterprises Differential Revision: https://reviews.freebsd.org/D19298 Notes: svn path=/head/; revision=348268
* aesni(4): Add support for x86 SHA intrinsicsConrad Meyer2017-09-261-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some 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 been enhanced to verify SHA1 and SHA256 HMAC using standard NIST test vectors. The test passes on this driver. Additionally, jhb's cryptocheck tool has been used to compare various random inputs against OpenSSL. This test also passes. Rough performance averages on AMD Ryzen 1950X (4kB buffer): aesni: SHA1: ~8300 Mb/s SHA256: ~8000 Mb/s cryptosoft: ~1800 Mb/s SHA256: ~1800 Mb/s So ~4.4-4.6x speedup depending on algorithm choice. This is consistent with the results the Linux folks saw for 4kB buffers. The driver borrows SHA update code from sys/crypto sha1 and sha256. The intrinsic step function comes from Intel under a 3-clause BSDL.[0] The intel_sha_extensions_sha<foo>_intrinsic.c files were renamed and lightly modified (added const, resolved a warning or two; included the sha_sse header to declare the functions). [0]: https://software.intel.com/en-us/articles/intel-sha-extensions-implementations Reviewed by: jhb Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12452 Notes: svn path=/head/; revision=324037
* sys/modules: normalize .CURDIR-relative paths to SRCTOPEnji Cooper2017-03-041-1/+1
| | | | | | | | | | | This simplifies make output/logic Tested with: `cd sys/modules; make ALL_MODULES=` on amd64 MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314651
* improve dependencies for this module a bit... not great, but atJohn-Mark Gurney2015-07-041-0/+3
| | | | | | | | least gives some basics... I would add them to DPSRC, but due to the intrinsics headers, they can't be added... Notes: svn path=/head/; revision=285127
* For clang, disable -Wcast-qual warnings for specific aesni files, sinceDimitry Andric2015-01-301-0/+3
| | | | | | | | clang 3.6.0 will emit a number of such warnings for those files, and they are partially contributed code. Notes: svn path=/head/; revision=277940
* Add some new modes to OpenCrypto. These modes are AES-ICM (can be usedJohn-Mark Gurney2014-12-121-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for counter mode), and AES-GCM. Both of these modes have been added to the aesni module. Included is a set of tests to validate that the software and aesni module calculate the correct values. These use the NIST KAT test vectors. To run the test, you will need to install a soon to be committed port, nist-kat that will install the vectors. Using a port is 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 modes and some other AES modes are present. It would be good for someone else 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 using bcmp which could leak timing info and result in the ability to forge messages. Add a minor optimization to the aesni module so that single segment mbufs don't get copied and instead are updated in place. The aesni module needs to be updated to support blocked IO so segmented mbufs don'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/opencrypto Relnotes: yes Sponsored by: FreeBSD Foundation Sponsored by: NetGate Notes: svn path=/head/; revision=275732
* Back out r255440. /usr/bin/gcc @r255185 (2013-09-03) can build this.David E. O'Brien2013-09-101-1/+1
| | | | | | | Approved by: re (kib) Notes: svn path=/head/; revision=255452
* Only use a clang'ism if ${CC} is clang.David E. O'Brien2013-09-101-1/+1
| | | | | | | | Reviewed by: sjg Approved by: re (kib) Notes: svn path=/head/; revision=255440
* Use the fact that the AES-NI instructions can be pipelined to improveJohn-Mark Gurney2013-09-031-2/+11
| | | | | | | | | | | | | | | | | | | | | | performance... Use SSE2 instructions for calculating the XTS tweek factor... Let the compiler do more work and handle register allocation by using intrinsics, now only the key schedule is in assembly... Replace .byte hard coded instructions w/ the proper instructions now that 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 modest increase of about 3x due to other system overhead (geom and opencrypto)... These changes allow almost full disk io rate w/ geli... Reviewed by: -current, -security Thanks to: Mike Hamburg for the XTS tweek algorithm Notes: svn path=/head/; revision=255187
* style.Makefile(5)David E. O'Brien2012-05-241-1/+1
| | | | Notes: svn path=/head/; revision=235879
* Crypto(4) driver for AESNI.Konstantin Belousov2010-07-231-0/+10
The aeskeys_{amd64,i386}.S content was mostly obtained from OpenBSD, no objections to the license from core. Hardware provided by: Sentex Communications Tested by: fabient, pho (previous versions) MFC after: 1 month Notes: svn path=/head/; revision=210409