Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions elliptic-curve/src/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!();
}
Expand Down
8 changes: 7 additions & 1 deletion elliptic-curve/src/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ pub type ProjectivePoint<C> = <C as CurveArithmetic>::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;
}
Expand Down