我正在尝试对信号使用运算符并在Circom 电路编译器语言&
中获取另一个信号,如下所示:
pragma circom 2.0.0;
template MAIN() {
signal input a;
signal output x;
signal v;
v <== 168;
x <== v & 31;
}
component main = MAIN();
我收到此错误:
error[T3001]: Non quadratic constraints are not allowed!
┌─ "/Users/ilia/compiling/main-circom/main.circom":146:5
│
146 │ x <== v & 31; // 0b00011111
│ ^^^^^^^^^^^^ found here
│
= call trace:
->MAIN
如何为 x 信号生成约束,使其成为二次方?