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

ring-math: use native integers for polynomial norms when possible #64

Open
chancehudson opened this issue Oct 19, 2024 · 1 comment
Open

Comments

@chancehudson
Copy link
Owner

If polynomial_degree * scalar_prime < 2^64 it should be safe to use e.g. a u64 instead of a BigUint

@chancehudson
Copy link
Owner Author

Related, instead of returning the norm value we could expose a function that returns a boolean. Something like

l_max_norm_lte(&self, upper_bound: u64): this returns a boolean indicating if the l2 norm is less than or equal to the upper bound. This allows the function to exit early and potentially use smaller integer representations.

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