ZK/SEC Research notes from zkSecurity
All posts
educative · zk · elliptic-curves

Notes and Proofs for Divisor Techniques

Elliptic Artwork

On the request of MAGIC Grants we were asked to review the security of the divisor-based protocol for proving Elliptic Curve Inner Products (ECIPs) introduced by Liam Eagen in his 2022 eprint. The motivation is the upcoming upgrade to Monero, which will employ this technique; then billions are on the line, you want to be sure. Our contributions include a new proof of extraction, more exact definitions of the relations proven, and a formal treatment of the composition of the protocol with a non-interactive proof. Our treatment goes all the way from the algebraic geometry to the concrete constraints that must be checked.

Download The Notes (PDF)

Application

The intended application is the upcoming Full-Chain Membership Proofs (FCMP++) for Monero, which composes the ECIP with Curve Trees to get set-membership proofs much more efficient than a standard Merkle tree verified inside a proof system. This will allow Monero to scale its membership proofs to include every possible transaction. Curve trees requires:

  • A single lookup.
  • A single scalar multiplication.

Proven using a circuit over a field that is the base field of the elliptic curve. The usual way to prove the scalar multiplication involves emulating the group operation in-circuit, e.g. proving the execution of the standard double-and-add inside the circuit. Eagen's technique instead exploits non-determinism and interaction: instead of computing the group operations, the prover constructs a proof (witness), commits to it, and then the verifier samples a random challenge to verify the validity of the proof. A small teaser follows.

The Trick

We think the original paper is underappreciated; the core observation is very neat. The key insight is that there is a 1-to-1 correspondence (up to nonzero scalar) between rational functions on an elliptic curve $E$ and principal divisors: formal sums of points with integer multiplicities, of degree zero, that sum to the identity on $E$. Concretely, $P_1, \ldots, P_n \in E$ satisfy $\sum_i P_i = \mathcal{O}$ (counted with multiplicity) if there exists a rational function $f \in \mathbb{F}(E)$ with divisor:

$$ \mathrm{div}(f) = \sum_i (P_i) - n(\mathcal{O}) $$

The useful direction: a witness for the sum is a rational function with the prescribed zeros at the $P_i$ and a matching pole of order $n$ at infinity. Hence, rather than emulating the group law inside the circuit, the prover commits to the coefficients of $f$ and the verifier checks that $f$ has exactly that divisor. Taking the logarithmic derivative reduces this further: the check becomes an inner product between the prover's secret coefficients and a public vector derived from a random challenge point, instead of evaluating $f$ at every $P_i$.

Done naively, this saves nothing over the simple group law emulation approach, however, by applying Haböck's logarithmic derivative trick to the expression, everything becomes a linear combination between public challenge values and the divisor polynomial $f(X, Y) \in \mathbb{F}[E]$. The end result is that an MSM of arbitrary length can be verified in 7 multiplicative constraints. All this is covered in much more detail in our writeup.

We Can Help

With broad practical/academic expertise zkSecurity helps its clients review/develop/employ the most advanced cryptography with confidence. Including providing additional formalism beyond the original paper, helping you go from paper to practice without fear of security/proof gaps. Whether you need extra eyes on your own work, or work you plan to incorporate into your solution, we are happy to discuss how we may help.

Keep reading
Latest

Circom-Auditor: Open-Source Skills for Finding Vulnerabilities in Circom Code

We are releasing zk-skills, a set of open-source security skills for AI coding agents, starting with circom-auditor: a first line of defense against vulnerabilities in Circom circuits, compatible with both Claude Code and Codex. On the zkbugs benchmark it detects up to 66 of 70 known bugs when pointed at the vulnerable circuits, and up to 40 of 56 when let loose on the full original codebases, far ahead of existing Circom security tools.

Stefanos Chaliasos, Hao Pham, False Witness Team · August 05, 2026

Variants of KZG: Part III, Multilinear Commitments with Zeromorph

In this blog post, we extend univariate KZG commitments to multilinear polynomials through Zeromorph. We introduce the univariatization map, encode the multilinear quotient identity as a univariate identity, and explain why the quotient encodings require degree checks. We then show how Zeromorph batches these checks into a single degree-bounded KZG opening and walk through its end-to-end opening protocol. We conclude by examining its proof size, prover cost, and verifier cost.

