shea256 / secret-sharing

A system for securely splitting secrets with Shamir's Secret Sharing Scheme
MIT License
483 stars 143 forks source link

incompatible with other implementations? #4

Open BlinkyStitt opened 9 years ago

BlinkyStitt commented 9 years ago

I was looking at using this to split some secrets. However, I wanted to be able to use multiple programs to create and restore these.

When I used the values from the README with http://point-at-infinity.org/ssss/, I don't get the expected results. Is there anything to do to make these compatible?

$ ssss-combine -t 2
Enter 2 shares separated by newlines:
Share [1/2]: 1-58cbd30524507e7a198bdfeb69c8d87fd7d2c10e8d5408851404f7d258cbcea7
Share [2/2]: 2-ecdbdaea89d75f8e73bde77a46db821cd40f430d39a11c864e5a4868dcb403ed
Resulting secret: : ...y.;ch`J..]H...19..r.MV.....
WARNING: binary data detected, use -x mode instead.

$ ssss-combine -t 2 -x
Enter 2 shares separated by newlines:
Share [1/2]: 1-58cbd30524507e7a198bdfeb69c8d87fd7d2c10e8d5408851404f7d258cbcea7
Share [2/2]: 2-ecdbdaea89d75f8e73bde77a46db821cd40f430d39a11c864e5a4868dcb403ed
Resulting secret: 3a20ed1e8a79d63b6368604ae1b65d48a3be893139fdec72c14d56df9deca4df

The expected resulting secret is c4bbcb1fbec99d65bf59d85c8cb62ee2db963f0fe106f483d9afa73bd4e39a8a

shea256 commented 9 years ago

Can you show me the code you used to generate those two shares? Was it 2/2 or 2/3?

BlinkyStitt commented 9 years ago

It is the example from the readme of this repo. 2 of 3

On Oct 24, 2014, at 10:24 AM, Ryan Shea notifications@github.com wrote:

Can you show me the code you used to generate those two shares? Was it 2/2 or 2/3?

— Reply to this email directly or view it on GitHub.

shea256 commented 9 years ago

Hm, I'm not sure why the two libraries are returning different results but I'll look into it more. It may be due to the fact that we're using different prime numbers.

BlinkyStitt commented 7 years ago

Did this ever get figured out?

https://www.reddit.com/r/Bitcoin/comments/56g8y2/hodlers_if_you_get_hit_by_a_bus_tomorrow_will/ reminded me of this issue.

BlinkyStitt commented 7 years ago

I think https://github.com/blockstack/secret-sharing/issues/19 might be related