Abstract
We introduce Lurk, a new LISP-based programming language for zk-SNARKs. Traditional approaches to programming over zero-knowledge proofs require compiling the desired computation into a flat circuit, imposing serious constraints on the size and complexity of computations that can be achieved in practice. Lurk programs are instead provided as data to the universal Lurk interpreter circuit, allowing the resulting language to be Turing-complete without compromising the size of the resulting proof artifacts. Our work describes the design and theory behind Lurk, along with detailing how its implementation of content addressing can be used to sidestep many of the usual concerns of programming zero-knowledge proofs.
- Mads Sig Ager, Dariusz Biernacki, Olivier Danvy, and Jan Midtgaard. 2003. From Interpreter to Compiler and Virtual Machine: A Functional Derivation. BRICS, 10, 14 (2003), March, issn:1601-5355, 0909-0878 https://doi.org/10.7146/brics.v10i14.21784 Google ScholarCross Ref
- Andrew W. Appel. 1991. Compiling with Continuations. Cambridge University Press, Cambridge. isbn:978-0-521-03311-4 https://doi.org/10.1017/CBO9780511609619 Google ScholarCross Ref
- Jean-Philippe Aumasson. 2022. The Security of ZKP projects: same but different. ZK Summit 7 workshop. https://www.aumasson.jp/data/talks/zksec_zk7.pdf Google Scholar
- Marta Bellés-Muñoz, Miguel Isabel, Jose Luis Muñoz-Tapia, Albert Rubio, and Jordi Baylina. 2022. Circom: A Circuit Description Language for Building Zero-knowledge Applications. IEEE Transactions on Dependable and Secure Computing, 1–18. issn:1941-0018 https://doi.org/10.1109/TDSC.2022.3232813 Google ScholarDigital Library
- Eli Ben-Sasson, Alessandro Chiesa, Eran Tromer, and Madars Virza. 2014. Scalable Zero Knowledge via Cycles of Elliptic Curves. In Advances in Cryptology – CRYPTO 2014, Juan A. Garay and Rosario Gennaro (Eds.). 8617, Springer Berlin Heidelberg, Berlin, Heidelberg. 276–294. isbn:978-3-662-44380-4 978-3-662-44381-1 https://doi.org/10.1007/978-3-662-44381-1_16 Google ScholarCross Ref
- Eli Ben-Sasson, Alessandro Chiesa, Eran Tromer, and Madars Virza. 2014. Succinct Non-Interactive Zero Knowledge for a von Neumann Architecture. In Proceedings of the 23rd USENIX Conference on Security Symposium (SEC’14). USENIX Association, USA. 781–796. isbn:978-1-931971-15-7 Google ScholarDigital Library
- Daniel Benarroch, Kobi Gurkan, Ron Kahat, Aurélien Nicolas, and Eran Tromer. 2019. zkInterface, a Standard Tool for Zero-Knowledge Interoperability. In 2nd ZKProof Workshop. https://docs.zkproof.org/pages/standards/accepted-workshop2/proposal–zk-interop-zkinterface.pdf Google Scholar
- Dan Boneh, Wilson Nguyen, and Alex Ozdemir. 2021. Efficient Functional Commitments: How to Commit to a Private Function. Cryptology ePrint Archive, Paper 2021/1342. https://eprint.iacr.org/2021/1342 Google Scholar
- Joseph Bonneau, Izaak Meckler, and Vanishree Rao. 2021. Mina: Decentralized Cryptocurrency at Scale. Google Scholar
- Sean Bowe, Alessandro Chiesa, Matthew Green, Ian Miers, Pratyush Mishra, and Howard Wu. 2020. ZEXE: Enabling Decentralized Private Computation. In 2020 IEEE Symposium on Security and Privacy (SP). 947–964. issn:2375-1207 https://doi.org/10.1109/SP40000.2020.00050 Google ScholarCross Ref
- Jeremy Bruestle, Paul Gafni, and RiscZero team. 2023. RISC Zero zkVM: Scalable, Transparent Arguments of RISC-V Integrity. Technical Report. https://www.risczero.com/proof-system-in-detail.pdf Google Scholar
- Benedikt Bünz, Alessandro Chiesa, Pratyush Mishra, and Nicholas Spooner. 2020. Recursive Proof Composition from Accumulation Schemes. In Theory of Cryptography, Rafael Pass and Krzysztof Pietrzak (Eds.) (Lecture Notes in Computer Science). Springer International Publishing, Cham. 1–18. isbn:978-3-030-64378-2 https://doi.org/10.1007/978-3-030-64378-2_1 Google ScholarDigital Library
- Alessandro Chiesa, Yuncong Hu, Mary Maller, Pratyush Mishra, Noah Vesely, and Nicholas Ward. 2020. Marlin: Preprocessing zkSNARKs with Universal and Updatable SRS. In Advances in Cryptology – EUROCRYPT 2020, Anne Canteaut and Yuval Ishai (Eds.) (Lecture Notes in Computer Science). Springer International Publishing, Cham. 738–768. isbn:978-3-030-45721-1 https://doi.org/10.1007/978-3-030-45721-1_26 Google ScholarDigital Library
- Alessandro Chiesa and Eran Tromer. 2010. Proof-Carrying Data and Hearsay Arguments from Signature Cards. In Innovations in Computer Science. Tsinghua University, Beijing, China. 310–331. Google Scholar
- Collin Chin, Howard Wu, Raymond Chu, Alessandro Coglio, Eric McCarthy, and Eric Smith. 2021. Leo: A Programming Language for Formally Verified, Zero-Knowledge Applications. In 4th ZKProof Workshop. https://eprint.iacr.org/2021/651.pdf Google Scholar
- Olivier Danvy. 2008. Defunctionalized Interpreters for Programming Languages. SIGPLAN Not., 43, 9 (2008), Sept., 131–142. issn:0362-1340 https://doi.org/10.1145/1411203.1411206 Google ScholarDigital Library
- Leonardo de Moura and Sebastian Ullrich. 2021. The Lean 4 Theorem Prover and Programming Language. In Automated Deduction – CADE 28, André Platzer and Geoff Sutcliffe (Eds.) (Lecture Notes in Computer Science). Springer International Publishing, Cham. 625–635. isbn:978-3-030-79876-5 https://doi.org/10.1007/978-3-030-79876-5_37 Google ScholarDigital Library
- Jacob Eberhardt and Stefan Tai. 2018. ZoKrates - Scalable Privacy-Preserving Off-Chain Computations. In 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData). 1084–1091. https://doi.org/10.1109/Cybermatics_2018.2018.00199 Google ScholarCross Ref
- Matthias Felleisen, Robert Bruce Findler, and Matthew Flatt. 2009. Semantics Engineering with PLT Redex. MIT Press. isbn:978-0-262-25817-3 Google ScholarDigital Library
- Matthias Felleisen and Daniel P. Friedman. 1986. Control Operators, the SECD-machine, and the λ -Calculus. In Proceedings of The Conference on Formal Description of Programming Concepts. Ebberup, Denmark. Google Scholar
- Ben Fisch, Joseph Bonneau, Juan Benet, and Nicola Greco. 2018. Proofs of replication using depth robust graphs. Blockchain Protocol Analysis and Security Engineering, 2018 (2018). Google Scholar
- Nicolas Gailly, Mary Maller, and Anca Nitulescu. 2022. SnarkPack: Practical SNARK Aggregation. In Financial Cryptography and Data Security, Ittay Eyal and Juan Garay (Eds.). 13411, Springer International Publishing, Cham. 203–229. isbn:978-3-031-18282-2 978-3-031-18283-9 https://doi.org/10.1007/978-3-031-18283-9_10 Google ScholarDigital Library
- Rosario Gennaro, Craig Gentry, Bryan Parno, and Mariana Raykova. 2013. Quadratic Span Programs and Succinct NIZKs without PCPs. In Advances in Cryptology – EUROCRYPT 2013, Thomas Johansson and Phong Q. Nguyen (Eds.) (Lecture Notes in Computer Science). Springer, Berlin, Heidelberg. 626–645. isbn:978-3-642-38348-9 https://doi.org/10.1007/978-3-642-38348-9_37 Google ScholarCross Ref
- Alex Gluchowski. 2021. Introducing zkSync. https://blog.matter-labs.io/introducing-zk-sync-the-missing-link-to-mass-adoption-of-ethereum-14c9cea83f58 Google Scholar
- Eiichi Goto. 1974. Monocopy and Associative Algorithms in an Extended LISP. Tokyo, University of. Google Scholar
- Lorenzo Grassi, Dmitry Khovratovich, Christian Rechberger, Arnab Roy, and Markus Schofnegger. 2021. POSEIDON: A New Hash Function for Zero-Knowledge Proof Systems. In 30th Usenix Security Symposium. Virtual. Google Scholar
- Jens Groth. 2016. On the Size of Pairing-Based Non-interactive Arguments. In Advances in Cryptology – EUROCRYPT 2016, Marc Fischlin and Jean-Sébastien Coron (Eds.) (Lecture Notes in Computer Science). Springer, Berlin, Heidelberg. 305–326. isbn:978-3-662-49896-5 https://doi.org/10.1007/978-3-662-49896-5_11 Google ScholarCross Ref
- R. J. M. Hughes. 1982. Super-Combinators a New Implementation Method for Applicative Languages. In Proceedings of the 1982 ACM Symposium on LISP and Functional Programming (LFP ’82). Association for Computing Machinery, New York, NY, USA. 1–10. isbn:978-0-89791-082-8 https://doi.org/10.1145/800068.802129 Google ScholarDigital Library
- Gilles Kahn. 1987. Natural Semantics. In Symposium on Theoretical Aspects of Computer Science. Google Scholar
- Abhiram Kothapalli and Srinath Setty. 2022. SuperNova: Proving Universal Machine Executions without Universal Circuits. Cryptology ePrint Archive, Paper 2022/1758. https://eprint.iacr.org/2022/1758.pdf Google Scholar
- Abhiram Kothapalli, Srinath Setty, and Ioanna Tzialla. 2022. Nova: Recursive Zero-Knowledge Arguments from Folding Schemes. In Advances in Cryptology – CRYPTO 2022, Yevgeniy Dodis and Thomas Shrimpton (Eds.) (Lecture Notes in Computer Science). Springer Nature Switzerland, Cham. 359–388. isbn:978-3-031-15985-5 https://doi.org/10.1007/978-3-031-15985-5_13 Google ScholarDigital Library
- Benoît Libert, Somindu C. Ramanna, and Moti Yung. 2016. Functional Commitment Schemes: From Polynomial Commitments to Pairing-Based Accumulators from Simple Assumptions. In 43rd International Colloquium on Automata, Languages and Programming (ICALP 2016). Google Scholar
- John McCarthy. 1960. Recursive functions of symbolic expressions and their computation by machine, Part I. Commun. ACM, 3, 4 (1960), April, 184–195. issn:0001-0782, 1557-7317 https://doi.org/10.1145/367177.367199 Google ScholarDigital Library
- Alex Ozdemir, Fraser Brown, and Riad S. Wahby. 2022. CirC: Compiler Infrastructure for Proof Systems, Software Verification, and More. In 2022 IEEE Symposium on Security and Privacy (SP). 2248–2266. issn:2375-1207 https://doi.org/10.1109/SP46214.2022.9833782 Google ScholarCross Ref
- Gordon D. Plotkin. 2004. A structural approach to operational semantics. J. Log. Algebraic Methods Program., 60-61 (2004), 17–139. Google Scholar
- Polygon. 2022. Polygon zkEVM. https://polygon.technology/solutions/polygon-zkevm Google Scholar
- Starkware. 2021. StarkNet. https://starkware.co/starknet/ Google Scholar
- Justin Thaler. 2013. Time-Optimal Interactive Proofs for Circuit Evaluation. In Advances in Cryptology – CRYPTO 2013, Ran Canetti and Juan A. Garay (Eds.) (Lecture Notes in Computer Science). Springer, Berlin, Heidelberg. 71–89. isbn:978-3-642-40084-1 https://doi.org/10.1007/978-3-642-40084-1_5 Google ScholarCross Ref
- Paul Valiant. 2008. Incrementally Verifiable Computation or Proofs of Knowledge Imply Time/Space Efficiency. In Theory of Cryptography, Ran Canetti (Ed.) (Lecture Notes in Computer Science). Springer, Berlin, Heidelberg. 1–18. isbn:978-3-540-78524-8 https://doi.org/10.1007/978-3-540-78524-8_1 Google ScholarCross Ref
- Mitchell Wand. 1982. Deriving Target Code as a Representation of Continuation Semantics. ACM Trans. Program. Lang. Syst., 4, 3 (1982), July, 496–517. issn:0164-0925, 1558-4593 https://doi.org/10.1145/357172.357179 Google ScholarDigital Library
- Mitchell Wand. 1982. Semantics-Directed Machine Architecture. In Proceedings of the 9th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’82). Association for Computing Machinery, New York, NY, USA. 234–241. isbn:978-0-89791-065-1 https://doi.org/10.1145/582153.582179 Google ScholarDigital Library
- Mitchell Wand. 1983. Loops in Combinator-Based Compilers. In The 10th ACM SIGACT-SIGPLAN Symposium. ACM Press, Austin, Texas. 190–196. isbn:978-0-89791-090-3 https://doi.org/10.1145/567067.567086 Google ScholarDigital Library
- Ye Zhang. 2019. Scroll Overview. https://scroll.io/blog/zkEVM Google Scholar
Index Terms
- LURK: Lambda, the Ultimate Recursive Knowledge (Experience Report)
Recommendations
Revised Report on the Algorithmic Language Scheme
The report gives a defining description of the programming language Scheme. Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language invented by Guy Lewis Steele, Jr. and Gerald Jay Sussman. It was designed to have ...
Definitional Interpreters for Higher-Order Programming Languages
Higher-order programming languages (i.e., languages in which procedures or labels can occur as values) are usually defined by interpreters that are themselves written in a programming language based on the lambda calculus (i.e., an applicative language ...
Experience report: using hackage to inform language design
HASKELL '10Hackage, an online repository of Haskell applications and libraries, provides a hub for programmers to both release code to and use code from the larger Haskell community. We suggest that Hackage can also serve as a valuable resource for language ...
Comments