Merge #15512: Add ChaCha20 encryption option (XOR)
2dfe27517Add ChaCha20 bench (Jonas Schnelli)2bc2b8b49Add ChaCha20 encryption option (XOR) (Jonas Schnelli) Pull request description: The current ChaCha20 implementation does not support message encryption (it can only output the keystream which is sufficient for the RNG). This PR adds the actual XORing of the `plaintext` with the `keystream` in order to return the desired `ciphertext`. Required for v2 message transport protocol. ACKs for commit 2dfe27: jnewbery: Looks good. utACK2dfe275171. jnewbery: utACK2dfe275171sipa: utACK2dfe275171ryanofsky: utACK2dfe275171. Changes since last review are just renaming the Crypt method, adding comments, and simplifying the benchmark. Tree-SHA512: 84bb234da2ca9fdc44bc29a786d9dd215520f81245270c1aef801ef66b6091b7793e2eb38ad6dbb084925245065c5dce9e5582f2d0fa220ab3e182d43412d5b5
This commit is contained in:
7 files changed
+232
-16
No files matched your search
@@ -21,6 +21,7 @@ bench_bench_bitcoin_SOURCES = \
|
||||
bench/duplicate_inputs.cpp \
|
||||
bench/examples.cpp \
|
||||
bench/rollingbloom.cpp \
|
||||
bench/chacha20.cpp \
|
||||
bench/crypto_hash.cpp \
|
||||
bench/ccoins_caching.cpp \
|
||||
bench/gcs_filter.cpp \
|
||||
|
||||
Reference in new issue
Block a user