HomeFreeBSD

Expand coverage of different buffer sizes.

Description

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

Details