bitcoin/src/crypto
Wladimir J. van der Laan 376638afcf
Merge #14047: Add HKDF_HMAC256_L32 and method to negate a private key
8794a4b3ae QA: add test for HKDF HMAC_SHA256 L32 (Jonas Schnelli)
551d489416 Add HKDF HMAC_SHA256 L=32 implementations (Jonas Schnelli)
3b64f852e4 QA: add test for CKey::Negate() (Jonas Schnelli)
463921bb64 CKey: add method to negate the key (Jonas Schnelli)

Pull request description:

  This adds a limited implementation of `HKDF` (defined by rfc5869) that supports only HMAC-SHA256  and length output of 32 bytes (will be required for v2 transport protocol).

  This PR also includes a method to negate a private key which is useful to enforce public keys starting with 0x02 (or 0x03) (a requirement for the v2 transport protocol). The new `CKey::Negate()` method is pretty much a wrapper around `secp256k1_ec_privkey_negate()`.

  Including tests.

  This is a subset of #14032 and a pre-requirement for the v2 transport protocol.

ACKs for commit 8794a4:

Tree-SHA512: 5341929dfa29f5da766ec3612784baec6a3ad69972f08b5a985a8aafdae4dae36f104a2b888d1f5d1f33561456bd111f960d7e32c2cc4fd18e48358468f26c1a
2019-05-16 19:24:52 +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
hkdf_sha256_32.cpp Add HKDF HMAC_SHA256 L=32 implementations 2019-05-11 09:14:07 +02:00
hkdf_sha256_32.h Add HKDF HMAC_SHA256 L=32 implementations 2019-05-11 09:14:07 +02: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 Do not construct out-of-bound pointers in SHA512/SHA1/RIPEMD160 code 2019-05-06 15:11:10 -07:00
ripemd160.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
sha1.cpp Do not construct out-of-bound pointers in SHA512/SHA1/RIPEMD160 code 2019-05-06 15:11:10 -07: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 Do not construct out-of-bound pointers in SHA512/SHA1/RIPEMD160 code 2019-05-06 15:11:10 -07: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