-
Notifications
You must be signed in to change notification settings - Fork 922
ECC: import point, always do some checks #9684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
a9176d2 to
bf652e9
Compare
|
retest this please |
de0099f to
11cf7bb
Compare
|
retest this please nodes down |
| 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
retest this please retest FIPS |
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