Skip to content
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

feat(types)!: use Mnemonic type from crypto.rs #471

Conversation

Alex6323
Copy link
Contributor

Description of change

Consistent with the new Password type in #468 this PR adds a Mnemonic type, that makes sure sensitive data gets zeroed when the owner is being dropped.

Links to any relevant issues

None

Type of change

  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How the change has been tested

Unit tests

@Alex6323 Alex6323 changed the title feat(types): introduce Mnemonic type that is ZeroizeOnDrop feat(types)!: introduce Mnemonic type that is ZeroizeOnDrop May 22, 2023
@Alex6323 Alex6323 marked this pull request as ready for review May 23, 2023 15:40
Copy link
Member

@Thoralf-M Thoralf-M left a comment

Choose a reason for hiding this comment

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

CI fails

DaughterOfMars
DaughterOfMars previously approved these changes Jun 1, 2023
@Alex6323 Alex6323 force-pushed the feat/types/zeroize-on-drop-mnemonic-type branch from 9cc642c to a8de867 Compare June 2, 2023 10:39
DaughterOfMars
DaughterOfMars previously approved these changes Jun 2, 2023
sdk/src/client/secret/mod.rs Outdated Show resolved Hide resolved
Copy link
Member

@thibault-martinez thibault-martinez left a comment

Choose a reason for hiding this comment

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

We should wait and use the Mnemonic from iotaledger/crypto.rs#200

thibault-martinez added a commit that referenced this pull request Jun 15, 2023
* Allow SecretManage to be extensible

* fix type

* more feature gating

* Fix stronghold backup/restore

* Fix backup restore bugs

* clippy

* feature 🐊

* LINE PIECE |

Co-authored-by: Thibault Martinez <[email protected]>

* imports

* fix merge

* PR suggestions

* changelog

* cleanup

* fix merge

* fix borked merge

* nit

* Remove Debug requirement from StorageManage

* comment

* clippy

* Remove generate addresses that is not needed

* remove more generate addresses

* cleanup

* Fix features and clippy

* flip the switch

---------

Co-authored-by: Thibault Martinez <[email protected]>
@thibault-martinez
Copy link
Member

iotaledger/crypto.rs#200 was merged, I don't know if there was something else in this PR that we would keep?

@Alex6323
Copy link
Contributor Author

Alex6323 commented Jul 3, 2023

Things we probably want to keep from this PR:
(a) The trimming of the input string,
(b) making the fns type safe (replace String with Mnemonic whereever possible)?

@DaughterOfMars
Copy link

I agree, those aspects should be maintained.

@Alex6323
Copy link
Contributor Author

Alex6323 commented Jul 5, 2023

Waiting for #715 to be merged which will make their Mnemonic type available.

@Alex6323 Alex6323 changed the title feat(types)!: introduce Mnemonic type that is ZeroizeOnDrop feat(types)!: use Mnemonic type from crypto.rs Jul 12, 2023
@@ -154,6 +154,76 @@ impl MnemonicSecretManager {
}
}

// impl From<Mnemonic> for MnemonicSecretManager {
Copy link
Member

Choose a reason for hiding this comment

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

What's up with all this ?

Copy link
Contributor Author

@Alex6323 Alex6323 Jul 18, 2023

Choose a reason for hiding this comment

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

don't think too much about it ... I merged develop into this branch to see in GH if there's something left of use and just out-commented this for the time being.

@Alex6323
Copy link
Contributor Author

Changes of this PR were already done in #715

@Alex6323 Alex6323 closed this Jul 18, 2023
@Alex6323 Alex6323 deleted the feat/types/zeroize-on-drop-mnemonic-type branch July 18, 2023 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants