ECC: import point, always do some checks#9684
Open
SparkiDev wants to merge 1 commit intowolfSSL:masterfrom
Open
ECC: import point, always do some checks#9684SparkiDev wants to merge 1 commit intowolfSSL:masterfrom
SparkiDev wants to merge 1 commit intowolfSSL:masterfrom
Conversation
a9176d2 to
bf652e9
Compare
Contributor
Author
|
retest this please |
de0099f to
11cf7bb
Compare
Contributor
Author
|
retest this please nodes down |
JacobBarthelmeh
requested changes
Jan 30, 2026
| WOLFSSL_API | ||
| int wc_ecc_import_x963_ex(const byte* in, word32 inLen, ecc_key* key, | ||
| int curve_id); | ||
| int wc_ecc_import_x963_ex2(const byte* in, word32 inLen, ecc_key* key, |
Contributor
There was a problem hiding this comment.
Maybe wc_ecc_import_and_check_x963? Am okay though if staying with *_ex2(), but this needs a WOLFSSL_API or WOLFSSL_LOCAL for if it is a public function or not.
Contributor
Author
There was a problem hiding this comment.
Check will happen when WOLFSSL_VALIDATE_ECC_IMPORT is defined in wc_ecc_import_check_x963_ex().
By adding _ex2() with untrusted parameter it doesn't make users think that the original imports will never check.
11cf7bb to
d075b51
Compare
Always check for infinity and, when B param available, whether the point is on the curve when point is untrusted. Change TLS code to treat points from peer as untrusted on import.
d075b51 to
565ac4c
Compare
Contributor
Author
|
retest this please retest FIPS |
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.
Description
Always check for infinity and, when B param available, whether the point is on the curve.
Fixes zd#21057
Testing
./configure --disable-shared
./configure --disable-shared --enable-opensslextra
Checklist