-
Notifications
You must be signed in to change notification settings - Fork 220
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
fix: add hidden types and seed words to key manager #4925
fix: add hidden types and seed words to key manager #4925
Conversation
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.
Looks great
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.
Awesome
The cli and seed work prompt still leak but these can be fixed in another PR(s) as both of them require a little refactoring
@@ -100,7 +105,8 @@ impl MnemonicLanguage { | |||
return Err(MnemonicError::UnknownLanguage); | |||
}, | |||
Ordering::Greater => { | |||
for word in words { | |||
for word_ind in 0..words.len() { |
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.
Is it worth it to have SeedWords
implement an iterator that provides word references? Then you don't need to mess around with indexes.
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 would say that it would be nice to have it. But honestly, to implement Iterator
one needs to make some lifetime algebra, which adds unnecessary complexity to the SeedWords
type. Since these are the only instances in which we need to traverse the SeedWords
type, I think it might be not worth the extra complexity. But happy to refactor if you think otherwise :)
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.
Ah, I hadn't considered that lifetimes would be problematic when writing this. As you say, it's probably not worth it for the two times when it would be used, and the bounds checks are correct as implemented anyway.
* development: fix: add hidden types and seed words to key manager (tari-project#4925) feat: timestamp validation (tari-project#4887) fix: deleted_txo_mmr_position_to_height_index already exists error (tari-project#4924) feat: add default grpc for localnet (tari-project#4937) first commit (tari-project#4926) v0.40.2 fix(dht): use limited ban period for invalid peer (tari-project#4933) feat: upgrade tari_crypto sign api (tari-project#4932) v0.40.1 chore: fix depreciated timestamp clippy (tari-project#4929) chore: fix naming of ffi functions and comments (tari-project#4930) fix: set wallet start scan height to birthday and not 0 (see issue tari-project#4807) (tari-project#4911) v0.40.0 chore: remove unused methods (tari-project#4922) fix: updates for SafePassword API change (tari-project#4927)
Description --- The goal of this PR is to zeroize sensitive data content across the Tari repo. We pay special attention to kdf key data and other occurrences of sensitive data. For more details, we refer to issue #4846. Moreover, this PR is a companion to #4953 and #4925 Motivation and Context --- Tackle issue #4846. How Has This Been Tested? ---
Description
We refactor the
key_manager
crate so that hides sensitive data such as mnemonics, encryption and mac keys, etc.Motivation and Context
Tackle issue #4861 and a portion of #4846.
Fixes #4861
How Has This Been Tested?
Add unit tests for
SeedWords
. Also generated need wallet with visible seed words, to the user.