boltlabs-inc / tss-ecdsa

An implementation of a threshold ECDSA signature scheme
Other
12 stars 5 forks source link

338 CurvePoint API #476

Closed hridambasu closed 11 months ago

hridambasu commented 1 year ago

Closes #338

hridambasu commented 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 } }

marsella commented 11 months ago

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.