mirror of
https://github.com/arnaucube/circomlib.git
synced 2026-02-06 18:56:43 +01:00
fix LessThan and adds assert
This commit is contained in:
@@ -86,10 +86,11 @@ template LessThan(n) {
|
||||
*/
|
||||
|
||||
template LessThan(n) {
|
||||
assert(n <= 252);
|
||||
signal input in[2];
|
||||
signal output out;
|
||||
|
||||
component n2b = Num2Bits(n*2+1);
|
||||
component n2b = Num2Bits(n+1);
|
||||
|
||||
n2b.in <== in[0]+ (1<<n) - in[1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user