We will post more updates when the proof is complete! ๐
08.08.2025 15:43 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
To that end, we state that if the circuit runs until the end on a witness, then it must be the encoding with field elements of a Keccak computation.
Frequent intermediate operations are showing that arrays hold boolean field elements, as well as manipulations of limbs of binary integers.
08.08.2025 15:41 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
We verify these logical tricks by brute-forcing all the possible values for the booleans, as there are only up to five or six such booleans for each formula.
The main property we show is that the circuit is deterministic (no under-constraints).
08.08.2025 15:37 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Then we write our proofs, trying to be careful to follow the organization of the original code, by verifying each loop independently and composing their behavior in a second step.
A few logical tricks are used in the definition of Keccak to replace some XOR operations by equivalent additions.
08.08.2025 15:34 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
We might choose to refine those choices later, once we better understand the bottlenecks in the proofs.
Our base definitions are in github.com/formal-land/...
08.08.2025 15:31 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
For now, we use rather simple data structures. For example, for field elements with use explicit Z elements with a modulo "p" operation, "p" being supposed as a prime number.
For arrays, we use the total function of their indices, returning a default value when out of bounds
08.08.2025 15:29 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
It is important to keep the original structure of the code, with explicit loops, in order to keep the number of equations small.
It will be simpler to reason about loops rather than a larger number of equations. In addition, the loops are rather simple here in terms of invariants.
08.08.2025 15:27 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
The Rust source code is available at github.com/Plonky3/Plon...
For now, we translate it by hand to the corresponding constraints in Rocq in the Garden project github.com/formal-land/...
We will ensure later with "coq-of-rust" that it corresponds to the original implementation.
08.08.2025 15:24 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
The Keccak hash function, one of the most frequently used hash primitives in the Ethereum protocol, is implemented here efficiently using zero-knowledge constraints.
This amounts to encoding boolean operations like XOR or shift using equations over polynomials of integers modulo a prime number.
08.08.2025 15:21 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
We are currently formally verifying, in Rocq, the implementation of the Keccak hash function from Plonky3 in AIR.
Here is a code extract in Rust:
08.08.2025 15:17 โ ๐ 1 ๐ 1 ๐ฌ 1 ๐ 0
Here is our last blog post about the formal verification of LLZK circuits in Rocq.
We present the reasoning rules, as well as how to apply them to verify that an example has no under-constraints. โ
The link ๐
31.07.2025 13:49 โ ๐ 1 ๐ 1 ๐ฌ 1 ๐ 0
Here is a new blog post on how we define the LLZK operator in the formal verification language Rocq, to assert that there are no under-constraints.
LLZK is a zero-knowledge circuit language based on MLIR by Veridise. This work is funded by the Ethereum Foundation.
Link: ๐
30.07.2025 15:23 โ ๐ 1 ๐ 1 ๐ฌ 1 ๐ 0
Here is a blog post where we explain how we translate the LLZK zero-knowledge circuit language to the proof system Rocq, in order to formally verify such circuits.
The main security property we are looking for is the absence of underconstraints. The link: ๐
30.07.2025 09:15 โ ๐ 1 ๐ 1 ๐ฌ 1 ๐ 0
It differs from what we were doing before, which was generating a typed and executable Rocq version, but without making explicit the non-aliasing and with a quite verbose version, making it difficult to use for the proofs.
13.07.2025 20:24 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
We are currently writing a whole EVM specification in the Rocq language that we prove equivalent to the original implementation in Revm.
This specification is in idiomatic Rocq but follows the structure of the Rust code. It includes the gas and versioning! ๐
13.07.2025 20:23 โ ๐ 1 ๐ 1 ๐ฌ 1 ๐ 0
1. Continue to verify a functional definition for the rest if the EVM instructions.
2. Show that this functional definition is equivalent to a semantics for the EVM in Rocq. There is at least one such project that we could show as equivalent to a reference implementation.
03.07.2025 14:50 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
For the rest of the instructions, we have a typed representation in Rocq generated with the help of "coq-of-rust". However, we do not have a clear idiomatic and functional definition like for the instruction ADD.
From there, we can go in two directions:
03.07.2025 14:48 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0
Finally, we update the top of the stack with the result of "Impl_Uint.wrapping_add" applied to the two top elements!
03.07.2025 14:44 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
We first try to consume a "VERYLOW" amount of gas. If it fails, we return the "OutOfGas" error message.
Otherwise, we pop one element from the stack and ask for a reference to the next one. If there are not enough elements, we return "StackUnderflow".
03.07.2025 14:43 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
In our functional specification, the first line:
Output.Success tt
says that there can be no runtime failures (no panics!), assuming none of the provided methods panic. This is an important safety property.
The rest describes how the ADD instruction behaves.
03.07.2025 14:41 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
One of the difficulties here is that the code is very abstract. The types of the stack or gas field are not defined, nor are the functions to manipulate them. Instead, they are provided as trait implementations.
We need to specify them somehow to say they admit a functional specification.
03.07.2025 14:39 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
The functional specification (more verbose, partly because we unroll the macros):
03.07.2025 14:34 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
The ADD instruction as implemented in Rust:
pub fn add<WIRE: InterpreterTypes, H: Host + ?Sized>(
interpreter: &mut Interpreter<WIRE>,
_host: &mut H,
) {
gas!(interpreter, gas::VERYLOW);
popn_top!([op1], op2, interpreter);
*op2 = op1.wrapping_add(*op2);
}
03.07.2025 14:33 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
One of our primary targets these days (months) is to make a functional specification for the Rust implementation of the EVM (Ethereum Virtual Machine) named Revm.
We finally achieved that for the ADD instruction! Here is what it looks like: ๐
03.07.2025 14:28 โ ๐ 2 ๐ 1 ๐ฌ 1 ๐ 0
It is a bit unusual when writing functional code, as it optionally returns a reference to be used later to mutate some state (the top element of the stack).
We obtained a proof-of-concept specification for this kind of code and are iterating on it to handle the ADD example cleanly.
18.06.2025 15:35 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Current: Asst Professor at Penn CIS
Past:
Cryptographer at Aleo
Crypto and computer security PhD, UC Berkeley
he/him
Formal Methods Researcher, Senior Lecturer @ University of Exeter, Developer of Isabelle/Solidity, marmsoler.com
Advancing AI safety through convenings, coordination, software
https://orpheuslummis.info, based in Montrรฉal
Software developer, ex-academic.
Fluent in Rocq/OCaml/Java/Python/Docker/Bash/Git/Ansible. https://linktr.ee/erikmd
Studying quantum computing and software semantics. YIMBY, anti-ethnonationalisms, pro open borders. โAnarchistโ is not a slur. He/him
Linkedin: https://www.linkedin.com/in/anshugsharma/
Facebook: https://www.facebook.com/anshu.sharma.557128
Blockchain & Web3 โข Crypto โข Defi โข DePin โข
X : @sh3rly13
Software engineer. Data infra guy. Apache Committer/PMC on various projects. WebAssembly enthusiast. Also cinema, street photography and sarcasm...
Hello! I am a #linux and #emacs user and software engineer who also enjoys #linguistics and #etymology. Trying to forget that I'm American. Proud to be living in Germany. Learning #German and #Rust. he/him/his.
GitHub: https://github.com/relrod
Transkriptorium AI co-founder & COO, Systems & Web Programmer, ML Researcher, BJJ student, Dad
#web3 dev + auditor | @SpearbitDAO LSR, @immunefi bug hunter, sage of AAVE codebase :D
Functional and systems programmer
irl i provide care to dependent adults and read algebra, logic, & code.
berkeley, maine, ithaca, eugene. nominal vet (usnr '71-73), nps, sri alum
email: tbrunner@uoregon.edu
commandeer
pronouns: thee/thou
#mathsky #autism
Prof CS University of Oslo
https://ebjohnsen.org
Senior Lecturer at the University of Glasgow. Working on computing education, formal methods & theoretical computer science, work-based learning in software engineering, skills & competencies, widening participation in HE, equality, diversity & inclusion.
Nova JavaScript engine developer and OSS contributor by day and night. Avid choir singer. He/him.
Give me data-oriented design or else (I will cry).
https://trynova.dev/
๐ซ๐ท of ๐ต๐น descent, married to ๐ฎ๐น in ๐ณ๐ฑ.
- Formerly worked in quantum cryptography (PhD), specifically in making protocols device independent using non locality.
- Now design/code some (non quantum) algorithms
- Like FOSS
- Like logic/CS/maths/physics
๐ฃ๏ธ ๐ซ๐ท๐ฌ๐ง๐ฎ๐น๐ต๐น๐ช๐ธ
We educate people about cryptography, and apply techniques like formal verification to build verified primitives.
interested in computation and logic.
ฮฉ := (ฮปx.x x) (ฮปx.x x)
To ฮฉ and beyond!
Backend developer with OCaml by day ๐ซ
Type theorist by night ๐ซฃ
I use Arch, (and neovim) btw ๐