spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.36k stars 3.06k forks source link

slip39: Implement extendable backups #9059

Closed onvej-sl closed 4 months ago

onvej-sl commented 4 months ago

This pull request implements 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.

SomberNight commented 4 months ago

related: https://github.com/trezor/python-shamir-mnemonic/issues/48

SomberNight commented 4 months ago

Looks good. Thx.