davsclaus opened a new pull request, #30519: URL: https://github.com/apache/camel/pull/30519
## Description Upgrades Bouncy Castle from 1.86 to 1.87 ([CAMEL-27309](https://issues.apache.org/jira/browse/CAMEL-27309)). 1.87 fixes several CVEs (CMS/X.500 name comparison DoS, TSP signing time and MD5 imprint, PBE iteration counts, among others; see the [release notes](https://github.com/bcgit/bc-java/blob/r1rv87/docs/releasenotes.md)). The Dependabot PR #30512 (bouncycastle 1.86 to 1.87) does not compile: 1.87 removed `org.bouncycastle.pqc.crypto.lms` and `org.bouncycastle.pqc.crypto.xmss`, which 1.86 had deprecated, and camel-pqc still imported `LMSigParameters` and `LMOtsParameters` from there. ### camel-pqc - `LMSigParameters` and `LMOtsParameters` now come from `org.bouncycastle.crypto.params`. Camel uses only their constants, which are unchanged. - The LMS and XMSS JCE classes (`LMSKeyGenParameterSpec`, `LMSHSSKeyGenParameterSpec`, `XMSSParameterSpec`, `XMSSMTParameterSpec`, and the `LMSPrivateKey`, `XMSSPrivateKey`, `XMSSMTPrivateKey` interfaces) now come from `org.bouncycastle.jcajce.spec` / `org.bouncycastle.jcajce.interfaces`. 1.87 promoted them there and deprecated the `org.bouncycastle.pqc.jcajce` ones. The old interfaces extend the new ones, so the `instanceof` checks of the stateful key tracking in `PQCProducer` still match keys from the BCPQC provider. - The three `org.bouncycastle.pqc.jcajce.spec.*` wildcard imports in the key lifecycle classes are replaced by explicit imports, so the promoted classes are not ambiguous. ### Upgrade guide A new "Bouncy Castle 1.87" entry in the 4.24 upgrade guide covers: - the removed packages, for application code that builds LMS/HSS keys itself; - HQC now follows the 2026-10-12 specification, so HQC keys and encapsulations from earlier releases (including keys stored by a key lifecycle manager) are incompatible; - NTRU, NTRU LPRime and SNTRU Prime now apply the KDF of the `KEMGenerateSpec` / `KEMExtractSpec`, where earlier releases used the raw shared secret. camel-pqc uses the 3-argument constructors, which name the default KDF, so an encapsulation made with an earlier Camel release gives a different key: both sides must be upgraded together; - Classic McEliece (`CMCE`) is deprecated upstream as "now believed unsafe to use". ### Not in this PR `CMCEParameterSpec` is now deprecated, and it is the only Bouncy Castle deprecation warning left in camel-pqc. Whether Camel deprecates its `CMCE` algorithm option is left for a separate decision. ## Tests Run locally against 1.87: - camel-pqc: 397 tests, 0 failures - the other modules that depend on Bouncy Castle: camel-as2-api (160), camel-asn1 (16), camel-crypto-pgp (71), camel-fop (14), camel-pdf (24), camel-xmlsecurity (201), camel-ssh (78), camel-jsch (43), camel-mina-sftp (53), camel-ftp (286), all passing Supersedes #30512. _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
