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

[EC] Unify scalar_mul_public for ec_nistp curves #2004

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

dkostic
Copy link
Contributor

@dkostic dkostic commented Nov 20, 2024

Issues:

CryptoAlg-2545

Description of changes:

Added unified scalar_mul_public implemented in ec_nistp.
This is a refactor of the algorithm in p384.c and p521.c
that makes it generic. The implementations in p384.c, p521.c,
as well as in p256.c, are substituted with this new unified
implementation.

Call-outs:

Builds on top of #2003

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@dkostic dkostic requested a review from a team as a code owner November 20, 2024 00:30
@dkostic dkostic force-pushed the ec-nistp-scalar-mul-public-v2 branch from c034744 to db30820 Compare November 20, 2024 00:48
@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.89%. Comparing base (ab8953b) to head (12c1aec).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2004   +/-   ##
=======================================
  Coverage   78.89%   78.89%           
=======================================
  Files         595      594    -1     
  Lines      102451   102380   -71     
  Branches    14527    14508   -19     
=======================================
- Hits        80827    80772   -55     
+ Misses      20976    20958   -18     
- Partials      648      650    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

crypto/fipsmodule/ec/wnaf.c Outdated Show resolved Hide resolved
Copy link
Contributor

@nebeid nebeid left a comment

Choose a reason for hiding this comment

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

Left a documentation question whether for this PR or an upcoming one.

ctx->felem_neg(ftmp, &g_table[idx * g_point_num_limbs + ctx->felem_num_limbs]);
y_tmp = ftmp;
}
ctx->point_add(x_out, y_out, z_out, x_out, y_out, z_out, 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the mixed flag explained elsewhere (re removing the comments that were before this step.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Samuel asked the same so I'll add the comment back in my next PR that's going to deal with point addition anyway.

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