Bit 87 coldkey encryption security#1251
Closed
isabella618033 wants to merge 29 commits intorelease/security_updatefrom
Closed
Bit 87 coldkey encryption security#1251isabella618033 wants to merge 29 commits intorelease/security_updatefrom
isabella618033 wants to merge 29 commits intorelease/security_updatefrom
Conversation
eduardogr
reviewed
Apr 21, 2023
eduardogr
reviewed
Apr 21, 2023
eduardogr
reviewed
May 1, 2023
| is_nacl (bool): | ||
| True if data is ansible encrypted. | ||
| """ | ||
| return keyfile_data[:len('$NACL')] == b'$NACL' |
Contributor
There was a problem hiding this comment.
does it make sense to create a variable with the '$NACL' value to not use it twice?
eduardogr
reviewed
May 1, 2023
| kdf = pwhash.argon2i.kdf | ||
| key = kdf(secret.SecretBox.KEY_SIZE, password, NACL_SALT, opslimit=pwhash.argon2i.OPSLIMIT_SENSITIVE, memlimit=pwhash.argon2i.MEMLIMIT_SENSITIVE) | ||
| box = secret.SecretBox(key) | ||
| decrypted_keyfile_data = box.decrypt(keyfile_data[len('$NACL'):]) |
Contributor
There was a problem hiding this comment.
another usage of the value where we could use the variable/constant with '$NACL'
eduardogr
reviewed
May 1, 2023
| import getpass | ||
| from rich.prompt import Confirm | ||
| import json | ||
| from bittensor._keyfile.keyfile_impl import encrypt_keyfile_data, decrypt_keyfile_data, keyfile_data_is_encrypted, keyfile_data_is_encrypted_nacl, keyfile_data_is_encrypted_ansible |
Contributor
There was a problem hiding this comment.
we are already importing bittensor, right? Is this needed?
eduardogr
approved these changes
May 1, 2023
Contributor
|
This PR is pretty important but stale now, what's the status here @isabella618033 ? |
Contributor
Following up on this. Are we expecting to add this still? |
Contributor
Bump. |
camfairchild
suggested changes
Aug 10, 2023
Contributor
|
Migrated to: #1497 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2 Update wallet from Ansible Vault to NaCl & argon2i password hashing.
Wallets can be updated with the following scenario
btcli update_wallet --all(successful update with legacy_wallet_2478, failure in update with legacy_wallet_7807, all other wallets had been updated previously)
