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

Implement most signature hints #291

Merged
merged 101 commits into from
Oct 3, 2023
Merged

Implement most signature hints #291

merged 101 commits into from
Oct 3, 2023

Conversation

fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Sep 26, 2023

Depends on: #275
Contains code that was cherry-picked into: #292 #293
Implements all hints in #202 except for GET_POINT_FROM_X
Also:

  • Implements DivMod & Igcdex
  • Fixes bug in BigInt3Split, the input value was being mutated by mistake

@fmoletta fmoletta changed the base branch from signature-hints-2 to SecpPHints September 26, 2023 21:28
@fmoletta fmoletta changed the title Implement DIV_MOD_N_SAFE_DIV, DIV_MOD_N_SAFE_DIV_PLUS_ONE & XS_SAFE_DIV hints Implement most signature hints Sep 26, 2023
@fmoletta fmoletta marked this pull request as ready for review September 26, 2023 21:39
Base automatically changed from SecpPHints to main September 26, 2023 23:03
@jrchatruc jrchatruc mentioned this pull request Sep 27, 2023
@@ -63,3 +63,42 @@ func SafeDivBig(x *big.Int, y *big.Int) (*big.Int, error) {
}
return q, nil
}

// Finds a nonnegative integer x < p such that (m * x) % p == n.
func DivMod(n *big.Int, m *big.Int, p *big.Int) (*big.Int, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

did not this function already exists in math_utils/utils.go ? why do we have two implementations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, Ill remove the redundant implementation and merge both packages

@pefontana pefontana added this pull request to the merge queue Oct 3, 2023
Merged via the queue into main with commit 76d65f6 Oct 3, 2023
2 checks passed
@pefontana pefontana deleted the signature-hints-3 branch October 3, 2023 14:58
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