-
Notifications
You must be signed in to change notification settings - Fork 145
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 BLS12-381 #162
Add BLS12-381 #162
Conversation
@kilic just for the record, I was trying to generate simple proof with bls12-381 with this branch and still getting an error:
and
|
@dragan2234 both |
@kilic This is my Cargo.toml:
I double-checked the files and it's the same as in this PR. SerdeObject for groups is done in macro in
it also says:
which resolves to:
Line:
where Params is:
|
@dragan2234 On my end I'm able to run
|
@kilic thanks! I didn't change the dependency in other crates, the bug is fixed now (still can't produce proofs, but I think it's not related to the curve this time, but my circuit) |
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.
At last!! Thanks for the work @kilic :)
LGTM 👍
@@ -361,6 +362,16 @@ pub(crate) fn impl_field(input: TokenStream) -> TokenStream { | |||
}); | |||
(borrow as u8) & 1 == 1 | |||
} | |||
|
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.
/// Returns whether or not this element is strictly lexicographically | |
/// larger than its negation. |
) => { | ||
|
||
|
||
// **Compressed formats**: |
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 may be good to keep these docs in src/derive/serde.rs
@@ -68,412 +61,125 @@ macro_rules! new_curve_impl { | |||
$constant_b:expr, | |||
$curve_id:literal, | |||
$hash_to_curve:expr, | |||
$flag_config:expr, | |||
standard_sign |
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.
Should we add implementation for the non-standard sign as well?
Ready to merge? @kilic |
758cbf9
Another take of BLS12 addition with a PR chain #154 #160 #161.
This PR also introduces compile time flag configuration to follow zcash serialization for BLS12381. However it leaves uncompressed encoding as it was, without usage of flags.