-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check that signature r8x & r8y are on the curve. Small signal nam…
…e fix
- Loading branch information
1 parent
7d5c6d9
commit 3ea0c50
Showing
3 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
pragma circom 2.1.5; | ||
|
||
include "../../../node_modules/circomlib/circuits/comparators.circom"; | ||
|
||
template ForceBabyCheckIfEnabled() { | ||
signal input {binary} enabled; | ||
signal input x; | ||
signal input y; | ||
|
||
signal x2; | ||
signal y2; | ||
|
||
var a = 168700; | ||
var d = 168696; | ||
|
||
x2 <== x*x; | ||
y2 <== y*y; | ||
|
||
ForceEqualIfEnabled()(enabled, [a*x2 + y2, 1 + d*x2*y2]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters