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

Is add_no_canonicalize_trashing_input needed for goldilocks reduce128? #2268

Open
chriseth opened this issue Dec 19, 2024 · 0 comments
Open

Comments

@chriseth
Copy link
Member

chriseth commented Dec 19, 2024

In the implementation of reduce128 for goldilocks, we use add_no_canonicalize_trashing_input and after that we call wrap' again. The code was taken from an implementation where it does not matter that the result is reduced modulo the field prime, as long as it fits 64 bits. We generally assume that field elements are always stored in canonical form (i.e. less than the field prime). Because of that I introduced the wrapcall at the end. So the question is if theadd_no_canonicalize_trashing_input` is that useful or if it can be implemented in a better way.

Note that we now have two files with similar impls for goldilocks.

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

No branches or pull requests

1 participant