-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
DIV_MOD_N_SAFE_DIV
, DIV_MOD_N_SAFE_DIV_PLUS_ONE
& XS_SAFE_DIV
hints@@ -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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Depends on: #275
Contains code that was cherry-picked into: #292 #293
Implements all hints in #202 except for
GET_POINT_FROM_X
Also: