trezor / python-mnemonic

:snake: Mnemonic code for generating deterministic keys, BIP39
https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
MIT License
837 stars 365 forks source link

Can't use Shamir's secret sharing with 12/24 word seeds #46

Closed mifunetoshiro closed 6 years ago

mifunetoshiro commented 6 years ago

len(seed) is bigger than primes.keys() in shamir.py so you get an "Unknown data length" exception. Works fine with the example sentence "Shamir's Secret Sharing Scheme!" because it's 31 in length, but can't be used with real BIP39 examples.

prusnak commented 6 years ago

Don't use this code. It's not meant to be used for production. We are finalizing the new standard: https://github.com/satoshilabs/slips/blob/master/slip-0039.md and once this is stabilized, we'll add the code to this repo.