diff --git a/elliptic-curve/src/dev.rs b/elliptic-curve/src/dev.rs index 98d4c8e1d..5d1eb8887 100644 --- a/elliptic-curve/src/dev.rs +++ b/elliptic-curve/src/dev.rs @@ -473,6 +473,14 @@ impl AffineCoordinates for AffinePoint { unimplemented!(); } + fn y(&self) -> FieldBytes { + unimplemented!(); + } + + fn x_is_odd(&self) -> Choice { + unimplemented!(); + } + fn y_is_odd(&self) -> Choice { unimplemented!(); } diff --git a/elliptic-curve/src/point.rs b/elliptic-curve/src/point.rs index ee4eded44..2eec19245 100644 --- a/elliptic-curve/src/point.rs +++ b/elliptic-curve/src/point.rs @@ -22,12 +22,18 @@ pub type ProjectivePoint = ::ProjectivePoint; /// Access to the affine coordinates of an elliptic curve point. // TODO: use zkcrypto/group#30 coordinate API when available pub trait AffineCoordinates { - /// Field element representation. + /// Field element representation with curve-specific serialization/endianness. type FieldRepr: AsRef<[u8]>; /// Get the affine x-coordinate as a serialized field element. fn x(&self) -> Self::FieldRepr; + /// Get the affine y-coordinate as a serialized field element. + fn y(&self) -> Self::FieldRepr; + + /// Is the affine x-coordinate odd? + fn x_is_odd(&self) -> Choice; + /// Is the affine y-coordinate odd? fn y_is_odd(&self) -> Choice; }