This PR supersedes #20962 and introduces a two-layered cipher suite used in the latest draft of BIP324.
- Inner layer uses RFC8439 which comes with a formal security analysis so any novelty introduced by our cipher suite still offers a baseline confidence in confidentiality and authenticity. The RFC8439 instance is re-keyed every 256 messages for forward secrecy.
- Outer layer uses a forward secure version of ChaCha20,
FSChaCha20
which re-keys itself every 256 messages for forward secrecy. It is used to encrypt the message length resulting in a pseudorandom byte stream.
The dependency tree for BIP324 PRs is here.