-
Notifications
You must be signed in to change notification settings - Fork 8
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
Defne public interface for distributed schnorr signature scheme #71
base: master
Are you sure you want to change the base?
Defne public interface for distributed schnorr signature scheme #71
Conversation
fn compute_final_signature( | ||
local_sigs: &HashSet<LocalSig>, | ||
threshold: usize, | ||
) -> Result<Signature, Error>; |
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.
I don't have confidence whether the arguments are enough or not.
@Yamaguchi Can you check it?
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 need to have signer index to calculate Lagrange interpolation. I will add it into LocalSig.
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.
To compute Signatre.r_x, a set of BlockVSS is needed.
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 true. I will add it.
use std::collections::HashSet; | ||
use std::str::FromStr; | ||
|
||
struct MockImpl; |
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 struct should be public.
use secp256k1::{constants, SecretKey}; | ||
use std::ops::Deref; | ||
|
||
pub enum Error { |
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.
Why define these errors here, not in errors.rs?
} | ||
|
||
pub trait KeyGenerationProtocol { | ||
fn create_node_vss( |
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.
I prefer the return type of these functions is Result<...., Error> even if it does not return error now.
threshold: usize, | ||
) -> HashSet<NodeVSS>; | ||
fn verify_node_vss(vss: &NodeVSS) -> Result<(), Error>; | ||
fn aggregate_node_vss(vss_set: &HashSet<NodeVSS>) -> NodeShare; |
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 should return Result<NodeShare, Error>
} | ||
|
||
fn create_local_sig( | ||
message: &[u8; 32], |
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.
Use Message type.
Some warnings reported when cargo build or cargo test. |
fix #70