|
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0 |
|
| #
d5cbcae3 |
| 18-Feb-2021 |
John Baldwin <[email protected]> |
Add an implementation of CHACHA20_POLY1305 to cryptosoft.
This uses the chacha20 IETF and poly1305 implementations from libsodium. A seperate auth_hash is created for the auth side whose Setkey met
Add an implementation of CHACHA20_POLY1305 to cryptosoft.
This uses the chacha20 IETF and poly1305 implementations from libsodium. A seperate auth_hash is created for the auth side whose Setkey method derives the poly1305 key from the AEAD key and nonce as described in RFC 8439.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27837
(cherry picked from commit dd2e1352b68aa33f7f6f8c19aaf88cf287013ae8)
show more ...
|
| #
ec3872a6 |
| 18-Feb-2021 |
John Baldwin <[email protected]> |
Add an OCF algorithm for ChaCha20-Poly1305 AEAD.
Note that this algorithm implements the mode defined in RFC 8439.
Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.free
Add an OCF algorithm for ChaCha20-Poly1305 AEAD.
Note that this algorithm implements the mode defined in RFC 8439.
Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27836
(cherry picked from commit fc8fc743d89388c0c5b97a491428fab2b36beac8)
show more ...
|
|
Revision tags: release/12.2.0 |
|
| #
49d48f45 |
| 10-Oct-2020 |
Ed Maste <[email protected]> |
modules/crypto: reenable assembly optimized skein implementation
r366344 corrected the optimized amd64 skein assembly implementation, so we can now enable it again.
Also add a dependency on this Ma
modules/crypto: reenable assembly optimized skein implementation
r366344 corrected the optimized amd64 skein assembly implementation, so we can now enable it again.
Also add a dependency on this Makefile for the skein_block object, so that it will be rebuit (similar to r366362).
PR: 248221 Sponsored by: The FreeBSD Foundation
show more ...
|
| #
e32e8685 |
| 23-Jul-2020 |
Ed Maste <[email protected]> |
modules/crypto: disable optimized assembly skein1024 implementation
It is presumably broken in the same way as userland skein1024 (see r363454)
PR: 248221
|
|
Revision tags: release/11.4.0 |
|
| #
24ed6f55 |
| 06-Jun-2020 |
Ed Maste <[email protected]> |
Rename skein_block_asm.s to .S and assemble using Clang IAS
Comparing the object files produced by GNU as 2.17.50 and Clang IAS shows many immaterial changes in strtab etc., and one material change
Rename skein_block_asm.s to .S and assemble using Clang IAS
Comparing the object files produced by GNU as 2.17.50 and Clang IAS shows many immaterial changes in strtab etc., and one material change in .text:
1bac: 4c 8b 4f 18 mov 0x18(%rdi),%r9 1bb0: eb 0e jmp 1bc0 <Skein1024_block_loop> - 1bb2: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) - 1bb9: 00 00 00 00 - 1bbd: 0f 1f 00 nopl (%rax) + 1bb2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) + 1bb9: 00 00 00 + 1bbc: 0f 1f 40 00 nopl 0x0(%rax)
0000000000001bc0 <Skein1024_block_loop>: Skein1024_block_loop(): 1bc0: 4c 8b 47 10 mov 0x10(%rdi),%r8 1bc4: 4c 03 85 c0 00 00 00 add 0xc0(%rbp),%r8
That is, GNU as and Clang's integrated assembler use different multi- byte NOPs for alignment (GNU as emits an 11 byte NOP + a 3 byte NOP, while Clang IAS emits a 10 byte NOP + a 4 byte NOP).
Dependency cleanup hacks are not required, because we do not create .depend files from GNU as.
Reviewed by: allanjude, arichardson, cem, tsoome Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8434
show more ...
|
| #
f2b86886 |
| 05-Jun-2020 |
Ed Maste <[email protected]> |
Also pass SKEIN_USE_ASM to the assembler, via AFLAGS
|
| #
310e81ae |
| 05-Jun-2020 |
Ed Maste <[email protected]> |
Apply C SKEIN_LOOP setting only to skein_block.c
Otherwise if assembling skein_block_asm.s with Clang's integrated assembler we can pass conflicting SKEIN_LOOP settings (via CFLAGS and ACFLAGS).
|
| #
8c27b7a9 |
| 03-Jun-2020 |
John Baldwin <[email protected]> |
Add opt_compat.h needed by r359374.
Reported by: kevans
|
| #
32075647 |
| 11-May-2020 |
John Baldwin <[email protected]> |
Remove support for the Blowfish algorithm from OCF.
It no longer has any in-kernel consumers.
Reviewed by: cem Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://revi
Remove support for the Blowfish algorithm from OCF.
It no longer has any in-kernel consumers.
Reviewed by: cem Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24772
show more ...
|
| #
5e46d47f |
| 11-May-2020 |
John Baldwin <[email protected]> |
Remove support for the skipjack encryption algorithm.
This was removed from IPsec in r286100 and no longer has any in-tree consumers.
Reviewed by: cem Relnotes: yes Sponsored by: Chelsio Communicat
Remove support for the skipjack encryption algorithm.
This was removed from IPsec in r286100 and no longer has any in-tree consumers.
Reviewed by: cem Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24769
show more ...
|
| #
7971a6f9 |
| 11-May-2020 |
John Baldwin <[email protected]> |
Remove support for the cast128 encryption algorithm.
It no longer has any in-tree consumers.
Reviewed by: cem Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://revie
Remove support for the cast128 encryption algorithm.
It no longer has any in-tree consumers.
Reviewed by: cem Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24768
show more ...
|
|
Revision tags: release/12.1.0 |
|
| #
a15cb219 |
| 07-Aug-2019 |
Xin LI <[email protected]> |
Expose zlib's utility functions in Z_SOLO library when building kernel. This allows kernel code to reuse zlib's implementation.
PR: 229763 Reviewed by: Yoshihiro Ota <ota j email ne jp> Relnotes: y
Expose zlib's utility functions in Z_SOLO library when building kernel. This allows kernel code to reuse zlib's implementation.
PR: 229763 Reviewed by: Yoshihiro Ota <ota j email ne jp> Relnotes: yes Differential Revision: https://reviews.freebsd.org/D21156
show more ...
|
| #
0ed1d6fb |
| 01-Aug-2019 |
Xin LI <[email protected]> |
Allow Kernel to link in both legacy libkern/zlib and new sys/contrib/zlib, with an eventual goal to convert all legacl zlib callers to the new zlib version:
* Move generic zlib shims that are not s
Allow Kernel to link in both legacy libkern/zlib and new sys/contrib/zlib, with an eventual goal to convert all legacl zlib callers to the new zlib version:
* Move generic zlib shims that are not specific to zlib 1.0.4 to sys/dev/zlib. * Connect new zlib (1.2.11) to the zlib kernel module, currently built with Z_SOLO. * Prefix the legacy zlib (1.0.4) with 'zlib104_' namespace. * Convert sys/opencrypto/cryptodeflate.c to use new zlib. * Remove bundled zlib 1.2.3 from ZFS and adapt it to new zlib and make it depend on the zlib module. * Fix Z_SOLO build of new zlib.
PR: 229763 Submitted by: Yoshihiro Ota <ota j email ne jp> Reviewed by: markm (sys/dev/zlib/zlib_kmod.c) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D19706
show more ...
|
|
Revision tags: release/11.3.0 |
|
| #
a99bc4c3 |
| 15-Feb-2019 |
Sean Eric Fagan <[email protected]> |
Add CBC-MAC authentication.
This adds the CBC-MAC code to the kernel, but does not hook it up to anything (that comes in the next commit).
https://tools.ietf.org/html/rfc3610 describes the algorith
Add CBC-MAC authentication.
This adds the CBC-MAC code to the kernel, but does not hook it up to anything (that comes in the next commit).
https://tools.ietf.org/html/rfc3610 describes the algorithm.
Note that this is a software-only implementation, which means it is fairly slow.
Sponsored by: iXsystems Inc Differential Revision: https://reviews.freebsd.org/D18592
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
01d5de8f |
| 17-Aug-2018 |
Conrad Meyer <[email protected]> |
Add xform-conforming auth_hash wrapper for Poly-1305
The wrapper is a thin shim around libsodium's Poly-1305 implementation. For now, we just use the C algorithm and do not attempt to build the SSE
Add xform-conforming auth_hash wrapper for Poly-1305
The wrapper is a thin shim around libsodium's Poly-1305 implementation. For now, we just use the C algorithm and do not attempt to build the SSE-optimized variant for x86 processors.
The algorithm support has not yet been plumbed through cryptodev, or added to cryptosoft.
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
cccc969b |
| 19-May-2018 |
Matt Macy <[email protected]> |
Silence non-actionable warnings in vendor code
We can't modify vendor code so there's no signal in warnings from it. Similarly -Waddress-of-packed-member is not useful on networking code as access t
Silence non-actionable warnings in vendor code
We can't modify vendor code so there's no signal in warnings from it. Similarly -Waddress-of-packed-member is not useful on networking code as access to packed structures is fundamental to its operation.
show more ...
|
| #
3b8d52d3 |
| 21-Apr-2018 |
Conrad Meyer <[email protected]> |
blake2: Disable warnings (not just error) for code we will not modify
Leave libb2 pristine and silence the warnings for mjg.
|
| #
61590291 |
| 29-Mar-2018 |
Conrad Meyer <[email protected]> |
opencrypto: Integrate Chacha20 algorithm into OCF
Mostly this is a thin shim around existing code to integrate with enc_xform and cryptosoft (+ cryptodev).
Expand the cryptodev buffer used to match
opencrypto: Integrate Chacha20 algorithm into OCF
Mostly this is a thin shim around existing code to integrate with enc_xform and cryptosoft (+ cryptodev).
Expand the cryptodev buffer used to match that of Chacha20's native block size as a performance enhancement for chacha20_xform_crypt_multi.
show more ...
|
| #
0e33efe4 |
| 21-Mar-2018 |
Conrad Meyer <[email protected]> |
Import Blake2 algorithms (blake2b, blake2s) from libb2
The upstream repository is on github BLAKE2/libb2. Files landed in sys/contrib/libb2 are the unmodified upstream files, except for one differe
Import Blake2 algorithms (blake2b, blake2s) from libb2
The upstream repository is on github BLAKE2/libb2. Files landed in sys/contrib/libb2 are the unmodified upstream files, except for one difference: secure_zero_memory's contents have been replaced with explicit_bzero() only because the previous implementation broke powerpc link. Preferential use of explicit_bzero() is in progress upstream, so it 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 our build system, a wrapped (limited) variant of the algorithm to match the API of our auth_transform softcrypto abstraction, incorporation into the Open Crypto Framework (OCF) cryptosoft(4) driver, as well as an x86 SSE/AVX accelerated 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 need to be explicitly saved before using blake2(4)-provided algorithms directly. Use via cryptodev / OCF saves FPU state automatically, and use via the auth_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 to validate correctness.
Reviewed by: jhb, markj Obtained from: github BLAKE2/libb2 Differential Revision: https://reviews.freebsd.org/D14662
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
929b476a |
| 01-Jul-2017 |
Allan Jude <[email protected]> |
Increase loop unrolling for skein hashes
This patch was inspired by an opposite change made to shrink the code for the boot loader.
On my i7-4770, it increases the skein1024 speed from 470 to 550 M
Increase loop unrolling for skein hashes
This patch was inspired by an opposite change made to shrink the code for the boot loader.
On my i7-4770, it increases the skein1024 speed from 470 to 550 MB/s
Reviewed by: sbruno MFC after: 1 month Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D7824
show more ...
|
| #
193d9e76 |
| 04-Mar-2017 |
Enji Cooper <[email protected]> |
sys/modules: normalize .CURDIR-relative paths to SRCTOP
This simplifies make output/logic
Tested with: `cd sys/modules; make ALL_MODULES=` on amd64 MFC after: 1 month Sponsored by: Dell EMC Isilon
|
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0 |
|
| #
7a3f5d11 |
| 27-Dec-2015 |
Allan Jude <[email protected]> |
Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c
cperciva's libmd implementation is 5-30% faster
The same was done for SHA256 previously in r263218
cperciva's implementation was lacking SHA
Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c
cperciva's libmd implementation is 5-30% faster
The same was done for SHA256 previously in r263218
cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation
Extend sbin/md5 to create sha384(1)
Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h}
Reviewed by: cperciva, des, delphij Approved by: secteam, bapt (mentor) MFC after: 2 weeks Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3929
show more ...
|
|
Revision tags: release/10.2.0 |
|
| #
d1b06863 |
| 30-Jun-2015 |
Mark Murray <[email protected]> |
Huge cleanup of random(4) code.
* GENERAL - Update copyright. - Make kernel options for RANDOM_YARROW and RANDOM_DUMMY. Set neither to ON, which means we want Fortuna - If there is no 'device rand
Huge cleanup of random(4) code.
* GENERAL - Update copyright. - Make kernel options for RANDOM_YARROW and RANDOM_DUMMY. Set neither to ON, which means we want Fortuna - If there is no 'device random' in the kernel, there will be NO random(4) device in the kernel, and the KERN_ARND sysctl will return nothing. With RANDOM_DUMMY there will be a random(4) that always blocks. - Repair kern.arandom (KERN_ARND sysctl). The old version went through arc4random(9) and was a bit weird. - Adjust arc4random stirring a bit - the existing code looks a little suspect. - Fix the nasty pre- and post-read overloading by providing explictit functions to do these tasks. - Redo read_random(9) so as to duplicate random(4)'s read internals. This makes it a first-class citizen rather than a hack. - Move stuff out of locked regions when it does not need to be there. - Trim RANDOM_DEBUG printfs. Some are excess to requirement, some behind boot verbose. - Use SYSINIT to sequence the startup. - Fix init/deinit sysctl stuff. - Make relevant sysctls also tunables. - Add different harvesting "styles" to allow for different requirements (direct, queue, fast). - Add harvesting of FFS atime events. This needs to be checked for weighing down the FS code. - Add harvesting of slab allocator events. This needs to be checked for weighing down the allocator code. - Fix the random(9) manpage. - Loadable modules are not present for now. These will be re-engineered when the dust settles. - Use macros for locks. - Fix comments.
* src/share/man/... - Update the man pages.
* src/etc/... - The startup/shutdown work is done in D2924.
* src/UPDATING - Add UPDATING announcement.
* src/sys/dev/random/build.sh - Add copyright. - Add libz for unit tests.
* src/sys/dev/random/dummy.c - Remove; no longer needed. Functionality incorporated into randomdev.*.
* live_entropy_sources.c live_entropy_sources.h - Remove; content moved. - move content to randomdev.[ch] and optimise.
* src/sys/dev/random/random_adaptors.c src/sys/dev/random/random_adaptors.h - Remove; plugability is no longer used. Compile-time algorithm selection is the way to go.
* src/sys/dev/random/random_harvestq.c src/sys/dev/random/random_harvestq.h - Add early (re)boot-time randomness caching.
* src/sys/dev/random/randomdev_soft.c src/sys/dev/random/randomdev_soft.h - Remove; no longer needed.
* src/sys/dev/random/uint128.h - Provide a fake uint128_t; if a real one ever arrived, we can use that instead. All that is needed here is N=0, N++, N==0, and some localised trickery is used to manufacture a 128-bit 0ULLL.
* src/sys/dev/random/unit_test.c src/sys/dev/random/unit_test.h - Improve unit tests; previously the testing human needed clairvoyance; now the test will do a basic check of compressibility. Clairvoyant talent is still a good idea. - This is still a long way off a proper unit test.
* src/sys/dev/random/fortuna.c src/sys/dev/random/fortuna.h - Improve messy union to just uint128_t. - Remove unneeded 'static struct fortuna_start_cache'. - Tighten up up arithmetic. - Provide a method to allow eternal junk to be introduced; harden it against blatant by compress/hashing. - Assert that locks are held correctly. - Fix the nasty pre- and post-read overloading by providing explictit functions to do these tasks. - Turn into self-sufficient module (no longer requires randomdev_soft.[ch])
* src/sys/dev/random/yarrow.c src/sys/dev/random/yarrow.h - Improve messy union to just uint128_t. - Remove unneeded 'staic struct start_cache'. - Tighten up up arithmetic. - Provide a method to allow eternal junk to be introduced; harden it against blatant by compress/hashing. - Assert that locks are held correctly. - Fix the nasty pre- and post-read overloading by providing explictit functions to do these tasks. - Turn into self-sufficient module (no longer requires randomdev_soft.[ch]) - Fix some magic numbers elsewhere used as FAST and SLOW.
Differential Revision: https://reviews.freebsd.org/D2025 Reviewed by: vsevolod,delphij,rwatson,trasz,jmg Approved by: so (delphij)
show more ...
|
| #
08fca7a5 |
| 12-Dec-2014 |
John-Mark Gurney <[email protected]> |
Add some new modes to OpenCrypto. These modes are AES-ICM (can be used for counter mode), and AES-GCM. Both of these modes have been added to the aesni module.
Included is a set of tests to valida
Add some new modes to OpenCrypto. These modes are AES-ICM (can be used 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
show more ...
|
|
Revision tags: release/10.1.0, release/9.3.0 |
|
| #
f225bcd1 |
| 16-Mar-2014 |
John-Mark Gurney <[email protected]> |
I clearly didn't test the modules... add sha256c.c to the various modules that included sha2.c...
|