Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Plan::new panics with invalid parameters. #11

Closed
tlepoint opened this issue Oct 13, 2023 · 5 comments
Closed

Plan::new panics with invalid parameters. #11

tlepoint opened this issue Oct 13, 2023 · 5 comments
Assignees

Comments

@tlepoint
Copy link

When trying to construct

concrete_ntt::prime64::Plan::try_new(2048, 1024)

the programs crashes (instead of returning None, as I would have expected):

thread 'main' panicked at /Users/tlepoint/.cargo/registry/src/index.crates.io-6f17d22bba15001f/concrete-ntt-0.1.0/src/roots.rs:56:13:
assertion failed: t_pow == 1
stack backtrace:
   0: rust_begin_unwind
             at /rustc/bf9a1c8a193fc373897196321215794c8bebbeec/library/std/src/panicking.rs:597:5
   1: core::panicking::panic_fmt
             at /rustc/bf9a1c8a193fc373897196321215794c8bebbeec/library/core/src/panicking.rs:72:14
   2: core::panicking::panic
             at /rustc/bf9a1c8a193fc373897196321215794c8bebbeec/library/core/src/panicking.rs:127:5
   3: concrete_ntt::roots::sqrt_mod_ex64
             at /Users/tlepoint/.cargo/registry/src/index.crates.io-6f17d22bba15001f/concrete-ntt-0.1.0/src/roots.rs:56:13
   4: concrete_ntt::roots::find_primitive_root64
             at /Users/tlepoint/.cargo/registry/src/index.crates.io-6f17d22bba15001f/concrete-ntt-0.1.0/src/roots.rs:83:22
   5: concrete_ntt::prime64::Plan::try_new
             at /Users/tlepoint/.cargo/registry/src/index.crates.io-6f17d22bba15001f/concrete-ntt-0.1.0/src/prime64.rs:710:16
   6: bug_concrete_ntt::main
             at ./src/main.rs:4:22
   7: core::ops::function::FnOnce::call_once
             at /rustc/bf9a1c8a193fc373897196321215794c8bebbeec/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@tlepoint
Copy link
Author

tlepoint commented Nov 1, 2023

Hi. Any update on this?

@IceTDrinker
Copy link
Member

@tlepoint sorry this fell through the cracks !

@sarah-quinones
Copy link

yeah, this looks like a bug on our end. i'll see if i can fix it in the next couple days and check if there's other places where we have potential panics as well

@IceTDrinker
Copy link
Member

hello @tlepoint latest concrete-ntt 0.1.1 has a fix for the issue you reported, we'll close this issue, if you encounter any other issue please open a new one on the repo 🙂

fixed by #13

cheers

@tlepoint
Copy link
Author

Awesome, thanks a lot for the fix. Will try it out this week!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants