Skip to content

Commit

Permalink
fix(gadgets): additional unsafe checks
Browse files Browse the repository at this point in the history
**Motivation**
During implementation #373, it was discovered that the ecc gadget does
not work correctly when multiplying zero points

The point is that unsafe methods were called that were unsafe for some
inputs, but it was implied that their result was not used in case of a
match. However, this led to incorrect witness (verification errors),
because the logic should be the opposite - the verification should go
before the call.

**Overview**
- Nonnull checks are performed BEFORE unsafe blocks are called
- Added tests
- For tests with ecc `K_TABLE_SIZE` was increased, because additional lines for non-zero checks
  • Loading branch information
cyphersnake committed Jan 8, 2025
1 parent 3053718 commit 9967306
Show file tree
Hide file tree
Showing 2 changed files with 255 additions and 84 deletions.
Loading

0 comments on commit 9967306

Please sign in to comment.