admin管理员组

文章数量:1529456

1. 引言

前序博客有:

  • Marlin:Preprocessing zkSNARKs with Universal and Updatable SRS学习笔记

相关代码实现有:

  • https://github/arkworks-rs/poly-commit,实现了以下几种Polynomial commitment scheme:
    • 1)kzg10:Kate等人2010年论文《Constant-Size Commitments to Polynomials and Their Applications》
    • 2)ipa_pc:基于Bünz等人2020年论文《Proof-Carrying Data from Accumulation Schemes》的Inner-product-argument PC。基于DLP假设。
    • 3)marlin/marlin_pc:为Chiesa等人2019年论文《Marlin:Preprocessing zkSNARKs with Universal and Updatable SRS》中基于kzg10的变种。
    • 4)marlin/marlin_pst13_pc:为Chiesa等人2019年论文《Marlin:Preprocessing zkSNARKs with Universal and Updatable SRS》和 Papamanthou等人2013年论文《Signatures of Correct Computation》中的Papamanthou-Shi-Tamassia multivariate PC变种,具有batching和hiding属性。
    • 5)sonic_pc:为Gabizon 2019年论文《AuroraLight: Improved prover efficiency and SRS size in a Sonic-like system》 和 Maller等人2019年论文《Sonic: Zero-Knowledge SNARKs from Linear-Size Universal and Updatable Structured Reference Strings》中基于kzg10的变种。其中degree enforcement和batching借鉴了Sonic论文,借鉴了AuroraLight来避免negative G1 powers,hiding属性借鉴了Marlin论文。
    • 6)multilinear_pc:为Yupeng Zhang等人2018年论文《vRAM: Faster Verifiable RAM With Program-Independent Preprocessing》 和 Tiancheng Xie等人2019年论文《Libra: Succinct Zero-Knowledge Proofs with Optimal Prover Computation》中的multilinear polynomial commitment scheme,可将 n n n-variate multilinear polynomial转换为 n n n quotient UV polynomial。基于DLP假设。
  • https://github/AleoHQ/snarkVM/tree/testnet2/polycommit/src/marlin_pc【Aleo 2020/12/31拷贝了arkworks-rs的代码,并在此基础上进行了相应的优化和扩展。Aleo中的polynomial commitment不是用的marlin_pc,实际用的是sonic_pc。】

2. arkworks实现中marlin/marlin_pcsonic_pc对比

[arkworks实现]https://github/arkworks-rs/poly-commit()中marlin/marlin_pcsonic_pc,二者都是基于KZG10的变种。主要不同在于:

  • 1)High level:
    二者处理degree bounds的方式不同:
    • marlin/marlin_pc:使用shift powers only in g1,需要2个commitments来enforce degree bounds。
    • sonic_pc:使用shift powers in G1 and G2,仅需一个commitment来enforce degree bounds。
  • 2)Setup阶段:
    • marlin/marlin_pc:shift powers in Marlin are in G1, and are shared with the “non-shift” powers。
    • sonic_pc:需要额外计算some G2 elements for shift powers: ( 1 / β ) i H (1/{\beta})^i H (1/β)iH。这将导致更长的verifying key,因为shift powers in sonic_pc are in G2。
  • 3)Commit阶段:
    • 当没有degree bound时,二者完全一样。
    • 当有degree bound时,marlin/marlin_pc要更昂贵一点,因为其需要其需要额外的commitment来commit to the shifted polynomial。
  • 4)Open阶段:
    • 当没有degree bound时,二者完全一样。
    • 当有degree bound时,marlin/marlin_pc要更昂贵一点,因为其需要更多的scalar field computations。
  • 5)Check阶段:
    • marlin/marlin_pc:由于Marlin仅建档调整了shifted polynomial的commitment,因此开销很小。marlin/marlin_pc中会check a pairing equation with two pairing operations。
    • sonic_pc:要更昂贵,因其需要check check a pairing equation with three pairing operations。当没有degree bound时,可reduce为a pairing equation with two pairing operations。

本文标签: PolynomialMarlinSchemecommitment