HomePhabricator

crypto: add FSChaCha20Poly1305, rekeying wrapper around ChaCha20Poly1305

Description

crypto: add FSChaCha20Poly1305, rekeying wrapper around ChaCha20Poly1305

Summary:
This adds the FSChaCha20Poly1305 AEAD as specified in BIP324, a wrapper
around the ChaCha20Poly1305 AEAD (as specified in RFC8439 section 2.8) which
automatically rekeys every N messages, and automatically increments the nonce
every message.

This is a partial backport of core#28008
https://github.com/bitcoin/bitcoin/pull/28008/commits/aa8cee93342ee857931afec9af3ff5dbd8ce7749

Depends on D19019

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D19020

Details

Provenance
Pieter Wuille <pieter@wuille.net>Authored on Jun 29 2023, 18:55
PiRKCommitted on Wed, Dec 3, 12:20
PiRKPushed on Wed, Dec 3, 12:20
Reviewer
Restricted Project
Differential Revision
D19020: crypto: add FSChaCha20Poly1305, rekeying wrapper around ChaCha20Poly1305
Parents
rABC82a77c13ec76: crypto: add FSChaCha20, a rekeying wrapper around ChaCha20
Branches
Unknown
Tags
Unknown