Skip to content

Commit cda9763

Browse files
committed
Add some more comments around verification fields
1 parent a746648 commit cda9763

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/field.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@
3535
* In VERIFY mode, they are materialzed explicitly as fields in the struct,
3636
* allowing run-time verification of these properties. In that case, the
3737
* field implementation also provides a secp256k1_fe_check routine to
38-
* verify that these fields match the run-time value. */
38+
* verify that these fields match the run-time value.
39+
*
40+
* See the code at the bottom of field_impl.h for the exact rules about
41+
* propagation of these fields, and checking of them. */
3942
#ifdef VERIFY
4043
# define SECP256K1_FE_VERIFY_FIELDS \
4144
int magnitude; \

src/field_impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ static int secp256k1_fe_sqrt(secp256k1_fe *r, const secp256k1_fe *a) {
136136
return secp256k1_fe_equal(&t1, a);
137137
}
138138

139+
/**************** PROPAGATION/CHECKING OF VERIFICATION FIELDS ************/
140+
139141
static void secp256k1_fe_impl_normalize(secp256k1_fe *r);
140142
SECP256K1_INLINE static void secp256k1_fe_normalize(secp256k1_fe *r) {
141143
secp256k1_fe_impl_normalize(r);

0 commit comments

Comments
 (0)