Skip to content

Add generic ML-DSA KeyFactory and Signature - #1667

Merged
jasonkatonica merged 4 commits into
IBM:mainfrom
jasonkatonica:katonica/issue1567/genericmldsa
Sep 9, 2026
Merged

jasonkatonica merged 4 commits into
IBM:mainfrom
jasonkatonica:katonica/issue1567/genericmldsa

Conversation

@jasonkatonica

@jasonkatonica jasonkatonica commented Jul 22, 2026

Copy link
Copy Markdown
Member

Register a family-level ML-DSA KeyFactory and Signature service so that callers can use the algorithm name ML-DSA without specifying a parameter set, matching the JEP 497 / JDK 24+ API contract.

  • Register PQCKeyFactory$MLDSA and PQCSignatureImpl$MLDSA as the ML-DSA service. Remove the ML-DSA alias from ML-DSA-65 (it was a
    mis-mapping that silently directed all generic lookups to ML-DSA-65).
  • Split the single name field into familyName (returned by getAlgorithm() such as ML-DSA) and paramSetName (the concrete parameter set such as ML-DSA-65). Add getters and setters for these values such that other code can act accordingly.
  • Add tests to BaseTestPQCKeyInterop. These tests cover all three ML-DSA parameter sets via @ParameterizedTest.
  • Add tests to BaseTestPQCKeys. Expand alias coverage to include case variants, OID aliases, and bare OID strings. Added tests for getAlgorithm() family-name correctness for all ML-DSA and ML-KEM aliases
  • Add tests to BaseTestPQCSignature for generic ML-DSA sign/verify tests to all three parameter sets.

Fixes: #1567

Signed-off-by: Jason Katonica katonica@us.ibm.com

Comment thread src/main/java/com/ibm/crypto/plus/provider/MLKEMImpl.java Outdated
Comment thread src/main/java/com/ibm/crypto/plus/provider/MLKEMImpl.java Outdated
Comment thread src/main/java/com/ibm/crypto/plus/provider/MLKEMImpl.java Outdated
Comment thread src/main/java/com/ibm/crypto/plus/provider/MLKEMImpl.java Outdated

@JinhangZhang JinhangZhang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/main/java/com/ibm/crypto/plus/provider/PQCPrivateKey.java Outdated
Comment thread src/main/java/com/ibm/crypto/plus/provider/PQCPublicKey.java Outdated
Comment thread src/main/java/com/ibm/crypto/plus/provider/PQCSignatureImpl.java Outdated
Comment thread src/main/java/com/ibm/crypto/plus/provider/PQCSignatureImpl.java Outdated
Comment thread src/main/java/com/ibm/crypto/plus/provider/PQCSignatureImpl.java Outdated
Comment thread src/test/java/ibm/jceplus/junit/base/BaseTestPQCKeyInterop.java Outdated
Comment thread src/test/java/ibm/jceplus/junit/base/BaseTestPQCKeyInterop.java Outdated
Comment thread src/test/java/ibm/jceplus/junit/base/BaseTestPQCKeyInterop.java Outdated
Comment thread src/test/java/ibm/jceplus/junit/base/BaseTestPQCKeyInterop.java Outdated
Comment thread src/test/java/ibm/jceplus/junit/base/BaseTestPQCSignatureWithAliases.java Outdated
Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: IBM#1567

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
@jasonkatonica
jasonkatonica force-pushed the katonica/issue1567/genericmldsa branch from bb7ac47 to 9427647 Compare September 1, 2026 13:03
Signed-off-by: Jason Katonica <katonica@us.ibm.com>
Signed-off-by: Jason Katonica <katonica@us.ibm.com>
@jasonkatonica
jasonkatonica force-pushed the katonica/issue1567/genericmldsa branch 3 times, most recently from 5b0d00a to a6e6bdd Compare September 1, 2026 15:26
Signed-off-by: Jason Katonica <katonica@us.ibm.com>
@jasonkatonica
jasonkatonica force-pushed the katonica/issue1567/genericmldsa branch from a6e6bdd to f391d23 Compare September 1, 2026 17:33

