Skip to content

Conversation

@SparkiDev
Copy link
Contributor

@SparkiDev SparkiDev commented Jan 20, 2026

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

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@SparkiDev SparkiDev self-assigned this Jan 20, 2026
@SparkiDev SparkiDev force-pushed the ecc_import_pub_check_fix branch 2 times, most recently from a9176d2 to bf652e9 Compare January 21, 2026 04:05
@SparkiDev
Copy link
Contributor Author

retest this please

@SparkiDev SparkiDev force-pushed the ecc_import_pub_check_fix branch 3 times, most recently from de0099f to 11cf7bb Compare January 30, 2026 01:20
@SparkiDev
Copy link
Contributor Author

retest this please

nodes down

@SparkiDev SparkiDev assigned wolfSSL-Bot and unassigned SparkiDev Jan 30, 2026
@SparkiDev SparkiDev requested a review from wolfSSL-Bot January 30, 2026 04:16
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,
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@SparkiDev SparkiDev force-pushed the ecc_import_pub_check_fix branch from 11cf7bb to d075b51 Compare February 2, 2026 05:45
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.
@SparkiDev SparkiDev force-pushed the ecc_import_pub_check_fix branch from d075b51 to 565ac4c Compare February 2, 2026 06:13
@SparkiDev
Copy link
Contributor Author

retest this please

retest FIPS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants