Skip to content

Commit

Permalink
A small simplification for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdettman committed Mar 26, 2015
1 parent 2fcfcb4 commit 338c2db
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ private DSAParameters generateParameters_FIPS186_3()
BigInteger U = new BigInteger(1, output).mod(ONE.shiftLeft(N - 1));

// 7. q = 2^(N–1) + U + 1 – ( U mod 2).
BigInteger q = ONE.shiftLeft(N - 1).add(U).add(ONE).subtract(U.mod(TWO));
BigInteger q = U.setBit(0).setBit(N - 1);

// 8. Test whether or not q is prime as specified in Appendix C.3.
// TODO Review C.3 for primality checking
Expand Down

0 comments on commit 338c2db

Please sign in to comment.