You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "oscerd (via GitHub)" <gi...@apache.org> on 2026/07/13 09:39:50 UTC
[PR] CAMEL-23846: Camel-PQC - make the NIST parameter set configurable on the endpoint [camel]
oscerd opened a new pull request, #24654:
URL: https://github.com/apache/camel/pull/24654
# CAMEL-23846: Camel-PQC — make the NIST parameter set configurable on the endpoint
## Motivation
The default key material classes hardcode a single parameter set per algorithm — `PQCDefaultMLDSAMaterial`
uses **ML-DSA-65**, ML-KEM defaults to **ML-KEM-512**, Falcon to 512 — and the lifecycle
`generateKeyPair` path only called the 2-arg `KeyLifecycleManager.generateKeyPair(algorithm, keyId)`.
To use any other NIST security level (ML-DSA-44/87, ML-KEM-768/1024, the SLH-DSA and Falcon variants)
users had to register their own `KeyPair`/`Signature`/`KeyGenerator` beans. There was no declarative
endpoint option.
## What this does
Adds a **`parameterSpec`** endpoint option (`@UriParam`, label `advanced`).
- **`PQCParameterSpecResolver`** (new) maps an algorithm + parameter-set name to the BouncyCastle
`AlgorithmParameterSpec`, covering **16 algorithms**: MLDSA, SLHDSA, FALCON, DILITHIUM, SPHINCSPLUS,
PICNIC, MLKEM, KYBER, NTRU, NTRULPRime, SNTRUPrime, BIKE, HQC, CMCE, FRODO, SABER.
- **`PQCComponent`** generates the key material with the configured parameter set instead of the
hardcoded default material, and **caches it per (algorithm, parameterSpec)** so that endpoints
sharing the same configuration — e.g. a `sign` and a `verify` endpoint — use the **same key**,
mirroring the semantics of the shared default material. (Without this, each endpoint would get a
fresh key and verification would fail.)
- **`generateKeyPair`** lifecycle operation now uses the **parameterSpec-aware** `KeyLifecycleManager`
overload.
### Name handling
Values are BouncyCastle's parameter-set names, resolved **case-insensitively**; the underscore form of
the BC constants (`ml_dsa_87`) is accepted as an alias of the canonical `ML-DSA-87`. Note BC is not
uniform here — the modern specs *throw* on an unknown name while the older ones *return `null`* — both
are normalised into one clear `IllegalArgumentException`.
### Out of scope (rejected with a clear error)
`parameterSpec` is not supported for the **stateful** hash-based signatures (XMSS, XMSSMT, LMS, HSS),
for **MAYO/SNOVA** (no name-addressable BC parameter spec), nor for the **hybrid** operations (they pair
a fixed classical key set with a matching PQC key set). Those still use registry-supplied beans.
## Testing
- `PQCParameterSpecResolverTest` (7 tests): resolves signature and KEM parameter sets, case-insensitive
and underscore-alias handling, `isSupported`, unsupported-algorithm rejection, and unknown-name
rejection for **both** the throwing and the `null`-returning BC spec classes.
- `PQCParameterSpecTest` (6 tests): `parameterSpec` drives the actual key size (ML-DSA-44 < 65 < 87, and
ML-KEM-512 < 1024), endpoints with the same algorithm+spec **share the key**, a full sign→verify round
trip with a non-default parameter set, and rejection of XMSS and of hybrid operations.
All 13 green; full reactor build green (catalog + endpoint-DSL regenerated).
## Documentation
`pqc-component.adoc` gains a *Parameter Sets (NIST Security Levels)* section with an example, the
key-sharing semantics, a per-algorithm table of parameter-set names, and the unsupported cases.
## Backport
None — new feature, `main` only (4.22.0).
---
_Claude Code on behalf of Andrea Cosentino._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-23846: Camel-PQC - make the NIST parameter set configurable on the endpoint [camel]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on PR #24654:
URL: https://github.com/apache/camel/pull/24654#issuecomment-4957675990
Rebased onto `main` after the BouncyCastle 1.85 rename (#24653).
That commit re-points Camel's `DILITHIUM` → **ML-DSA**, `SPHINCSPLUS` → **SLH-DSA** and `KYBER` → **ML-KEM** (provider `BC`). `PQCParameterSpecResolver` was still handing those three the pre-standardization `DilithiumParameterSpec`/`SPHINCSPlusParameterSpec`/`KyberParameterSpec` — which still compiles, but would have been the wrong spec type for the new generators at runtime. They now resolve via `MLDSAParameterSpec`/`SLHDSAParameterSpec`/`MLKEMParameterSpec`, with a regression test (`testPreStandardizationAliasesUseStandardizedParameterSets`) pinning it, and the docs table updated.
14 tests green, full reactor build green.
_Claude Code on behalf of Andrea Cosentino._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-23846: Camel-PQC - make the NIST parameter set configurable on the endpoint [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #24654:
URL: https://github.com/apache/camel/pull/24654#issuecomment-4956574668
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: Apache Camel Committers, please review the following items:
* First-time contributors **require MANUAL approval** for the GitHub Actions to run
* You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
* You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
* Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-23846: Camel-PQC - make the NIST parameter set configurable on the endpoint [camel]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd merged PR #24654:
URL: https://github.com/apache/camel/pull/24654
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-23846: Camel-PQC - make the NIST parameter set configurable on the endpoint [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #24654:
URL: https://github.com/apache/camel/pull/24654#issuecomment-4956876874
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `catalog/camel-catalog`
- `components/camel-pqc`
- `dsl/camel-componentdsl`
- `dsl/camel-endpointdsl`
---
<details><summary>:microscope: Scalpel shadow comparison — Scalpel: 12 tested, 26 compile-only — current: 9 all tested</summary>
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **38 affected modules** (current approach: 9).
<details><summary>:warning: Modules only in Scalpel (29)</summary>
- `apache-camel`
- `camel-allcomponents`
- `camel-catalog`
- `camel-catalog-console`
- `camel-catalog-lucene`
- `camel-catalog-maven`
- `camel-catalog-suggest`
- `camel-componentdsl`
- `camel-csimple-maven-plugin`
- `camel-endpointdsl`
- `camel-endpointdsl-support`
- `camel-itest`
- `camel-jbang-core`
- `camel-jbang-it`
- `camel-jbang-main`
- `camel-jbang-plugin-edit`
- `camel-jbang-plugin-generate`
- `camel-jbang-plugin-kubernetes`
- `camel-jbang-plugin-test`
- `camel-kamelet-main`
- `camel-launcher`
- `camel-report-maven-plugin`
- `camel-route-parser`
- `camel-yaml-dsl`
- `camel-yaml-dsl-deserializers`
- `camel-yaml-dsl-maven-plugin`
- `coverage`
- `docs`
- `dummy-component`
</details>
**Skip-tests mode would test 12 modules** (4 direct + 8 downstream), **skip tests for 26** (generated code, meta-modules)
<details><summary>Modules Scalpel would test (12)</summary>
- `camel-catalog`
- `camel-componentdsl`
- `camel-endpointdsl`
- `camel-jbang-mcp`
- `camel-jbang-plugin-mcp`
- `camel-jbang-plugin-route-parser`
- `camel-jbang-plugin-tui`
- `camel-jbang-plugin-validate`
- `camel-launcher-container`
- `camel-pqc`
- `camel-yaml-dsl-validator`
- `camel-yaml-dsl-validator-maven-plugin`
</details>
<details><summary>Modules with tests skipped (26)</summary>
- `apache-camel`
- `camel-allcomponents`
- `camel-catalog-console`
- `camel-catalog-lucene`
- `camel-catalog-maven`
- `camel-catalog-suggest`
- `camel-csimple-maven-plugin`
- `camel-endpointdsl-support`
- `camel-itest`
- `camel-jbang-core`
- `camel-jbang-it`
- `camel-jbang-main`
- `camel-jbang-plugin-edit`
- `camel-jbang-plugin-generate`
- `camel-jbang-plugin-kubernetes`
- `camel-jbang-plugin-test`
- `camel-kamelet-main`
- `camel-launcher`
- `camel-report-maven-plugin`
- `camel-route-parser`
- `camel-yaml-dsl`
- `camel-yaml-dsl-deserializers`
- `camel-yaml-dsl-maven-plugin`
- `coverage`
- `docs`
- `dummy-component`
</details>
> :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
</details>
<details><summary>All tested modules (38 modules)</summary>
- Camel :: All Components Sync point
- Camel :: Assembly
- Camel :: Catalog :: CSimple Maven Plugin (deprecated)
- Camel :: Catalog :: Camel Catalog
- Camel :: Catalog :: Camel Report Maven Plugin
- Camel :: Catalog :: Camel Route Parser
- Camel :: Catalog :: Console
- Camel :: Catalog :: Dummy Component
- Camel :: Catalog :: Lucene (deprecated)
- Camel :: Catalog :: Maven
- Camel :: Catalog :: Suggest
- Camel :: Component DSL
- Camel :: Coverage
- Camel :: Docs
- Camel :: Endpoint DSL
- Camel :: Endpoint DSL :: Support
- Camel :: Integration Tests
- Camel :: JBang :: Core
- Camel :: JBang :: Integration tests
- Camel :: JBang :: MCP
- Camel :: JBang :: Main
- Camel :: JBang :: Plugin :: Edit
- Camel :: JBang :: Plugin :: Generate
- Camel :: JBang :: Plugin :: Kubernetes
- Camel :: JBang :: Plugin :: MCP
- Camel :: JBang :: Plugin :: Route Parser
- Camel :: JBang :: Plugin :: TUI
- Camel :: JBang :: Plugin :: Testing
- Camel :: JBang :: Plugin :: Validate
- Camel :: Kamelet Main
- Camel :: Launcher
- Camel :: Launcher :: Container
- Camel :: PQC
- Camel :: YAML DSL
- Camel :: YAML DSL :: Deserializers
- Camel :: YAML DSL :: Maven Plugins
- Camel :: YAML DSL :: Validator
- Camel :: YAML DSL :: Validator Maven Plugin
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/29239946688)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org