diff --git a/src/circuit/gadget/ecc.rs b/src/circuit/gadget/ecc.rs index 23efe03f..d20ac5c2 100644 --- a/src/circuit/gadget/ecc.rs +++ b/src/circuit/gadget/ecc.rs @@ -459,7 +459,7 @@ mod tests { // Test complete addition { super::chip::add::tests::test_add( - chip.clone(), + chip, layouter.namespace(|| "complete addition"), &zero, p_val, diff --git a/src/circuit/gadget/ecc/chip.rs b/src/circuit/gadget/ecc/chip.rs index c7d702ea..5d95a272 100644 --- a/src/circuit/gadget/ecc/chip.rs +++ b/src/circuit/gadget/ecc/chip.rs @@ -22,9 +22,9 @@ pub(super) mod witness_point; #[derive(Clone, Debug)] pub struct EccPoint { /// x-coordinate - pub x: CellValue, + x: CellValue, /// y-coordinate - pub y: CellValue, + y: CellValue, } impl EccPoint { @@ -41,6 +41,16 @@ impl EccPoint { _ => None, } } + /// The cell containing the affine short-Weierstrass x-coordinate, + /// or 0 for the zero point. + pub fn x(&self) -> CellValue { + self.x + } + /// The cell containing the affine short-Weierstrass y-coordinate, + /// or 0 for the zero point. + pub fn y(&self) -> CellValue { + self.y + } } /// Configuration for the ECC chip