译自 halo2 book:https://zcash.github.io/halo2/design/gadgets/ecc.html
椭圆曲线(Elliptic Curves)
EccChip
halo2_gadgets 提供了一个芯片(chip),它使用 10 个 advice 列实现了 EccInstructions。
该芯片目前仅限于 Pallas 曲线,但在不久的将来会扩展以支持
Vesta 曲线。
芯片假设(Chip assumptions)
EccChip 所做假设的一个非穷尽列表:
- 不是曲线上任何有效点(point)的 坐标。
- 对 Pallas 成立,因为 在 中不是平方数。
- 不是曲线上任何有效点的 坐标。
- 对 Pallas 成立,因为 在 中不是立方数。
布局(Layout)
下表展示了各个芯片子区域的门(gate)如何使用各列:
- - 见证点(witnessing points)。
- - 不完全点加法(incomplete point addition)。
- - 完全点加法(complete point addition)。
- - 定基标量乘(Fixed-base scalar multiplication)。
- - 变基标量乘(variable-base scalar multiplication),不完全轮(incomplete rounds)。
- - 变基标量乘,完全轮(complete rounds)。
- - 变基标量乘,溢出检查(overflow check)。