Varun Thakore · August 04, 2026

Variants of KZG: Part II, Multilinear Commitments with PST

In this blog post, we extend the ideas behind univariate KZG commitments to multilinear polynomials through the PST commitment scheme. We derive the multilinear quotient identity, explain how PST commits to and opens multilinear polynomials using a specialized multilinear setup and walk through its opening protocol. We conclude by examining the proof size, prover and verifier costs, and the limitations that motivate other multilinear polynomial commitment schemes.

Varun Thakore · July 28, 2026
Recommended

ZNARKs: SNARKs for The Integers

Hey there! Interested in learning about SNARKs that work beyond finite fields? We’ve been diving into $\mathbb{Z}$NARKs, which are SNARKs tailored for computations involving integers. Our latest post unpacks this intriguing area, showing how we can construct efficient proof systems for integer-based computations. You'll discover nifty tricks like range checks without bit decomposition and mixed field emulation, plus how these techniques can simplify RSA computations. Intrigued by the idea of using randomness for more reliable proofs or exploring an intellectual curiosity like $\mathbb{Q}$-circuits? This post covers it all, including a peek into the future of polynomial commitments. Dive in and explore with us!

Mathias Hall-Andersen · November 11, 2024

WE-KZG: Encrypt to KZG.

Ever wondered if you could create a ciphertext that's only decrypted when a polynomial inside a commitment has a particular value? We’ve explored this notion using KZG commitments in our latest Asiacrypt 2024 paper. Dive into the elegant world of Witness Encryption and see how it can be applied in cool ways like Laconic Oblivious Transfer. This approach keeps things as efficient as regular KZG operations and might just spark some creative applications of your own! Curious to learn more? Let’s explore together!

Mathias Hall-Andersen · October 08, 2024

Groth16, Intuitively

Groth16 is still the gold standard for succinct SNARKs: 128-byte proofs, constant-size verification, and a decade of real-world deployment. But despite its ubiquity, almost nobody explains *why* it works the way it does. In this post, we build Groth16 from the ground up, starting from R1CS and QAPs, then layer in pairings, trusted setup parameters, and the separator tricks (α, β, γ, δ) that make the scheme sound. By the end, you should have an intuitive grasp of every term in the final verifier equation.

David Wong · May 01, 2026
More to explore

The zero-knowledge attack of the year might just have happened, or how Nova got broken

Last week, a surprising paper revealed a major vulnerability in Microsoft's Nova, a leading zero-knowledge proof (ZKP) system, that showcased a false computation with a valid proof. This discovery is especially intriguing given the complexity and robustness typically associated with ZKP systems. We had just launched our company to tackle bugs in ZKP frameworks, and while we anticipated issues, complete breakdowns of systems themselves are rare. Nova's issue revolved around cycles of elliptic curves, showing how small implementation oversights in complex cryptographic systems can lead to significant errors. This post dives into the intricate mechanics of Nova and the discovery process, offering a fascinating glimpse into why rigorous specifications are crucial in cryptography.

David Wong · July 02, 2023

zkVM Security: What Could Go Wrong?

Ever wondered how zkVMs simplify the use of zero-knowledge proofs in coding? We dive into how they let developers focus more on application logic by abstracting complex cryptographic aspects, using familiar languages like Rust or C++. But hold on, it's not all smooth sailing. Despite these benefits, a single bug anywhere in the complex system of compilers, proof systems, or verification can lead to serious security issues. In the post, we break down the zkVM workflow, explore common vulnerabilities at each phase, and highlight the importance of understanding these layers to build more secure, zk-powered applications. Curious about how this all plays out? Let’s unravel it together!

Suneal Gong · November 21, 2024

Bringing Aleo and Leo into zkao

We recently brought Leo and Aleo support to zkao, our AI-powered bug-detection tool, and put it to work on a real engagement with HumanityLink. Getting an LLM to audit a young ecosystem like Aleo turned out to be less about the model and more about what we fed it - custom prompts or skills so it actually recognizes Aleo bug patterns, a harness called cheatVM that turns findings into real end-to-end proofs of concept instead of code that just looks right, and a clear threat model that significantly cut down our false positives.

zk/sec, False Witness team · July 20, 2026