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

Test and refactor EvenY (renamed from PositiveY) #94

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

conradoplg
Copy link
Contributor

Closes #74

While documenting and adding tests I realized that we can make it easier for the callers by making keys with even Y coordinates inside the wrapper FROST functions, so that users don't need to call into_positive_y() manually. I left the trait pub in case they want to use frost-core directly for some reason and thus would need to convert manually.

This required implementing EvenY for SecretShare, and since for it it's expensive to check if Y is even (it doesn't have the group public key, and needs to convert to KeyPackage), I added a has_even_y() method to the trait and added a parameter to into_even_y() to pass a previously computed evenness boolean.

@conradoplg conradoplg changed the base branch from main to update-frost-2 November 20, 2023 19:16
@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2023

Codecov Report

Merging #94 (3407fd0) into main (397f501) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #94   +/-   ##
=======================================
  Coverage   84.73%   84.73%           
=======================================
  Files          12       12           
  Lines         760      760           
=======================================
  Hits          644      644           
  Misses        116      116           

Base automatically changed from update-frost-2 to main November 22, 2023 17:20
change reexposed FROST functions to already ensure even Y keys
Copy link

@natalieesk natalieesk left a comment

Choose a reason for hiding this comment

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

Looks good

@conradoplg conradoplg merged commit 29162a7 into main Nov 28, 2023
4 checks passed
@conradoplg conradoplg deleted the test-refactor-even-y branch November 28, 2023 20:56
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.

Add tests for PositiveY and improve its docs
3 participants