freebsd-dev/sys
John Baldwin 723d87648e Improve support for stream ciphers in the software encryption interface.
Add a 'native_blocksize' member to 'struct enc_xform' that ciphers can
use if they support a partial final block.  This is particular useful
for stream ciphers, but can also apply to other ciphers.  cryptosoft
will only pass in native blocks to the encrypt and decrypt hooks.  For
the final partial block, 'struct enc_xform' now has new
encrypt_last/decrypt_last hooks which accept the length of the final
block.  The multi_block methods are also retired.

Mark AES-ICM (AES-CTR) as a stream cipher.  This has some interesting
effects on IPsec in that FreeBSD can now properly receive all packets
sent by Linux when using AES-CTR, but FreeBSD can no longer
interoperate with OpenBSD and older verisons of FreeBSD which assume
AES-CTR packets have a payload padded to a 16-byte boundary.  Kornel
has offered to work on a patch to add a compatiblity sysctl to enforce
additional padding for AES-CTR in esp_output to permit compatibility
with OpenBSD and older versions of FreeBSD.

AES-XTS continues to use a block size of a single AES block length.
It is possible to adjust it to support partial final blocks by
implementing cipher text stealing via encrypt_last/decrypt_last hooks,
but I have not done so.

Reviewed by:	cem (earlier version)
Tested by:	Kornel Dulęba <mindal@semihalf.com> (AES-CTR with IPsec)
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D24906
2020-05-22 16:29:09 +00:00
..
amd64 Fix the build after r361033 when ACPI is disabled. 2020-05-22 01:18:55 +00:00
arm Bring in support for single core Zynq devices. Turns out that real 2020-05-21 06:40:51 +00:00
arm64 Stop performing a full icache sync when the DIC and IDC flags are set 2020-05-19 16:04:27 +00:00
bsm bsm: add AUE_CLOSERANGE 2020-04-24 01:27:25 +00:00
cam cam: ANSIfy 0-argument function definitions 2020-05-16 14:33:08 +00:00
cddl Don't block on the range lock in zfs_getpages(). 2020-05-20 18:29:23 +00:00
compat linuxkpi: Add rcu_work functions 2020-05-21 20:18:38 +00:00
conf pkgbase: use -dev,-dbg instead of -development,-debug 2020-05-20 19:45:22 +00:00
contrib [ath_hal_ar9300] Ensure AH_BYTE_ORDER is defined before used. 2020-05-12 02:23:11 +00:00
crypto Improve support for stream ciphers in the software encryption interface. 2020-05-22 16:29:09 +00:00
ddb kernel: provide panicky version of __unreachable 2020-05-13 18:07:37 +00:00
dev Socket AF_HYPERV should return failure when it is not running on HyperV 2020-05-22 09:17:07 +00:00
dts allwinner: aw_thermal: Cope with DTS changes 2020-04-14 19:05:17 +00:00
fs Deduplicate fsid comparisons 2020-05-21 01:55:35 +00:00
gdb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
geom Reimplement aliases in geom 2020-05-13 19:17:28 +00:00
gnu dts: Import DTS from Linux 5.6 2020-04-14 18:57:00 +00:00
i386 Fix the build after r361033 when ACPI is disabled. 2020-05-22 01:18:55 +00:00
isa
kern Deduplicate fsid comparisons 2020-05-21 01:55:35 +00:00
kgssapi Remove support for Kernel GSS algorithms deprecated in r348875. 2020-04-10 23:08:41 +00:00
libkern Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
mips Print CPU informtion later in boot. 2020-05-20 21:16:54 +00:00
modules HyperV socket implementation for FreeBSD 2020-05-20 11:03:59 +00:00
net sysctl: fix setting net.isr.dispatch during early boot 2020-05-16 17:05:44 +00:00
net80211 net80211: post RTM_IFINFO notification after toggling IFF_DRV_RUNNING 2020-05-22 11:25:45 +00:00
netgraph Fix Typo in ng_hci_le_connection_complete_ep struct. 2020-05-19 13:58:52 +00:00
netinet DCTCP: update alpha only once after loss recovery. 2020-05-21 21:42:49 +00:00
netinet6 Allow TCP to reuse local port with different destinations 2020-05-18 22:53:12 +00:00
netipsec Don't pass bogus keys down for NULL algorithms. 2020-05-02 01:00:29 +00:00
netpfil pf: Add a new zone for per-table entry counters. 2020-05-16 00:28:12 +00:00
netsmb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfs Remove rtable dumping code from bootp. 2020-04-28 07:23:41 +00:00
nfsclient
nfsserver
nlm Make nfslockd depend on xdr. 2020-04-23 09:37:22 +00:00
ofed Convert OFED rtable interactions to the new routing KPI. 2020-04-15 13:06:55 +00:00
opencrypto Improve support for stream ciphers in the software encryption interface. 2020-05-22 16:29:09 +00:00
powerpc [PowerPC] Fix kernel boot on powerpc 2020-05-21 15:53:16 +00:00
riscv riscv: Fix pmap_protect for superpages 2020-05-13 17:20:51 +00:00
rpc Split XDR into separate kernel module. Make krpc depend on xdr. 2020-04-17 06:04:20 +00:00
security Deduplicate fsid comparisons 2020-05-21 01:55:35 +00:00
sys Bump __FreeBSD_version after r361275, HyperV socket support 2020-05-22 10:50:29 +00:00
teken
tests Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tools
ufs Retire two unused background fsck sysctls. 2020-04-21 17:42:32 +00:00
vm Allocate UMA per-CPU counters earlier. 2020-05-14 16:06:54 +00:00
x86 amd64: Add a knob to flush RSB on context switches if machine has SMEP. 2020-05-20 22:00:31 +00:00
xdr Split XDR into separate kernel module. Make krpc depend on xdr. 2020-04-17 06:04:20 +00:00
xen Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (16 of many) 2020-02-25 19:04:39 +00:00
Makefile