ZK/SEC Research notes from zkSecurity
All posts
announcement · zk · clean

Zero Knowledge Episode 414: zkGolf, AI, Clean and Optimising ZK Circuits

Four of us were on the latest Zero Knowledge podcast! Mathias Hall-Andersen and Giorgio Dell'Immagine joined Anna Rose and co-hosts Nico Mohnblatt and Kobi Gurkan for Episode 414: zkGolf: AI, Clean and Optimising ZK Circuits with zkSecurity.

The conversation follows the path from cryptography puzzles to Clean, our framework for formally verifying circuits in Lean, and zk.golf, our competition to make those circuits cheaper. Here are a few excerpts.

From puzzles to circuit golf

Kobi explains what made cryptography puzzles useful in the first place (9:52):

One thing that I found useful, both for myself and people around me, is that one of the best ways to learn something deeply is to try to break it and to see what goes wrong and what needs to be done for it to go right.

With agents now solving the puzzles, what should the next competition look like? Nico sums up zkGolf (39:53):

Yeah, it's write an R1CS circuit that matches my spec and that has low cost and prove that you match my spec and have low cost.

We tell the story of the first experiments in our zkGolf launch post.

Let the agent write the circuit, and ask for a proof

Giorgio describes the question behind Clean and the experiments that led to zkGolf (19:35):

And the main point is that, how do you ensure that what the LLM has written is actually what you wanted? And so we were kind of discussing of this idea that maybe if the LLMs can prove that what it wrote was what you wanted, then you could trust the implementation.

The same approach applies to the score. Mathias, on requiring proofs of the circuit's cost as well as its correctness (33:58):

I'm asking it to grade its own homework, but I'm going to verify that it graded correctly. It's going to prove that it graded correctly.

If you'd like to try it, our introduction to Clean for developers points to a tutorial that assumes no prior experience with Lean or formal verification.

The specification still matters

As Giorgio points out at 25:47: "Clean gives you a way to check and to prove that your circuit and specification are equivalent. There could be also bugs in the specification."

Understanding what the agents discover

The episode also covers bugs found in the competition's definitions, the connection to Better.Codes, and where circuit development and auditing might go next. Nico suggests a different kind of challenge (1:06:37):

We could start to do the same with zkGolf or we could have sort of a reverse hackathon so I don't want you to go and create something I want you to go and explain something that's been created

And for anyone wondering whether it's too late to compete, Mathias says (1:10:39):

Just when we thought we'd hit rock bottom apparently the bottom fell out and we're taking suggestions for circuits as well

Watch the full episode above, or head to zk.golf to pick a challenge!

Keep reading
More to explore

Comparison of formal verification frameworks for arithmetic circuits

A hands-on comparison of formal verification frameworks for arithmetic circuits, evaluating those in the ACL2 Book (r1cs, PFCS), acl2-jolt, Garden (Rocq), zk-lean, sp1-lean, and Clean. Each framework is tested on reproducibility, available examples (from basic field elements to RISC-V VM instructions), and practical verification tasks including the IsZero and weighted-sum circuits. The evaluation includes both human and Claude Code's ability to work with each framework, revealing insights about installation difficulty, proof automation capabilities, and the maturity of publicly available examples. This post maps the current landscape of formally verified ZK circuits and discusses what's coming next in this rapidly evolving field.

Yoichi Hirai · November 19, 2025

Exploring Leo: A Primer on Aleo Program Security

In this blog post, we dive into Aleo, a blockchain platform that leverages zero-knowledge cryptography for creating private and scalable decentralized applications. You'll discover how Leo, its Rust-like programming language, simplifies app development by allowing developers to focus on robust privacy features without delving deep into cryptographic complexities. We also explore Leo's unique design, offering practical tips on avoiding common pitfalls and potential vulnerabilities like underflows and unauthorized access. Whether you're a developer curious about building privacy-focused solutions or just intrigued by blockchain innovation, you'll find valuable insights here.

Suneal Gong · August 07, 2024

Accelerating ZK Proving with WebGPU: Techniques and Challenges

Hey there! We're diving into how leveraging WebGPU can revolutionize client-side proving for privacy-preserving zero-knowledge apps. By tackling the usual time and memory bottlenecks with innovative techniques like using GPUs, we're achieving significant performance gains. We'll share our experiences using WebGPU with various frameworks, offering insights into optimizing operations and managing data transfer efficiently. Plus, learn about the challenges and exciting potential of integrating WebGPU into zero-knowledge frameworks. Join us to explore the future of privacy tech!

Jaehun Kim, Jason Park · April 25, 2025