LibreSSL ML-KEM compatibility fixes and OpenBSD hardening cleanup#2404
LibreSSL ML-KEM compatibility fixes and OpenBSD hardening cleanup#2404daviduhden wants to merge 6 commits into
Conversation
|
AI slope will not be accepted anyway |
582f517 to
09e8ae3
Compare
Why upstream
|
cf0fd73 to
a1b037e
Compare
|
@orignal thanks for the clarification about the intentional random SessionRequest sizing in I aligned this branch with that behavior again (restored the random NTCP2 PQ downgrade branch for size variance) and re-ran long runtime checks in this environment (Homebrew + clang) for both TLS backends. Build/runtime environment used
Results after restoring random SessionRequest size variation
Current status
I will keep this branch aligned with upstream behavior while continuing NTCP2 interoperability diagnosis. |
|
@orignal update with the latest production-readiness work, while keeping this branch aligned with 1) Upstream alignment / conflicts
2) Added deterministic ML-KEM encaps/decaps coverageI added a dedicated roundtrip test:
Roundtrip test result in this environment:
This gives deterministic proof of at least one successful encapsulation/decapsulation path. 3) Runtime evidence (320s windows,
|
| Variant | NTCP2 connected | NTCP2 crypto6 | NTCP2 crypto4 | SessionCreated read errors | SSU2 established | SSU2 PQ4 effective | SSU2 PQ2 effective |
|---|---|---|---|---|---|---|---|
| LibreSSL (this branch) | 79 | 28 | 51 | 18 | 19 | 0 | 11 |
| OpenSSL (this branch) | 92 | 36 | 56 | 26 | 17 | 1 | 14 |
| OpenSSL (pure upstream binary) | 101 | n/a | n/a | 30 | 27 | n/a | n/a |
Additional NTCP2 stability indicators on LibreSSL run:
SessionConfirmed sent: 61Received message decrypted: 347I2NPblocks processed: 333- ML-KEM native decapsulation successes observed repeatedly.
4) Status for preview
Given the deterministic ML-KEM roundtrip coverage plus sustained runtime traffic on both transports, this PR is now in preview-ready shape from my side.
b5c8052 to
7b55679
Compare
Summary
This PR brings LibreSSL ML-KEM compatibility to parity with the OpenSSL branch intent, while keeping the OpenBSD hardening cleanup and staying rebased on top of
openssl.What changed
1) ML-KEM / LibreSSL compatibility
OPENSSL_PQtoOPENSSL_MLKEMOPENSSL_MLKEMfor LibreSSL>= 4.3.0OPENSSL_MLDSA2) NTCP2 upstream behavior alignment
ClientLogin()random SessionRequest size variation (upstream behavior), to avoid divergence in handshake shape.3) OpenBSD hardening cleanup
4) Added deterministic PQ test coverage
tests/test-postquantum.cpptests/Makefileastest-postquantumValidation performed in this environment
Toolchain/runtime:
Checks completed:
test-postquantumpassed on both LibreSSL and OpenSSL buildsntcp2.version=4andssu2.version=4Current production-readiness status
SessionCreated read errorin public-peer conditions, in patterns comparable to current upstream runtime behaviorGiven the above, this PR is prepared for preview/review as the compatibility-correct baseline and keeps parity with upstream behavior while improving LibreSSL correctness and testability.