Skip to content

Restore EC consistency checks for Linux - #137355

Merged
vcsjones merged 1 commit into
dotnet:mainfrom
vcsjones:ec-consistency-check
Nov 12, 2026
Merged

vcsjones merged 1 commit into
dotnet:mainfrom
vcsjones:ec-consistency-check

Conversation

@vcsjones

Copy link
Copy Markdown
Member

In #127190 when moving off of EC_KEY to EVP_PKEY the key consistency check was lost, so a D that does not match a Q would import. We need the EVP_PKEY equivalent of EC_KEY_check_key.

We don't have consistency behavior of this across all platforms, but this restores the behavior on Linux. We can fix the other platforms in a separate pull request so this one can be considered for backport, separately from other fixes.

Contributes to #137336.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@vcsjones vcsjones added this to the 12.0.0 milestone Nov 11, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security
See info in area-owners.md if you want to be subscribed.

@vcsjones
vcsjones merged commit d1271ee into dotnet:main Nov 12, 2026
100 checks passed
@vcsjones

Copy link
Copy Markdown
Member Author

/backport to release/11.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0 (link to workflow run)

@vcsjones
vcsjones deleted the ec-consistency-check branch November 13, 2026 00:11
ViveliDuCh pushed a commit that referenced this pull request Nov 14, 2026
Backport of #137355 to release/11.0

/cc @vcsjones

## Customer Impact

- [x] Customer reported
- [ ] Found internally

Reported by a customer in
#137336

In .NET 10 and earlier on Linux, inconsistent EC key parameters would
raise an exception if the public and private key did not match. In .NET
11, EC keys where the private (`D`) and public (`Q`) parameters did not
match no longer throws an exception. Customers would not be able to
detect incorrect EC key parameters, and these incorrect parameters would
behave unexpectedly.


## Regression

- [x] Yes
- [ ] No

Regressed in #127190.

## Testing

New tests were added. Existing tests show that other functionality is
not regressed.

## Risk

Low. Adds a missing key validation call.

---------

Co-authored-by: Kevin Jones <[email protected]>
Co-authored-by: Jeremy Barton <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants