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

Panic in Fcmp::prove when params contains too few Helios/Selene generators #17

Open
jeffro256 opened this issue Dec 10, 2024 · 1 comment

Comments

@jeffro256
Copy link

jeffro256 commented Dec 10, 2024

When passed params contains too few generators compared to the passed branches, then a panic occurs on this line:

let g_generators = generators.g_bold_slice()[.. values.len()].iter().cloned();

IMO, some check should be made here and an Error returned if there aren't enough generators. Are there any other parts of the code that assume enough generators and take a slice without bounds checking?

@kayabaNerve
Copy link
Owner

https://github.com/kayabaNerve/fcmp-plus-plus/blob/develop/crypto%2Ffcmps%2Fsrc%2Flib.rs#L520

There is a NotEnoughGenerators error used in general. It just wasn't used by the prover-only commit to the VCs before actually instantiating the GBPs. Will try to put out a patch over the next few days, thanks for identifying.

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

2 participants