freebsd-nq/sys
John Baldwin 4361c4eb6e 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
2021-10-06 14:08:48 -07:00
..
amd64 amd64 efirt: do not flush cache for runtime pages 2021-10-06 05:53:20 +03:00
arm Add the missing license to gic_if.m 2021-10-04 13:21:21 +01:00
arm64 arm64, riscv: Fix TRAF_PC() to return the PC, not the return address. 2021-10-01 11:53:12 -07:00
bsm Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9). 2021-08-05 23:20:42 +08:00
cam cam(4): Limit search for disks in SES enclosure by single bus 2021-10-05 15:01:16 -04:00
cddl Allow ddb and dtrace use the DMAP region on arm64 2021-10-01 11:27:33 +01:00
compat linuxkpi: Handle a NULL cache pointer in kmem_cache_destroy() 2021-10-06 14:49:39 -04:00
conf nvme: Only reset once on attach. 2021-10-01 11:09:34 -06:00
contrib Import ACPICA 20210930 2021-09-30 22:05:52 -04:00
crypto aesni: Support AES-CCM requests with a truncated tag. 2021-10-06 14:08:48 -07:00
ddb Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
dev cryptosoft: Fix support for variable tag lengths in AES-CCM. 2021-10-06 14:08:48 -07:00
dts Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
fs fusefs: Fix a bug during VOP_STRATEGY when the server changes file size 2021-10-06 14:07:33 -06:00
gdb
geom geom_label: Add more validation for NTFS volume tasting 2021-10-04 18:15:06 -04:00
gnu
i386 minidump: De-duplicate the progress bar 2021-09-29 16:42:21 -03:00
isa
kern malloc: Unmark KASAN redzones if the full allocation size was requested 2021-10-06 16:09:41 -04:00
kgssapi
libkern libkern: remove bcopy 2021-08-24 11:24:07 +00:00
mips minidump: De-duplicate the progress bar 2021-09-29 16:42:21 -03:00
modules modules: felix: Remove etherswitch_if.c from Makefile 2021-10-01 11:24:08 +02:00
net pfctl: userspace adaptive syncookies configration 2021-09-29 15:11:54 +02:00
net80211 net80211: prevent plaintext injection by A-MSDU RFC1042/EAPOL frames 2021-09-30 14:54:04 +00:00
netgraph bluetooth: complete removal of ng_h4 2021-09-29 20:00:02 -06:00
netinet sctp: don't keep being locked on a stream which is removed 2021-10-02 00:48:01 +02:00
netinet6 sctp: Tighten up locking around sctp_aloc_assoc() 2021-09-11 10:15:21 -04:00
netipsec ipsec: fix typo part2 2021-09-27 07:46:56 +02:00
netpfil pf: hook up adaptive mode configuration 2021-09-29 15:11:54 +02:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed socket: De-duplicate SBLOCKWAIT() definitions 2021-09-14 09:01:32 -04:00
opencrypto cryptosoft: Fix support for variable tag lengths in AES-CCM. 2021-10-06 14:08:48 -07:00
powerpc minidump: De-duplicate the progress bar 2021-09-29 16:42:21 -03:00
riscv riscv: Add vt and kbdmux to GENERIC for video console support 2021-10-03 19:34:53 +01:00
rpc rpc: Convert an SOLISTENING check to an assertion 2021-09-17 14:19:05 -04:00
security Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9). 2021-08-05 23:20:42 +08:00
sys Move td_pflags2 TDP2_SIGWAIT to td_flags TDF_SIGWAIT 2021-10-06 17:05:22 +03:00
teken
tests routing: add IPv6 fib validation procedure. 2021-08-16 23:04:01 +00:00
tools makesyscalls: sprinkle some assert() on standard function calls 2021-09-24 20:55:56 -05:00
ufs vfs: remove dead fifoop VOP_KQFILTER implementations 2021-10-03 01:02:51 -05:00
vm minidump: De-duplicate is_dumpable() 2021-09-29 16:41:52 -03:00
x86 apic: initialize lapic_paddr statically 2021-10-06 05:52:56 +03:00
xdr
xen
Makefile