File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,11 +135,11 @@ template MaxValueCheck(ct) {
135135 signal {maxbit} aux[2 ];
136136 aux.maxbit = nbits(ct);
137137 aux[0 ] <== MaxbitCheck(nbits(ct))(in ); // to ensure the correct size
138- aux[1 ] <== n ;
138+ aux[1 ] <== ct ;
139139
140140 signal out1 <== LessEqThan(nbits(ct))(aux);
141141 out1 === 1 ;
142- out.maxvalue = n ;
142+ out.maxvalue = ct ;
143143 out <== in ;
144144}
145145
@@ -181,17 +181,17 @@ template MinMaxValueCheck(ct1,ct2){
181181 aux_min.maxbit = nbits(ct2);
182182 aux_min[0 ] <== ct1;
183183 aux_min[1 ] <== checked_in;
184- signal out1 <== LessEqThan(nbits(n ))(aux_min);
184+ signal out1 <== LessEqThan(nbits(ct1 ))(aux_min);
185185 out1 === 1 ;
186- out.minvalue = n ;
186+ out.minvalue = ct1 ;
187187
188188 signal {maxbit} aux_max[2 ];
189- aux .maxbit = nbits(ct2);
189+ aux_max .maxbit = nbits(ct2);
190190 aux_max[0 ] <== checked_in;
191191 aux_max[1 ] <== ct2;
192- signal out2 <== LessEqThan(nbits(n ))(aux_max);
192+ signal out2 <== LessEqThan(nbits(ct2 ))(aux_max);
193193 out2 === 1 ;
194- out.maxvalue = n ;
194+ out.maxvalue = ct2 ;
195195
196196 out <== in ;
197197}
You can’t perform that action at this time.
0 commit comments