Crypto: Disallow DSA-SHA1 signing k=q

reported by: bottomlineit.co.za
This commit is contained in:
zzz
2026-04-25 17:47:20 -04:00
parent 16a188996f
commit bb49736b33
+1 -1
View File
@@ -406,7 +406,7 @@ public final class DSAEngine {
boolean ok;
do {
k = new NativeBigInteger(160, _context.random());
ok = k.compareTo(CryptoConstants.dsaq) != 1;
ok = k.compareTo(CryptoConstants.dsaq) < 0;
ok = ok && !k.equals(BigInteger.ZERO);
//System.out.println("K picked (ok? " + ok + "): " + k.bitLength() + ": " + k.toString());
} while (!ok);