Skip to content

replace secpr5121 with secp256r1 for default ECGenParameterSpec #296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- release 2.6.1

- enhanced security: replace secpr5121 with secp256r1 for default ECGenParameterSpec
- enhanced logging: log detailed information and stack trace health check failure
- enhanced logging: Netty channel handler exception will be logged only when:
1. run with -debug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@
}

public static KeyPair generateKeyPairEC() throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidAlgorithmParameterException {
return generateKeyPair("EC", 512);
return generateKeyPair("EC", 256);// secp256r1 , secp384r1, secp521r1
}

/**
Expand All @@ -490,7 +490,7 @@
switch (keyfactoryAlgorithm.toUpperCase()) {
case "RSA" -> {
kpg = KeyPairGenerator.getInstance("RSA");
kpg.initialize(size);

Check failure

Code scanning / CodeQL

Use of a cryptographic algorithm with insufficient key size High

This
key size
is less than the recommended key size of 2048 bits.
}
case "EC" -> {
kpg = KeyPairGenerator.getInstance("EC");
Expand Down