Skip to content

Commit 7b510fd

Browse files
committed
Correct the 1.86 ML-DSA, ML-KEM and SLH-DSA removal notes, which still described the pqc.crypto.util key-factory entries as repointed at the canonical classes and PQCOtherInfoGenerator as widened to a CipherParameters constructor, both of which later commits removed and reverted, so the notes now name the org.bouncycastle.crypto.util classes a caller of those factories should move to and scope the decode-as-before claim to the paths that still recognise the OIDs.
1 parent 21153e3 commit 7b510fd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎docs/releasenotes.html‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ <h3>2.1.4 Additional Notes</h3>
209209
<li>The deprecated XWingPrivateKeyParameters constructor taking org.bouncycastle.pqc.crypto.mlkem key parameters has been removed, as flagged when the ML-KEM classes were promoted to org.bouncycastle.crypto in 1.85; use the constructor taking org.bouncycastle.crypto.params.MLKEMPrivateKeyParameters / MLKEMPublicKeyParameters instead. X-Wing itself is otherwise unchanged and no longer references the deprecated package.</li>
210210
<li>ML-DSA signature verification (org.bouncycastle.crypto.signers.MLDSASigner / HashMLDSASigner, and the corresponding JCA Signature.MLDSA* / Signature.HashMLDSA* algorithms) returns false uniformly for a cryptographically wrong signature and for one that is structurally malformed per FIPS 204 Algorithm 8 (wrong length, an out-of-order or duplicate hint index, or a hint weight exceeding the parameter set's omega) - the two cases are not distinguished, and neither ever raises SignatureException for a decode failure. This differs from some other providers, including the JDK's own SUN ML-DSA implementation, which throws SignatureException for a decode failure and reserves false for a well-formed-but-wrong signature; code relying on Signature.verify() to distinguish "malformed" from "wrong" cannot rely on that distinction against the BC provider. This is documented behaviour, not a defect (github #2367).</li>
211211
<li>org.bouncycastle.operator.jcajce.JcaContentSignerBuilder no longer creates new legacy generic composite (id_alg_composite) signatures: the constructor's org.bouncycastle.jcajce.spec.CompositeAlgorithmSpec handling and the CompositePrivateKey short-circuit that drove it have been removed, and CompositeAlgorithmSpec is deprecated accordingly. Creating a modern fixed-algorithm Composite ML-DSA signature (e.g. via a CompositePrivateKey whose algorithm is one of the IANAObjectIdentifiers.id_MLDSA* OIDs) is unaffected. Verifying an existing legacy composite signature through org.bouncycastle.operator.jcajce.JcaContentVerifierProviderBuilder still works in this release but is planned for removal in the next one - callers still relying on the legacy format for verification should migrate to a modern fixed-algorithm composite key.</li>
212-
<li>As announced in the 1.85 release notes, the deprecated ML-DSA (FIPS 204) implementation under org.bouncycastle.pqc.crypto.mldsa has been removed. Use the standardised implementation under org.bouncycastle.crypto instead (crypto.params.MLDSA* / crypto.generators.MLDSAKeyPairGenerator / crypto.signers.MLDSASigner and HashMLDSASigner), which is registered in the BC provider. The org.bouncycastle.pqc.crypto.util key-factory entries and org.bouncycastle.cert.plants.bc.BcMTCSigners - the only production callers still on the deprecated package - now use the canonical classes instead; no object identifiers are affected and existing ML-DSA certificates and keys decode exactly as before.</li>
213-
<li>As announced in the 1.85 release notes, the deprecated ML-KEM (FIPS 203) implementation under org.bouncycastle.pqc.crypto.mlkem has been removed. Use the standardised implementation under org.bouncycastle.crypto instead (crypto.params.MLKEM* / crypto.generators.MLKEMKeyPairGenerator / crypto.kems.MLKEMGenerator and MLKEMExtractor), which is registered in the BC provider. The org.bouncycastle.pqc.crypto.util key-factory entries and org.bouncycastle.pqc.crypto.util.PQCOtherInfoGenerator - the only production callers still on the deprecated package - now use the canonical classes instead; PQCOtherInfoGenerator.PartyU/PartyV widen their constructor parameter from the pqc-side KEMParameters marker interface to CipherParameters so a canonical MLKEMParameters (which does not implement that marker interface) is still accepted alongside NTRUParameters, which does. No object identifiers are affected and existing ML-KEM certificates and keys decode exactly as before.</li>
214-
<li>As announced in the 1.85 release notes, the deprecated SLH-DSA (FIPS 205) implementation under org.bouncycastle.pqc.crypto.slhdsa has been removed. Use the standardised implementation under org.bouncycastle.crypto instead (crypto.params.SLHDSA* / crypto.generators.SLHDSAKeyPairGenerator / crypto.signers.SLHDSASigner and HashSLHDSASigner), which is registered in the BC provider. The org.bouncycastle.pqc.crypto.util key-factory entries - the only production callers still on the deprecated package - now use the canonical classes instead; no object identifiers are affected and existing SLH-DSA certificates and keys decode exactly as before.</li>
212+
<li>As announced in the 1.85 release notes, the deprecated ML-DSA (FIPS 204) implementation under org.bouncycastle.pqc.crypto.mldsa has been removed. Use the standardised implementation under org.bouncycastle.crypto instead (crypto.params.MLDSA* / crypto.generators.MLDSAKeyPairGenerator / crypto.signers.MLDSASigner and HashMLDSASigner), which is registered in the BC provider. org.bouncycastle.cert.plants.bc.BcMTCSigners, the only production caller still on the deprecated package, now uses the canonical classes instead. The ML-DSA entries in the org.bouncycastle.pqc.crypto.util key factories have been removed rather than repointed, since org.bouncycastle.crypto.util covers the same object identifiers and is the path the JCE key classes take: a caller decoding an ML-DSA SubjectPublicKeyInfo or PrivateKeyInfo through pqc.crypto.util.PublicKeyFactory / PrivateKeyFactory (or encoding one through the matching SubjectPublicKeyInfoFactory / PrivateKeyInfoFactory) should now use the org.bouncycastle.crypto.util classes of the same names, which return the canonical crypto.params.MLDSA* types. No object identifiers are affected, and existing ML-DSA certificates and keys decode exactly as before through the BC provider and through org.bouncycastle.crypto.util.</li>
213+
<li>As announced in the 1.85 release notes, the deprecated ML-KEM (FIPS 203) implementation under org.bouncycastle.pqc.crypto.mlkem has been removed. Use the standardised implementation under org.bouncycastle.crypto instead (crypto.params.MLKEM* / crypto.generators.MLKEMKeyPairGenerator / crypto.kems.MLKEMGenerator and MLKEMExtractor), which is registered in the BC provider. The ML-KEM entries in the org.bouncycastle.pqc.crypto.util key factories have been removed rather than repointed, since org.bouncycastle.crypto.util covers the same object identifiers and is the path the JCE key classes take: a caller decoding an ML-KEM SubjectPublicKeyInfo or PrivateKeyInfo through pqc.crypto.util.PublicKeyFactory / PrivateKeyFactory (or encoding one through the matching SubjectPublicKeyInfoFactory / PrivateKeyInfoFactory) should now use the org.bouncycastle.crypto.util classes of the same names, which return the canonical crypto.params.MLKEM* types. For the same reason org.bouncycastle.pqc.crypto.util.PQCOtherInfoGenerator.PartyU/PartyV no longer have an ML-KEM branch and keep the org.bouncycastle.pqc.crypto.KEMParameters constructor parameter they had in 1.85, NTRU being the one KEM left there; ML-KEM OtherInfo generation is covered by org.bouncycastle.crypto.util.OtherInfoGenerator, whose PartyU/PartyV take the canonical MLKEMParameters. No object identifiers are affected, and existing ML-KEM certificates and keys decode exactly as before through the BC provider and through org.bouncycastle.crypto.util.</li>
214+
<li>As announced in the 1.85 release notes, the deprecated SLH-DSA (FIPS 205) implementation under org.bouncycastle.pqc.crypto.slhdsa has been removed. Use the standardised implementation under org.bouncycastle.crypto instead (crypto.params.SLHDSA* / crypto.generators.SLHDSAKeyPairGenerator / crypto.signers.SLHDSASigner and HashSLHDSASigner), which is registered in the BC provider. The SLH-DSA entries in the org.bouncycastle.pqc.crypto.util key factories have been removed rather than repointed, since org.bouncycastle.crypto.util covers the same object identifiers and is the path the JCE key classes take: a caller decoding an SLH-DSA SubjectPublicKeyInfo or PrivateKeyInfo through pqc.crypto.util.PublicKeyFactory / PrivateKeyFactory (or encoding one through the matching SubjectPublicKeyInfoFactory / PrivateKeyInfoFactory) should now use the org.bouncycastle.crypto.util classes of the same names, which return the canonical crypto.params.SLHDSA* types. No object identifiers are affected, and existing SLH-DSA certificates and keys decode exactly as before through the BC provider and through org.bouncycastle.crypto.util.</li>
215215
<li>BCJSSE: server-side OCSP stapling is configured by the same system properties as SunJSSE, and like SunJSSE they are read per SSLContext rather than once per class load, so one process can host a context that staples and a context that does not. jdk.tls.server.enableStatusRequestExtension (default false) enables it; jdk.tls.stapling.cacheSize (256), jdk.tls.stapling.cacheLifetime (3600 seconds), jdk.tls.stapling.responseTimeout (5000 milliseconds), jdk.tls.stapling.responderURI, jdk.tls.stapling.responderOverride (false) and jdk.tls.stapling.ignoreExtensions configure it, with exactly zero for either cache setting meaning no limit of that kind rather than no caching. The response timeout is the exception to that reading: it bounds a handshake thread, where "no limit" is not something to configure by accident, so its minimum is one millisecond and a zero is refused with a warning and the default used in its place. A negative value is refused the same way whichever of these properties it is given to, the default being used instead, as it is for a value that is not a number. Two differences from SunJSSE are deliberate. First, jdk.tls.stapling.ignoreExtensions defaults to true here: the OCSP request extensions in question are the client's to choose and a nonce among them makes every response single-use, so honouring them would let a client force an outbound OCSP request per handshake, which is what the cache exists to prevent - RFC 6066 sec. 8 has the client naming extensions it "wishes the server to include" rather than extensions it is owed, and setting the property to false restores parity. What that forwards is the nonce, and only the nonce: an extension a client asks to have passed on is not one this server can promise anything about, and a response shaped by one client's extensions would be cached under the certificate alone and then relayed to clients that asked with different ones. A nonced request is answered outside the cache accordingly - neither served from it nor put into it - which is why honouring extensions costs an outbound request per handshake, and a nonced lookup that fails is not recorded against the shared request the other clients use. Second, a response stating no nextUpdate is never cached, where SunJSSE holds one for cacheLifetime; this matches how the CertPath validator side of the library already reads RFC 6960 sec. 4.2.2.1. One further property is specific to this implementation: org.bouncycastle.jsse.server.stapling.failureLifetime (60 seconds) sets how long a failed lookup suppresses further attempts for the same certificate, so an unreachable responder costs one attempt per interval rather than one per handshake. Note also that fetches are made on the handshake thread within the responseTimeout budget rather than on a background thread pool as SunJSSE uses, so the first handshake needing a given response pays for retrieving it.</li>
216216
<li>Unreachable classes for RFC 3281 cert-path services have been removed.</li>
217217
<li>The MLS gRPC interop test harness has moved out of the published bcmls jar, where it was org.bouncycastle.mls.client, into the non-publishing misc module as org.bouncycastle.mls.examples.client, and its gRPC and protobuf dependencies are now taken by Maven coordinate at versions clear of CVE-2024-7246, CVE-2024-7254 and CVE-2025-55163.</li>

0 commit comments

Comments
 (0)