New APIs for running updates to ChaCha20/Poly1305 AEAD

wolfSSL 4.4.0 introduces new ChaCha20/Poly1305 API’s for AEAD to allow “chunked” updates of data followed by a final calculation for the authentication tag. This uses the same “Init”, “Update”, “Final” conventions commonly available with our hash algorithms.

New API’s are available by default and can be disabled using: NO_CHACHAPOLY_AEAD_IUF.

wc_ChaCha20Poly1305_CheckTag
wc_ChaCha20Poly1305_Init
wc_ChaCha20Poly1305_UpdateAad
wc_ChaCha20Poly1305_UpdateData
wc_ChaCha20Poly1305_Final
wc_Poly1305_Pad
wc_Poly1305_EncodeSizes

These additions resulted in the following additional enhancements to the wolfSSL library and regression testing:

  1. Refactor of functions wc_ChaCha20Poly1305_Encrypt and wc_ChaCha20Poly1305_Decrypt to use the new ChaChaPoly_Aead context and the new init/update/final functions.
  2. Refactor of the Poly1305 AEAD / MAC to reduce duplicate code (Footprint Optimizations)
  3. Tests for TLS v1.3 interop and ChaCha20/Poly1305 AEAD test vectors.

If you have any questions about the wolfSSL embedded SSL/TLS library, or using ChaCha20/Poly1305 in your application, contact us today at facts@wolfssl.com.