Return Option from vartime inversion and pow methods#1260
Open
cong-or wants to merge 2 commits intoRustCrypto:masterfrom
Open
Return Option from vartime inversion and pow methods#1260cong-or wants to merge 2 commits intoRustCrypto:masterfrom
cong-or wants to merge 2 commits intoRustCrypto:masterfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1260 +/- ##
==========================================
- Coverage 90.84% 90.83% -0.01%
==========================================
Files 186 186
Lines 21673 21686 +13
==========================================
+ Hits 19688 19699 +11
- Misses 1985 1987 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3018fca to
6352578
Compare
Member
|
I'm a little confused that |
Contributor
Author
@tarcieri No worries — happy to rebase this when you're ready to collect breaking changes for the next release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1096 converted the vartime bit shift methods from
CtOptiontoOption. This does the same for vartime inversion and pow.Since these methods are already variable-time, wrapping results in
CtOptiondoesn't add any constant-time guarantees — it just forces eager evaluation in combinators whereOptionwouldbe lazy.
The
Inverttrait impls still returnCtOption— #1097 tried changing that and got reverted in #1124 becauseelliptic-curveneedsInvert::Outputto stay flexible. So the trait implsconvert back from
Optionvia match.