-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add CLSAG module for signature creation and verification #14
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.
Good work! I am curious about why you decided to extract sign and verify into separate modules. It's probably just a matter of style, but I think we haven't usually done it like that.
msg: &[u8; 32], | ||
signing_key: Scalar, | ||
signing_key_index: usize, | ||
H_p_pk: EdwardsPoint, | ||
alpha: Scalar, | ||
ring: &[EdwardsPoint; RING_SIZE], | ||
commitment_ring: &[EdwardsPoint; RING_SIZE], | ||
fake_responses: [Scalar; RING_SIZE - 1], | ||
z: Scalar, | ||
pseudo_output_commitment: EdwardsPoint, | ||
L: EdwardsPoint, | ||
R: EdwardsPoint, | ||
I: EdwardsPoint, |
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 really is a lot of arguments, Clippy! It would be good to document exactly what each of these arguments is, especially if this is to be a public API.
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. Recorded a ticket here: #25
@@ -27,6 +27,7 @@ strict_encoding_support = ["strict_encoding"] | |||
hex = "0.4.3" | |||
hex-literal = "0.3.1" | |||
keccak-hash = "0.7.0" |
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'm not against adding tiny-keccak
but you could just use keccak-hash
like we did for bulletproof. keccak-hash
uses tiny-keccak
under the hood anyway, so the dependency footprint would actually be the same. I don't know.
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.
Yeah, I am thinking of throwing out keccak-hash
but because the API is actually inconvenient for our usecase and a utility function that hashes a single slice can easily be added locally.
See #12.
Yeah just to keep things organized really. Wanted to reduce the lines of code in a single module. |
No description provided.