fix LessThan and adds assert

This commit is contained in:
Kobi Gurkan
2020-08-24 10:46:37 +03:00
parent 01e3f0d680
commit 1cd3d203c5
3 changed files with 135 additions and 45 deletions

View File

@@ -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];