Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4128 commits
Select commit Hold shift + click to select a range
9912127
refactored out slow tests for parallel execution.
Jun 27, 2026
154927e
CMS: It's just "algorithm protection" attribute
Jun 27, 2026
e7047a6
Add AttributeTable.hasAny method
Jun 27, 2026
2cf2af0
Refactor SIgnerInformation
Jun 27, 2026
6b21544
Refactor CMSAuthenticatedData
Jun 27, 2026
a4a3109
Read S-Expression canonical string length incrementally to avoid pre-…
Jun 27, 2026
0aa2511
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jun 27, 2026
84cba75
Generalise canonical-string read into Streams.readLenBytesFully and a…
Jun 27, 2026
cbf5b27
Remove unused legacy SXprUtils S-expression helper, relates to github…
Jun 27, 2026
0948a3b
EthereumIESEngine: close static-key stream-mode cross-message MAC for…
Jun 27, 2026
14a64f4
Merge branch 'ethereum-ies-static-key-fix' into 'main'
Jun 27, 2026
4c56032
Merge branch 'armor-pem-header-injection-fix' into 'main'
Jun 27, 2026
b6496f2
MLS SecureRandom hygiene: source from the Group / registrar, never `n…
Jun 27, 2026
56c6489
Merge branch 'mls-securerandom-sweep' into 'main'
Jun 27, 2026
f99a41e
GF(2^8) / GF(2^4) arithmetic consolidation onto constant-time util.GF…
Jun 27, 2026
953ecde
Merge branch 'alg-gf256-dedup' into 'main'
Jun 27, 2026
9b7ada7
EAX / CCM / OCB / KCCM: reject nonce reuse on re-init for encryption
Jun 27, 2026
b65ba5f
Merge branch 'aead-nonce-reuse-guard' into 'main'
Jun 27, 2026
409c939
AIMer
Jun 28, 2026
62b2c35
Merge branch 'kpqc-aimer' into 'main'
Jun 28, 2026
c146fca
ElGamalEngine: validate ciphertext components on decryption (small-su…
Jun 28, 2026
9e8991f
Merge branch 'elgamal-peer-value-validation' into 'main'
Jun 28, 2026
4371f61
Fix `PKIXCertPathReviewer.getPolicyTree()` always returning `null`
Jun 28, 2026
24e0103
Merge branch 'pkix-getpolicytree-fix' into 'main'
Jun 28, 2026
3a03043
Reject empty GeneralSubtrees/GeneralSubtree sequences in X.509 NameCo…
Jun 28, 2026
211fd23
KCCM: Decryption input length guard
Jun 28, 2026
98dc30f
RFC 8702 — SHAKE in CMS: KMAC-with-SHAKE support
Jun 28, 2026
86626df
Merge branch 'rfc-8702-shake-cms' into 'main'
Jun 28, 2026
efe1030
KCCM/KGCM: Improve parameter type and reuse checks
Jun 28, 2026
4fb18ac
Enforce the RFC 9106 Argon2 memory-size-exponent floor at key derivation
Jun 28, 2026
6fc7c13
Merge branch 'argon2-memory-exponent-floor' into 'main'
Jun 28, 2026
413d481
GF256AES: Optimize mul, sqr methods
Jun 28, 2026
407693a
Refactor ElGamalEngine
Jun 28, 2026
cbac5bb
DVCS: carry `requester` and `extensions` forward in the `DVCSRequestI…
Jun 29, 2026
8a2e78c
Merge branch 'dvcs-request-info-builder-seed-fix' into 'main'
Jun 29, 2026
db0e123
Harden GnuPG keybox blob parsing against malformed input
Jun 29, 2026
13178fc
Merge branch 'keybox-cert-blob-bounds' into 'main'
Jun 29, 2026
5a42f0b
fix a stale-buffer bug on the signing retry path
Jun 29, 2026
fa6dd4a
OpenPGP: reject malformed dash-prefixed lines in cleartext-signed (CS…
Jun 29, 2026
8f9908c
Merge branch '2329-openpgp-csf-dash-escape' into 'main'
Jun 29, 2026
df4ef8f
ChaCha20Poly1305: improve init parameter checks
Jun 29, 2026
5b606f0
Fix possible integer overflow
Jun 29, 2026
1642e9d
Refactoring in bcpg and openpgp tests
Jun 29, 2026
a4ebade
Guard OCSP RevokedInfo, SingleResponse and Signature decode construct…
Jun 29, 2026
8c6581d
Guard four fixed-arity ASN.1 SEQUENCE decode constructors (cms.Attrib…
Jun 29, 2026
9aff128
ECIES: Fix mac update length and cleanup
Jun 29, 2026
c5dcb89
pass build1-5to1-8
Jun 29, 2026
dfa5a2d
Merge branch 'legacy-builds' into 'main'
Jun 30, 2026
745c793
Correct MessageDigestUtils digest name for the RIPEMD-256 OID
Jun 30, 2026
ebf67f8
Merge branch 'main' into legacy-properties-overlay-sync
Jun 30, 2026
b8986fa
build-provider + build-libraries green
Jun 30, 2026
c2fefda
Pass java 1.4 test package.
Jun 30, 2026
7ce90dd
Merge branch 'messagedigestutils-ripemd256-name-fix' into 'main'
Jun 30, 2026
24db505
Bound the legacy PBES1 / PBKDF1 iteration count in the pkix PBE decry…
Jun 30, 2026
cbcbc86
Merge remote-tracking branch 'origin/main' into pbes1-pbkdf1-operator…
Jun 30, 2026
a5b3fd9
Add comment
Jun 30, 2026
ade3d4f
Cap the CMS PasswordRecipient PBKDF2 iteration count (CPU-DoS guard)
Jun 30, 2026
29d25c5
Merge branch 'claude/serene-bouman-77ade5' into 'main'
Jun 30, 2026
0caf423
#33+#34+#37 bug fix
Jun 30, 2026
f25c114
Merge branch 'main' into openssl-pem-parse-ioexception
Jun 30, 2026
9eb7fdb
Use a constant-time MAC compare in the CMSAuthenticatedDataParser jav…
Jun 30, 2026
e260a06
Wrap RuntimeException from the PKCS12 engineLoad MAC-data parse as IO…
Jun 30, 2026
7c77de4
Wrap RuntimeException from the CMSSignedData parse as CMSException
Jun 30, 2026
2134ca9
Wrap RuntimeException from the CMSSignedData parse as CMSException
Jun 30, 2026
b29107b
Reject a top-level SECRET_SUBKEY packet in PGPObjectFactory.nextObjec…
Jun 30, 2026
913ef61
Merge branch 'pg-objectfactory-secret-subkey-ioexception' into 'main'
Jun 30, 2026
3826620
Surface a malformed IssuingDistributionPoint extension from X509CRLHo…
Jun 30, 2026
4cdf7c6
Merge branch 'x509crlholder-idp-parse-ioexception' into 'main'
Jun 30, 2026
87ce888
Cap the BKS keystore load iteration count to prevent a pre-integrity-…
Jun 30, 2026
a919761
Merge branch 'bks-keystore-iteration-cap' into 'main'
Jun 30, 2026
72fce66
Cap the PKCS#12-PBE iteration count in the pkix operator / OpenSSL PK…
Jun 30, 2026
b709460
Merge branch 'pkcs12-pbe-operator-iteration-cap' into 'main'
Jun 30, 2026
8bc1876
Merge branch 'main' into openssl-pem-parse-ioexception
Jul 1, 2026
8a7f525
Merge branch 'main' into pkcs12-cms-parse-runtimeexception-leak
Jul 1, 2026
de0d4d4
Merge branch 'refs/heads/main' into pqc-pubkey-length-validation
Jul 1, 2026
bf06265
Merge branch 'main' into pqc-verify-malformed-input-hardening
Jul 1, 2026
52ba533
Merge branch 'main' into pg-sig-subpacket-length-guard
Jul 1, 2026
07a811b
Update CMCE and FrodoKEM
Jul 1, 2026
c4b24fe
Validate encoding length in PQC public key parameter decode constructors
Jul 1, 2026
34e9fce
Merge branch 'main' into lms-hss-sig-parse-npe-fix
Jul 1, 2026
a38e460
Merge branch 'pqc-verify-malformed-input-hardening' into pqc-pubkey-l…
Jul 1, 2026
bf86812
replaced IllegalStateException with IllegalArgumentException as adver…
Jul 1, 2026
f0049a9
Reject malformed MLS external-join messages instead of crashing with …
Jul 1, 2026
1414d5d
Merge branch 'mls-newmember-verify-npe-fix' into 'main'
Jul 1, 2026
f828a0b
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 1, 2026
e757665
Corrected BIP-340 step numbering in BIP340Signer signing comments, re…
Jul 1, 2026
c7185cf
replaced IllegalStateException with IllegalArgumentException as adver…
Jul 1, 2026
c046171
Revert "Wrap RuntimeException from the CMSSignedData parse as CMSExce…
Jul 1, 2026
5f3c410
Merge branch 'main' into pkcs12-cms-parse-runtimeexception-leak
Jul 1, 2026
28ba229
Convert malformed-inner-content IllegalArgumentException to CMSExcept…
Jul 1, 2026
49dfc18
Merge branch 'cms-auth-decode-robustness' into 'main'
Jul 1, 2026
aaf287d
Merge branch 'main' into pg-sig-subpacket-length-guard
Jul 1, 2026
9a5d1db
Refactor withinDNSubtree
Jul 1, 2026
eba0e61
ASN.1: New fromExplicit method(s) for casts in parsing context
Jul 1, 2026
3a402b8
Guard TimeStampResp / TimeStampReq against a too-short SEQUENCE (pars…
Jul 1, 2026
da9a22e
Merge branch 'tsp-request-response-parse-guard' into 'main'
Jul 1, 2026
34b5282
Merge branch 'main' into pqc-pubkey-length-validation
Jul 1, 2026
b8fa7a3
Merge branch 'main' into pkcs12-cms-parse-runtimeexception-leak
Jul 1, 2026
314e626
Validate ciphertext length in eight PQC KEM decapsulators before deco…
Jul 1, 2026
80b14cb
Merge branch 'pqc-kem-ciphertext-length-validation' into 'main'
Jul 1, 2026
caaa307
Align CMS malformed-content-tag test with the IllegalArgumentExceptio…
Jul 1, 2026
25f6188
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 1, 2026
75b0a0a
Merge branch 'main' into openssl-pem-parse-ioexception
Jul 1, 2026
c8b108b
Merge branch 'main' into lms-hss-sig-parse-npe-fix
Jul 1, 2026
14aa21d
Merge branch 'main' into pg-sig-subpacket-length-guard
Jul 2, 2026
6d009ec
Speed up ARIA (ARIAEngine) ~1.3–1.4× via SWAR multiply-broadcast diff…
Jul 2, 2026
5461f34
Merge branch 'alg-aria-refactor' into 'main'
Jul 2, 2026
a96ef42
Merge branch 'main' into pqc-paramspec-fromname-fix
Jul 2, 2026
94ee4f4
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 2, 2026
ca74bb8
CMS: check for extraneous data in byte arrays
Jul 2, 2026
2176f86
Expand name-constraint bypass tests
Jul 2, 2026
f872d4f
Added generateCbom/generateSbom Gradle tasks producing reproducible C…
Jul 2, 2026
f43a9b7
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 2, 2026
c22de8b
Edit .gitlab-ci.yml removed trigger for spongy castle
Jul 2, 2026
2444502
Merge branch 'main' into pqc-xwing-export-and-aes-cleanup
Jul 2, 2026
6cf1668
added a nested exception on failure in SubjectPublicKeyInfo creation …
Jul 2, 2026
8241a48
Remove remaining vestigial Dilithium-AES references: unused Dilithium…
Jul 2, 2026
0b4d29e
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 2, 2026
d1977d4
Reject ambiguous multi-'@' rfc822Name tested names in nameConstraints
Jul 2, 2026
3253175
Documented SBOM/CBOM generation in README.md and brought build instru…
Jul 2, 2026
a35bf0f
Merge branch 'main' into legacy-properties-overlay-sync
Jul 2, 2026
d9889a3
Restore a green build1-4 (jdk1.4) build and test run following the me…
Jul 3, 2026
6854a62
Sync the jdk1.4 overlays with base, porting missed security and behav…
Jul 3, 2026
f5de1c8
added use of priveledged action
Jul 3, 2026
9bf4a57
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 3, 2026
8db136f
X.509 name-parse robustness (COV-4 / COV-6)
Jul 3, 2026
ebdcea8
Merge branch 'x509-name-parse-robustness' into 'main'
Jul 3, 2026
c71b283
Mirror X509_ALLOW_LENIENT_RFC822_NAME into the jdk1.4 Properties over…
Jul 3, 2026
a4f00b1
Add docs/claude/build-jdk14.md covering the build1-4 legacy build: so…
Jul 3, 2026
4139886
Complete XMSS/XMSS^MT SP 800-208 support and move asn1.iana into core…
Jul 3, 2026
80fa867
Be lenient about the ASN.1 string type for an SGP22 EUM IIN (serialNu…
Jul 3, 2026
37094e5
Grow ASN.1 definite-length objects incrementally via Streams.readLenB…
Jul 4, 2026
115e852
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 4, 2026
fb3fd82
RFC 9734 implementation
Jun 2, 2026
b2a3e52
Add a KeyPurposeId OID unit test covering the recently-added Extended…
Jul 4, 2026
c43e578
Move the ASN.1 max-construction-depth and max-length stream property …
Jul 4, 2026
99a9eaf
CMS: type-check asn1.cms.Attribute decode (no ClassCastException past…
Jul 4, 2026
34244f7
Merge branch 'cms-attribute-type-guard' into 'main'
Jul 4, 2026
cd1d88f
Reject a key whose tree digest is outside the named XMSS/XMSS^MT sign…
Jul 5, 2026
c93b376
moved to 1.85 release
Jul 6, 2026
a8b7832
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 6, 2026
7b2c325
Export the new org.bouncycastle.crypto.bls package from the provider …
Jul 6, 2026
9b58957
Cleaned up 1.85 release notes: removed duplicated policy-tree and Fal…
Jul 6, 2026
7ff53a9
Removed the Dilithium, SPHINCSPlus and Kyber JCE wrappers from the BC…
Jul 6, 2026
29ae9ee
Added JCA/JCE provider test coverage for AIMer and a BC-provider key-…
Jul 6, 2026
be08d30
Made the SDitH engines package-private in line with the other PQC eng…
Jul 6, 2026
2112905
Removed the unreferenced Hawk NTRUProfile and BLS12_381Fp classes and…
Jul 6, 2026
79853c5
Removed the unused org.bouncycastle.iana.AEADAlgorithm constants clas…
Jul 6, 2026
bf1f59f
Removed stale ext module descriptor exports for long-deleted legacy P…
Jul 6, 2026
73fcb0a
Brought internal CMSOBjectIdentifiers in line with util, corrected re…
Jul 6, 2026
2be1777
Added missing 1.85 release note entries: AC signature verification, N…
Jul 6, 2026
b1a7e78
Fixed HTML defects in CONTRIBUTORS.html (premature list-item close or…
Jul 6, 2026
6790a22
Export org.bouncycastle.jcajce.provider.asymmetric.compositekem from …
Jul 6, 2026
49bb5cf
Brought docs/specifications.html up to date with the current algorith…
Jul 6, 2026
f08c13e
added note about deprecated PQC implementations
Jul 6, 2026
5fe1ec0
Fixed jdk1.4/legacy Ant builds: restored asn1.iana in the provider fi…
Jul 6, 2026
89054f3
Fixed jdk18+/legacy Ant test builds: signer-info clash on package-pri…
Jul 6, 2026
c45097e
Fixed jdk15to18 build: declare the captured tooShort local final in P…
Jul 6, 2026
e2fa0f3
Resynced the jdk1.5 BaseBlockCipher overlay with base: it had rotted …
Jul 6, 2026
4b58ed7
Added lms/mayo/sdith test excludes to jdk15+.xml core test fileset, m…
Jul 6, 2026
527624f
CMSSignedData.replaceSigners/addDigestAlgorithm recompute the SignedD…
Jul 7, 2026
082fa17
Fixed keybox Blob.getInstance treating an EMPTY_BLOB as end-of-file, …
Jul 7, 2026
48a0a0a
Harden asn1.cms.SignerInfo decode to reject a non-INTEGER version or …
Jul 7, 2026
064fd52
Reject empty SEQUENCE in the RFC 5280 SEQUENCE SIZE (1..MAX) X.509 ex…
Jul 7, 2026
df26a27
Credited digi-scrypt in CONTRIBUTORS and added a release note for the…
Jul 7, 2026
9961e6f
Give RevocationTest's eeCertWithDistPoint a valid non-empty CRL distr…
Jul 7, 2026
d520021
Made the X509RevocationChecker soft-fail hard limit inclusive (failHa…
Jul 7, 2026
eb7ad2e
Replaced the CMS SignedData version-preservation property with a CMSS…
Jul 7, 2026
9197bc4
Fixed an off-by-4 header-length guard in NotationData.verifyData: the…
Jul 8, 2026
b2b4fba
Exercise the SPHINCS+ OID encode/decode round-trip for the -simple va…
Jul 8, 2026
2151d2e
deleted unnecessary file
Jul 8, 2026
257799a
Extended the generateCbom fallback primitive classification to cover …
Jul 9, 2026
135b014
1.85 release notes - with CVE listing
Jul 9, 2026
f10384a
Brought the JPMS module descriptors and OSGi Export-Package headers b…
Jul 9, 2026
7172710
Derive OpenPGPCertificate subkey/key expiry only from a cryptographic…
Jul 9, 2026
fd546f5
Cap the declared OpenPGP signature subpacket length at SignaturePacke…
Jul 9, 2026
e4df40b
Default version 6 OnePassSignaturePacket to the new OpenPGP packet fo…
Jul 10, 2026
9acf752
Fixed an off-by-one in the keybox EMPTY_BLOB skip guard: a well-forme…
Jul 10, 2026
478234d
Documented the OSGi Export-Package brace-list in build.gradle as a se…
Jul 10, 2026
bc8bd3c
Reject CR/LF in the S/MIME streaming writer header names and values: …
Jul 11, 2026
97469d8
Give pkix its own public org.bouncycastle.operator.OidCatalogue and d…
Jul 11, 2026
931d269
Added the maxSerial field to the MTCCertificationAuthority (id-pe-mtc…
Jul 11, 2026
84c0c1f
Bump the Merkle Tree Certificates release note to track draft-ietf-pl…
Jul 11, 2026
5cfd860
Enforce the draft-ietf-tls-trust-anchor-ids sec. 3 / 4.1 opaque Trust…
Jul 11, 2026
b6bc884
Removed the dead randomizer plumbing from the composite ML-DSA Signat…
Jul 11, 2026
86482e4
Enforce the RFC 9629 kekLength INTEGER (1..65535) lower bound and the…
Jul 11, 2026
1db7a72
Added a legacy-source-javadoc-jars skill documenting how to build Mav…
Jul 11, 2026
a730518
Name the jdk1.4 Ant-build jars <module>-debug-jdk14-<version> when re…
Jul 11, 2026
bb26088
Name the jdk15to18 Ant-build jars <module>-debug-jdk15to18-<version> …
Jul 11, 2026
f360f23
Ignore repository-root *.jar files (/*.jar) so stray build-artifact j…
Jul 11, 2026
e128162
Fix build1-5to1-8 so the META-INF/services/java.security.Provider pos…
Jul 11, 2026
1a7332a
Restore the jdk15to18 Ant test build under genuine javac 1.5: add the…
Jul 11, 2026
9b43e92
Resolve CertTest's reflective verify(PublicKey,Provider) call through…
Jul 11, 2026
b73cf4d
Reset the KGCM associated-text accumulator in KGCMBlockCipher.init so…
Jul 12, 2026
10056f5
Name the Gradle-build jars/artifacts <module>-debug-jdk18on-<version>…
Jul 12, 2026
3d826de
Support variable-length associated data and short nonces in KCCMBlock…
Jul 12, 2026
4f24982
Document the release.debug Gradle build property in README.md: add a …
Jul 12, 2026
ecee534
Anchor run_mtt.sh's gradle.properties version parse to the version= line
Jul 12, 2026
57fbd3c
Set the 1.85 release date to 2026, July 12th in the release notes
Jul 14, 2026
eb8cfe7
Add a Docker-based jdk1.3 (build1-3) build path and begin the jdk1.3 …
Jul 14, 2026
7572561
Bump versions for the 1.86 development cycle: gradle/bc-build to 1.86…
Jul 14, 2026
58cc1fd
updated section numbers, added 1.86
Jul 14, 2026
f1f64e7
Sync the Ed25519 KeyFactorySpi OpenSSH path across the JDK 11/15 mult…
Jul 15, 2026
fa70011
Document checking for MR overlays and adding JVM-specific (testN) cov…
Jul 15, 2026
f090469
Stop bundling org.bouncycastle.asn1.iana into the Ant-built bcutil jars
Jul 15, 2026
ca363de
Stop bundling org.bouncycastle.asn1.iana into the Ant-built bcutil ja…
Jul 15, 2026
3464fe6
Fix KeyIdentifier.matches(List, KeyIdentifier, boolean) to examine ev…
Jul 15, 2026
2b9c104
Reach the Argon2 s2kCalculator null-guard in PGPUtil.makeKeyFromPassP…
Jul 15, 2026
0802cf1
Accept an empty passphrase on the JCE ARGON2 SecretKeyFactory path
Jul 15, 2026
bad0fa9
Validate untrusted RSASSA-PSS parameters in BcRsaPssUtil.createSigner
Jul 15, 2026
e2b3a39
Guard CMSUtils.getAEADMacLength against malformed AEAD parameters
Jul 15, 2026
5a3d831
Bound the scrypt parallelization parameter p in the PKCS8/PKCS12 cost…
Jul 15, 2026
b6a0550
Bound the 204/404 body drain in ESTService.getCSRAttributes so it can…
Jul 15, 2026
6d0ad7c
Reject a negative PBKDF2 iteration count in the CMS password-recipien…
Jul 15, 2026
6ba0153
Fall back to a module-safe ResourceBundle lookup in LocalizedMessage …
Jul 15, 2026
d6b8f75
Use ASN1BitString.getBytes() for composite signature components
Jul 15, 2026
8ad4366
Add a strict equals() to KEMRecipientId for parity with the other CMS…
Jul 15, 2026
b19c272
version bump
Jul 15, 2026
3f492e5
Return 0 from KCCMBlockCipher.getUpdateOutputSize so JCA CCM decrypti…
Jul 15, 2026
81ca968
Document the full version-bump file set (incl. the OpenPGP armor DEFA…
Jul 15, 2026
4ca5bc0
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 15, 2026
a6ae246
Add an X500NameStyle example showing how to parse a Distinguished Nam…
Jul 15, 2026
09cb1ed
Add the misc examples tree to the Gradle build as a non-publishing mo…
Jul 15, 2026
272fb32
Add ML-KEM and X-Wing KEM support to HPKE, relates to github #2351
Jul 15, 2026
b4df1c5
Bound the PKIX certification-path builder's depth-first search with a…
Jul 16, 2026
23b6712
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 16, 2026
3406b62
Keep junit out of the legacy provider jars by excluding main-namespac…
Jul 16, 2026
e1271da
Document the jdk1.3->jdk1.4 overlay layering and the legacy provider-…
Jul 16, 2026
38f563a
Drop crypto.agreement.owl.AllTests from the signed legacy Ant test st…
Jul 16, 2026
e57eda2
Revive the jdk1.3 (build1-3) provider build: sync rotted overlays (X5…
Jul 16, 2026
924fd93
added back PQC list
Jul 16, 2026
ff7b761
Guard empty/missing-content and out-of-range parse paths against leak…
Jul 17, 2026
f9762d3
Advance the jdk1.3 full build: re-introduce SecretWithEncapsulation w…
Jul 17, 2026
3001351
fixed typo in CVE number
Jul 17, 2026
eaeab5d
Merge branch 'main' of gitlab.cryptoworkshop.com:root/bc-java
Jul 17, 2026
cfbf497
minor cleanup.
Jul 17, 2026
606a959
Add PQCCertTest exercising ML-KEM and FrodoKEM certificate generation…
Jul 18, 2026
9b2a164
Enable FrodoKEM as a CMS RFC 9629 KEMRecipientInfo recipient by regis…
Jul 18, 2026
1dfefa6
Add user keying material (UKM) support to the CMS RFC 9629 KEMRecipie…
Jul 18, 2026
eac0b55
Register a Composite ML-KEM KEM Cipher so composite recipients work i…
Jul 19, 2026
657daa1
Route InvalidKeyException throws that fold in a caught exception's me…
Jul 19, 2026
5b0e00d
Route the RSA-KEM CipherSpi wrap-failure IllegalBlockSizeException th…
Jul 19, 2026
8831e2b
Add SecurityExceptions.noSuchAlgorithmException and route cause-foldi…
Jul 19, 2026
2dd651e
Add JceKEMAuthEnvelopedRecipient so KEM (RFC 9629) recipients work wi…
Jul 19, 2026
0d4fe40
Assert the AES-256-KW wrap OID in the Composite ML-KEM CMS test, pinn…
Jul 19, 2026
5b42463
fixed JavaDoc
Jul 19, 2026
52407d8
Document CMS container constructors, noting byte[] input must be the …
Jul 19, 2026
575a623
added doc on 1.85.1
Jul 19, 2026
c47e8a8
Fix CodeQL workflow: trigger on main not master, bump to codeql-actio…
Jul 19, 2026
d2e0c8b
Add CBOM generation workflow
Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
301 changes: 301 additions & 0 deletions .claude/skills/bcpqc-add-signature-algorithm/SKILL.md

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .claude/skills/build-jdk13-docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Runtime environment for the bc-java jdk1.3 (build1-3) legacy build.
#
# Base: Debian 4.0 "etch" i386 (glibc 2.3.6). Chosen deliberately:
# * i386 userland -> matches the 32-bit Sun JDK 1.3.1 binaries.
# * glibc < 2.4 -> no PTR_MANGLE pointer mangling. Sun's Classic VM green
# threads hand-roll jmp_buf context switches; on glibc
# >= 2.4 (e.g. bullseye/jessie 2.19) longjmp demangles a
# raw poked-in PC and jumps to garbage -> SIGSEGV. 2.3.6
# does not mangle, so the Classic/green VM runs.
# The host kernel is shared (containers share it), but green threads are
# user-space, so no kernel-version dependency bites here.
FROM debian/eol:etch

# The 2001-era Sun launch wrapper (bin/.java_wrapper) predates x86-64: it reads
# `uname -m`, and because this container shares the host's amd64 kernel that
# returns "x86_64", which the wrapper cannot map to its i386 lib dir -> it dies
# with "can't find libjava.so". apt is dead on EOL etch (no `linux32`), so shim
# `uname -m` to report i686. Everything else passes through to the real uname.
RUN cp -a /bin/uname /bin/uname.real \
&& printf '%s\n' \
'#!/bin/sh' \
'if [ "$1" = "-m" ]; then echo i686; exit 0; fi' \
'exec /bin/uname.real "$@"' > /bin/uname \
&& chmod 0755 /bin/uname

# Nothing else is baked in: the JDK, ant, aux jars and the repo are all
# bind-mounted at run time by build-jdk13.sh so the image stays tiny and the
# host tree is the single source of truth.
120 changes: 120 additions & 0 deletions .claude/skills/build-jdk13-docker/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
name: build-jdk13-docker
description: Build and test the legacy jdk1.3 (build1-3) distribution on a modern host by running the genuine Sun JDK 1.3.1 inside an i386 / glibc-2.3.6 Docker container. Use this whenever the user wants to run "build1-3" / the "jdk1.3" or "Java 1.3" build, get a bcprov-jdk13 jar, reproduce a genuine-1.3 compile failure, or when a genuine JDK 1.3.1 won't start on the host ("can't find libjava.so", missing libstdc++-libc6.1-1.so.2, or a green-threads Classic VM segfault). Captures the container recipe, why glibc < 2.4 is mandatory, the uname/libstdc++/threads traps, and that the jdk1.3 source overlays have rotted (the real source floor is Java 1.4).
---

# Building and testing the jdk1.3 (build1-3) distribution in Docker

The `jdk1.3` distribution is driven by `sh build1-3` → `ant/jdk13.xml` → `ant/bc+-build.xml`,
compiling with the **real Sun JDK 1.3.1** at `/opt/jdk1.3.1` and running tests on the same JRE.
Like `build1-4` it is a genuine-1.3 *compile* floor (post-1.3 APIs fail at compile time), but it
adds two things the jdk1.4 build does not: it builds its own **clean-room JCE** first (from
`jce/src/`, so **no jar signing** is needed — unlike jdk1.4/jdk15to18), and its preprocessor
rewrites the Java-1.4 cert-path API (`java.security.cert.CertStore/CertPath/PKIX*/…Selector`) to
BC's `org.bouncycastle.jce.cert.*` backport, plus `LinkedHashSet`→`HashSet`.

The blocker this skill solves: **a 2001-era 32-bit Sun JDK 1.3.1 cannot run on a modern Linux
host.** The fix is to run it in a period-appropriate i386 container.

## Quick start

```
.claude/skills/build-jdk13-docker/build-jdk13.sh provider # build the provider -> bcprov-jdk13 jar
.claude/skills/build-jdk13-docker/build-jdk13.sh test # full build + tests
.claude/skills/build-jdk13-docker/build-jdk13.sh shell # interactive 1.3 container (fast iteration)
.claude/skills/build-jdk13-docker/build-jdk13.sh # full build (no arg)
```

First run builds a tiny image (`bc-jdk13:etch`). i386 executes natively on an x86-64 kernel — **no
qemu**. Everything (JDK, ant, aux jars, the repo) is bind-mounted from the host; only a `uname`
shim is baked into the image. A full `provider` round is ~10 min (the `<replaceregexp>` preprocess
over ~6,800 files dominates, then the nojit Classic VM compiles).

## Why a genuine JDK 1.3.1 won't run on the host — and why etch

`/opt/jdk1.3.1` (→ `/opt/installs/jdk1.3.1_20`) is a 32-bit x86 Sun JDK. On Ubuntu 24.04:

1. **`uname` wall (cosmetic).** Its launch wrapper (`bin/.java_wrapper`) predates x86-64: it reads
`uname -m`, gets `x86_64` (the container shares the host's amd64 kernel), can't map that to its
i386 lib dir, and dies with **"can't find libjava.so."** Fixed by the image's `uname -m`→`i686`
shim (apt is dead on EOL etch, so there is no `linux32`).
2. **VM wall (fatal on the host).** After that:
- the default `-client`/HotSpot VM uses **native threads** whose launcher binary links the
extinct **`libstdc++-libc6.1-1.so.2`** (gone from modern distros; and 1.3 native threads on
NPTL is broken anyway);
- the `-classic` VM uses **green threads** and needs no libstdc++ — but it **segfaults** on
glibc ≥ 2.4. Cause: glibc 2.4 added `PTR_MANGLE` pointer mangling; Sun's green threads
hand-roll `jmp_buf` context switches, so `longjmp` demangles a raw poked-in PC and jumps to
garbage (`catchsegv` shows `EIP == fault address`, empty backtrace).

So the container base must be **i386 with glibc < 2.4**. `debian/eol:etch` (Debian 4.0, **glibc
2.3.6**) works; `debian/eol:sarge` (2.3.2) also works; anything ≥ 2.4 (jessie 2.19, …) segfaults.
Green threads are user-space, so the shared modern host **kernel** is not a problem.

The recipe therefore forces the **Classic VM / green threads** via a custom `jvm.cfg` (`-classic`
first = default VM → wrapper selects green threads → no libstdc++), sidestepping both VM problems.

## Recipe internals (in this skill dir)

- **`Dockerfile`** — `FROM debian/eol:etch`; the only customization is the `uname -m`→`i686` shim.
- **`jvm.cfg`** — reorders `-classic` to the top so every forked `java`/`javac` defaults to the
green-threads Classic VM. Mounted over `/opt/jdk1.3.1/jre/lib/jvm.cfg` (works because that file
already exists in the ro JDK mount).
- **`build-jdk13.sh`** — bind-mounts the JDK at `/opt/jdk1.3.1` (matching `build1-3`'s hardcoded
`JDKPATH`), ant `/opt/apache-ant-1.6.5`, `/opt/javamail-1.3.1`, `/opt/jaf-1.0.2`, and the repo at
`/work`; exports the `JAVA_MAIL_HOME`/`JAVA_ACTIVATION_HOME` that `build1-3` uses but forgets to
set; runs as your uid so build artifacts aren't root-owned.

Two non-obvious mount facts:
- **ORO for `<replaceregexp>`.** JDK 1.3 has no `java.util.regex`, so ant's regexp preprocessing
needs a Jakarta ORO impl (`/opt/ant/lib` ships only the `ant-apache-oro` *adapter*). The script
locates an `oro-2.0.x.jar` (default `~/.m2/.../oro/2.0.8`) and injects it with `ANT_ARGS="-lib
/opt/extralib"`. It is **not** dropped into `/opt/ant/lib` because docker cannot create a new
mountpoint file inside the read-only `/opt/ant` mount (that fails with "read-only file system").
- `--platform linux/386` sets the userland arch but **not** the syscall personality, so `uname -m`
still returns `x86_64` — hence the image `uname` shim rather than relying on `linux32`.

## The jdk1.3 overlays have rotted — the real source floor is Java 1.4

`build1-3 provider` does not currently produce a jar out of the box: the current `src/main/java`
uses **Java 1.4 APIs** that the jdk1.3 tree never caught up with. Known breakages (fixed where
noted; expect more to surface as each layer clears):

- **`Throwable.initCause` (Java 1.4, absent in 1.3).** Everything routes through
`org.bouncycastle.util.Exceptions` and `org.bouncycastle.jcajce.provider.util.SecurityExceptions`,
whose base classes chain via `initCause`. Handled with **jdk1.3 overlays** that construct
message-only (1.3 has no `getCause`, so no caller can observe a dropped cause) — keep the message
text verbatim (test contract) and the factory signatures in lockstep with base. Direct
`initCause`/`getCause` users outside those two factories need per-file overlays too (grep them:
`grep -rl '\.initCause(\|\.getCause(' core/src/main/java prov/src/main/java`).
- **`@Deprecated` survived preprocessing** (`illegal character: \64` = `@`, then cascading
`<identifier> expected`). Root cause: the shared `ant/build.regexp` `${regexp}` strips
`@Override`/`@SuppressWarnings`/`@FunctionalInterface` but **not** `@Deprecated`; `jdk14.xml` has
a dedicated `@Deprecated` pass and `jdk13.xml` was missing it. **Fixed** by mirroring that pass
into `ant/jdk13.xml`. (If a new annotation type appears, add a pass the same way.)

The Java-1.4-vs-1.3 delta is narrow in reachable code (`initCause`/`getCause` a handful of files,
plus a few `java.net.URI`/`java.nio.*` users, most of which already have overlays). There are **no**
`assert` statements or `java.util.regex` uses in reachable main code. So the effort is overlay-sync,
not a rewrite. Follow the overlay discipline in `docs/claude/build-jdk14.md` (prefer deleting an
overlay when base is 1.3-clean after preprocessing; NOTE-comment every overlay that must exist;
keep `core/src/main/jdk1.3/.../util/Properties.java` mirroring base constants).

## Iterating fast

The `<replaceregexp>` preprocess is the ~7-min bottleneck, and the staging tree is **never cleaned**
by the build (stale sources keep compiling), so after changing overlays/excludes:

```
rm -rf build # on the host; build/ is gitignored
.claude/skills/build-jdk13-docker/build-jdk13.sh provider
```

For tighter loops use `shell`: it drops you into the 1.3 container with everything mounted, so you
can run `sh build1-3 provider` (or `ant -f ant/jdk13.xml build-provider`) directly and re-run after
editing overlays in `/work`, without paying container startup each time. Errors go to the console;
failed test suites write per-suite XML under `build/artifacts/jdk1.3/reports/xml/`.

Verify overlay fixes against the real build — the preprocessor plus 1.3 javac is the only authority,
never eyeball. Related: `docs/claude/build-jdk14.md`, the `build-jdk15to18` skill, and CLAUDE.md's
"Main source stays Java 4 compatible" note (the maintained floor is 1.4; 1.3 is stricter still).
89 changes: 89 additions & 0 deletions .claude/skills/build-jdk13-docker/build-jdk13.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#!/bin/sh -
#
# Drive the bc-java jdk1.3 (build1-3) legacy build inside an i386 / glibc-2.3.6
# container, because a genuine Sun JDK 1.3.1 no longer runs on a modern host
# (its native-threads launcher needs the extinct libstdc++-libc6.1-1.so.2, and
# its green-threads Classic VM segfaults on glibc >= 2.4 pointer mangling).
#
# Usage:
# ./build-jdk13.sh # full build (build1-3, no arg)
# ./build-jdk13.sh provider # provider only (build1-3 provider)
# ./build-jdk13.sh test # build + run the test suite
# ./build-jdk13.sh shell # interactive shell in the container (debug)
#
# Override any host path via env, e.g. BC_JAVA=/path/to/bc-java ./build-jdk13.sh
#
set -e

SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)

# --- host paths (all bind-mounted read-only except the repo) -----------------
BC_JAVA=${BC_JAVA:-/home/dgh/bc/git/repositories/bc-java}
# Resolve the /opt/jdk1.3.1 symlink to its real target so the mount is stable.
JDK_HOST=${JDK_HOST:-$(readlink -f /opt/jdk1.3.1)}
ANT_HOST=${ANT_HOST:-/opt/apache-ant-1.6.5}
MAIL_HOST=${MAIL_HOST:-/opt/javamail-1.3.1}
JAF_HOST=${JAF_HOST:-/opt/jaf-1.0.2}
IMAGE=${IMAGE:-bc-jdk13:etch}

# ORO impl for ant's <replaceregexp> (JDK 1.3 has no java.util.regex). Not
# bundled with the skill (it is a binary); located from common host spots, or
# set ORO_JAR explicitly. Any jakarta-oro / oro 2.0.x jar works.
if [ -z "$ORO_JAR" ]; then
for c in /home/dgh/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar \
/home/dgh/.m2/repository/oro/oro/2.0.7/oro-2.0.7.jar \
"$SCRIPT_DIR"/oro-*.jar "$SCRIPT_DIR"/jakarta-oro*.jar; do
[ -e "$c" ] && { ORO_JAR=$c; break; }
done
fi

for p in "$BC_JAVA/build1-3" "$JDK_HOST/bin/.java_wrapper" "$ANT_HOST/bin/ant" \
"$MAIL_HOST/mail.jar" "$JAF_HOST/activation.jar" "$ORO_JAR" \
"$SCRIPT_DIR/Dockerfile" "$SCRIPT_DIR/jvm.cfg"; do
[ -n "$p" ] && [ -e "$p" ] || {
echo "ERROR: missing required path: ${p:-<ORO_JAR unset: set ORO_JAR=/path/to/oro-2.0.x.jar>}" >&2
exit 1
}
done

# --- build the (tiny) image once ---------------------------------------------
if ! docker image inspect "$IMAGE" >/dev/null 2>&1; then
echo ">> building $IMAGE"
docker build --platform linux/386 -t "$IMAGE" "$SCRIPT_DIR"
fi

# --- what to run inside -------------------------------------------------------
if [ "$1" = "shell" ]; then
RUNCMD="exec /bin/sh"
TTY="-it"
else
# build1-3 references $JAVA_MAIL_HOME / $JAVA_ACTIVATION_HOME but never sets
# them, and hardcodes JDKPATH=/opt/jdk1.3.1 -- so we mount the JDK there and
# export the two homes. ANT_HOME is auto-detected by the ant script.
RUNCMD="cd /work && exec sh build1-3 $*"
TTY=""
fi

# --- run ----------------------------------------------------------------------
# Nested bind mounts overlay a single file inside a read-only tree:
# * jvm.cfg -> make -classic (green threads) the default VM. This works only
# because jvm.cfg already EXISTS in the ro JDK mount; docker cannot create a
# NEW mountpoint inside a ro mount (that is why oro goes to its own dir and
# is added with ant -lib, not dropped into the ro /opt/ant/lib).
exec docker run --rm $TTY --platform linux/386 \
--user "$(id -u):$(id -g)" \
-e HOME=/tmp \
-e JAVA_MAIL_HOME=/opt/javamail-1.3.1 \
-e JAVA_ACTIVATION_HOME=/opt/jaf-1.0.2 \
-e ANT_HOME=/opt/ant \
-e ANT_ARGS="-lib /opt/extralib" \
-e PATH=/opt/jdk1.3.1/bin:/opt/ant/bin:/usr/bin:/bin \
-w /work \
-v "$BC_JAVA":/work \
-v "$JDK_HOST":/opt/jdk1.3.1:ro \
-v "$SCRIPT_DIR/jvm.cfg":/opt/jdk1.3.1/jre/lib/jvm.cfg:ro \
-v "$ANT_HOST":/opt/ant:ro \
-v "$ORO_JAR":/opt/extralib/oro.jar:ro \
-v "$MAIL_HOST":/opt/javamail-1.3.1:ro \
-v "$JAF_HOST":/opt/jaf-1.0.2:ro \
"$IMAGE" /bin/sh -c "$RUNCMD"
17 changes: 17 additions & 0 deletions .claude/skills/build-jdk13-docker/jvm.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Reordered jvm.cfg for the bc-java jdk1.3 Docker build.
#
# First non-# line is the DEFAULT VM. We put -classic first so that every
# `java`/`javac` the build forks selects the Classic VM, which the launch
# wrapper runs with GREEN THREADS. That matters twice:
# * the green-threads launcher binary does NOT link the extinct
# libstdc++-libc6.1-1.so.2 that the native-threads (client/hotspot)
# launcher needs (and which no modern distro ships);
# * green threads are user-space, sidestepping the LinuxThreads-vs-NPTL
# mismatch that breaks Sun 1.3 native threads.
# The other VMs stay listed so an explicit -client/-server still resolves.
#
-classic
-client
-hotspot
-server
Loading