Commit graph

5 commits

Author SHA1 Message Date
Pieter Wuille
b6934fd03f net: merge V2Transport constructors, move key gen
This removes the ability for BIP324Cipher to generate its own key, moving that
responsibility to the caller (mostly, V2Transport). This allows us to write
the random-key V2Transport constructor by delegating to the explicit-key one.
2023-09-10 16:11:52 -04:00
stratospher
93cb8f0380 refactor: add missing headers for BIP324 ciphersuite 2023-08-15 07:30:48 +05:30
stratospher
d22d5d925c crypto: BIP324 ciphersuite follow-up
follow-up to #28008.
* move `dummy_tag` variable in FSChaCha20Poly1305 crypto_tests
outside of the loop to be reused every time
* use easy to read `cipher.last()` in `AEADChaCha20Poly1305::Decrypt()`
* comment for initiator in `BIP324Cipher::Initialize()`
* systematically damage ciphertext with bit positions in bip324_tests
* use 4095 max bytes for aad in bip324 fuzz test
2023-08-14 09:03:21 +05:30
Pieter Wuille
1c7582ead6 tests: add decryption test to bip324_tests 2023-07-26 17:09:27 -04:00
Pieter Wuille
990f0f8da9 Add BIP324Cipher, encapsulating key agreement, derivation, and stream/AEAD ciphers
Co-authored-by: dhruv <856960+dhruv@users.noreply.github.com>
2023-07-26 17:09:23 -04:00