]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
crypto: Test all of the AES-CCM KAT vectors.
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 6 Oct 2021 21:08:48 +0000 (14:08 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 6 Oct 2021 21:08:48 +0000 (14:08 -0700)
commit668770dc7de2ec8b5f5edf71e09b8a404120f6fa
treec94c6036d7707d8ca8ee1bbf7016f928c930d360
parent4361c4eb6e3620e68d005c1671fdbf60b1fe83c6
crypto: Test all of the AES-CCM KAT vectors.

Previously, only test vectors which used the default nonce and tag
sizes (12 and 16, respectively) were tested.  This now tests all of
the vectors.  This exposed some additional issues around requests with
an empty payload (which wasn't supported) and an empty AAD (which
falls back to CIOCCRYPT instead of CIOCCRYPTAEAD).

- Make use of the 'ivlen' and 'maclen' fields for CIOGSESSION2 to
  test AES-CCM vectors with non-default nonce and tag lengths.

- Permit requests with an empty payload.

- Permit an input MAC for requests without AAD.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32121
tests/sys/opencrypto/cryptodev.py
tests/sys/opencrypto/cryptotest.py