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

add check for canonical point encodings where needed, and tests #193

Merged
merged 6 commits into from
Dec 15, 2022

Conversation

conradoplg
Copy link
Contributor

While adding support for Ed448 I noticed that curve25519-dalek and Ed448-Goldilocks didn't check for non-canonical point encodings (e.g. with Y coordinate >= p). Turns out this isn't needed for Ed25519 since we check for non-prime order points and that also blocks non-canonical points, but it was needed for Ed448. I also added tests for all ciphersuites.

@conradoplg conradoplg requested a review from dconnolly December 7, 2022 19:02
@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2022

Codecov Report

Base: 76.03% // Head: 75.09% // Decreases project coverage by -0.94% ⚠️

Coverage data is based on head (aaa4264) compared to base (1d06341).
Patch coverage: 78.42% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #193      +/-   ##
==========================================
- Coverage   76.03%   75.09%   -0.95%     
==========================================
  Files          25       25              
  Lines        2387     2349      -38     
==========================================
- Hits         1815     1764      -51     
- Misses        572      585      +13     
Impacted Files Coverage Δ
frost-core/src/signing_key.rs 69.44% <0.00%> (-1.99%) ⬇️
frost-core/src/frost/identifier.rs 75.43% <10.00%> (-12.32%) ⬇️
frost-core/src/frost/round2.rs 68.00% <22.22%> (-3.84%) ⬇️
frost-core/src/error.rs 33.33% <50.00%> (-66.67%) ⬇️
frost-ed448/src/lib.rs 58.27% <71.42%> (+1.65%) ⬆️
frost-core/src/frost/keys.rs 80.21% <76.47%> (-0.31%) ⬇️
frost-secp256k1/src/lib.rs 64.84% <80.00%> (-0.45%) ⬇️
frost-ristretto255/src/lib.rs 56.71% <85.18%> (-7.71%) ⬇️
frost-p256/src/lib.rs 61.84% <87.87%> (-2.19%) ⬇️
frost-ed25519/src/lib.rs 49.07% <91.66%> (-9.14%) ⬇️
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

dconnolly
dconnolly previously approved these changes Dec 14, 2022
Copy link
Contributor

@dconnolly dconnolly left a comment

Choose a reason for hiding this comment

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

Great!

@dconnolly
Copy link
Contributor

Oh I may have done an incomplete merge conflict resolve

@dconnolly
Copy link
Contributor

@mergify rebase

@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2022

rebase

❌ Base branch update has failed

Git reported the following error:

Rebasing (1/2)
error: could not apply 2edc4f6... add check for canonical point encodings where needed, and tests
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2edc4f6... add check for canonical point encodings where needed, and tests
Auto-merging frost-secp256k1/tests/frost.rs
Auto-merging frost-p256/tests/frost.rs
Auto-merging frost-ed448/tests/frost.rs
Auto-merging frost-ed448/src/lib.rs
CONFLICT (content): Merge conflict in frost-ed448/src/lib.rs
Auto-merging frost-ed25519/tests/frost.rs
Auto-merging frost-ed25519/src/lib.rs

err-code: 12F0A

@conradoplg
Copy link
Contributor Author

conradoplg commented Dec 14, 2022

@dconnolly fixed it! not really, fixing it 😅

@conradoplg
Copy link
Contributor Author

Now it's really fixed!

Copy link
Contributor

@mpguerra mpguerra left a comment

Choose a reason for hiding this comment

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

Re-approving to get this merged.

mergify bot added a commit that referenced this pull request Dec 15, 2022
@mergify mergify bot merged commit 9514e76 into main Dec 15, 2022
@mergify mergify bot deleted the check-canonical-encodings branch December 15, 2022 09:38
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