bitcoin/src/crypto
Jonas Schnelli 695141bf7a
Merge #15512: Add ChaCha20 encryption option (XOR)
2dfe27517 Add ChaCha20 bench (Jonas Schnelli)
2bc2b8b49 Add 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. utACK 2dfe275171.
  jnewbery:
    utACK 2dfe275171
  sipa:
    utACK 2dfe275171
  ryanofsky:
    utACK 2dfe275171. Changes since last review are just renaming the Crypt method, adding comments, and simplifying the benchmark.

Tree-SHA512: 84bb234da2ca9fdc44bc29a786d9dd215520f81245270c1aef801ef66b6091b7793e2eb38ad6dbb084925245065c5dce9e5582f2d0fa220ab3e182d43412d5b5
2019-05-10 09:26:23 +02:00
..
ctaes Update ctaes 2016-12-08 17:09:07 -08:00
aes.cpp Remove unused AES-128 code 2019-03-25 14:46:30 +01:00
aes.h Remove unused AES-128 code 2019-03-25 14:46:30 +01:00
chacha20.cpp Add ChaCha20 encryption option (XOR) 2019-05-03 20:31:18 +02:00
chacha20.h Add ChaCha20 encryption option (XOR) 2019-05-03 20:31:18 +02:00
common.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
hmac_sha256.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
hmac_sha256.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
hmac_sha512.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
hmac_sha512.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
poly1305.cpp Add Poly1305 implementation 2019-03-26 18:12:29 +01:00
poly1305.h Add Poly1305 implementation 2019-03-26 18:12:29 +01:00
ripemd160.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
ripemd160.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
sha1.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
sha1.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
sha256.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
sha256.h Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
sha256_avx2.cpp Use immintrin.h everywhere for intrinsics 2018-06-26 10:11:08 -07:00
sha256_shani.cpp Use immintrin.h everywhere for intrinsics 2018-06-26 10:11:08 -07:00
sha256_sse4.cpp Add SSE4 based SHA256 2017-07-20 09:03:53 -07:00
sha256_sse41.cpp Use immintrin.h everywhere for intrinsics 2018-06-26 10:11:08 -07:00
sha512.cpp Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
sha512.h Abstract out seeding/extracting entropy into RNGState::MixExtract 2019-01-16 16:31:37 -08:00
siphash.cpp Extract CSipHasher to it's own file in crypto/ directory. 2018-11-05 09:25:15 -08:00
siphash.h Extract CSipHasher to it's own file in crypto/ directory. 2018-11-05 09:25:15 -08:00