-
Notifications
You must be signed in to change notification settings - Fork 204
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
ECDSA signature verification panics if provided invalid signature/public key #2755
Comments
Thanks for reporting this @colinnielsen. The underlying issue is that I'll go through and update this function to return false in this case rather than panicking. |
@colinnielsen I've tested |
if-else
branch in for
loop
Awesome! Thank you, @TomAFrench |
This issue is closed now but Noir isn't currently pulling from the ACVM code in this repository yet. |
Aim
I am trying to wrap up my dark-safe circuit:
I need a variable amount of items in an input array, so I'm using loop with some fixed
MAX_ITERATIONS
, then anshould_calculate
boolean in the input structs as a "no-op" flag.There is an
if
block within thefor
loop, which looks for ashould_calculate
flag in the struct, and no-ops otherwise.Expected Behavior
The program should not panic
Bug
Given a Prover.toml with 4 valid inputs and with 4 "empty" structs, running
nargo execute
, I see 4println
statements echo the array index, and "computing", then the program crashes at the blackbox-solver file.Running the
nargo execute -p provers/Prover_full.toml
with a full array Prover_full.toml works as expectedNOTE:
else
branch. This makes no difference to either above case. The program crashes whenever it hits an empty struct in the loop.nargo execute
, the program will fail on the first iterationTo Reproduce
git clone https://github.com/colinnielsen/dark-safe.git && cd dark-safe/circuits
nargo execute
,nargo execute -p provers/Prover_completely_empty.toml
,nargo execute -p provers/Prover_full.toml
, ornargo execute -p provers/Prover_empty_first.toml
If you want to play with your own Prover.toml, (with a valid polynomial and array of signatures) run:
yarn install
yarn build
Installation Method
Binary
Nargo Version
nargo 0.12.0 (git version hash: 13cc23b, is dirty: false)
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: