Open mikelodder7 opened 1 month ago
// Shouldn't allow sharing threshold of 1 but succeeds let (secret, shares, poly) = deal_randomsecret::<, Fr>(&mut rng, 1, 1).unwrap();
The problem isn't the threshold but total, which shouldn't be 1. deal_random_secret::<_, Fr>(&mut rng, 1, 3).unwrap();
is fine. Adding a check for total
. Thanks.
fn invalid_recombine_dup_id() { .... // Should fail because of duplicate share id. Duplicate share id's result in lagrange divide by zero
reconstruct_secret
expects the shares to be unique as its comment says.
fn invalid_recombine_dup_id() { .... assert_eq!(secret, secret1);
This check fails. What was the intention here?
[test]
fn invalid_recombine_zero_id() {
Thanks for reporting this. Fixing.
Expecting the comments to catch bugs is not good practice.
Yes that test intentionally fails and will pass once you fix the bug
Expecting the comments to catch bugs is not good practice.
I am not expecting the comment to catch the bug but was setting the expectation through it.
The shamir methods fail running the following tests