| 51850e1e | 23-May-2019 |
John Baldwin <[email protected]> |
MFC 346617: Test the AES-CCM test vectors from the NIST Known Answer Tests.
The CCM test vectors use a slightly different file format in that there are global key-value pairs as well as section key-
MFC 346617: Test the AES-CCM test vectors from the NIST Known Answer Tests.
The CCM test vectors use a slightly different file format in that there are global key-value pairs as well as section key-value pairs that need to be used in each test. In addition, the sections can set multiple key-value pairs in the section name. The CCM KAT parser class is an iterator that returns a dictionary once per test where the dictionary contains all of the relevant key-value pairs for a given test (global, section name, section, test-specific).
Note that all of the CCM decrypt tests use nonce and tag lengths that are not supported by OCF (OCF only supports a 12 byte nonce and 16 byte tag), so none of the decryption vectors are actually tested.
show more ...
|
| 657f0c2d | 23-May-2019 |
John Baldwin <[email protected]> |
MFC 346616: Run the plain SHA digest tests from NIST.
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 exp
MFC 346616: Run the plain SHA digest tests from NIST.
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.
show more ...
|
| 8a478e8e | 23-May-2019 |
John Baldwin <[email protected]> |
MFC 346614: Skip tests with missing test vectors instead of failing.
This copes more gracefully when older version of the nist-kat package are intalled that don't have newer test vectors such as CCM
MFC 346614: Skip tests with missing test vectors instead of failing.
This copes more gracefully when older version of the nist-kat package are intalled that don't have newer test vectors such as CCM or plain SHA.
If the nist-kat package is not installed at all, this still fails with an error.
show more ...
|
| 005fdbbc | 21-Sep-2017 |
Conrad Meyer <[email protected]> |
cryptotest.py: Actually use NIST-KAT HMAC test vectors and test the right hashes
Previously, this test was entirely a no-op as no vector in the NIST-KAT file has a precisely 20-byte key.
Additional
cryptotest.py: Actually use NIST-KAT HMAC test vectors and test the right hashes
Previously, this test was entirely a no-op as no vector in the NIST-KAT file has a precisely 20-byte key.
Additionally, not every vector in the file is SHA1. The length field determines the hash under test, and is now decoded correctly.
Finally, due to a limitation I didn't feel like fixing in cryptodev.py, MACs are truncated to 16 bytes in this test.
With this change and the uncommitted D12437 (to allow key sizes other than those used in IPSec), the SHA tests in cryptotest.py actually test something and e.g. at least cryptosoft passes the test.
Sponsored by: Dell EMC Isilon
show more ...
|