Repository navigation
Added Brainpool curves for TLS 1.3 and ECDSA verification - #456
Merged
fdesbiens merged 5 commits intoOct 16, 2026
Merged
Conversation
Fixes eclipse-threadx#380 NetX Secure lacked Brainpool domain parameters and TLS 1.3 mappings, so it could not negotiate Brainpool key shares or verify signatures on these curves. Added RFC 5639 P256r1, P384r1 and P512r1 curves, RFC 8734 groups and signature schemes, X.509 OIDs, and a general projective doubling formula. Added regression vectors and TLS handshake tests. Standalone ECDH, ECDSA and Brainpool tests passed (3/3); TLS 1.3 Brainpool tests passed (3/3); the TLS 1.2 ECC baseline passed (1/1). GCC 14 CMake/Ninja builds passed for TLS 1.3, TLS 1.2 and no-ECC configurations. Assisted-by: Codex (GPT-6-Sol) <noreply@openai.com>
Brainpool overlapped the TLS certificate verification fix, and its crypto test list conflicted with the current standalone build configuration. Keep both the Brainpool curve check and the legacy ECDSA SHA-1 digest fix. Link the separately built crypto library only in the Linux FIPS profile; the standalone profile already compiles its crypto sources into the test. GCC 14 CMake/Ninja tests passed 1/1 each for Brainpool in default and standalone crypto builds, TLS 1.3 ECC, and legacy ECDSA verification. Assisted-by: Codex (gpt-6.1-sol) <noreply@openai.com>
The integrated EC source carried two disclosure lines, causing the repository disclosure check to fail. Keep the existing line once in the file header. The disclosure check passed. Assisted-by: Codex (gpt-6.1-sol) <noreply@openai.com>
fdesbiens
marked this pull request as draft
October 16, 2026 16:57
Brainpool signature selection and curve matching lacked regression coverage. A cipher table entry with a missing method could also dereference a null pointer while building the ClientHello signature list. Exercise Brainpool signature schemes, mismatched curves, and invalid crypto method requests. Skip incomplete cipher table entries before reading their methods. GCC 14 CMake/Ninja runs passed: 35/35 standalone crypto, 35/35 crypto coverage, 188/188 default Secure, and 164/164 TLS 1.3 Secure. Changed production code reached 175/175 lines and 77/78 branches; the untested branch requires a prime-field curve ID above Brainpool P512, while registered higher IDs use separate curve implementations. Assisted-by: Codex (gpt-6.1-sol) <noreply@openai.com>
The projective doubling path selected the general formula by a numeric curve ID range. That range depended on the current ID assignments and left an unreachable upper-bound branch in the available prime-field curves. Match each supported Brainpool curve ID explicitly. This keeps future curve IDs from selecting the general formula solely because they fall in that range. GCC 14 CMake/Ninja suites passed 35/35 standalone crypto, 35/35 crypto coverage, 188/188 default Secure, and 164/164 TLS 1.3 Secure. Changed production code reached 176/176 lines and 80/80 branches. Not run on hardware. Assisted-by: Codex (GPT-6) <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #380
NetX Secure lacks Brainpool domain parameters and TLS 1.3 mappings, so it cannot negotiate Brainpool key shares or verify signatures on these curves. A cipher table entry with a missing method can also cause a null dereference while building the ClientHello signature list.
Added RFC 5639 P256r1, P384r1 and P512r1 curves, RFC 8734 groups and signature schemes, X.509 OIDs, and the general projective doubling formula needed by these curves. The formula is selected by explicit curve IDs. Incomplete cipher table entries are skipped, and ECDH, ECDSA, and TLS handshake regressions were added. MiyukiDark's Brainpool branch was consulted for integration scope; the domain values were checked against RFC 5639 and OpenSSL. The matching manual update is eclipse-threadx/rtos-docs-asciidoc#99.
GCC 14 CMake/Ninja suites passed 35/35 standalone crypto, 35/35 crypto coverage, 188/188 default Secure, and 164/164 TLS 1.3 Secure. Changed production code reached 176/176 lines and 80/80 branches. Not run on hardware.