Some comments explaining some of the constants in the code.

This commit is contained in:
Gregory Maxwell
2015-02-02 01:47:23 +00:00
parent f88343f2eb
commit 6efd6e7777
7 changed files with 32 additions and 0 deletions

View File

@@ -34,6 +34,7 @@
static void secp256k1_fe_verify(const secp256k1_fe_t *a) {
const uint64_t *d = a->n;
int m = a->normalized ? 1 : 2 * a->magnitude, r = 1;
/* secp256k1 'p' value defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. */
r &= (d[0] <= 0xFFFFFFFFFFFFFULL * m);
r &= (d[1] <= 0xFFFFFFFFFFFFFULL * m);
r &= (d[2] <= 0xFFFFFFFFFFFFFULL * m);