File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1611,10 +1611,10 @@ p256_base_mult:
16111611 *
16121612 * Returns t , a random value th at is nonzero mod n , in shares.
16131613 *
1614- * This follows a modified version of the method in FIPS 186 - 4 sections B. 4 . 1
1615- * and B. 5 . 1 for generation of secret scalar values d and k. The computation
1616- * in FIPS 186 - 4 is:
1617- * seed = RBG(seedlen) // seedlen >= 320
1614+ * This follows a modified version of the method in FIPS 186 - 5 sections A. 2 . 2
1615+ * and A. 3 . 2 for generation of secret scalar values d and k. The computation
1616+ * in FIPS 186 - 5 is:
1617+ * seed = RBG(seedlen) // seedlen >= 256
16181618 * return (seed mod (n - 1 )) + 1
16191619 *
16201620 * The important features here are th at (a) the seed is at least 64 bits longer
@@ -1924,7 +1924,7 @@ boolean_to_arithmetic:
19241924 * d = (d0 + d1) mod n
19251925 * ...where n is the curve order.
19261926 *
1927- * This implementation follows FIPS 186 - 4 section B. 4 . 1 , where we
1927+ * This implementation follows FIPS 186 - 5 section A. 2 . 2 , where we
19281928 * generate d using N + 64 random bits ( 320 bits in this case) as a seed. But
19291929 * while FIPS computes d = (seed mod (n - 1 )) + 1 to ensure a nonzero key , we
19301930 * instead just compute d = seed mod n. The caller MUST ensure th at if this
Original file line number Diff line number Diff line change 1313 *
1414 * Returns t , a random value th at is nonzero mod n , in shares.
1515 *
16- * This follows a modified version of the method in FIPS 186 - 4 sections B. 4 . 1
17- * and B. 5 . 1 for generation of secret scalar values d and k. The computation
18- * in FIPS 186 - 4 is:
19- * seed = RBG(seedlen) // seedlen >= 448
16+ * This follows a modified version of the method in FIPS 186 - 5 sections A. 2 . 2
17+ * and A. 3 . 2 for generation of secret scalar values d and k. The computation
18+ * in FIPS 186 - 5 is:
19+ * seed = RBG(seedlen) // seedlen >= 384
2020 * return (seed mod (n - 1 )) + 1
2121 *
2222 * The important features here are th at (a) the seed is at least 64 bits longer
You can’t perform that action at this time.
0 commit comments