plume-sig / zk-nullifier-sig

Implementation of PLUME: nullifier friendly signature scheme on ECDSA
MIT License
128 stars 22 forks source link

<./rust-arkworks> is over generalized #88

Open skaunov opened 5 months ago

skaunov commented 5 months ago

The crate is quite complex and I fail to see any reason behind it. It offers a complex trait, but its type system requires further development to be really useful. (And error handling isn't well-compatible with other crates.) It's very generic over curves and its generators, but the only curve other implementations support is deprecated, and I can't find a case when another curve would be plugged into it.

I well might be just fail to see the big idea though. @weijiekoh , could you explain these since I struggled to pick-up the reasons from code but it doesn't add up well in my mind. =(

My current proposal is to ditch the defined trait, simplify few places, and decide on the level of generality. If we don't expect no other curves for PLUME in foreseeable future then further simplify to make it concrete, if do expect then [try] to preserve this part. [try]: deprecation of the curve definition makes this more a grounding and reference work (than just use) until the whole thing isn't maintained to be compatible with current arkworks version

skaunov commented 5 months ago

(tried to make simplification while straightening Error, but sunk there, the last straw was separate struct Parameters)

weijiekoh commented 5 months ago

Hi! The original code I wrote was meant to be a prototype, and I didn’t have production use in mind. As such it would be best to decide how to move forward on your own terms and there is no need to follow my code :)

skaunov commented 5 months ago

(just a small note as reminder when this will be in progress)

feels like affine_to_bytes should return [u8; 33]