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
8235710: Remove the legacy elliptic curves #289
Conversation
👋 Welcome back ascarpino! A progress list of the required criteria for merging this PR into |
@ascarpino The following labels will be automatically applied to this pull request: When this pull request is ready to be reviewed, an RFR email will be sent to the corresponding mailing lists. If you would like to change these labels, use the |
/csr |
@ascarpino the issue for this pull request, JDK-8235710, already has an approved CSR request: JDK-8251547 |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@ascarpino This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for more details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 51 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build changes look good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new IllegalStateException(
new InvalidAlgorithmParameterException(
"Curve not supported: Private: " +
((privNC != null) ? privNC.toString() : " unknown") +
", PublicKey:" +
((pubNC != null) ? pubNC.toString() : " unknown")));
src/jdk.crypto.ec/share/classes/sun/security/ec/ECDHKeyAgreement.java
Outdated
Show resolved
Hide resolved
fix supportedcurves in SunEC
@@ -642,8 +633,7 @@ jdk.disabled.namedCurves = secp112r1, secp112r2, secp128r1, secp128r2, \ | |||
# | |||
# | |||
jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \ | |||
RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, \ | |||
include jdk.disabled.namedCurves | |||
RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jdk.disabled.namedCurves
still exists. If someone decides to add a curve there, shouldn't it be also disabled here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jdk.disabled.namedCurves is commented out and I don't think it's good for every operation disabled algorithms call to check an empty property. The description for the disabledAlgorithm properties say you have to use "include", so I don't think it is necessary to we keep it active..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just think this is an unnecessary behavior change. After all, the purpose of jdk.disabled.namedCurves
is to be included in other disabledAlgorithms properties.
No strong opinion on this. Please decide yourself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand what you are saying. The property only existed because there were so many curves that would have overwhelmed the disabledAlgorithms. I also don't like making this a permanent addition to the disabledAlgorithm properties. It's possible we may remove the property in the future as it's likely unnecessary going forward.
/integrate |
@ascarpino Since your change was applied there have been 51 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 0b83fc0. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Mailing list message from Magnus Ihse Bursie on security-dev: Sorry for being late on this one (I'm working through a huge backlog), ENABLE_INTREE_EC is still present in spec.gmk. And it is still checked Anthony, can you please open a new JBS issue to fix the remaining cleanup? /Magnus On 2020-09-22 15:23, Erik Joelsson wrote: |
I opened https://bugs.openjdk.java.net/browse/JDK-8255530 for the remaining cleanup. |
I have the change in a workspace, just hadn't created the bug yet.. thanks |
This change removes the native elliptic curves library code; as well as, and calls to that code, tests, and files associated with those libraries. The makefiles have been changed to remove from all source builds of the ec code. The SunEC system property is removed and java.security configurations changed to reflect the removed curves.
This will remove the following elliptic curves from SunEC: secp112r1, secp112r2, secp128r1, secp128r2, secp160k1, secp160r1, secp160r2, secp192k1, secp192r1, secp224k1, secp224r1, secp256k1, sect113r1, sect113r2, sect131r1, sect131r2, sect163k1, sect163r1, sect163r2, sect193r1, sect193r2, sect233k1, sect233r1, sect239k1, sect283k1, sect283r1, sect409k1, sect409r1, sect571k1, sect571r1, X9.62 c2tnb191v1, X9.62 c2tnb191v2, X9.62 c2tnb191v3, X9.62 c2tnb239v1, X9.62 c2tnb239v2, X9.62 c2tnb239v3, X9.62 c2tnb359v1, X9.62 c2tnb431r1, X9.62 prime192v2, X9.62 prime192v3, X9.62 prime239v1, X9.62 prime239v2, X9.62 prime239v3, brainpoolP256r1 brainpoolP320r1, brainpoolP384r1, brainpoolP512r1
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/289/head:pull/289
$ git checkout pull/289