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

[New Hint] IS_QUAD_RESIDUE #968

Closed
pefontana opened this issue Apr 13, 2023 · 0 comments
Closed

[New Hint] IS_QUAD_RESIDUE #968

pefontana opened this issue Apr 13, 2023 · 0 comments
Labels
whitelisted-hint Implementation of hint on whitelist directory

Comments

@pefontana
Copy link
Member

pefontana commented Apr 13, 2023

                "from starkware.crypto.signature.signature import FIELD_PRIME",
                "from starkware.python.math_utils import div_mod, is_quad_residue, sqrt",
                "",
                "x = ids.x",
                "if is_quad_residue(x, FIELD_PRIME):",
                "    ids.y = sqrt(x, FIELD_PRIME)",
                "else:",
                "    ids.y = sqrt(div_mod(x, 3, FIELD_PRIME), FIELD_PRIME)"

#715

@pefontana pefontana added the whitelisted-hint Implementation of hint on whitelist directory label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whitelisted-hint Implementation of hint on whitelist directory
Projects
Status: Done
Development

No branches or pull requests

2 participants