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

u256 sqr mod #302

Closed
wants to merge 3 commits into from
Closed

u256 sqr mod #302

wants to merge 3 commits into from

Conversation

shramee
Copy link
Contributor

@shramee shramee commented May 15, 2024

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

No dedicated u256 sqr, which can be done with one less u128 mul.

What is the new behavior?

Instead of mult_mod(x, x), call the more efficient sqr_mod(x)

A new u256_wide_sqr which is largely identical to u256_wide_mul is added,
image

Does this introduce a breaking change?

  • Yes
  • No

@shramee shramee requested a review from 0xLucqs as a code owner May 15, 2024 12:28
@shramee
Copy link
Contributor Author

shramee commented May 15, 2024

Resolved!

function sig adjusted to `mult_mod`
@shramee shramee mentioned this pull request May 15, 2024
9 tasks
@shramee
Copy link
Contributor Author

shramee commented May 15, 2024

Closing in favor of #304

@shramee shramee closed this May 15, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant