pjkundert / python-slip39

Generate Ethereum, Bitcoin, etc. account seed and backup Mnemonics in SLIP-39 format (Trezor & Ledger compatible), with details in printable PDF format. Optionally, also print encrypted JSON and BIP-38 paper wallets.
https://slip39.com
Other
50 stars 17 forks source link

Support slip39 extendable backups #20

Open onvej-sl opened 4 weeks ago

onvej-sl commented 4 weeks ago

This pull request updates the module shamir-mnemonic to 0.3.0 to support extendable backups.

Extendable backups were introduced in a recent revision of the SLIP-39 specification. The highest bit of the iteration exponent has been repurposed for a new "extendable backup flag". Setting the flag indicates that the random identifier is not used as salt in the encryption of the master secret. This makes it possible to create multiple sets of shares, such that each set of shares uses a different identifier and each set of shares leads to the same master secret for every passphrase. This is a desirable property, which unfortunately was not considered in the initial specification. It allows users to start working with their wallet by creating a single-share (1-of-1) scheme and later upgrade to a multi-share scheme while maintaining the same encrypted master secret and passphrases. Existing SLIP-39 shares remain valid. New shares created using the revised specification use a different checksum customization string and are not compatible with older implementations.

onvej-sl commented 4 weeks ago

Fixes https://github.com/pjkundert/python-slip39/issues/19.