Skip to content

Commit

Permalink
fix: address inactive public key check in verify_signature_noir (#6270
Browse files Browse the repository at this point in the history
)

# Description

## Problem\*

Resolves #6266 

## Summary\*

This PR adds the fix specified in #6266, thanks to @jewelofchaos9 for
raising this issue 🙏

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored Oct 10, 2024
1 parent f61ba03 commit e4325aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion noir_stdlib/src/schnorr.nr
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn verify_signature_noir<let N: u32>(
if ((sig_s.lo != 0) | (sig_s.hi != 0)) & ((sig_e.lo != 0) | (sig_e.hi != 0)) {
let (r_is_infinite, result) = calculate_signature_challenge(public_key, sig_s, sig_e, message);

is_ok = !r_is_infinite;
is_ok &= !r_is_infinite;
for i in 0..32 {
is_ok &= result[i] == signature[32 + i];
}
Expand Down

0 comments on commit e4325aa

Please sign in to comment.