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/suite_b: Thread CPU features through functions using Modulus. #2181

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

briansmith
Copy link
Owner

Follow the same pattern that is used in arithmetic/bigint.rs: Since we have to construct a Modulus at roughly the same place we have to get the proof we've done CPU feature detection, just have Modulus contain the cpu::Features, so that any function that takes a Modulus no longer needs a cpu::Features argument.

Then, make a step towards threading cpu::Features all the way down to to the callers of the lowest-level C/assembly functions. This will facilitate a future refactoring where all dispatching based on CPU features is moved out of the assembly code, from upstream.

Follow the same pattern that is used in arithmetic/bigint.rs: Since we
have to construct a `Modulus` at roughly the same place we have to get
the proof we've done CPU feature detection, just have `Modulus`
contain the `cpu::Features`, so that any function that takes a
`Modulus` no longer needs a `cpu::Features` argument.

Then, make a step towards threading `cpu::Features` all the way down to
to the callers of the lowest-level C/assembly functions. This will
facilitate a future refactoring where all dispatching based on CPU
features is moved out of the assembly code, from upstream.
@briansmith briansmith self-assigned this Dec 10, 2024
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 99.57806% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.94%. Comparing base (3518d05) to head (6212ecb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ec/suite_b/ecdsa/signing.rs 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2181   +/-   ##
=======================================
  Coverage   96.93%   96.94%           
=======================================
  Files         154      154           
  Lines       20195    20238   +43     
  Branches      464      464           
=======================================
+ Hits        19577    19619   +42     
  Misses        512      512           
- Partials      106      107    +1     

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

@briansmith briansmith merged commit aca068c into main Dec 10, 2024
158 checks passed
@briansmith briansmith deleted the b/publicmodulus-2 branch December 10, 2024 23:19
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.

1 participant