-
Notifications
You must be signed in to change notification settings - Fork 318
address issues raised by Nitin #105
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
base: master
Are you sure you want to change the base?
Changes from all commits
f9aa08d
ec30669
f6fc519
508438c
9acaf03
4727fa8
ba4fbc1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,6 +170,11 @@ fn main() { | |
j += 1; | ||
} | ||
} | ||
|
||
assert_eq!(signers_vec.len(), (THRESHOLD + 1) as usize); | ||
if signers_vec.len()> (THRESHOLD + 1) as usize{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the assert_eq! can just be removed and the if can be changed to:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why minimum number of parties, shouldn't it be exactly THRESHOLD + 1? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's what I meant by minimum number of parties. You need minimum THRESHOLD + 1 signers to generate a usable signature. Also this comment is just for style. We don't need an assert and an if statement. Could just use an if statement only. But that should not stop you from merging this as is. |
||
panic!("The assumption is that number of shares = threshold + 1"); | ||
} | ||
let mut enc_key: Vec<Vec<u8>> = vec![]; | ||
for (i, k) in signers_vec.iter().enumerate() { | ||
if *k != signers_vec[party_num_int as usize - 1] as usize { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"parties":"3", "threshold":"1"} | ||
{"parties":"3", "threshold":"2"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any specific reason to change the threshold to 2 here ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I changed it while testing to be consistent with the assumption. Though I don't thing the threshold value is meaningful There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. threshold value is meaningful but not for this demo. So can leave it as is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably can just be written as:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a matter of style, but I can change it as you suggested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed.