Skip to content

8340327: A common framework to support public key algorithms with standard parameter sets#2950

Draft
GoeLin wants to merge 3 commits into
openjdk:masterfrom
GoeLin:gpb_8340327-fix2
Draft

8340327: A common framework to support public key algorithms with standard parameter sets#2950
GoeLin wants to merge 3 commits into
openjdk:masterfrom
GoeLin:gpb_8340327-fix2

Conversation

@GoeLin

@GoeLin GoeLin commented Jun 29, 2026

Copy link
Copy Markdown
Member

This is needed to backport the new Quantum-Resistant [1] algorithms.

Patching the original change to 21 first causes two issues:
It does not apply clean to SignatureUtil as
https://bugs.openjdk.org/browse/JDK-8302233: "HSS/LMS: keytool and jarsigner changes"
is not in 21.
I omit the patch to getDefaultSigAlgForKey() that modifies the
default entry of a switch.
The omitted patch just undoes the change of 8302233 for KEM.
Thus the patch is not necessary in 21 as long as 8302233 is not backported.

Further I had to adapt the @modules in test NamedEdDSA.java.
After 21 ec has been moved into java.base.


Then, the change needs a larger rework as https://bugs.openjdk.org/browse/JDK-8318096: "Introduce AsymmetricKey interface with a getParams method" is not in 21. This has a CSR and has not been backported by Oracle, so I don't want to backport it as prereq change. Also, adding an interface and new methods breaks the jck tests.

I replaced the instanceof AsymmetricKey statements with checks for PrivateKey or PublicKey.
I add a method getParams to KeyUtil.java that searches with reflection for the getParams() method of the Key and calls that. I need a privileged action to make the method accessible.
I added a test using a security manager. The tests needs no extra privileges once I add the privileged action.



Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8340327 needs maintainer approval

Issue

  • JDK-8340327: A common framework to support public key algorithms with standard parameter sets (Enhancement - P3)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/2950/head:pull/2950
$ git checkout pull/2950

Update a local copy of the PR:
$ git checkout pull/2950
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/2950/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2950

View PR using the GUI difftool:
$ git pr show -t 2950

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/2950.diff

@GoeLin GoeLin changed the title Gpb 8340327 fix2 backport 3f53d571343792341481f4d15970cdc0bcd76a5e Jun 29, 2026
@bridgekeeper

bridgekeeper Bot commented Jun 29, 2026

Copy link
Copy Markdown

👋 Welcome back goetz! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Jun 29, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot changed the title backport 3f53d571343792341481f4d15970cdc0bcd76a5e 8340327: A common framework to support public key algorithms with standard parameter sets Jun 29, 2026
@openjdk

openjdk Bot commented Jun 29, 2026

Copy link
Copy Markdown

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk Bot added the backport Port of a pull request already in a different code base label Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base

Development

Successfully merging this pull request may close these issues.

1 participant