Page MenuHomeFreeBSD

Run the plain SHA digest tests from NIST.
ClosedPublic

Authored by jhb on Apr 11 2019, 9:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 9, 10:56 PM
Unknown Object (File)
Thu, Mar 28, 2:43 PM
Unknown Object (File)
Mar 23 2024, 12:40 AM
Unknown Object (File)
Mar 23 2024, 12:40 AM
Unknown Object (File)
Mar 23 2024, 12:40 AM
Unknown Object (File)
Feb 28 2024, 11:31 PM
Unknown Object (File)
Feb 22 2024, 7:19 AM
Unknown Object (File)
Dec 23 2023, 9:33 PM
Subscribers

Details

Summary

Pass in an explicit digest length to the Crypto constructor since it
was assuming only sessions with a MAC key would have a MAC. Passing
an explicit size allows us to test the full digest in HMAC tests as
well.

Test Plan
  • tested with cryptosoft0 and ccr0
  • this depends on the updated version of the nist-kat port that installs the plain SHA test vectors

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cem added inline comments.
tests/sys/opencrypto/cryptotest.py
266 ↗(On Diff #56111)

Because we don't support these algorithms?

This revision is now accepted and ready to land.Apr 11 2019, 9:28 PM
tests/sys/opencrypto/cryptotest.py
266 ↗(On Diff #56111)

Yes, at least not AFAIK. If it's just truncated SHA512 I could perhaps ask for SHA512 from OCF and truncate it manually.

tests/sys/opencrypto/cryptotest.py
266 ↗(On Diff #56111)

Nah, like SHA-384, it has different initial constants. Can't just truncate ordinary SHA-512.

This revision was automatically updated to reflect the committed changes.