summa-tx / coins

Rust implementations of BIP32/39 and Ledger device comms
Other
90 stars 31 forks source link

bump crypto deps #101

Closed mattsse closed 2 years ago

mattsse commented 2 years ago

@prestwich initial attempt to bump crypto deps of

digest to 0.10

and k256 to 0.11 hmac 0.12 sha2 0.10 pbkdf2 0.11 which all use digest 0.10

digest 0.10 changed a lot of traits, not 100% sure about migration in core/src/hashes/mod.rs (especially Blake2b256)

there's one failing test in bip32 derived::test::it_can_descendant_sign_and_verify, which I couldn't make sense of, because if I understood the macros correctly DerivedXPriv merely delegates the signer...

Also couldn't help myself and ran clippy fix

prestwich commented 2 years ago

the test is failing because the output of the signing function has changed, which should not occur with a version bump unless the signing behavior of ecdsa/k256 has changed 🤔

prestwich commented 2 years ago

basically the tests were relying on deterministic signing and had just hardcoded the expected signature. the new signature is still deterministic, but different

prestwich commented 2 years ago

ah, perusing the changelogs for k256, I'm guessing this is related to an RFC6979 change

https://github.com/RustCrypto/elliptic-curves/pull/552

mattsse commented 2 years ago

updated hex sig and rsv array