Page MenuHomeFreeBSD

cryptocheck: Add Chacha20-Poly1305 AEAD coverage.
ClosedPublic

Authored by jhb on Dec 30 2020, 12:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 11:04 AM
Unknown Object (File)
Fri, Apr 12, 11:04 AM
Unknown Object (File)
Fri, Apr 12, 11:04 AM
Unknown Object (File)
Fri, Apr 12, 11:04 AM
Unknown Object (File)
Thu, Apr 11, 7:21 PM
Unknown Object (File)
Thu, Mar 28, 6:42 PM
Unknown Object (File)
Feb 23 2024, 11:14 PM
Unknown Object (File)
Feb 18 2024, 7:20 AM
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