Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

译自 halo2 book:https://zcash.github.io/halo2/design/gadgets/ecc/addition.html

我们将使用短 Weierstrass 曲线上仿射坐标(affine coordinates)的曲线算术公式, 推导自 Hüseyin Hışıl 博士论文 的第 4.1 节。

不完全加法(Incomplete addition)

  • 输入:
  • 输出:

Hışıl 论文中的公式为:

重命名为 ,把 重命名为 ,把 重命名为 ,得到

这等价于

假设 ,我们有

于是我们得到约束:

    • 注意此约束对于 (当 时)是不可满足的, 因此不能用于任意输入。

约束(Constraints)

完全加法(Complete addition)

假设我们把 表示为 。( 不是有效点的 坐标,因为那将需要 ,而 中不是平方数。同样 也不是有效点的 坐标,因为 中不是立方数。)

对于倍点(doubling)情形,Hışıl 的论文告诉我们 必须改为计算为

定义

见证(Witness),其中:

约束(Constraints)

最大次数(Max degree):6

约束分析(Analysis of constraints)

命题(Propositions):

情形(Cases):

注意我们依赖于这样一个事实: 不是 Pallas 曲线上除 之外任何点的有效 坐标或 坐标。

    • 完备性(Completeness):

    • 可靠性(Soundness): 的唯一解。

  • ,其中

    • 完备性(Completeness):

    • 可靠性(Soundness): 的唯一解。

  • ,其中

    • 完备性(Completeness):

    • 可靠性(Soundness): 的唯一解。

  • ,其中

    • 完备性(Completeness):

    • 可靠性(Soundness): 被正确计算,且 是唯一解。

  • ,其中

    • 完备性(Completeness):

    • 可靠性(Soundness): 的唯一解。

  • ,其中

    • 完备性(Completeness):

    • 可靠性(Soundness): 被正确计算,且 是唯一解。