Replies: 1 comment 1 reply
-
这个问题的原因在LessThan实现 中的“n2b.in <== in[0]+ (1<<n) - in[1];” 是一个mod p 的运算,如果假设in[0]=p/2, 需要253bit表示,LessThan实际上已经溢出了。
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
使用circomlib中的comparators 的LessThan 写了一个max 电路,当输入是p-2 和50的时候,LessThan 的输出是 p-2 < 50. 在comparators 中没有找到原因,大家知道是什么原因吗?
zkrepl 提示输入必须小于p/2, 但是从comparators 的说明中没有看到这个限制

Beta Was this translation helpful? Give feedback.
All reactions