Understanding XMSS
Ethereum currently uses BLS for validators. This is vulnerable to quantum computers, so we need to move to post-quantum schemes. There are a lot of quantum-resistant signature algorithms, and Ethereum prefers hash-based ones.
In this post, I will explain
- What is hash-based signature?
- How hash-based signature works?
- What is XMSS?
No mathematical argument. This post is for those who knows the current Ethereum, and have interests in XMSS.
What is hash-based signature?
Ok, let's recall digital signature algorithm itself. Digital signature algorithms allow us to prove the authenticity of the data. So it is used when a user makes a transaction, when a validator attests a block, or anywhere there is a need to prove the who. In a simple sentence, a digital signature is defined by these three properties.
- Authenticity: the signature shows the message came from the holder of the secret key.
- Integrity: if the message changes after signing, even by one bit, the signature no longer checks out.
- Non-repudiation: the signer can't later deny signing it, because nobody else could have made that signature.
There are many ways to achieve these properties.
BLS, which Ethereum's validators use today, is built on the elliptic-curve discrete logarithm problem over a pairing-friendly curve: given pk = sk * G, you can't compute sk from pk and G (a publicly known curve parameter). A quantum computer can.
Hash-based signatures are built on hash functions: given y = H(x), you can't compute x from y. A quantum computer can't either.

How hash-based signature works?
I'll give an intuition. There are a lot of secrets in your mind. Hash the secrets and publish the hashes (somehow). If you want to sign a data X, reveal some of your secrets based on the data X (by some algorithm). Then the secrets you revealed are the signature. Anyone can verify it by hashing them and comparing with the published hashes. At first, only you know the secrets, so it has authenticity. If the message changes, then the secrets revealed will change, so the signature changes. Also, since only you know the secrets, no one else could have signed it, which gives the non-repudiation property. Got it?
Sadly, since you give away some of your secrets each time you sign, you can't use the key more than once. When you use many times, people will know enough of your secrets, so people will be able to forge your signature. This construction is called the Lamport signature scheme. It's a one-time hash-based signature.
The important point is that since it uses only a hash function, it's believed to be a quantum-resistant even with this simple construction.
These are the basics of hash-based signatures. Next, let's look at the what and why of XMSS.

What is XMSS?
XMSS (eXtended Merkle Signature Scheme) is a hash-based signature scheme, and a variant of it, leanXMSS, is planned for Ethereum's consensus layer.
XMSS is essentially a Merkle tree of one-time signature keys. It creates many one-time key pairs and places the hash of each one-time public key as a leaf of the tree. It only publishes the root of the tree, a 32-byte value that serves as the public key. To sign, you use the next unused one-time key and attach the Merkle path proving that this key belongs under the root. The verifier recomputes the one-time public key from the signature and the message, then checks that it, together with the path, leads to the root.
Why XMSS for CL?
One strong reason is that it relies only on the security of hash functions. Other post-quantum signature schemes rely on specific mathematical structures, such as lattices. They are, of course, believed to be safe. But in an age when AI may speed up cryptanalysis, we want to minimize our assumptions about mathematical structures.
Also, most quantum-resistant signature algorithms are not easy to aggregate. One way to solve this problem is to use a STARK. If an algorithm is cheap to run inside a STARK, it is relatively easy to aggregate. XMSS satisfies this property: verifying it is just hashing, and a STARK-friendly hash function is very cheap inside a STARK.
Other quantum-resistant algorithms, such as lattice-based ones, do have ways to aggregate, but they are not fast enough, either on their own or inside a STARK.
Specifically, the consensus layer plans to use leanXMSS. Its structure is XMSS itself, but its leaves are tied to slots, and it is optimized to be proven inside a STARK.

And there comes the leanVM. The core of transition from BLS to post-quantum one is speed of aggregation. Current BLS signature is easy to aggregate and fast so it doesn't require specific treatment. Now, we are planning for leanXMSS, it needs a STARK fast enough. Ethereum community are currently building a minimal zkVM optimized for leanXMSS. I'll talk about leanVM in next post. Thank you for reading.