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: Make more LeakyLimb->Limb conversions explicit. #2179

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

briansmith
Copy link
Owner

Rename Modulus to PublicModulus and add a new Modulus:

PublicModulus::limbs: [LeakyLimb; _]
Modulus::limbs: [Limb; _]

Refactor the callers to (approximately) minimize the number of types a Modulus is constructed, as it will require a copy if/when Limb becomes a type distinct from LeakyLimb.

Make it clearer that it is a variable-time operation.
@briansmith briansmith self-assigned this Dec 9, 2024
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

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

Project coverage is 96.92%. Comparing base (cf510c4) to head (d7a133b).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/ec/suite_b/ops.rs 99.23% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2179      +/-   ##
==========================================
- Coverage   96.93%   96.92%   -0.01%     
==========================================
  Files         154      154              
  Lines       20157    20195      +38     
  Branches      464      464              
==========================================
+ Hits        19539    19575      +36     
  Misses        512      512              
- Partials      106      108       +2     

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

Rename `Modulus` to `PublicModulus` and add a new `Modulus`:

    PublicModulus::limbs: [LeakyLimb; _]
    Modulus::limbs: [Limb; _]

Refactor the callers to (approximately) minimize the number of
types a `Modulus` is constructed, as it will require a copy if/when
`Limb` becomes a type distinct from `LeakyLimb`.

(In the future, it is likely that more methods of `CommonOps` and
`ScalarOps` will move to `Modulus<Q>` and `Modulus<N>`,
respectively.)
@briansmith briansmith merged commit 8eff313 into main Dec 10, 2024
158 checks passed
@briansmith briansmith deleted the b/publicmodulus branch December 10, 2024 20:01
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