Closed redshiftzero closed 8 months ago
What's the difference between ops and projective/ops?
Currently nothing, my thinking was to mirror the structure from the previous code (now under the arkworks
feature) where we have a projective.rs
and affine.rs
for implementing arithmetic operations on Element
and AffineElement
respectively
It surprises me that the code even compiles; shouldn't Rust complain about there being two implementations of the same trait for Element?
Also, I think we should just not expose arithmetic on Affine. Like, the reason Affine exists is only for compatability with arkworks, and as a "I know what I'm doing" button that people can press to convert from the Affine representation to the Element.
ah, so it compiles because the projective arithmetic implementations in the arkworks
feature are on the Element
that holds an inner arkworks EdwardsProjective
point, but the projective arithmetic implementations added in this PR are on the arkworks independent Element
in the smol_curve
module
Also, I think we should just not expose arithmetic on Affine. Like, the reason Affine exists is only for compatability with arkworks, and as a "I know what I'm doing" button that people can press to convert from the Affine representation to the Element.
agreed 100%!
I think that second Element
type will not exist in the near future, because we won't have the arkworks EdwardsProjective
appear anywhere; instead I imagine we'll just implement the Arkworks traits on Element and AffineElement.
Adding projective operations for #63