dash/src/crypto
Wladimir J. van der Laan c4f7bb5d72
Merge #14047: Add HKDF_HMAC256_L32 and method to negate a private key
8794a4b3ae4d34a4cd21a7dee9f694eef7726a4f QA: add test for HKDF HMAC_SHA256 L32 (Jonas Schnelli)
551d489416339dae8f9d896013cd060a21406e2b Add HKDF HMAC_SHA256 L=32 implementations (Jonas Schnelli)
3b64f852e400c552f031697d6a86829dc6e74bd6 QA: add test for CKey::Negate() (Jonas Schnelli)
463921bb649d644f79f9d7f0f96f10aa0d165f76 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
2021-08-10 23:55:56 +03:00
..
ctaes
aes_helper.c
aes.cpp Merge #15663: crypto: Remove unused AES-128 code 2021-07-10 12:10:51 -05:00
aes.h Merge #15663: crypto: Remove unused AES-128 code 2021-07-10 12:10:51 -05:00
blake.c
bmw.c
chacha20.cpp
chacha20.h
chacha_poly_aead.cpp
chacha_poly_aead.h
common.h
cubehash.c
echo.c
groestl.c
hkdf_sha256_32.cpp Merge #14047: Add HKDF_HMAC256_L32 and method to negate a private key 2021-08-10 23:55:56 +03:00
hkdf_sha256_32.h Merge #14047: Add HKDF_HMAC256_L32 and method to negate a private key 2021-08-10 23:55:56 +03:00
hmac_sha256.cpp
hmac_sha256.h
hmac_sha512.cpp
hmac_sha512.h
jh.c
keccak.c
luffa.c
poly1305.cpp
poly1305.h
ripemd160.cpp Merge #15950: Do not construct out-of-bound pointers in SHA2 code 2021-07-10 12:10:51 -05:00
ripemd160.h
sha1.cpp Merge #15950: Do not construct out-of-bound pointers in SHA2 code 2021-07-10 12:10:51 -05:00
sha1.h
sha3.cpp
sha3.h
sha256_avx2.cpp
sha256_shani.cpp
sha256_sse4.cpp
sha256_sse41.cpp
sha256.cpp
sha256.h
sha512.cpp Merge #15950: Do not construct out-of-bound pointers in SHA2 code 2021-07-10 12:10:51 -05:00
sha512.h
shavite.c
simd.c
siphash.cpp merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
siphash.h merge bitcoin#14074: Use std::unordered_set instead of set in blockfilter interface 2021-06-27 12:03:15 +05:30
skein.c
sph_blake.h
sph_bmw.h
sph_cubehash.h
sph_echo.h
sph_groestl.h
sph_jh.h
sph_keccak.h
sph_luffa.h
sph_shavite.h
sph_simd.h
sph_skein.h
sph_types.h