diff --git a/crates/zkvm/lib/src/bls12381.rs b/crates/zkvm/lib/src/bls12381.rs index 0839e4050b..0040527553 100644 --- a/crates/zkvm/lib/src/bls12381.rs +++ b/crates/zkvm/lib/src/bls12381.rs @@ -56,10 +56,6 @@ impl AffinePoint for Bls12381Point { } } - fn complete_add_assign(&mut self, other: &Self) { - self.weierstrass_add_assign(other); - } - fn add_assign(&mut self, other: &Self) { let a = self.limbs_mut(); let b = other.limbs_ref(); @@ -68,6 +64,10 @@ impl AffinePoint for Bls12381Point { } } + fn complete_add_assign(&mut self, other: &Self) { + self.weierstrass_add_assign(other); + } + fn double(&mut self) { let a = self.limbs_mut(); unsafe { diff --git a/crates/zkvm/lib/src/bn254.rs b/crates/zkvm/lib/src/bn254.rs index 2d94561022..b1bc88d0d8 100644 --- a/crates/zkvm/lib/src/bn254.rs +++ b/crates/zkvm/lib/src/bn254.rs @@ -49,10 +49,6 @@ impl AffinePoint for Bn254Point { } } - fn complete_add_assign(&mut self, other: &Self) { - self.weierstrass_add_assign(other); - } - fn add_assign(&mut self, other: &Self) { let a = self.limbs_mut(); let b = other.limbs_ref(); @@ -61,6 +57,10 @@ impl AffinePoint for Bn254Point { } } + fn complete_add_assign(&mut self, other: &Self) { + self.weierstrass_add_assign(other); + } + fn double(&mut self) { let a = self.limbs_mut(); unsafe { diff --git a/crates/zkvm/lib/src/secp256k1.rs b/crates/zkvm/lib/src/secp256k1.rs index 24ba13651a..0aa0b094d5 100644 --- a/crates/zkvm/lib/src/secp256k1.rs +++ b/crates/zkvm/lib/src/secp256k1.rs @@ -51,10 +51,6 @@ impl AffinePoint for Secp256k1Point { } } - fn complete_add_assign(&mut self, other: &Self) { - self.weierstrass_add_assign(other); - } - fn add_assign(&mut self, other: &Self) { let a = self.limbs_mut(); let b = other.limbs_ref(); @@ -63,6 +59,10 @@ impl AffinePoint for Secp256k1Point { } } + fn complete_add_assign(&mut self, other: &Self) { + self.weierstrass_add_assign(other); + } + fn double(&mut self) { match &mut self.0 { WeierstrassPoint::Infinity => (), @@ -71,4 +71,4 @@ impl AffinePoint for Secp256k1Point { }, } } -} +} \ No newline at end of file diff --git a/crates/zkvm/lib/src/secp256r1.rs b/crates/zkvm/lib/src/secp256r1.rs index cb2a1f882f..147b1c9687 100644 --- a/crates/zkvm/lib/src/secp256r1.rs +++ b/crates/zkvm/lib/src/secp256r1.rs @@ -51,10 +51,6 @@ impl AffinePoint for Secp256r1Point { } } - fn complete_add_assign(&mut self, other: &Self) { - self.weierstrass_add_assign(other); - } - fn add_assign(&mut self, other: &Self) { let a = self.limbs_mut(); let b = other.limbs_ref(); @@ -63,6 +59,10 @@ impl AffinePoint for Secp256r1Point { } } + fn complete_add_assign(&mut self, other: &Self) { + self.weierstrass_add_assign(other); + } + fn double(&mut self) { match &mut self.0 { WeierstrassPoint::Infinity => (),