-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eth2util/keystore: conform to EIP2335 #622
Conversation
…owits/eip2335-keystores
…owits/eip2335-keystores
Codecov Report
@@ Coverage Diff @@
## main #622 +/- ##
=======================================
Coverage 56.69% 56.69%
=======================================
Files 96 96
Lines 9100 9096 -4
=======================================
- Hits 5159 5157 -2
+ Misses 3197 3196 -1
+ Partials 744 743 -1
Continue to review full report at Codecov.
|
}, nil | ||
} | ||
|
||
// decrypt returns the secret from the encrypted (empty password) keystore. | ||
func decrypt(store keystore, password string) (*bls_sig.SecretKey, error) { | ||
// Ugly way to check if the untyped store.Crypto field contains a "scrypt" kdf function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to specify cipher when you are decrypting
eth2util/keystore/keystore.go
Outdated
Pubkey: hex.EncodeToString(pubKeyBytes), | ||
Name: encryptor.Name(), | ||
Crypto: fields, | ||
Description: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add comment why empty maybe? (note you do not need to put empty since that is the default)
Refactor keystore to adhere to EIP2335 spec
category: refactor
ticket: #567