shamir39 icon indicating copy to clipboard operation
shamir39 copied to clipboard

Add button to test shares produce original mnemonic

Open jsanjuas opened this issue 6 years ago • 3 comments

Added a button to the UI that tests that the mnemonic is always recovered given enough shares to buy the user peace of mind.

Caveat: since it exhaustively checks all combinations of shares, it is only practical for a rather small number of shares, though -- my laptop already needs ~40s for n=15.

jsanjuas avatar Dec 13 '17 10:12 jsanjuas

Very interesting idea. Thanks for the pull request. Leave it with me to consider for a while.

My initial feeling is it's not in the interest of the user to be casting doubt like this. If the shares are created they will work, end of story, and users should have trust in it as a mathematical certainty.

It's sort of like how you wouldn't put a button in a calculator app to test all the combos of 2+3+4+5+6+7=27

But considering the newness and 'complexity' of shamir39, I can understand the motivation for this feature.

iancoleman avatar Dec 13 '17 22:12 iancoleman

Sure!

Let me clarify that, as a user, I wouldn't be doubting the math as much as a particular implementation of it in a dynamic language that features surprising behaviours in edge cases. Consider how critical the correctness of this tool is to a user - in this case, I would say there is never "too much reassurance" that it indeed works.

I understand your point, though. I'd argue that a measure of doubt is already cast by the warnings you have (very responsibly) included at the top.

jsanjuas avatar Dec 15 '17 08:12 jsanjuas

My initial feeling is it's not in the interest of the user to be casting doubt like this. If the shares are created they will work, end of story, and users should have trust in it as a mathematical certainty.

Something that is in the interest of the user is to type the shares back in, and verify them. Transcription errors happen, so it's a good step to take the shares from their eventual storage place - steel, or paper - and verify that they recreate the original seed, before destroying all copies of the seed phrase itself.

yorickdowne avatar Apr 28 '21 18:04 yorickdowne