shea256 / secret-sharing

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

possibility to use custom prime #9

Closed prusnak closed 8 years ago

prusnak commented 9 years ago

In my calculations I'd like to use a custom prime (e.g. 2^256-189, see https://primes.utm.edu/lists/2small/ for the verbose list). This patch adds possibility to skip get_large_enough_prime function call by defining a custom prime.

mvonmaltitz commented 9 years ago

This enhancement would easily allow making use of the homomorphic properties of Shamir's Secret Sharing scheme (e.g. adding constants to shared secrets or adding up different secrets). Therefore I would really like this pull request being merged.

prusnak commented 8 years ago

Rebased.

@shea256 What do you think?

shea256 commented 8 years ago

@prusnak thank you for the improvement and please excuse the delay. Just merged in your change. Nice work :)

prusnak commented 8 years ago

Could you please release version with the patch included to PyPI? Thanks!