Page:Fips186-2-change1.pdf/18

From Wikisource
Jump to navigation Jump to search
This page has been validated.
Step 8. Let W be the integer
W = V0 + V1*2160 + … + Vn-1*2(n-1)*160 + (Vn mod 2b) * 2n*160
and let X = W + 2L-1. Note that 0 ≤ W ≤ 2L-1 and hence 2L-1 ≤ X < 2L.
Step 9. Let c = X mod 2q and set p = X - (c - 1). Note that p is congruent to 1 mod 2q.
Step 10. If p < 2L-1, then go to step 13.
Step 11. Perform a robust primality test on p.
Step 12. If p passes the test performed in step 11, go to step 15.
Step 13. Let counter = counter + 1 and offset = offset + n + 1.
Step 14. If counter ≥ 212 = 4096 go to step 1, otherwise (i.e. if counter < 4096) go to step 7.
Step 15. Save the value of SEED and the value of counter for use in certifying the proper generation of p and q.

15