Created
March 16, 2023 07:44
-
-
Save shubham-kanodia/91090217764f788274d5c18d8b7e36ff to your computer and use it in GitHub Desktop.
What input value greater than 4294967296 and within the prime field satisfies the given equation?
This file contains hidden or 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
pragma circom 2.1.4; | |
include "circomlib/circuits/comparators.circom"; | |
template RangeProof(bits, max_abs_value) { | |
signal input in; | |
component lowerBound = LessThan(bits); | |
component upperBound = LessThan(bits); | |
lowerBound.in[0] <== max_abs_value + in; | |
lowerBound.in[1] <== 0; | |
lowerBound.out === 0; | |
upperBound.in[0] <== 2 * max_abs_value; | |
upperBound.in[1] <== max_abs_value + in; | |
upperBound.out === 0; | |
} | |
component main = RangeProof(33, 4294967296); | |
/* INPUT = { | |
"in": "" | |
} */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment