From c015ea331674368461ff466bc7cbc69806f61628 Mon Sep 17 00:00:00 2001 From: echo Date: Sat, 27 May 2023 01:01:40 +0800 Subject: [PATCH] Fix comments (#652) --- ec/src/models/short_weierstrass/mod.rs | 2 +- ec/src/models/short_weierstrass/serialization_flags.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ec/src/models/short_weierstrass/mod.rs b/ec/src/models/short_weierstrass/mod.rs index 03183a8ee..20bf7029c 100644 --- a/ec/src/models/short_weierstrass/mod.rs +++ b/ec/src/models/short_weierstrass/mod.rs @@ -65,7 +65,7 @@ pub trait SWCurveConfig: super::CurveConfig { /// Check if the provided curve point is in the prime-order subgroup. /// /// The default implementation multiplies `item` by the order `r` of the - /// prime-order subgroup, and checks if the result is one. + /// prime-order subgroup, and checks if the result is zero. /// Implementors can choose to override this default impl /// if the given curve has faster methods /// for performing this check (for example, via leveraging curve diff --git a/ec/src/models/short_weierstrass/serialization_flags.rs b/ec/src/models/short_weierstrass/serialization_flags.rs index 13eb1c8de..c2c9c0b41 100644 --- a/ec/src/models/short_weierstrass/serialization_flags.rs +++ b/ec/src/models/short_weierstrass/serialization_flags.rs @@ -5,11 +5,11 @@ use ark_serialize::Flags; /// The default flags (empty) should not change the binary representation. #[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum SWFlags { - /// Represents a point with positive y-coordinate by setting the MSB to 1. + /// Represents a point with positive y-coordinate by setting all bits to 0. YIsPositive = 0, /// Represents the point at infinity by setting the setting the last-but-one bit to 1. PointAtInfinity = 1 << 6, - /// Represents a point with negative y-coordinate by setting all bits to 0. + /// Represents a point with negative y-coordinate by setting the MSB to 1. YIsNegative = 1 << 7, }