]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Test the AES-CCM test vectors from the NIST Known Answer Tests.
authorjhb <jhb@FreeBSD.org>
Wed, 24 Apr 2019 00:23:06 +0000 (00:23 +0000)
committerjhb <jhb@FreeBSD.org>
Wed, 24 Apr 2019 00:23:06 +0000 (00:23 +0000)
commit84609db9944644ea5c2fa462169ec25955deb38d
tree82b07f60a7a73c1b0ea4ec5b8017d3302428b743
parent5ca25aadd977e50265d14ac587c2d03b0e7e4d5e
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.

Reviewed by: ngie
MFC after: 1 month
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D19978
tests/sys/opencrypto/cryptodev.py
tests/sys/opencrypto/cryptotest.py