Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

keys: fix privkey derivation #554

Merged
merged 3 commits into from Sep 29, 2020
Merged

keys: fix privkey derivation #554

merged 3 commits into from Sep 29, 2020

Conversation

fedekunze
Copy link
Contributor

No description provided.

@@ -58,27 +58,37 @@ func EthermintKeygenFunc(bz []byte, algo keys.SigningAlgo) (tmcrypto.PrivKey, er
return PrivKeySecp256k1(bz), nil
}

func DeriveSecp256k1(mnemonic, bip39Passphrase, _ string) ([]byte, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hdpath wasn't being used to derive the key

@codecov
Copy link

codecov bot commented Sep 29, 2020

Codecov Report

Merging #554 into development will decrease coverage by 0.01%.
The diff coverage is 81.81%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #554      +/-   ##
===============================================
- Coverage        70.72%   70.71%   -0.02%     
===============================================
  Files               42       42              
  Lines             2333     2339       +6     
===============================================
+ Hits              1650     1654       +4     
- Misses             540      541       +1     
- Partials           143      144       +1     
Impacted Files Coverage Δ
crypto/algorithm.go 76.47% <81.81%> (-2.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f648d2...b9d921e. Read the comment docs.


path := hdwallet.MustParseDerivationPath(hdPath)

account, err := wallet.Derive(path, false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used this library to test the correctness with ethereum

@fedekunze fedekunze merged commit 592eca9 into development Sep 29, 2020
@fedekunze fedekunze deleted the fix-key-derivation branch September 29, 2020 20:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants