ZenGo-X / curv

Rust language general purpose elliptic curve cryptography.
MIT License
264 stars 111 forks source link

Choices between G1Point and Point<Bls12_381_1> in v0.10.0 #175

Open traffictse opened 1 year ago

traffictse commented 1 year ago

I noticed that in Module bls12_381, the implementation of trait ECPoint for struct G1Point is kept from v0.7.0 till the current v0.10.0, while since v0.8.0, the wrapper Point<E: Curve> has been recommended instead of the low-level trait ECPoint. Also, the significant function hash_to_curve still outputs a struct G1Point.

Seemingly, there is some convenience when choosing Point<Bls12_381_1> over G1Point. For example, the traits Serialize and Deserialize are implemented for Point<E: Curve> but not G1Point.

I am wondering if there is any reason to keep the specific notation G1Point (as well as the implementation of trait ECPoint for it) for BLS12-381 when there is a generic struct Point<E: Curve> (namely Point<Bls12_381_1> as an instantiation)?