]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Expand coverage of different buffer sizes.
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 25 May 2020 23:04:18 +0000 (23:04 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Mon, 25 May 2020 23:04:18 +0000 (23:04 +0000)
commit7d50aff082757097619b4d5f3f6e2a4b592b63da
tree76482365911b5006a9b19fef6cbcf081ed002e31
parent8c01c3dc46a4ce7c5e5a91e510f2b82dbda9445c
Expand coverage of different buffer sizes.

- When -z is used, include small buffers from 1 to 32 bytes to test
  stream ciphers.  Note that while AES-XTS claims to support a block
  size of 1 in OpenSSL, it does require a minimum of 1 block of cipher
  text as it is not a stream cipher but depends on CTS to pad out the
  final partial block.

- Permit multiple AAD sizes to be set via multiple -A options, or via
  -z.  When -z is set, use small buffers from 0 to 32 bytes followed
  by powers of 2 up to 256.  When multiple sizes are specified, the
  ETA and AEAD algorithms perform the full matrix of AAD sizes by
  payload sizes.

- Only warn on unchanged ciphertext instead of erroring.  The
  currently generated plaintext and key for a couple of AES-CTR tests
  with a buffer size of 1 results in ciphertext that matches the
  plaintext.

Reviewed by: cem
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D25006
tools/tools/crypto/cryptocheck.c