---
eip: 8355
label: EIP-8355
title: Precompiles for ML-DSA Verification
status: Draft
type: Standards Track
category: Core
created: 2026-07-30
official: https://eips.ethereum.org/EIPS/eip-8355
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8355.md
canonical: https://eips.huatuo.xyz/eip-8355/
lang: en
tldr: Proposes three precompiles that verify NIST ML-DSA post-quantum signatures at all three security levels, taking standard FIPS 204 keys and signatures plus a message of any length.
tags: [precompile, post-quantum, signatures, ml-dsa, core]
---

# EIP-8355: Precompiles for ML-DSA Verification

> Three precompiles verifying ML-DSA signatures from a concatenated public key, signature, and trailing message

**TL;DR:** Proposes three precompiles that verify NIST ML-DSA post-quantum signatures at all three security levels, taking standard FIPS 204 keys and signatures plus a message of any length.

## What problem does it solve?

Ethereum accounts and contracts verify ECDSA (secp256k1) or P-256 signatures, both of which a large quantum computer could break. ML-DSA (FIPS 204, formerly Dilithium) is NIST's finalized lattice-based signature standard and is already supported by HSMs, cloud key services and mainstream crypto libraries. Verifying it in plain EVM code would be far too expensive, so contracts need a precompile.

[EIP-8051](/eip-8051/) also proposes ML-DSA verification, but only for ML-DSA-44, only over a fixed 32-byte pre-hash, and with a large pre-expanded public key. EIP-8355 makes different choices so that keys and signatures produced by standard tooling can be verified unchanged.

## How it works

Three precompiles, one per parameter set (proposed addresses):

| Precompile | Address | Public key | Signature | Base gas |
| --- | --- | ---: | ---: | ---: |
| `VERIFY_MLDSA44` (level II) | `0x12` | 1312 B | 2420 B | 6,500 |
| `VERIFY_MLDSA65` (level III) | `0x13` | 1952 B | 3309 B | 9,000 |
| `VERIFY_MLDSA87` (level V) | `0x14` | 2592 B | 4627 B | 13,500 |

- **Input:** `pubkey ++ signature ++ message`, no headers or length fields. Key and signature lengths are fixed, so the message is simply whatever follows, and it may be empty.
- **Semantics:** standard `ML-DSA.Verify` over the raw message with the empty context string. Keys use the normal compressed FIPS 204 encoding; the precompile does the matrix expansion itself.
- **Output:** always 32 bytes, `…01` for valid and `…00` for invalid, malformed or too-short input. It never reverts except when out of gas.
- **Gas:** `BASE + 6 × ceil(message_length / 32)`, charged before any work.

Always returning 32 bytes is deliberate. Calling an address with no code also "succeeds" with empty output, so with `ecrecover`-style empty-on-failure results a contract can't tell "invalid signature" from "this chain doesn't have the precompile". Here any return length other than 32 means the precompile is missing.

## Sample code

Calling the ML-DSA-44 verifier from Solidity:

```solidity
address constant VERIFY_MLDSA44 = address(0x12);

function verifyMLDSA44(bytes memory pubkey, bytes memory sig, bytes memory message)
    internal view returns (bool)
{
    require(pubkey.length == 1312 && sig.length == 2420, "bad lengths");
    (bool ok, bytes memory out) = VERIFY_MLDSA44.staticcall(abi.encodePacked(pubkey, sig, message));
    require(ok, "out of gas");
    require(out.length == 32, "precompile not available");
    return abi.decode(out, (uint256)) == 1;
}
```

From the spec's test cases: a valid ML-DSA-44 signature over `"Hello world"` (11 bytes) costs `6500 + 6 × 1 = 6506` gas and returns `1`; flipping one bit of the signature costs the same and returns `0`.

## Things to know

- **Status: Draft.** Addresses and gas figures are not final and still need benchmarking.
- Check both the call's success flag *and* the returned word. Success alone tells you nothing about the signature.
- There is no built-in domain separation (empty context). Put the chain, contract, nonce or intent into the message, for example by signing over an [EIP-8141](/eip-8141/) frame hash.
- Signatures and keys are large (kilobytes), so calldata cost matters as much as verification gas.
- Compare [EIP-8051](/eip-8051/) (competing ML-DSA design) and [EIP-7951](/eip-7951/) (P-256 precompile, which returns empty output on failure).


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8355
