Page MenuHomeFreeBSD

crypto: Refactor software support for AEAD ciphers.
ClosedPublic

Authored by jhb on Nov 30 2021, 5:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 11:26 PM
Unknown Object (File)
Feb 13 2024, 9:23 PM
Unknown Object (File)
Feb 13 2024, 9:23 PM
Unknown Object (File)
Feb 13 2024, 9:23 PM
Unknown Object (File)
Feb 13 2024, 9:08 PM
Unknown Object (File)
Jan 17 2024, 7:31 AM
Unknown Object (File)
Dec 20 2023, 7:42 AM
Unknown Object (File)
Nov 28 2023, 2:42 AM
Subscribers

Details

Summary

Extend struct enc_xform to add new members to handle auth operations
for AEAD ciphers. In particular, AEAD operations in cryptosoft no
longer use a struct auth_hash. Instead, the setkey and reinit methods
of struct enc_xform are responsible for initializing both the cipher
and auth state.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Nov 30 2021, 5:18 PM
This revision is now accepted and ready to land.Dec 3 2021, 2:55 PM
sys/opencrypto/xform_aes_icm.c
129

So this was a bug (I forgot to change this to aes_ccm_setkey) that the compiler warned about (unused function).

I had used '-d soft' instead of '-d cryptosoft0' when testing and device aesni in GENERIC meant I was testing aesni originally.

When I retested in a VM to make sure this broke, I actually killed bhyve as the uninitialized AES_CBC_MAC state caused a wild pointer passed to a xor instruction to trigger an EPT page fault (maybe it was to an MMIO region?) and bhyve died with an abort trap. Fun times.