From 867ada2611cd9e904caa17bfd853a6834e796e5b Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Sun, 18 Feb 2024 21:55:25 +0100 Subject: [PATCH] fix PartialEq for ProjectivePoint --- starknet-curve/src/ec_point.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/starknet-curve/src/ec_point.rs b/starknet-curve/src/ec_point.rs index fa3e2829..0b2fe3fa 100644 --- a/starknet-curve/src/ec_point.rs +++ b/starknet-curve/src/ec_point.rs @@ -167,12 +167,8 @@ impl PartialEq for ProjectivePoint { // An infinity point is not equal to a non-infinity point false } else { - // Calculate the inverse of z-coordinates - let z1inv = self.z.invert().unwrap(); - let z2inv = other.z.invert().unwrap(); - // Compare the affine coordinates after applying the inverse of z-coordinates - self.x * z1inv == other.x * z2inv && self.y * z1inv == other.y * z2inv + self.x * other.z == other.x * self.z && self.y * other.z == other.y * self.z } } }