Page MenuHomeFreeBSD

cryptocheck: Add Chacha20-Poly1305 AEAD coverage.
ClosedPublic

Authored by jhb on Dec 30 2020, 12:50 AM.

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 Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 35780
Build 32669: arc lint + arc unit

Event Timeline

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

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–218

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