Skip to content

mp_sqrtmod_prime: bail early on the check for small values#6828

Merged
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
SparkiDev:mp_sqrtmod_prime_cust_curve
Oct 5, 2023
Merged

mp_sqrtmod_prime: bail early on the check for small values#6828
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
SparkiDev:mp_sqrtmod_prime_cust_curve

Conversation

@SparkiDev
Copy link
Copy Markdown
Contributor

@SparkiDev SparkiDev commented Oct 2, 2023

Description

When using custom curves, only use the first 22 values with the prime to calculate Legendre symbol. The known curves work and defeats long running times when non-prime values are passed in.

Fixes zd#16753

Testing

PoC

Checklist

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

@SparkiDev SparkiDev self-assigned this Oct 2, 2023
@SparkiDev SparkiDev force-pushed the mp_sqrtmod_prime_cust_curve branch from 380eabb to 05dfed4 Compare October 3, 2023 06:15
@SparkiDev SparkiDev changed the title mp_sqrtmod_prime: use slower version when customer curves mp_sqrtmod_prime: bail early on the check for small values Oct 3, 2023
When using custom curves, only use the first 22 values with the prime to
calculate Legendre symbol. The known curves work and defeats long running
times when non-prime values are passed in.
@SparkiDev SparkiDev force-pushed the mp_sqrtmod_prime_cust_curve branch from 05dfed4 to e55e679 Compare October 3, 2023 06:48
@bandi13
Copy link
Copy Markdown
Contributor

bandi13 commented Oct 3, 2023

retest this please

@SparkiDev SparkiDev assigned wolfSSL-Bot and unassigned SparkiDev Oct 5, 2023
@JacobBarthelmeh JacobBarthelmeh merged commit c26ad8d into wolfSSL:master Oct 5, 2023
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.

4 participants