Skip to content

Commit ae7bb57

Browse files
committed
field.h: improve doc of fe_equal_var
- `_fe_equal` requires both the inputs magnitude to be 1 - `_fe_equal_var` requires only the first input magnitude to be 1
1 parent a1102b1 commit ae7bb57

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/field.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,13 @@ static int secp256k1_fe_is_zero(const secp256k1_fe *a);
6464
/** Check the "oddness" of a field element. Requires the input to be normalized. */
6565
static int secp256k1_fe_is_odd(const secp256k1_fe *a);
6666

67-
/** Compare two field elements. Requires magnitude-1 inputs. */
67+
/** Compare two field elements. Requires both the inputs to have magnitude = 1.
68+
* i.e. a->magnitude = 1 and b->magnitude = 1 */
6869
static int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b);
6970

70-
/** Same as secp256k1_fe_equal, but may be variable time. */
71+
/** Same as secp256k1_fe_equal, but may be variable time.
72+
* Requires only the first input to have magnitude = 1.
73+
* i.e. a->magnitude = 1 */
7174
static int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b);
7275

7376
/** Compare two field elements. Requires both inputs to be normalized */

0 commit comments

Comments
 (0)