Page MenuHomePhabricator

crypto: add FSChaCha20Poly1305, rekeying wrapper around ChaCha20Poly1305
Needs ReviewPublic

Authored by PiRK on Tue, Dec 2, 14:50.

Details

Reviewers
None
Group Reviewers
Restricted Project
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