Skip to content

Commit b6f76e8

Browse files
committed
Fix SAKKE curve parameters
1 parent 3b7d0d5 commit b6f76e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/main/java/org/bouncycastle/crypto/params/SAKKEPublicKeyParameters.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ public class SAKKEPublicKeyParameters
9191
* Uses parameters from RFC 6509 Appendix A.
9292
*/
9393
private static final ECCurve.Fp curve = new ECCurve.Fp(
94-
p, // Prime p
95-
BigInteger.valueOf(-3).mod(p), // a = -3
96-
BigInteger.ZERO, // ,
97-
g, // Order of the subgroup (from RFC 6509)
98-
BigInteger.ONE // Cofactor = 1
94+
p, // Prime p
95+
p.subtract(BigInteger.valueOf(3)), // a = -3
96+
BigInteger.ZERO,
97+
q, // Order of the subgroup (from RFC 6509)
98+
BigInteger.valueOf(4) // Cofactor = 1
9999
);
100100

101101
/**

0 commit comments

Comments
 (0)