shea256 / secret-sharing

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

Output isn't compatible with ssss #20

Closed sowbug closed 7 years ago

sowbug commented 7 years ago

It would be reassuring if one could recover secrets using the ssss utility. However, it doesn't appear to work:

from secretsharing import PlaintextToHexSecretSharer
>>> PlaintextToHexSecretSharer.split_secret("hello", 3, 5)
['1-231aa4dc', '2-3224bff9', '3-134b1e74', '4-468dc04c', '5-4beca582']

$ ssss-combine -t3 -n5
Enter 3 shares separated by newlines:
Share [1/3]: 3-134b1e74
Share [2/3]: 4-468dc04c
Share [3/3]: 5-4beca582
WARNING: security level too small for the diffusion layer.
Resulting secret: ....
WARNING: binary data detected, use -x mode instead.
$ ssss-combine -t3 -n5 -x
Enter 3 shares separated by newlines:
Share [1/3]: 5-4beca582
Share [2/3]: 4-468dc04c
Share [3/3]: 3-134b1e74
WARNING: security level too small for the diffusion layer.
Resulting secret: a313fced

It's unclear to me how a313fced (which I assume is a hex representation of binary data) can correspond to the string "hello."

sowbug commented 7 years ago

Oops, sorry, duplicate of #4.