-
Notifications
You must be signed in to change notification settings - Fork 2
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
Simple Example - Centralized Telescope with BLS #120
base: main
Are you sure you want to change the base?
Conversation
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.
LGTM!
I think you can simplify a bit the code (replacing the if lets), optimize it a bit (you can use only one hashmap) and a couple of question on visibility and var name. :)
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.
Very good start. One request: let's not commit to the main branch directly. If the element size needs to be changed, it can be done in this PR.
…o-scaling/alba into curiecrypt/simple-example
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.
LGTM
You could add a some more comments on the functions, but that can be done in a separate PR.
Co-authored-by: Tolik Zinovyev <aszinovyev@gmail.com>
// Create the telescope structure | ||
let alba = Telescope::create(soundness_param, completeness_param, set_size, lower_bound); | ||
|
||
let mut public_key_list: Vec<(usize, PublicKey)> = Vec::with_capacity(nb_elements as usize); |
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.
The usize
variable always contains its own index, so it is redundant and can be removed.
if let Some(signature_entry) = signatures.iter().find(|entry| entry.signature == *sig) { | ||
if public_key_list | ||
.iter() | ||
.any(|entry| entry.0 == signature_entry.index) |
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 think this logic wouldn't work if you pass signatures to this function that are not index 0, 1, ..., n_p-1. That's why in my document Aggregate gets triples (i, s_i, w_i). In particular, the index i of the signature is included.
Also, public_key_list
seems redundant in this function.
Content
This PR includes a basic example of integrating a multi-signature scheme into the Centralized Telescope.
It consists of the functionality
KeyGen
,Sign
,Aggregate
, andVerify
proposed in the Definition 3. of Alba Definitions by @tolikzinovyev.Pre-submit checklist
Issue(s)
Relates to #114