Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
194 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Benchmarking ZK-Friendly Hash Functions and SNARK Proving Systems for EVM-compatible Blockchains (2409.01976v1)

Published 3 Sep 2024 in cs.CR

Abstract: With the rapid development of Zero-Knowledge Proofs (ZKPs), particularly Succinct Non-Interactive Arguments of Knowledge (SNARKs), benchmarking various ZK tools has become a valuable task. ZK-friendly hash functions, as key algorithms in blockchain, have garnered significant attention. Therefore, comprehensive benchmarking and evaluations of these evolving algorithms in ZK circuits present both promising opportunities and challenges. Additionally, we focus on a popular ZKP application, privacy-preserving transaction protocols, aiming to leverage SNARKs' cost-efficiency through "batch processing" to address high on-chain costs and compliance issues. To this end, we benchmarked three SNARK proving systems and five ZK-friendly hash functions, including our self-developed circuit templates for Poseidon2, Neptune, and GMiMC, on the bn254 curve within the circom-snarkjs framework. We also introduced the role of "sequencer" in our SNARK-based privacy-preserving transaction scheme to enhance efficiency and enable flexible auditing. We conducted privacy and security analyses, as well as implementation and evaluation on Ethereum Virtual Machine (EVM)-compatible chains. The results indicate that Poseidon and Poseidon2 demonstrate superior memory usage and runtime during proof generation under Groth16. Moreover, compared to the baseline, Poseidon2 not only generates proofs faster but also reduces on-chain costs by 73% on EVM chains and nearly 26% on Hedera. Our work provides a benchmark for ZK-friendly hash functions and ZK tools, while also exploring cost efficiency and compliance in ZKP-based privacy-preserving transaction protocols.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (62)
  1. [n. d.]. (18) Jordi Baylina - baylina.eth on X. https://x.com/jbaylina/status/1624116186861404188
  2. [n. d.]. Announcing the Perpetual Powers of Tau Ceremony to benefit all zk-SNARK projects — by Koh Wei Jie — Coinmonks — Medium. https://medium.com/coinmonks/announcing-the-perpetual-powers-of-tau-ceremony-to-benefit-all-zk-snark-projects-c3da86af8377
  3. [n. d.]. Arbitrum — The Future of Ethereum. https://arbitrum.io/
  4. [n. d.]. Fees — Hedera. https://docs.hedera.com/hedera/networks/mainnet/fees
  5. [n. d.]. hanzeG/circom-zkmixer. https://github.com/hanzeG/circom-zkmixer
  6. [n. d.]. hanzeG/zklib_circom. https://github.com/hanzeG/zklib_circom
  7. [n. d.]. iden3/circom: zkSnark circuit compiler. https://github.com/iden3/circom
  8. [n. d.]. Intro — Typhoon Network. https://docs.typhoon.network/
  9. [n. d.]. matter-labs/zksync-era: zkSync Era. https://github.com/matter-labs/zksync-era
  10. [n. d.]. Pedersen Hash — iden3 0.1 documentation. https://iden3-docs.readthedocs.io/en/latest/iden3_repos/research/publications/zkproof-standards-workshop-2/pedersen-hash/pedersen.html
  11. [n. d.]. Predictable fees. Made easy. — Hedera. https://hedera.com/fees
  12. [n. d.]. The $2.3 Billion Tornado Cash Case Is a Pivotal Moment for Crypto Privacy — WIRED. https://www.wired.com/story/tornado-cash-money-laundering-case-crypto-privacy/
  13. [n. d.]. Typhoon Cash — Typhoon Cash. https://docs.typhoon.cash/
  14. MiMC: Efficient Encryption and Cryptographic Hashing with Minimal Multiplicative Complexity. In International Conference on the Theory and Application of Cryptology and Information Security. Springer, Berlin, Heidelberg, 191–219.
  15. Algebraic Cryptanalysis of STARK-Friendly Designs: Application to MARVELlous and MiMC. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 11923 LNCS (2019), 371–397. https://doi.org/10.1007/978-3-030-34618-8{_}13
  16. Feistel Structures for MPC, and More. In Cryptology ePrint Archive. https://doi.org/10.13154/tosc.v0.i0.0-0
  17. Design of Symmetric-Key Primitives for Advanced Cryptographic Protocols. Cryptology ePrint Archive 2020, 3 (2019), 1–45. https://doi.org/10.13154/TOSC.V2020.I3.1-45
  18. New optimization techniques for PlonK’s arithmetization. Cryptology ePrint Archive (2022). https://eprint.iacr.org/2022/462
  19. barryWhiteHat. 2018. miximus: A proof of concept trustless ethereum mixer. https://github.com/barryWhiteHat/miximus
  20. Zerocash: Decentralized anonymous payments from bitcoin. In Proceedings - IEEE Symposium on Security and Privacy. Institute of Electrical and Electronics Engineers Inc., Berkeley, CA, USA, 459–474. https://doi.org/10.1109/SP.2014.36
  21. STARK Friendly Hash – Survey and Recommendation. Cryptology ePrint Archive (2020). https://eprint.iacr.org/2020/948
  22. Community Proposal: A Benchmarking Framework for (Zero-Knowledge) Proof Systems. (2020).
  23. New Design Techniques for Efficient Arithmetization-Oriented Hash Functions:Anemoi Permutations and Jive Compression Mode. Cryptology ePrint Archive (2022). https://eprint.iacr.org/2022/840
  24. Bulletproofs: Short Proofs for Confidential Transactions and More. Proceedings - IEEE Symposium on Security and Privacy 2018-May (7 2018), 315–334. https://doi.org/10.1109/SP.2018.00020
  25. Haze: A Compliant Privacy Mixer. Cryptology ePrint Archive (2023). https://eprint.iacr.org/2023/1152
  26. zk-Bench : A Toolset for Comparative Evaluation and Performance Benchmarking of SNARKs. In Cryptology ePrint Archive, Vol. 1. Association for Computing Machinery, New York, NY, USA,. https://doi.org/10.1145/nn.nn
  27. Ittay Eyal and Emin Gün Sirer. 2018. Majority Is Not Enough: Bitcoin mining is vulnerable. Commun. ACM 61, 7 (7 2018), 95–102. https://doi.org/10.1145/3212998
  28. Ariel Gabizon and Zachary J Williamson. 2021. fflonK: a Fast-Fourier inspired verifier efficient version of PlonK.
  29. Ariel Gabizon and Aztec J Zachary Williamson Aztec. 2019. PlonK: Permutations over Lagrange-bases for Oecumenical Noninteractive arguments of Knowledge.
  30. Consensys/gnark: v0.9.1. https://zenodo.org/records/10016783
  31. Horst Meets Fluid-SPN: Griffin for Zero-Knowledge Applications. Cryptology ePrint Archive (2022). https://eprint.iacr.org/2022/403
  32. Reinforced Concrete: A Fast Hash Function for Verifiable Computation. Proceedings of the ACM Conference on Computer and Communications Security (11 2022), 1323–1335. https://doi.org/10.1145/3548606.3560686
  33. Monolith: Circuit-Friendly Hash Functions with New Nonlinear Layers for Fast and Constant-Time Implementations. Cryptology ePrint Archive (2023). https://eprint.iacr.org/2023/1025
  34. Poseidon: A New Hash Function for {Zero-Knowledge} Proof Systems. 519–535 pages. www.usenix.org/conference/usenixsecurity21/presentation/grassi
  35. Poseidon2: A Faster Version of the Poseidon Hash Function. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 14064 LNCS (2023), 177–203. https://doi.org/10.1007/978-3-031-37679-5{_}8/FIGURES/4
  36. Invertible Quadratic Non-Linear Layers for MPC-/FHE-/ZK-Friendly Schemes over $\mathbb F_p^n$. Cryptology ePrint Archive (2021). https://eprint.iacr.org/2021/1695
  37. halo2 Community Edition. [n. d.]. privacy-scaling-explorations/halo2. https://github.com/privacy-scaling-explorations/halo2
  38. Xiangan He. 2024. Zephyr: A Cost-Effective, Zero-Knowledge Light Client for Enhanced Blockchain Interoperability. ACM SIGMETRICS Performance Evaluation Review 51, 3 (1 2024), 16–18. https://doi.org/10.1145/3639830.3639838
  39. iden3. [n. d.]. iden3/circomlib: Library of basic circuits for circom. https://github.com/iden3/circomlib
  40. Igor Aleksanov and Vitaly Drogan. 2018. Matter Labs. zkSync: Scaling and Privacy Engine for Ethereum. https://github.com/matter-labs/zksync
  41. Jens Groth. 2016. On the Size of Pairing-based Non-interactive Arguments. In Advances in Cryptology–EUROCRYPT 2016: 35th Annual International Conference on the Theory and Applications of Cryptographic Techniques. Springer, Berlin Heidelberg. https://eprint.iacr.org/2016/260.pdf
  42. Jordi Baylina and Blaine Bublitz. 2019. iden3/snarkjs: zkSNARK implementation in JavaScript & WASM. https://github.com/iden3/snarkjs?tab=readme-ov-file
  43. Due V. Le and Arthur Gervais. 2021. AMR: Autonomous coin mixer with privacy preserving reward distribution. In AFT 2021 - Proceedings of the 2021 3rd ACM Conference on Advances in Financial Technologies. Association for Computing Machinery, Inc, Arlington Virginia, 142–155. https://doi.org/10.1145/3479722.3480800
  44. matter labs. [n. d.]. era-boojum: Boojum, the scariest SNARK implementation. https://github.com/matter-labs/era-boojum
  45. S Meiklejohn and R Mercer. 2018. Möbius: Trustless Tumbling for Transaction Privacy. UCL Department of Computer Science: London, UK. (2018) (2 2018). https://www.ucl.ac.uk/computer-science/
  46. Ralph C Merkle. 1987. A Digital Signature Based on a Conventional Encryption Function A DIGITAL SIGNATURE BASED ON A CONVENTIONAL E;UCRYITION FUNCTION. In Conference on the theory and application of cryptographic techniques. Springer, Santa Barbara, California, USA, 369–378. https://doi.org/10.1007/3-540-48184-2{_}32
  47. SoK: Decentralized Sequencers for Rollups. https://arxiv.org/abs/2310.03616v1
  48. Pinocchio. Commun. ACM 59, 2 (1 2016), 103–112. https://doi.org/10.1145/2856449
  49. Tornado Cash Privacy Solution Version 1.4. https://github.com/tornadocash/tornado-core/blob/master/cli.js
  50. Polygon Labs. [n. d.]. 0xPolygonZero/plonky2. https://github.com/0xPolygonZero/plonky2
  51. Roman Walch. [n. d.]. What’s the deal with hash functions in Zero Knowledge? — TACEO Blog. https://blog.taceo.io/whats-the-deal-with-hashes-in-zk/
  52. CoinShuffle: Practical decentralized coin mixing for bitcoin. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 8713 LNCS, PART 2 (2014), 345–364. https://doi.org/10.1007/978-3-319-11212-1{_}20/COVER
  53. Layer 2 Blockchain Scaling: a Survey. (2021). http://arxiv.org/abs/2107.10881
  54. Starknet Foundation. 2018. Starknet. https://github.com/starknet-io
  55. Colin Steidtmann and Sanjay Gollapudi. 2023. Benchmarking ZK-Circuits in Circom. Cryptology ePrint Archive (2023).
  56. Alan Szepieniec alan. 2021. On the Use of the Legendre Symbol in Symmetric Cipher Design. Cryptology ePrint Archive (2021). https://eprint.iacr.org/2021/984
  57. The Tip5 Hash Function for Recursive STARKs. Cryptology ePrint Archive (2023). https://eprint.iacr.org/2023/107
  58. A2L: Anonymous atomic locks for scalability in payment channel hubs. Proceedings - IEEE Symposium on Security and Privacy 2021-May (5 2021), 1834–1851. https://doi.org/10.1109/SP40001.2021.00111
  59. On How Zero-Knowledge Proof Blockchain Mixers Improve, and Worsen User Privacy. ACM Web Conference 2023 - Proceedings of the World Wide Web Conference, WWW 2023 (4 2023), 2022–2032. https://doi.org/10.1145/3543507.3583217
  60. zkBridge: Trustless Cross-chain Bridges Made Practical. In Proceedings of the ACM Conference on Computer and Communications Security. Association for Computing Machinery, 3003–3017. https://doi.org/10.1145/3548606.3560652
  61. Transparent polynomial delegation and its applications to zero knowledge proof. In Proceedings - IEEE Symposium on Security and Privacy, Vol. 2020-May. Institute of Electrical and Electronics Engineers Inc., 859–876. https://doi.org/10.1109/SP40000.2020.00052
  62. Scroll. https://github.com/scroll-tech
Citations (1)

Summary

We haven't generated a summary for this paper yet.