-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
cmd/clef: encrypt the master seed on disk #17704
Conversation
// blob that can be decrypted later on. | ||
func EncryptKey(key *Key, auth string, scryptN, scryptP int) ([]byte, error) { | ||
authArray := []byte(auth) | ||
// Encryptdata encrypts the data given as 'data with the password 'auth'. |
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.
I think there is a ' missing after data
44c5b91
to
15364fa
Compare
Signed-off-by: YaoZengzeng <[email protected]>
6e56949
to
d17d5d2
Compare
Now rebased on master, so should be ready to merge since #17756 is already in. This touches the keystore a bit, so please look through that in particular. |
@fjl Could you check the keystore changes? |
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.
Keystore changes LGTM
This PR replaces #17678. It implements an encrypted storage of the clef master seed, utilizing the keystore encryption format, but wrapping it differently.
Example:
It also fixes some errors with the flags.
EDIT: This is now rebased on top off #17756 , since it uses the same method to get a user password.