Skip to content
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

ECC: generate values in range of order by rejection #7020

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

SparkiDev
Copy link
Contributor

Description

When generating private key and nonce for ECDSA, use rejection sampling. Note: SP uses this algorithm

Fixes zd#17099

Testing

./configure '--disable-shared' '--enable-ecccustcurves=all'
./configure '--disable-shared' '--enable-ecccustcurves=all' --enable-heapmath
./configure '--disable-shared' '--enable-ecccustcurves=all' --enable-fastmath

Checklist

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

@SparkiDev SparkiDev self-assigned this Nov 30, 2023
@SparkiDev SparkiDev force-pushed the ecc_gen_k_by_reject branch 2 times, most recently from 3028ecc to 2790fc9 Compare November 30, 2023 02:05
@SparkiDev SparkiDev force-pushed the ecc_gen_k_by_reject branch 3 times, most recently from 6061904 to 7e2a399 Compare December 12, 2023 02:08
When generating private key and nonce for ECDSA, use rejection sampling.
Note: SP uses this algorithm
Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good otherwise. Just spelling

wolfcrypt/src/ecc.c Outdated Show resolved Hide resolved
@SparkiDev SparkiDev assigned dgarske and wolfSSL-Bot and unassigned SparkiDev Dec 14, 2023
@SparkiDev
Copy link
Contributor Author

Reporter is happy the new code is timing resistant.

@cconlon cconlon merged commit fb6b022 into wolfSSL:master Dec 14, 2023
108 checks passed
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.

4 participants