Skip to content

Introduce an iovec API for encryption

Nikos Mavrogiannopoulos requested to merge tmp-iovec-api into master

This introduces an AEAD API which can encrypt from scattered data. This is particularly useful addition to AEAD APIs because our exported high level APIs for AEAD they only read from a single buffer. That made sense for AEAD in general as only some ciphers can handle scattered data effectively (e.g., CCM doesn't), but the TLS 1.3 use of AEAD, can benefit from the ability of GCM and CHACHA20 to encrypt scattered data.

The iovec optimizations are documented (in comment) to be available only for the internally registered APIs. Externally registered crypto APIs work, though by involving a malloc/memcpy.

Checklist

  • Code modified for feature
  • Test suite introduced
  • Documentation updated

Reviewer's checklist:

  • Any issues marked for closing are addressed
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTION.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by Nikos Mavrogiannopoulos

Merge request reports