Skip to content
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

Merged
merged 2 commits into from
May 17, 2021
Merged

Conversation

thomaseizinger
Copy link

No description provided.

@thomaseizinger thomaseizinger changed the base branch from main to ecdh_recover_mask May 14, 2021 01:05
Copy link

@luckysori luckysori left a 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.

Comment on lines +18 to +30
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,

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.

Copy link
Author

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"

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.

Copy link
Author

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.

Base automatically changed from ecdh_recover_mask to main May 17, 2021 02:34
@thomaseizinger
Copy link
Author

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.

Yeah just to keep things organized really. Wanted to reduce the lines of code in a single module.

@thomaseizinger thomaseizinger merged commit e23f2b5 into main May 17, 2021
@thomaseizinger thomaseizinger deleted the clsag branch May 17, 2021 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants