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

nonnative arithmetic doesn't support < 3 limbs configuration #128

Open
slumber opened this issue Sep 19, 2023 · 0 comments
Open

nonnative arithmetic doesn't support < 3 limbs configuration #128

slumber opened this issue Sep 19, 2023 · 0 comments

Comments

@slumber
Copy link
Contributor

slumber commented Sep 19, 2023

The following code panics if you attempt to use configuration with 1 or 2 limbs

if 2 * params.bits_per_limb + ark_std::log2(params.num_limbs) as usize
> BaseField::MODULUS_BIT_SIZE as usize - 1
{
panic!("The current limb parameters do not support multiplication.");
}

However, I don't remember bellman-bignat having this limitation

// The following code is adapted from https://github.com/alex-ozdemir/bellman-bignat/blob/master/src/mp/bignat.rs#L567

This could be a problem if nonnative params become configurable

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