LeanVM
Devcon·Fri, Nov 6, 2026, 12:00 AM
Speaker
Transcript
[music]
Thank you very much. Hello everyone. So, I'm Thomas Bangs and I'm going to present you what is LinVM. So, to begin with, what's the problem? The problem is that we want to make Ethereum post-quantum and more recently post-AI.
And that currently all of our cryptographic stack uh relies on elliptic curves. Typically, at the execution layer, you have ECDSA. At the consensus layer, you have BLS. And at the data availability layer, you have KZG. And all three relies in some way to elliptic curve cryptography, which we know is broken by Shor's algorithm.
Meaning, quantum computers will break it trivially as soon as they are sufficiently big. And recently, there is this fear that even super smart mathematical AIs could also break it. And so, we need to move towards this so-called hash-based cryptography, meaning we stop relying on elliptic curves, we rely fully on hashes. And turns out, we can construct all the primitives we care about in Ethereum purely on hashes. For instance, at the execution layer, we can replace ECDSA, so the signature you use to sign a transaction, by something called SPHINCS, which is a hash-based signature scheme.
For the consensus, we can also use hash-based signatures to replace BLS. We have this is this a XMSS scheme. And for the data availability availability layer, we also have a solution based on Reed-Solomon encoding and Merkle hashing to make our blobs post-quantum. So, in some sense, we are all covered by hash-based cryptography. But, there are two small issues.
The first one is the size. Those hash-based uh hash-based signatures are extremely solid, but they are much bigger than today's signatures. For the consensus layer, we're speaking about a 20x improvement in in increase in size, and for the execution layer, we're talking about a 100x [snorts] improvement increase in size. One sec. Um
[snorts]
Tick. Second problem, we don't have native aggregation. Currently, Ethereum performs of the order of a few hundred transactions per block at the execution layer, but it performs on the order of 30,000 transactions per seconds at the consensus layer because every slot, tens of thousands of validators attest the block, sign the block to construct the proof of chain, the proof of stake chain. And um Sorry.
[snorts]
And currently, for these 30, 000 um signatures being um handled per slot at the consensus layer, we rely on aggregation of BLS signatures because those elliptic curve BLS signatures have native aggregation properties, meaning aggregation is easy. You have your 1,000 of 1,000 of PKS signatures, each is small, and you can aggregate them into a same-size small aggregated signature. The issue is that we don't have this nice property with XMSS, this hash-based signature scheme. And it's a big problem because every signature every XMSS hash-based signature is like 2 KB, and if you multiply 2 KB by 30,000 XMSS per slot, you are at like 60 MB of signature data per per block, which is impossible to handle. The solution is STARKs, aka hash-based succinct non-interactive argument of knowledge hash-based STARKs.
A STARK is a hash-based cryptographic proof that lets you prove some statement. In particular, in our case, what we care about is to replace this 30,000 XMSS signature per block by a much smaller cryptographic proof that will attest that these signatures have existed at some point. But, you don't put the signatures in the block, instead, you put in the block a STARK, so this cryptographic proof that says, "I know these signatures have existed in the past, and here is the proof." And this proof is much much smaller than the 30,000 signatures that you have every block. The thing is, in Ethereum, we have this subnets, these committees, meaning the aggregation it's not like every validators send the transaction to a single aggregator that would perform all the aggregation directly.
So, we have these committees, meaning a small number of validators that can aggregate their signatures to form a stark cryptographic proof. But, then you end up with, let's say, 16 of these starks, one per committee, and you want to again combine these 16 starks into again another stark. And you can do it. You can have a stark that says, "I know 16 starks that were verified valid, and each of these starks were saying, 'I know 2,000 signatures that were verified valid.'" And this is called recursion.
You verify a stark inside another stark. And this is extremely powerful because it allows us to parallelize the aggregation work across multiple subnets, and to, in the end, combine everything into a single stark, meaning whatever [snorts] the number of validators is, you can, in the end, only store a 256 kilobyte stark in the block. And Lin VM is the this machine that will handle the stark. Lin VM is what's called a ZK virtual machine, meaning it has an instruction set, a a few number of instructions, and you can write programs using this ISA, this instruction set, and Lin VM will prove correct execution of this ISA. And it's not like risk five that has, I don't know, 65 instructions.
It's a very very simple ISA. LinVM is a very minimal and simple virtual machine. In particular, LinVM has only six instructions. You can think of it as something close to a circuit in the sense that most of the instructions are additions and multiplication as in a circuit, and you have a few instructions to perform hashes because we want to aggregate hash-based signatures, and this involves um verifying a lot of hashes, and you have [snorts] a few other instructions for control flow to have um some loops and um conditions in the LinVM programs. In terms of cryptographic machinery, LinVM recently, thanks to Plonk and all the recent advances, um moved to binary fields, meaning these fields um based on the like extensions of the smallest possible field F2, that are extremely efficient to prove standard hashes like Keccak.
LinVM uses Keccak 256, the same hash function the execution layer of Ethereum uses, meaning LinVM doesn't add new cryptographic assumption to Ethereum. It actually it will remove a cryptographic assumption because it will remove elliptic curve cryptography, so it will strengthen the cryptographic assumptions on which Ethereum relies. So, in terms of small details for those interested, um the PCS is weird. Um we used the ring switching and M3 arithmetization from Binius, and we use a grand product GKR to handle communication via buses between the different tables, the different circuits of the VM. LinVM is currently being formally verified and we are very close to have fully reviewed the statements that proves that LinVM is complete and knowledge sound with 128 bits of security in Lin four.
And as I said before, LinVM is based on Keccak, extremely secure hash function, very high margins, and proves Keccak thanks to GKR and reverse multiplication friendly embedding technique that was brought to us by Lev Soukhanov. And that's it for me. The TLDR [snorts] is that LinVM is zero-knowledge virtual machine that is as simple as minimal as possible to handle all the STARKs that are needed to make Ethereum post-quantum, post-AI, replacing all the elliptic curves. You replace this by only hashes. Everything relies on hashes, everything on Keccak.
Solid, rock solid. And essentially, you can aggregate thousands of signatures per second. You can recurse. You can handle blobs, signatures at the consensus layer, at the execution layer. You can handle everything that you need to make Ethereum work purely based on Keccak, the only cryptographic assumption in this world.
Thank you very much.
Awesome. So, we have some questions. One of the main questions that I was like thinking about when I was listening to your talk is like Okay, so you said we use STARKs, you STARKs. Is a STARK the same as a PQ SNARK? Like, is this the same terminology?
Almost. They are essentially two ways to build PQ SNARKs. I would say the first way is hashes, so hash-based snarks, what I call starks. And the second way is lattices. You can also typically result is a risk-5 ZK VM that uses lattices as a building block.
Okay, cool. Um another question is is statelessness a part of Lean VM roadmap or not yet?
I would say yes. Because currently Lean VM uses this very minimal ISA, very simple stark machinery, but there is a world in which we use Lean VM we use in Lean VM the risk-5 ISA that would let us prove um EVM blocks thanks to uh risk-5 um guest program for the EVM.
Another question, so like I remember it was kind of big news, you guys were considering using like Blake 3 you were originally using Poseidon, then Blake 3, and now it's Keccak. It's really There's a good question. Uh Yeah, so what are the challenges to implement recursion for Keccak?
[snorts]
I would say um So, for context, initially uh Lean VM were using Poseidon 2. Then Poseidon 2 was almost broken. It's still secure, but the security margins was reduced a lot, so we moved to Poseidon 1. Then Flock came, and Flock was able to prove very efficiently standard hashes, SHA-2, SHA-3, Blake. So, we moved to SHA-3, sorry, to Blake 3.
Then we realized that Blake 2 Blake 2S was also almost as fast as Blake 3 cuz it was the same power of 2 in the uh R1CS matrices in Flock. So, we moved to um um Blake 2S. And then it turned out uh using GKR you can have extremely efficient Keccak uh Keccak proving. Like, this machine can prove on CPU CPU 600,000 Keccak per second, which is more than enough to handle the signatures we need for Ethereum consensus, execution, and data layers. And so, I would say there's also like SHA-2, which is considered cuz SHA-2 is already in Ethereum at the consensus layer.
So, in some sense, it would also not add any new cryptographic assumptions. But, SHA-2 SHA-3 are good hash functions and I think we are happy with it. Yeah.
So, you're confident that you'll get the same performance from Keccak as
Yes. I mean, maybe not maybe you could I don't know. It's likely that you can be a little bit faster with Blake 3 for instance because Blake 3 is extremely fast, but I don't think we should optimize for 20 25% performance improvement because the performance is already extremely good. Like, you can aggregate thousands of SMs per second. You can have recursion in I don't know.
You can aggregate eight to one recursion in less than a second. So, performance is already very good and performance keeps improving. Like, every day I merge PRs like 10% 15% improvement. So, I'm not afraid by performance and so, I think uh we should really optimize for simplicity and security of the STARK machinery because performance is in some sense a solved problem, I would say.
Another question that has a lot of upvotes is why only six instructions? The VM is general purpose. Can you prove other types of programs, not just signature aggregation?
Yes. You can prove like it's Turing complete. You can prove everything. Um the VM has been really optimized for recursion and aggregation of hash-based signatures. Having a very small number of instructions in is friendly to recursion because um when you recurse, you have to verify a proof of yourself and the number of instructions will impact number of constraints blah blah blah.
So, having a very small um ISA means very fast recursion. And so that's why we want to keep the ISA small.
Makes sense. So, who runs this VM? Is this running client-side or is this you're running this VM? Who runs this?
So, the proving and verifying verifying the Stark is done in a few milliseconds. Your phone, your whatever can verify it. Even your ledger can verify it. And it this can be useful. And proving would be done by validators in the consensus and it turns out you can prove Starks very fast on a few set like four threads of AVX2 AVX 512 is enough to have efficient aggregation of signatures.
Makes sense. Unfortunately, we're
[music]
Automatic transcript — names and jargon may be misspelled.