@KostasTsiounis KostasTsiounis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jasonkatonica
jasonkatonica merged commit b0c1c0b into IBM:main Sep 9, 2026
3 checks passed
@jasonkatonica
jasonkatonica deleted the katonica/issue1567/genericmldsa branch September 9, 2026 17:13
jasonkatonica added a commit to jasonkatonica/OpenJCEPlus that referenced this pull request Sep 9, 2026
Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: IBM#1567

Back-ported from: IBM#1667

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
jasonkatonica added a commit to jasonkatonica/OpenJCEPlus that referenced this pull request Sep 9, 2026
Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: IBM#1567

Back-ported from: IBM#1667

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
jasonkatonica added a commit to jasonkatonica/OpenJCEPlus that referenced this pull request Sep 9, 2026
Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: IBM#1567

Back-ported from: IBM#1667

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
jasonkatonica added a commit to jasonkatonica/OpenJCEPlus that referenced this pull request Sep 9, 2026
Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: IBM#1567

Back-ported from: IBM#1667

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
jasonkatonica added a commit to jasonkatonica/OpenJCEPlus that referenced this pull request Sep 9, 2026
Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: IBM#1567

Back-ported from: IBM#1667

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
jasonkatonica added a commit that referenced this pull request Sep 10, 2026
Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: #1567

Back-ported from: #1667

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
jasonkatonica added a commit that referenced this pull request Sep 10, 2026
Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: #1567

Back-ported from: #1667

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
jasonkatonica added a commit that referenced this pull request Sep 10, 2026
* Add generic ML-DSA KeyFactory and Signature

Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: #1567

Back-ported from: #1667

Signed-off-by: Jason Katonica <katonica@us.ibm.com>

* Conflict resolution

Signed-off-by: Jason Katonica <katonica@us.ibm.com>

---------

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
jasonkatonica added a commit that referenced this pull request Sep 10, 2026
* Add generic ML-DSA KeyFactory and Signature

Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: #1567

Back-ported from: #1667

Signed-off-by: Jason Katonica <katonica@us.ibm.com>

* Fix conflicts

Signed-off-by: Jason Katonica <katonica@us.ibm.com>

---------

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
thu-ibm pushed a commit to thu-ibm/OpenJCEPlus that referenced this pull request Sep 18, 2026
* Add generic ML-DSA KeyFactory and Signature

Register a family-level `ML-DSA` `KeyFactory` and `Signature` service so
that callers can use the algorithm name `ML-DSA` without specifying a
parameter set, matching the JEP 497 / JDK 24+ API contract.

- Register `PQCKeyFactory$MLDSA` and `PQCSignatureImpl$MLDSA` as the
`ML-DSA` service. Remove the `ML-DSA` alias from `ML-DSA-65` (it was a
  mis-mapping that silently directed all generic lookups to ML-DSA-65).
- Split the single `name` field into `familyName` (returned by
`getAlgorithm()` such as `ML-DSA`) and `paramSetName` (the concrete
parameter set such as `ML-DSA-65`). Add getters and setters for these
values such that other code can act accordingly.
- Add tests to `BaseTestPQCKeyInterop`. These tests cover all three
`ML-DSA` parameter sets via `@ParameterizedTest`.
- Add tests to `BaseTestPQCKeys`. Expand alias coverage to include case
variants, OID aliases, and bare OID strings. Added tests for
`getAlgorithm()` family-name correctness for all ML-DSA and ML-KEM
aliases
- Add tests to `BaseTestPQCSignature` for generic `ML-DSA` sign/verify
tests to all three parameter sets.

Fixes: IBM#1567

Signed-off-by: Jason Katonica <katonica@us.ibm.com>

* Address review comments

Signed-off-by: Jason Katonica <katonica@us.ibm.com>

* merge conflicts

Signed-off-by: Jason Katonica <katonica@us.ibm.com>

* Updates from code comments

Signed-off-by: Jason Katonica <katonica@us.ibm.com>

---------

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support generic ML-DSA

4 participants