Repository navigation
signer: add SwSigner::from_seed_with_network - #196
Merged
Merged
Conversation
Contributor
Author
|
Updated to follow the contribution guidelines: |
Contributor
|
please tidy up the commits and make the PR more minimal |
`new_with_network` only parses English mnemonics and always uses an empty passphrase, while `from_xprv_with_network` keeps no seed, so the SLIP77 master blinding key and BIP85 are unavailable. - Let the caller compute the BIP39 seed itself (any wordlist, any passphrase) and build a signer that keeps it. - Store the seed (zeroized on drop) and route `new_with_network` through the new constructor. - BIP85 only needs the seed, not the mnemonic.
- A signer built from the seed of a mnemonic matches the mnemonic signer (xpub, SLIP77 key, BIP85) and keeps the seed. - The BIP39 vector with passphrase "TREZOR" pins the master key.
Contributor
Author
|
Tidied up: two commits on current master (change + test), lwk_signer only. |
LeoComandini
reviewed
Dec 3, 2026
Contributor
|
lgtm with comment |
Co-authored-by: LeoComandini <26792912+LeoComandini@users.noreply.github.com>
Contributor
|
utACK f0275fb, code review |
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.
SwSigner::new_with_networkonly parses English mnemonics and always uses an empty passphrase.from_xprv_with_networkkeeps no seed, so the SLIP77 master blinding key and BIP85 are unavailable.from_seed_with_network(seed: &[u8; 64], network)lets the caller compute the BIP39 seed itself (any wordlist, any passphrase) and keeps it, soseed(), SLIP77 and BIP85 work;mnemonic()returnsNone.new_with_networknow goes through the new constructor; the seed is stored and zeroized on drop.derive_bip85_mnemonic()only requires the seed, which it already used.Two commits: the change, then its test (equivalence with the mnemonic signer and the BIP39 "TREZOR" passphrase vector).
cargo test -p lwk_signer,cargo clippy -p lwk_signer --all-targets -- -D warningsandcargo fmt --checkpass on base23bef2a7f.