Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security bug with threshold #2

Closed
OleksandrShtepa opened this issue Oct 21, 2022 · 1 comment
Closed

Security bug with threshold #2

OleksandrShtepa opened this issue Oct 21, 2022 · 1 comment
Assignees

Comments

@OleksandrShtepa
Copy link

There is a security bug in the library.
shamirs.shares(value, quantity, threshold)
actually works as:
shamirs.shares(value, quantity, threshold-1)
So shares() outputs unmodified value if threshold==2:

>>> shares(1234, quantity=3, threshold=2, modulus=10000)
[share(1, 1234, 10000), share(2, 1234, 10000), share(3, 1234, 10000)]
>>> interpolate(shares(1234, quantity=10, threshold=5)[:4])
1234
@lapets lapets closed this as completed in bf84bbe Jun 3, 2023
@lapets
Copy link
Owner

lapets commented Jun 3, 2023

Thanks!

@lapets lapets self-assigned this Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants