mit-dci / zksigma

A library for generating non-interactive proofs of knowledge without trusted setup
MIT License
29 stars 10 forks source link

Moved ECPoint.Add, .Mult, .Sub and .Neg to ZKCurveParams #17

Closed gertjaap closed 5 years ago

gertjaap commented 5 years ago

This allows for using zkpcp.Add(p1, p2) in stead of p1.Add(p2, zkpcp) which looks weird.

Future improvement might be to include a pointer to zkpcp in ECPoint, given that a point can only exist on a certain curve - but given that ECPoints are transferred over the line when doing RPC, this would result in empty zkpcp references on deserialization and would need further optimizations / mitigations for that fact which don't seem to add value right now.