Page MenuHomeFreeBSD

cryptocheck: Add Chacha20-Poly1305 AEAD coverage.
ClosedPublic

Authored by jhb on Dec 30 2020, 12:50 AM.
Tags
None
Referenced Files
F138182769: D27838.id84149.diff
Sat, Nov 29, 4:11 PM
Unknown Object (File)
Fri, Nov 28, 4:04 AM
Unknown Object (File)
Fri, Nov 21, 3:56 PM
Unknown Object (File)
Fri, Nov 14, 12:34 AM
Unknown Object (File)
Thu, Nov 6, 11:48 PM
Unknown Object (File)
Oct 31 2025, 6:46 AM
Unknown Object (File)
Oct 26 2025, 12:47 AM
Unknown Object (File)
Oct 24 2025, 9:52 PM
Subscribers

Details

Summary
  • Make openssl_gcm_encrypt generic to AEAD ciphers (aside from CCM) and use it for Chacha20-Poly1305.
  • Use generic AEAD control constants instead of GCM/CCM specific names.
Test Plan
  • cryptocheck passes for existing ciphers and passes for the new chacha20 aead cipher

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 37128
Build 34017: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Dec 30 2020, 12:50 AM
tools/tools/crypto/cryptocheck.c
213–221

Shouldn't CCM have a tag len as well? I know it's a bit of an oddball.

1056

alg->tag_len?

1143–1146

Seems odd to pass it when it's available in alg.

tools/tools/crypto/cryptocheck.c
213–221

Hmm, the reason I didn't is that CCM doesn't use the "generic" aead routines because of it's oddball nature. I could add the tag len though for completeness, it just wouldn't be used.

1056

I could, I didn't change this one only because it is 'openssl_gmac' and thus GMAC specific. I wonder if I can just reuse 'openssl_aead' though for the GMAC case by passing in a zero-byte payload. If that works, I might add that as a separate cleanup prior to this in the series.

jhb marked 3 inline comments as done.Feb 17 2021, 1:55 AM
jhb retitled this revision from Add Chacha20-Poly1305 AEAD coverage. to cryptocheck: Add Chacha20-Poly1305 AEAD coverage..
  • Address review feedback from cem@
This revision is now accepted and ready to land.Feb 18 2021, 1:58 AM