release 0.3.0 broke backwards compat. old versions cannot recover new seeds. `ERROR: Invalid mnemonic checksum for ...`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Reproduce with two virtualenvs as in the report: generate shares with shamir-mnemonic 0.3.0 and try recovery with 0.2.2 to see the checksum error. Diff the mnemonic generation/checksum code between the two versions to find what changed in 0.3.0. This is a backwards-compatibility issue affecting real wallet recovery (Electrum), so any fix must be compatible with the SLIP-39 spec and with shares already in circulation — done means new shares recover in both old and new versions, with tests covering both directions.
Written by the indexing model from the issue text.
Description
Shares generated by version 0.3.0 are rejected during recovery in old versions.
In particular, shares I generate with 0.3.0 cannot be used to restore with in Electrum.
user@user-VirtualBox:~/wspace/tmp$ python3 -m venv env30
user@user-VirtualBox:~/wspace/tmp$ source env30/bin/activate
(env30) user@user-VirtualBox:~/wspace/tmp$ pip install shamir-mnemonic[cli]==0.3.0
Collecting shamir-mnemonic[cli]==0.3.0
Downloading shamir_mnemonic-0.3.0-py3-none-any.whl (23 kB)
Collecting click<9,>=7
Using cached click-8.1.7-py3-none-any.whl (97 kB)
Installing collected packages: shamir-mnemonic, click
Successfully installed click-8.1.7 shamir-mnemonic-0.3.0
(env30) user@user-VirtualBox:~/wspace/tmp$ shamir create 2of3 --master-secret="5be935613b67a9d53bfafe03fab5e92ea5bcacc6449cf151714730cdf366b0a7e0a644d571aa2559f201f193231e9dab7a4eb9b2854a19536d2e0fc9bc3d7cc8"
Using master secret: 5be935613b67a9d53bfafe03fab5e92ea5bcacc6449cf151714730cdf366b0a7e0a644d571aa2559f201f193231e9dab7a4eb9b2854a19536d2e0fc9bc3d7cc8
Group 1 of 1 - 2 of 3 shares required:
species biology academic acid acne depart vintage object aluminum grumpy friar season therapy dynamic ivory tracks large spark leaf pleasure dragon dish junction capture render founder marathon tackle float step maiden loud should trust permit decrease total enemy that privacy midst maximum armed mandate carve have symbolic armed payroll news seafood density segment frequent perfect spelling year deadline gesture
species biology academic agency acquire reunion unfair darkness prayer cubic guest glad energy database video patrol smell laden literary sled amount review crucial national river hush lawsuit square inmate training trouble wavy garlic express royal guard mason lend source diminish custody fitness flip rainbow miracle guitar listen course render industry satisfy soldier crucial machine snapshot sheriff bracelet yield mandate
species biology academic always acid critical greatest iris findings vintage listen sidewalk relate carve idle priest aide main document chubby fused fumes steady armed prospect aluminum sunlight smear adjust relate express dryer listen patent hormone organize depart smell learn omit velvet extend physics provide cards already slap round mild elevator slap python agree visual exhaust tracks mild race tension
(env30) user@user-VirtualBox:~/wspace/tmp$
user@user-VirtualBox:~/wspace/tmp$ python3 -m venv env22
user@user-VirtualBox:~/wspace/tmp$ source env22/bin/activate
(env22) user@user-VirtualBox:~/wspace/tmp$ pip install shamir-mnemonic==0.2.2
Collecting shamir-mnemonic==0.2.2
Using cached shamir_mnemonic-0.2.2-py3-none-any.whl (22 kB)
Collecting colorama
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting attrs
Using cached attrs-23.2.0-py3-none-any.whl (60 kB)
Collecting click<9,>=7
Using cached click-8.1.7-py3-none-any.whl (97 kB)
Installing collected packages: colorama, click, attrs, shamir-mnemonic
Successfully installed attrs-23.2.0 click-8.1.7 colorama-0.4.6 shamir-mnemonic-0.2.2
(env22) user@user-VirtualBox:~/wspace/tmp$ shamir recover
Enter a recovery share: species biology academic acid acne depart vintage object aluminum grumpy friar season therapy dynamic ivory tracks large spark leaf pleasure dragon dish junction capture render founder marathon tackle float step maiden loud should trust permit decrease total enemy that privacy midst maximum armed mandate carve have symbolic armed payroll news seafood density segment frequent perfect spelling year deadline gesture
ERROR: Invalid mnemonic checksum for "species biology academic acid ...".
Enter a recovery share:
Note that the other direction works: shares generated by old versions are accepted by 0.3.0.
- Dominant language
- Python
- Stars
- 205
- Forks
- 74
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from trezor/python-shamir-mnemonic
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
trezor/python-shamir-mnemonic#54 · 1 reaction ·
-
Group member check seems too restrictive when combining mnemonicsPossibly taken @pjkundert claimed this 736 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 30/100
trezor/python-shamir-mnemonic#44 · 6 comments ·
All issues in trezor/python-shamir-mnemonic
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
juandresrodca/AdminForge#66 ·
Maintainers usually reply within 1 day
-
backend/local comp/tools P2 tool/terminal type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NousResearch/hermes-agent#158788 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
public-apis/public-apis#9330 · 1 reaction ·
Maintainers usually reply within 12 days
-
approved author-page correction move-papers
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
acl-org/acl-anthology#11043 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day