Closed hridambasu closed 11 months ago
@marsella From CurvePoint for EncodedPoint Or From CurvePoint for ProjectivePoint like impl From CurvePoint for ProjectivePoint { fn from(value: CurvePoint) -> ProjectivePoint { value.0 } }
The code we're trying to simplify is
VerifyingKey::from_encoded_point(&public_key_point.0.to_affine().into())
If you write a function to get ProjectivePoint
, then this will look something like:
VerifyingKey::from_encoded_point(&public_key_point.into().to_affine().into())
If you write a function to get EncodedPoint
, then this will look like:
VerifyingKey::from_encoded_point(&public_key_point.into())
I prefer the latter because it depends less on mucking around with k256-specific representation changes.
Closes #338