Skip to content

lib/crypto: KUnit tests for AES-CCM and AES-GCM

Eric Biggers linux-crypto lkml 2 versions – Applied

Status from this message: Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 2 repliesApplied
  2. v15 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Fixed crash in test_aes_ccm_data_len_too_large() on 32-bit kernels.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5lib/crypto: tests: Create test-utils.hlib/crypto/tests/chacha20poly1305_kunit.c lib/crypto/tests/hash-test-template.h lib/crypto/tests/mldsa_kunit.c +3 more+124 -990 replies
2/5lib/crypto: tests: Use per-test-case buffers in hash testslib/crypto/tests/aes_cbc_macs_kunit.c lib/crypto/tests/blake2b_kunit.c lib/crypto/tests/blake2s_kunit.c +12 more+193 -2410 replies
3/5lib/crypto: tests: Add aead-test-template.hlib/crypto/tests/aead-test-template.h+1039 -00 replies
4/5lib/crypto: tests: Add KUnit test suite for AES-CCMlib/crypto/.kunitconfig lib/crypto/tests/Kconfig lib/crypto/tests/Makefile +2 more+427 -00 replies
5/5lib/crypto: tests: Add KUnit test suite for AES-GCMlib/crypto/.kunitconfig lib/crypto/tests/Kconfig lib/crypto/tests/Makefile +2 more+494 -20 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchArd Biesheuvel
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] lib/crypto: KUnit tests for AES-CCM and AES-GCM

This series applies to libcrypto-next. It can also be retrieved from:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git gcm-ccm-kunit-v2

This series adds comprehensive KUnit test suites for the AES-CCM and AES-GCM library APIs.

This is a follow-up to the series
"[PATCH v2 00/13] Library APIs for AES encryption modes"
(https://lore.kernel.org/linux-crypto/[email protected]/)

Changed in v2:
- Fixed crash in test_aes_ccm_data_len_too_large() on 32-bit kernels.

Eric Biggers (5):
lib/crypto: tests: Create test-utils.h lib/crypto: tests: Use per-test-case buffers in hash tests lib/crypto: tests: Add aead-test-template.h lib/crypto: tests: Add KUnit test suite for AES-CCM lib/crypto: tests: Add KUnit test suite for AES-GCM

 lib/crypto/.kunitconfig                   |    2 +
 lib/crypto/tests/Kconfig                  |   18 +
 lib/crypto/tests/Makefile                 |    2 +
 lib/crypto/tests/aead-test-template.h     | 1039 +++++++++++++++++++++
 lib/crypto/tests/aes_cbc_macs_kunit.c     |   12 +-
 lib/crypto/tests/aes_ccm_kunit.c          |  356 +++++++
 lib/crypto/tests/aes_gcm_kunit.c          |  472 ++++++++++
 lib/crypto/tests/blake2b_kunit.c          |   33 +-
 lib/crypto/tests/blake2s_kunit.c          |   33 +-
 lib/crypto/tests/chacha20poly1305_kunit.c |    9 +-
 lib/crypto/tests/ghash_kunit.c            |   37 +-
 lib/crypto/tests/hash-test-template.h     |  249 ++---
 lib/crypto/tests/md5_kunit.c              |    2 -
 lib/crypto/tests/mldsa_kunit.c            |   19 +-
 lib/crypto/tests/nh_kunit.c               |    5 +-
 lib/crypto/tests/poly1305_kunit.c         |   21 +-
 lib/crypto/tests/polyval_kunit.c          |   38 +-
 lib/crypto/tests/sha1_kunit.c             |    2 -
 lib/crypto/tests/sha224_kunit.c           |    2 -
 lib/crypto/tests/sha256_kunit.c           |   48 +-
 lib/crypto/tests/sha384_kunit.c           |    2 -
 lib/crypto/tests/sha3_kunit.c             |   30 +-
 lib/crypto/tests/sha512_kunit.c           |    2 -
 lib/crypto/tests/sm3_kunit.c              |    2 -
 lib/crypto/tests/test-utils.h             |  111 +++
 scripts/crypto/gen-aead-testvecs.py       |   69 ++
 26 files changed, 2275 insertions(+), 340 deletions(-)
 create mode 100644 lib/crypto/tests/aead-test-template.h
 create mode 100644 lib/crypto/tests/aes_ccm_kunit.c
 create mode 100644 lib/crypto/tests/aes_gcm_kunit.c
 create mode 100644 lib/crypto/tests/test-utils.h
 create mode 100755 scripts/crypto/gen-aead-testvecs.py

base-commit: 6d22ec26295c1412d765e3d687e46224fc332928

Signature · 1 line
2.55.0