BLS signatures on Arkworks #3
Replies: 2 comments 2 replies
-
Hey! Congrats on the fantastic crate, and thank you for the wonderful feedback! Let me go over your points one-by-one: (1): (2) Usage of (3) (4) Field elements Separately, I think you shouldn't have to implement point deserialization, because this is again handled by our serialization traits. |
Beta Was this translation helpful? Give feedback.
-
Hi! Thanks for the detailed pointers! I was able to put (1) and (4) to good use! See this PR which simplifies the serialization logic by a mile, and this one which completely removes It was a bit difficult to wrap my head around the need for a number of limbs at compile time for Arkworks' While refactoring I found two potential things to improve inside of Arkworks itself (existing tests told me when behavior changed as I switched from what I had before to using more Arkworks types and helpers):
|
Beta Was this translation helpful? Give feedback.
-
Hello! I recently published a new Rust package implementing BLS signatures based on Arkworks: https://github.com/ArnaudBrousseau/bls_on_arkworks
Wanted to drop by here and say thank you for a really cool set of crates; couldn't have written this without the foundation you've built here! Here are a few spots where using Arkworks felt harder than it should have been:
BigInt
type in Arkworks doesn't support multiplication modulo a number or clean import/export to bytes so I found myself usingnum-bigint
instead. I haven't tried too hard so it's possible I'm simply not seeing how to use it properly. Advice appreciated if you have any!MapToCurveBasedHasher
. This snippet is the result of lots of trial and error. In the the end looking the the Arkworks tests helped (here). More example in docs could've helped maybe? Not sure.ark_ec::pairing::PairingOutput
has a function named::zero
which maps to "one"! That was a little surprising (see where this is used: link)And here are a few spots where Arkworks really shines:
hash_to_point
implementation, while hard to cobble together, is very succinct and clear: linkget_ys_from_x_unchecked
was just was I needed to implement point deserialization (see here)new_unchecked
/is_on_curve
/is_in_correct_subgroup_assuming_on_curve
were perfect for my use case. Was able to bubble up granular errors thanks to these, without re-implementing any arithmetic at all! See thisIf some of the things I talk about in the "could do better" part are easy PRs to make I'd be down to contribute potentially!
Beta Was this translation helpful? Give feedback.
All reactions