git: crypto: Add ChaCha20-Poly1305 and XChaCha20-Poly1305 AEAD

Aaron LI aly at
Sat Jan 13 06:01:35 PST 2024

commit 6f63b8fa239106036c63e02b5dfdebbf2b326e9f
Author: Aaron LI <aly at>
Date:   Wed Nov 22 09:39:42 2023 +0800

    crypto: Add ChaCha20-Poly1305 and XChaCha20-Poly1305 AEAD
    Derived from OpenBSD with significant modifications by me:
    - Removed unused code to hook into the cryptosoft framework.
    - Adjusted the interface to align with the IETF RFC document
      (e.g., make the nonce a byte string other than a uint64_t),
      so that the code becomes more generic.
    - RFC 8439: ChaCha20 and Poly1305 for IETF Protocols
    - RFC draft: XChaCha: eXtended-nonce ChaCha and AEAD_XChaCha20_Poly1305

Summary of changes:
 sys/conf/files          |   1 +
 sys/crypto/Makefile     |   1 +
 sys/crypto/chachapoly.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++++
 sys/crypto/chachapoly.h |  44 ++++++++++++
 4 files changed, 227 insertions(+)
 create mode 100644 sys/crypto/chachapoly.c
 create mode 100644 sys/crypto/chachapoly.h

DragonFly BSD source repository

More information about the Commits mailing list