opnsense-src/sys
John Baldwin 9039a0fae4 cryptosoft: Fix support for variable tag lengths in AES-CCM.
The tag length is included as one of the values in the flags byte of
block 0 passed to CBC_MAC, so merely copying the first N bytes is
insufficient.

To avoid adding more sideband data to the CBC MAC software context,
pull the generation of block 0, the AAD length, and AAD padding out of
cbc_mac.c and into cryptosoft.c.  This matches how GCM/GMAC are
handled where the length block is constructed in cryptosoft.c and
passed as an input to the Update callback.  As a result, the CBC MAC
Update() routine is now much simpler and simply performs the
XOR-and-encrypt step on each input block.

While here, avoid a copy to the staging block in the Update routine
when one or more full blocks are passed as input to the Update
callback.

Reviewed by:	sef
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32120

(cherry picked from commit 4361c4eb6e)
2021-10-21 14:19:04 -07:00
..
amd64 Enable PPS_SYNC on amd64, arm64 and armv7 2021-10-17 03:28:13 +03:00
arm Enable PPS_SYNC on amd64, arm64 and armv7 2021-10-17 03:28:13 +03:00
arm64 Enable PPS_SYNC on amd64, arm64 and armv7 2021-10-17 03:28:13 +03:00
bsm
cam cam(4): Limit search for disks in SES enclosure by single bus 2021-10-19 11:06:52 -04:00
cddl kern: drop remaining references to removed makesyscalls.sh 2021-09-14 20:53:03 -05:00
compat LinuxKPI: Import linux_page.c and some dependent code from drm-kmod 2021-10-13 12:07:53 +03:00
conf ossl: Add ChaCha20 cipher support. 2021-10-21 08:51:24 -07:00
contrib Upgrade ENA to v2.4.1 2021-10-07 18:10:32 +02:00
crypto aesni: Support AES-CCM requests with a truncated tag. 2021-10-21 14:08:12 -07:00
ddb
dev cryptosoft: Fix support for variable tag lengths in AES-CCM. 2021-10-21 14:19:04 -07:00
dts arm: allwinner: dtb: Add overlays to disable SD/MMC node 2021-07-22 19:29:21 +02:00
fs nfscl: Fix another deadlock related to the NFSv4 clientID lock 2021-10-19 18:40:27 -07:00
gdb
geom geom_label: Add more validation for NTFS volume tasting 2021-10-18 09:07:58 -04:00
gnu
i386 i386: move signal delivery code to exec_machdep.c 2021-10-16 16:01:47 +03:00
isa
kern crypto: Add a new type of crypto buffer for a single mbuf. 2021-10-21 08:51:26 -07:00
kgssapi
libkern Switch to an ifunc in the kernel for crc32c 2021-08-30 12:22:21 +01:00
mips crypto: Add a new type of crypto buffer for a single mbuf. 2021-10-21 08:51:26 -07:00
modules ossl: Add ChaCha20 cipher support. 2021-10-21 08:51:24 -07:00
net pfctl: userspace adaptive syncookies configration 2021-10-06 10:46:54 +02:00
net80211 net80211/LinuxKPI: add more radiotap definitions 2021-07-18 00:35:03 +00:00
netgraph ng_ppp(4): Fix a typo in a comment 2021-10-17 10:35:19 +02:00
netinet Change lowest address on subnet (host 0) not to broadcast by default. 2021-10-19 08:16:32 -05:00
netinet6 nd6: Make the DAD callout MPSAFE 2021-09-21 09:37:52 -04:00
netipsec ipsec: enter epoch before calling into ipsec_run_hhooks 2021-10-11 09:10:31 +00:00
netpfil pf: Introduce pf_nvbool() 2021-10-20 09:51:34 +02:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed socket: Rename sb(un)lock() and interlock with listen(2) 2021-10-07 09:56:47 -04:00
opencrypto cryptosoft: Fix support for variable tag lengths in AES-CCM. 2021-10-21 14:19:04 -07:00
powerpc Restore PPS_SYNC in NOTES 2021-10-17 03:28:13 +03:00
riscv Restore PPS_SYNC in NOTES 2021-10-17 03:28:13 +03:00
rpc rpc: Convert an SOLISTENING check to an assertion 2021-09-24 09:01:07 -04:00
security
sys crypto: Add crypto_cursor_segment() to fetch both base and length. 2021-10-21 08:51:26 -07:00
teken
tests routing: add IPv6 fib validation procedure. 2021-09-07 21:02:58 +00:00
tools makesyscalls.lua: add a CAPENABLED flag 2021-10-20 00:19:56 +01:00
ufs vfs: remove dead fifoop VOP_KQFILTER implementations 2021-10-08 19:56:46 -05:00
vm minidump: De-duplicate is_dumpable() 2021-10-15 12:20:48 -03:00
x86 minidump: De-duplicate the progress bar 2021-10-15 12:20:48 -03:00
xdr
xen
Makefile