Abstract
This standard defines the Quantum Bridge Shield, a post-quantum signature layer for cross-chain bridges on Ethereum. A committee signs the Merkle root of a batch of cross-chain messages with stateful hash-based signatures as specified in RFC 8554, optionally paired with secp256k1 Elliptic Curve Digital Signature Algorithm (ECDSA) during migration. An on-chain guard approves a root only when a strict majority of distinct, unfrozen members has signed it, records every one-time key leaf it accepts, and freezes any key that signs one leaf twice. A bridge accepts a message only with a Merkle inclusion proof against an approved root. The standard fixes the digest formats, the Merkle construction, the quorum and freezing rules, the guard interface and the leaf formats for bridge integrations, so that independent signers, guards and bridges interoperate.
Motivation
Bridges on Ethereum are secured by committees that sign with secp256k1 ECDSA or BLS12-381. Shor's algorithm recovers the private key behind any such public key on a fault-tolerant quantum computer, after which an adversary can attest to messages that never occurred and release assets on the destination chain. Committee public keys and historical signatures are public today, so they can be harvested now and broken later, and one recovered validator key compromises every route that trusts it.
Hash-based signatures rest only on the security of the hash function. The Leighton-Micali Signature (LMS) scheme is standardized in RFC 8554 and approved in National Institute of Standards and Technology (NIST) SP 800-208, has a 56-byte public key, and verifies on the Ethereum Virtual Machine (EVM) through the SHA-256 precompile at about 200,000 gas for the recommended parameters. No interoperable way exists for a bridge to require such signatures, for signers to produce them safely, or for different implementations to agree on what was signed. This standard provides it.
Specification
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
Signatures
Every committee member holds an LMS public key as specified in RFC 8554 for a single tree, with the SHA-256 parameter sets of 32-byte output. Guards MUST accept LMS typecodes 5 to 9, which are tree heights 5, 10, 15, 20 and 25, and Leighton-Micali one-time signature (LMOTS) typecodes 1 to 4, which are Winternitz parameters 1, 2, 4 and 8. Guards MUST reject every other typecode. The signed message is always a 32-byte digest defined below.
Every LMS key is bound to one guard on one chain through its identifier I. Each key draws a 32-byte salt uniformly at random, and I MUST equal the first 16 bytes of keccak256(abi.encode(chainid, guard, salt)), so that every key keeps a distinct identifier as RFC 8554 requires. Each committee entry carries its salt, and a guard MUST recompute I from it and reject any configuration containing a key whose identifier does not match, or two keys with the same identifier. A guard is therefore deployed to an address fixed before key generation, for example through the CREATE2 opcode (0xf5) or a known deployer nonce, and one key serves exactly one guard.
In hybrid mode every member MUST also sign the same 32-byte digest with secp256k1 ECDSA. The ECDSA signature is computed over that digest passed directly to the ecrecover precompile, with no ERC-191 prefix, and is encoded as 65 bytes of r, s and v, where s is at most half the curve order and v is 27 or 28. In post-quantum mode the ECDSA signature is absent and ignored.
Digests
Let guard be the address of the guard contract, chainid the chain identifier block.chainid, and epoch the configuration epoch, which starts at 1 and increases by one on every reconfiguration.
ROOT_TAG = keccak256("ERC8443_ROOT_V1")
REVOKE_TAG = keccak256("ERC8443_REVOKE_V1")
CONFIG_TAG = keccak256("ERC8443_CONFIG_V1")
rootDigest(root) = keccak256(abi.encode(ROOT_TAG, chainid, guard, epoch, root))
revokeDigest(root) = keccak256(abi.encode(REVOKE_TAG, chainid, guard, epoch, root))
configDigest(signers, threshold, mode) =
keccak256(abi.encode(CONFIG_TAG, chainid, guard, epoch, keccak256(abi.encode(signers)), threshold, mode))chainid is block.chainid encoded as uint256, guard is the guard address encoded as address, epoch is encoded as uint64, mode as uint8 with 0 for hybrid and 1 for post-quantum, threshold as uint256, and signers as an array of (address ecdsa, bytes lmsPublicKey, bytes32 identifierSalt). In rootDigest and revokeDigest the epoch is the epoch under which the root is approved or revoked. In configDigest, and in the possession and reconfiguration flows that use it, the epoch is the target epoch, which is the current epoch plus one.
Merkle construction
leafHash(leaf) = keccak256(0x00 || leaf)
node(left, right) = keccak256(0x01 || left || right)A batch has at least one leaf, and an empty batch is not allowed. The leaf-hash level holds leafHash(leaf) for each of the n leaves, padded with zero words to the next power of two. For a single leaf the root is leafHash(leaf) with an empty proof. At level i, bit i of the leaf index selects the side of the current node. If that bit is 0 the current node is the left child and the proof node is the right sibling, giving node(current, proofNode). If that bit is 1 the current node is the right child and the proof node is the left sibling, giving node(proofNode, current). The leaf argument to isIncluded is the integration leaf defined in Bridge bindings, and the guard applies leafHash to it before walking the proof. For a proof longer than 64 nodes, or an index that does not fit the proof length, isIncluded MUST return false and MUST NOT revert.
Quorum
A configuration is a list of signers, a threshold and a mode. The threshold MUST satisfy 2 * threshold > n and threshold <= n, where n is the number of signers, so it is at least a strict majority, and a guard MUST reject any configuration that does not satisfy this. LMS public keys MUST be unique, and in hybrid mode ECDSA addresses MUST be nonzero and unique.
Each key is identified on the guard by keyHash, which is keccak256(lmsPublicKey) and is the value reported as lmsKeyHash. For each key the guard stores, per leaf index, the single 32-byte digest it has accepted at that leaf, and whether the key is frozen. This leaf state and frozen state are keyed by keyHash and persist across reconfiguration for a retained member.
An action carries a list of Attestation entries, each (uint256 signer, bytes ecdsaSignature, bytes lmsSignature), with strictly increasing signer indices. For each entry let q be the leaf index of its LMS signature, key the member's key and digest the action digest. The guard evaluates each entry in order.
- If
keyis frozen, the entry is skipped and does not count. - If no digest is recorded at
q, the LMS signature MUST verify overdigestand, in hybrid mode, the ECDSA signature MUST recover the member's address, otherwise the action reverts. On success the entry counts. - If the digest recorded at
qequalsdigest, then in hybrid mode the ECDSA signature MUST recover the member's address or the action reverts, and the entry counts again. This keeps an early published signature from blocking an action. - If a digest different from
digestis recorded atq, and the LMS signature verifies overdigest, that is equivocation, so the guard freezeskey, emitsSignerFrozenand the entry does not count. If instead the LMS signature does not verify, the action reverts.
An action takes effect only when the count reaches the threshold. Only on success does the guard write digest as the accepted digest at q for each counted entry, which advances nextLeafOf. A freeze from step 4 persists whether or not the action reaches the threshold, so an action never reverts because of a freeze, and a count below the threshold approves nothing and writes no leaf digest while any freeze stands. Anyone can freeze a key by calling reportEquivocation with two valid LMS signatures from one leaf of the key over two different digests.
Roots and reconfiguration
When an action over rootDigest(root) reaches the threshold, the guard marks root approved, records the approval time and emits RootApproved. isApproved returns true from that moment and false for a root that was never approved or that has been revoked. An approved root becomes usable to bridges only after a minimum root age has elapsed since its approval time, and during that interval isApproved is true while isIncluded MUST return false. The minimum root age MUST be at least 60 seconds, is fixed at deployment, and is exposed through minRootAge.
An action over revokeDigest(root) marks root revoked, after which isApproved returns false and the root MUST never be approved again. A root MAY be revoked before it is ever approved, which blocks it permanently.
Approval and revocation are properties of the root and do not change on reconfiguration, so a root approved under one epoch stays approved after reconfigure.
A new member MUST prove possession of its LMS key, and in hybrid mode its ECDSA key, by signing the configuration digest of the target epoch through provePossession before it can be added. A current member whose LMS key, and in hybrid mode ECDSA address, is unchanged MAY be retained without a new signature, and keeps its leaf state and frozen status.
Interface
interface IQuantumBridgeShield {
enum Mode { Hybrid, PostQuantum }
struct Signer {
address ecdsa;
bytes lmsPublicKey;
bytes32 identifierSalt;
}
struct Attestation {
uint256 signer;
bytes ecdsaSignature;
bytes lmsSignature;
}
event RootApproved(bytes32 indexed root, uint64 indexed epoch, uint256 signatures);
event RootRevoked(bytes32 indexed root, uint64 indexed epoch, uint256 signatures);
event ConfigurationChanged(uint64 indexed epoch, uint256 signers, uint256 threshold, Mode mode);
event SignerFrozen(bytes32 indexed lmsKeyHash, uint256 leaf, bytes32 digestA, bytes32 digestB);
function approveRoot(bytes32 root, Attestation[] calldata attestations) external;
function revokeRoot(bytes32 root, Attestation[] calldata attestations) external;
function provePossession(Signer[] calldata signers, uint256 threshold, Mode mode, uint256 index, Attestation calldata proof) external;
function reconfigure(Signer[] calldata signers, uint256 threshold, Mode mode, Attestation[] calldata attestations) external;
function reportEquivocation(bytes calldata lmsPublicKey, bytes32 digestA, bytes calldata signatureA, bytes32 digestB, bytes calldata signatureB) external;
function isApproved(bytes32 root) external view returns (bool);
function isIncluded(bytes32 root, bytes32 leaf, uint256 index, bytes32[] calldata proof) external view returns (bool);
function nextLeafOf(uint256 signer) external view returns (uint256);
function epoch() external view returns (uint64);
function identifierFor(bytes32 salt) external view returns (bytes16);
function minRootAge() external view returns (uint64);
}Guard behaviour
Each function reverts on malformed input, and on a signer index that is out of range or not strictly increasing, in addition to the conditions below.
approveRootruns the quorum procedure overrootDigest(root). On reaching the threshold it marksrootapproved, records the approval time and emitsRootApprovedwith the final count. It reverts ifrootis already approved or revoked.revokeRootruns the quorum procedure overrevokeDigest(root). On reaching the threshold it marksrootrevoked and emitsRootRevoked. It reverts ifrootis already revoked.provePossessionrecords that the member atindexof the proposed configuration has proven control of its keys, keyed by the configuration digest of the target epoch. Theproofconsumes one LMS leaf, which the guard records as accepted so that it counts towardnextLeafOf. It reverts if the LMS signature, or in hybrid mode the ECDSA signature, does not verify over that digest.reconfigureruns the quorum procedure overconfigDigestof the new configuration against the current configuration, so the current members authorise the change. Every new member that is not retained MUST have proven possession for the target epoch. On success the epoch increases by one, the new configuration takes effect, retained members keep their leaf and frozen state, andConfigurationChangedis emitted. It reverts if the new configuration is invalid under Quorum, if a required possession proof is missing, or if the count is below the threshold.reportEquivocationfreezes a key given two valid LMS signatures from the same leaf of that key over two different digests. It emitsSignerFrozenwith the key hash, the leaf and the two digests. The key need not belong to the current configuration. It reverts if either signature does not verify, if the two leaves differ, or if the two digests are equal.
The view functions behave as follows.
isApprovedreturns true only for a root that has been approved and not revoked.isIncludedreturns true only whenisApproved(root)is true, the minimum root age has elapsed since approval, and the proof placesleafatindexunderroot. It returns false otherwise and does not revert.nextLeafOfreturns one more than the highest leaf index recorded for the member's key, and 0 when no leaf is recorded.epochreturns the current configuration epoch.identifierForreturns the identifier that a key with the given salt must carry on this guard.minRootAgereturns the fixed minimum root age in seconds.
RootApproved and RootRevoked are emitted by approveRoot and revokeRoot on success, and ConfigurationChanged by reconfigure on success. SignerFrozen is emitted whenever a key is frozen, by step 4 of the quorum procedure or by reportEquivocation. In SignerFrozen, lmsKeyHash is keccak256(lmsPublicKey), leaf is the reused leaf index, and digestA and digestB are the two different digests signed at that leaf.
Bridge bindings
A bridge integration MUST define its leaf so that it binds a domain tag unique to the integration, the destination, the bridge endpoint and the full message, so that no leaf of one integration is valid in another. A bridge MUST accept a message only when isIncluded returns true for its leaf, and the leaf passed to isIncluded is this integration leaf.
The following is an example binding for the LayerZero v2 messaging protocol, whose packet layout is defined by that protocol in its PacketV1Codec.
LAYERZERO_TAG = keccak256("ERC8443_LAYERZERO_V1")
layerZeroLeaf = keccak256(abi.encode(LAYERZERO_TAG, uint32 localEid, address verifier, address receiveLibrary,
keccak256(packetHeader), bytes32 payloadHash, uint64 confirmations))In this example packetHeader is the 81-byte version 1 header, with byte 0 the version, bytes 1 to 9 the nonce, bytes 9 to 13 the source endpoint id, bytes 13 to 45 the sender, bytes 45 to 49 the destination endpoint id, and bytes 49 to 81 the receiver. localEid is the destination endpoint id in the header. A verifier MUST check that the header is 81 bytes, that its version byte is 1, and that its destination endpoint id equals localEid. payloadHash and confirmations are the values the destination receiveLibrary verifies for the packet, as defined by that protocol. An integration for another protocol defines its own tag and inputs in the same shape.
Signer requirements
LMS keys are stateful. A signer MUST durably record each leaf before it releases a signature, MUST NOT sign from a key whose state is behind the on-chain nextLeafOf, and SHOULD keep a monotonic high-water mark on storage separate from the key.
A signer MUST recompute the identifier of its key from its salt and the chain and guard of every signing request, and MUST refuse a mismatch before it touches leaf state.
Tree height SHOULD be chosen from the expected batch rate. Height 20 gives 1,048,576 leaves, roughly 145 days at one batch per block and about two years at one batch per minute, and is RECOMMENDED for active bridges. Because one leaf signs a whole batch, larger batches extend key life.
Rationale
LMS was chosen over stateless hash-based signatures because a Winternitz 4 (W4) LMS signature is about 2.5 KB and verifies for about 200,000 gas, while stateless schemes produce signatures of 8 to 50 KB. Lattice signatures have no precompile available on Ethereum today and cost millions of gas to verify in the EVM, though precompiles for them are proposed in EIP-8051 and EIP-8052. LMS needs only the SHA-256 precompile that every EVM chain provides.
Signing a Merkle root rather than each message pays the cost of post-quantum verification once per batch. Once a batch is approved, accepting one of its messages costs only a Merkle proof check, which is under 10,000 gas for a batch of 256.
Recording the digest accepted at every leaf makes one-time key reuse detectable on chain in any arrival order, and letting the same digest count again means that publishing a signature early cannot block an action. Writing records only when an action succeeds keeps honest signatures usable after a failed attempt.
Hybrid mode lets bridges deploy the standard beside their existing committees, so security is never lower than the stronger of ECDSA and LMS during migration. The domain tags bind every digest to one action, chain, guard and epoch.
Backwards Compatibility
This standard adds a verification layer and changes no existing contract. Bridges adopt it beside their current verification, for example inside an aggregation of security modules.
Test Cases
The following values hold for chainid 1, guard 0x00000000000000000000000000000000000000aa, epoch 1 and root = keccak256("example batch").
ROOT_TAG 0x71904a4c3117a7dd53c6f15004b44e6460dc68dcac58725870067150f0d54efa
REVOKE_TAG 0x1cc3d4b436c1fafa690a7c5d250041e5906fc181adf75bc065ba9345f2541970
CONFIG_TAG 0x65a64d4f8c35b3da7483555564c66e4b1846a3b68e8f97c7ed6eefa414b36ce2
root 0x147a79ace204d0285b38360840696652b6316c08f833b86bc1e1b297ff2640ca
rootDigest 0x7f4e274eaedb33b80bb0229e3b89620f326f8921f5cd8d51c5822e46abcd90d9
revokeDigest 0x43994ba0b401f79648792a769a1d026f2417f82cf359614ff54f01765880529aThe following values hold for the leaves keccak256("message a"), keccak256("message b") and keccak256("message c").
merkleRoot 0x5c57796a586cca35235995a17d5fe44a78642d6f9e2af1f25defefd5e0225fc0
proof index 2 [0x0000000000000000000000000000000000000000000000000000000000000000,
0xfd5657abcd3a0b6c6fd39380b90aac23720f534a9e46413a2d8f5f9021f44c9e]For the same chainid and guard and salt = keccak256("example salt"), the bound identifier is the following.
salt 0x0ccc6cd43178fb492fe88cff3ed06aa4f709a4da5b48e8eb53b316164b699e84
identifier 0x37d871a0a1680d958aae157ea07376f8LMS verification must accept the two test cases of RFC 8554 Appendix F and must reject them after any change to the message or the signature.
Security Considerations
The security of the shield rests on SHA-256 and Keccak-256. Grover search leaves about 128 bits of security against preimage attacks on both.
Reusing an LMS leaf exposes enough of the one-time key to forge signatures. The on-chain records detect reuse, and any party can freeze the key, but they cannot prevent the first forged signature from counting if it reaches an unused leaf. Signers must therefore persist leaf state before signing, never run a cloned key, and prefer a hardware module with a monotonic counter. Snapshots, disk images and virtual machine clones defeat file-level copy detection.
The guarantee holds for messages that the committee observes on the source chain. A dishonest majority can still attest to false messages. The minimum root age gives an honest minority time to raise revocation through the bridge's own processes.
If misuse freezes so many keys that fewer live members remain than the threshold, the guard stops approving anything. This fail-safe halt is intended, and recovery is a new guard that the bridge selects. Operators should size a committee so that the number of members minus the threshold is at least the number of keys that could be frozen or lost at the same time, and should monitor that margin. A guard may expose the count of members whose keys are not frozen for this purpose.
The identifier binding confines every key to one guard on one chain, so a cloned or compromised signer cannot spread leaf reuse across guards. Placing a chosen key on another guard needs a preimage of a 128-bit value under Keccak-256, about 2^128 work classically and about 2^64 under Grover search. Separation between guards also holds without the binding, because every digest commits to the full chain identifier and guard address. reportEquivocation accepts two valid LMS signatures from the same leaf of the same key over two different digests, so any party holding such a pair can freeze the key. Recovery after a halt is a new guard at a new address, which requires fresh keys for every member.
Implementations should bound committee size so that approval and rotation fit within the transaction gas limit for the largest supported signatures.
Copyright
Copyright and related rights waived via CC0.
