P3Q Corona and Magnetar Verifier Kinds
Kinds 0x02 (Corona, Module-LWE threshold) and 0x03 (Magnetar, FIPS 205 SLH-DSA threshold) on the same P3Q precompile slot as Pulsar — one slot, one ABI, three primitive kinds resting on two independent hardness assumptions
Abstract
P3Q at EVM slot 0x012205 is the rollup-batch post-quantum verifier
family. The precompile takes a one-byte kind discriminator at the head of
calldata and dispatches to a primitive-specific P3QVerifier implementation
that performs the threshold-signature verification with an audited per-kind
gas charge. LP-8506 specifies
kind 0x01 (Pulsar, Module-LWE / FIPS 204 ML-DSA-65 threshold) and the
unified ABI.
A rollup that wants cross-family-maximum post-quantum posture — custody grade, treasury, sovereign archival — must verify signatures from independent families, so that a structural break against any one family does not compromise the rollup. This LP specifies two additional kinds on the same slot:
| Slot | kind | Name | Family | Verifies |
|---|---|---|---|---|
0x012205 | 0x01 | Pulsar | Module-LWE | Pulsar / FIPS 204 ML-DSA-65 threshold |
0x012205 | 0x02 | Corona | Module-LWE | Corona threshold signatures |
0x012205 | 0x03 | Magnetar | Hash-based | Magnetar / FIPS 205 SLH-DSA threshold |
All three share one slot, one ABI shape, one dispatch path:
// EVM precompile at slot 0x012205 — unified PQ verifier family
function verify(
uint8 kind,
bytes calldata sig,
bytes32 messageHash,
bytes calldata groupPubKey
) external view returns (bool);
A rollup in PQ-heavy mode submits one P3Q verify call per kind per
RollupBatchTx; a rollup in PQ-fast mode submits only kind 0x01.
Cross-family resilience is opt-in at rollup genesis through
CertPolicy.Mode (LP-4990).
Why one slot rather than one slot per family
One slot is one audit surface, one Solidity ABI shape, one operator-known
address, one dispatch path in the EVM. Adding a fourth family becomes one new
P3QVerifier implementation plus one new kind byte — no new slot
allocation, no new function shape, no new audit boundary.
The raw primitive verifiers are a separate concern and keep their own slots
under LP-0120: 0x012204 raw Pulsar,
0x012206 raw Corona, 0x012207 raw Magnetar. A contract that needs
Corona-kind verify for a rollup batch calls P3Q.verify(0x02, sig, h, pk)
at 0x012205. A contract that needs the raw Corona primitive calls the
primitive verifier at 0x012206 directly. The P3Q family ABI is the single
entry point for rollup-batch verification across all kinds.
The three primitive kinds
| Property | kind=0x01 Pulsar | kind=0x02 Corona | kind=0x03 Magnetar |
|---|---|---|---|
| Slot | 0x012205 | 0x012205 | 0x012205 |
| PQ family | Module-LWE (ML-DSA params) | Module-LWE (Ringtail params) | Hash-based |
| Underlying scheme | FIPS 204 ML-DSA-65 | Corona threshold | FIPS 205 SLH-DSA |
| Verifier core | luxfi/pulsar/verify | luxfi/corona/sign.Verify (bespoke; NOT byte-equal to FIPS 204) | luxfi/magnetar/verify (FIPS 205 conformant) |
| Solidity ABI | P3Q.verify(0x01,sig,h,pk)→bool | P3Q.verify(0x02,sig,h,pk)→bool | P3Q.verify(0x03,sig,h,pk)→bool |
| Signature size | 3,309 B | 33,052 B | ~35,664 B |
| Verify time (CPU) | ~80 μs | ~1.6 ms | ~1.92 ms |
| Verify time (Blackwell sm_120, projected) | ~50 μs | ~15 ms | ~50 ms |
| Verify time batched, N=64 (Blackwell, projected) | ~5 ms | ~50 ms | ~80 ms |
Gas cost (P3QVerifier.GasCost()) | 50,000 | 5,000,000 | 30,000 |
| State semantics | stateless | stateless | stateless |
| Constant-time | yes | yes | yes |
Three primitive kinds resting on two independent hardness assumptions:
- Module-LWE — kind
0x01Pulsar: hardness reduces to Module-LWE and Module-SIS. - Module-LWE — kind
0x02Corona: hardness reduces to Module-LWE and Module-SIS. - Hash collision resistance — kind
0x03Magnetar: hardness reduces to collision resistance of the underlying hash function.
Pulsar and Corona use different Module-LWE parameter sets and different codebases, so a parameter- or implementation-specific break need not hit both — but they are not family-disjoint. Only Magnetar provides cross-family independence: a simultaneous break would require independent advances in module-lattice cryptanalysis and in hash collision attacks. That is the cross-family-maximum posture PQ-heavy mode requires.
The common verifier framework
A Go-side abstraction at ~/work/lux/standard/precompiles/p3q_family/:
type P3QVerifier interface {
// Verify returns true iff sig is a valid threshold signature
// from groupPubKey on messageHash.
Verify(sig []byte, messageHash [32]byte, groupPubKey []byte) bool
// GasCost returns the precompile gas charge for one verify.
GasCost() uint64
// Kind returns the calldata discriminator byte (0x01 Pulsar,
// 0x02 Corona, 0x03 Magnetar).
Kind() byte
// PrimitiveName returns "pulsar", "corona", or "magnetar".
PrimitiveName() string
}
Each implementation registers at boot into a kind-byte-keyed dispatch table loaded by the single P3Q precompile. On a call, the precompile:
- reads the leading
kindbyte from calldata; - looks up the registered
P3QVerifierfor that kind; - charges
Verifier.GasCost(); - calls
Verifier.Verify(sig, messageHash, groupPubKey); - returns the boolean encoded as a 32-byte EVM ABI
bool.
Three implementations, one slot, one dispatch path, one ABI shape, one audit surface.
Corona kind (0x02)
Slot and ABI
Slot 0x012205 with leading kind=0x02 — the same physical precompile
address as Pulsar and Magnetar. Dispatch resolves to the Corona
P3QVerifier.
// EVM precompile at slot 0x012205, kind = 0x02
bool ok = P3Q.verify(
0x02, // Corona kind
coronaSig, // serialized Corona threshold sig
messageHash, // H(prev_root || new_root || batch_hash)
groupPubKey // Corona group public key
);
Wire format
Corona threshold signatures serialize per the Corona specification — not byte-equal to any NIST standard, because Corona is a Lux-defined Module-LWE threshold scheme. The precompile reads:
| Offset | Size | Field |
|---|---|---|
| 0 | 1 | kind (= 0x02) |
| 1 | 1 | mode (= 0x01 reserved) |
| 2 | 4 | sigLen |
| 6 | sigLen | sig bytes (Module-LWE polynomial commitments, ~33 KB) |
| 6+sigLen | 4 | groupPubKeyLen |
| 10+sigLen | groupPubKeyLen | groupPubKey |
| 10+sigLen+pkLen | 32 | messageHash |
Gas cost
5,000,000 gas, returned by Corona's P3QVerifier.GasCost() at dispatch.
Corona is genuinely heavier than Pulsar: its verify requires an inverse NTT plus polynomial multiplication mod q with larger coefficients, over a 33 KB signature rather than 3.3 KB. Measured CPU verify is ~1.6 ms against Pulsar's ~80 μs — a 20× ratio. Calibration uses the CPU verify cost as the baseline, because validators are not required to have Blackwell-class GPUs.
The absolute charge lands at 5,000,000 gas — roughly 100× the Pulsar base, rounded for clean accounting, and conservative relative to the 20× measured CPU ratio. This is the most expensive kind in the family; a rollup that wants Corona-kind verify per batch should budget accordingly.
Verifier core
The Go implementation at
~/work/lux/standard/precompiles/p3q_family/corona.go wraps
luxfi/corona/sign.Verify. The core is bespoke — Corona is a separate
Module-LWE construction, not a NIST standard.
A GPU acceleration path at ~/work/lux/accel/cuda/corona.cu supplies the
batched-verify path over waves of Corona signatures. The batched kernel
amortizes NTT setup across the batch: ~50 ms for N=64 on Blackwell against
64 × 15 ms = 960 ms for the naive serial verifier, roughly a 19× projected
speedup.
Use case
A rollup that wants Module-LWE parameter and implementation diversity
configures its sequencer to sign each batch with both a Pulsar threshold
signature and a Corona threshold signature — two Module-LWE schemes, distinct
parameter sets, distinct codebases. The rollup contract calls
P3Q.verify(0x01, …) and P3Q.verify(0x02, …) at 0x012205 in sequence. A
parameter- or implementation-specific break of Pulsar need not compromise
Corona. For genuine family-disjoint protection, add Magnetar.
The cost is ~5,050,000 gas per batch — 50k for Pulsar plus 5M for Corona. Acceptable for value-bearing rollups; prohibitive for high-volume gaming or social rollups.
Magnetar kind (0x03)
Slot and ABI
Slot 0x012205 with leading kind=0x03. Dispatch resolves to the Magnetar
P3QVerifier.
// EVM precompile at slot 0x012205, kind = 0x03
bool ok = P3Q.verify(
0x03, // Magnetar kind
magnetarSig, // serialized SLH-DSA threshold sig
messageHash, // H(prev_root || new_root || batch_hash)
groupPubKey // Magnetar group public key
);
Wire format
Magnetar threshold signatures are FIPS 205 SLH-DSA conformant at the
underlying-signature level, with a threshold-aggregation wrapper per
LP-4540. The
precompile reads the leading kind, then the Magnetar-specific bytes:
| Offset | Size | Field |
|---|---|---|
| 0 | 1 | kind (= 0x03) |
| 1 | 1 | mode (= 0x01 reserved) |
| 2 | 4 | participant_bitmap_len |
| 6 | participant_bitmap_len | bitmap of participating signers (set bits participate) |
| 6+blen | 4 | slh_sig_len |
| 10+blen | slh_sig_len | SLH-DSA-192f sig bytes (~35,664 B) |
| 10+blen+slen | 4 | groupPubKeyLen |
| 14+blen+slen | groupPubKeyLen | groupPubKey |
| 14+blen+slen+pkLen | 32 | messageHash |
Gas cost
30,000 gas, returned by Magnetar's P3QVerifier.GasCost() at dispatch —
comparable to Pulsar's 50k. SLH-DSA verify is fast, ~1.92 ms CPU. The signing
operation is what is slow; see the parameter-set choice below.
Parameter set — 192f for production
SLH-DSA has two parameter sets at the 192-bit security level:
| Parameter | Sig size | Sign time (Spark) | Sign time (M1 Max) | Production fit |
|---|---|---|---|---|
| SLH-DSA-192s ("small") | ~16 KB | 795 ms | 1,575 ms | breaks the 1-second round budget |
| SLH-DSA-192f ("fast") | ~35 KB | 36 ms | 71 ms | fits inside the round budget at N≤64 |
The Quasar four-scheme matrix bench measured Magnetar-192s as the wall-clock bottleneck for every PQ-heavy cell — PQ-heavy at N=64 on Spark came to 1.33 s, past the sub-second finality target. Switching to 192f drops per-validator sign from 795 ms to 36 ms, 22× faster, and restores the sub-1-second budget.
Production lock: conformant deployments MUST configure Magnetar with
SLH-DSA-192f. The threshold-init API at
~/work/lux/threshold/protocols/magnetar/ takes a parameter-set argument;
PQ-heavy chains pass magnetar.ParamSetFast192. An operator choosing 192s for
the 2.2× smaller signature opts into multi-second finality and MUST run
mode=PQ-strict (no Magnetar leg) for the sub-second tier; 192s is reserved
for long-archival anchoring, where fast finality is not the requirement.
Signing for either variant happens off-chain at the sequencer; on-chain verification under P3Q is fast for both sets, ~1.92 ms CPU. The parameter set affects only the wall clock of the per-validator signing ceremony.
Verifier core
The Go implementation at
~/work/lux/standard/precompiles/p3q_family/magnetar.go wraps
luxfi/magnetar/verify. The core is FIPS 205 SLH-DSA conformant.
A GPU acceleration path at ~/work/lux/accel/cuda/magnetar.cu supplies
batched verify over waves of SLH-DSA signatures; the batched kernel amortizes
the WOTS+ tree walk across the batch, ~80 ms for N=64.
Use case
A rollup that wants hash-based family independence from the lattice
families configures its sequencer to sign each batch with a Magnetar threshold
signature in addition to Pulsar. The rollup contract calls
P3Q.verify(0x01, …) then P3Q.verify(0x03, …). SLH-DSA security relies only
on the collision resistance of its underlying hash function, so it is immune
to advances in lattice cryptanalysis and would survive a complete break of the
Module-LWE family — both Pulsar and Corona.
Magnetar is the last-line post-quantum choice: sovereign-archival commitments, long-tenor custody attestations, regulator-facing audit trails. The cost — 30k gas per verify plus a 35 KB signature — is reasonable for low-frequency, high-value batches.
Composition — cross-family rollups
A rollup in PQ-heavy mode submits four verifications to its rollup
contract: one classical BLS leg plus three P3Q calls at the same slot, each
with a different kind.
| Verifier | Slot + kind | Family | Gas |
|---|---|---|---|
| BLS aggregate | standard pairing precompile | Pairings (classical) | 5,000 |
| P3Q Pulsar | 0x012205 kind=0x01 | Module-LWE | 50,000 |
| P3Q Corona | 0x012205 kind=0x02 | Module-LWE | 5,000,000 |
| P3Q Magnetar | 0x012205 kind=0x03 | Hash-based | 30,000 |
Total: 5,085,000 gas per batch in the cross-family-maximum posture.
A break of any single family does not compromise the batch, because three
independent verifications remain. The composition is additive: the contract
calls the BLS precompile and three P3Q.verify(kind, …) calls in sequence
inside validateBatch, and rejects the batch if any returns false.
PQ-strict skips the Magnetar leg
For value-bearing rollups that want post-quantum insurance without
cross-family maximum, PQ-strict requires only BLS + Pulsar + Corona. The
contract calls P3Q.verify(0x01, …) and P3Q.verify(0x02, …), for about
5,055,000 gas per batch. Pinning strict-PQ-strict drops the BLS leg for a
marginal 5,000-gas saving; that is not the optimization point.
PQ-fast skips Corona entirely
A high-throughput rollup pinning PQ-fast verifies only Pulsar: about 50k gas per batch. The Corona and Magnetar kinds are not called.
Gas cost calibration
The verify-cost landscape across the kinds plus the classical baselines:
| Verifier | Slot + kind | Gas | Verify time CPU | Verify time Blackwell (projected) |
|---|---|---|---|---|
ecrecover (secp256k1) | 0x01 | 3,000 | ~10 μs | ~3 μs |
| BLS pairing | standard | 5,000 | ~6 ms | ~10 μs |
| P3Q Pulsar | 0x012205 0x01 | 50,000 | ~80 μs | ~50 μs |
| P3Q Magnetar | 0x012205 0x03 | 30,000 | ~1.92 ms | ~50 ms |
| P3Q Corona | 0x012205 0x02 | 5,000,000 | ~1.6 ms | ~15 ms |
The Corona kind is the bottleneck, and the charge is deliberately conservative: its CPU verify time (1.6 ms) is comparable to Magnetar's (1.92 ms), yet its gas charge is 167× Magnetar's. The calibration discipline assumes a CPU-class verifier — validators are not required to have Blackwell-class GPUs — and under that assumption Corona measures about 20× the Pulsar CPU verify time. Rounding that to a 100× gas ratio over Pulsar produces the 5M charge.
The disparity between the Corona and Magnetar charges is larger than their measured CPU verify times alone justify. It stands as the conservative setting until validator hardware uniformity is established; operators running all-Blackwell validator sets may petition for a discounted Corona charge in a later amendment. Nothing here codifies such a discount.
Operator choice
The gas ladder makes the mode tradeoff explicit:
| Rollup mode | Per-batch gas | Use case |
|---|---|---|
| PQ-off | ~5k (BLS only) | Non-financial, high-throughput, ephemeral state |
| PQ-fast | ~55k (BLS + Pulsar) | Payments, gaming, DEX |
| PQ-strict | ~5,055k (BLS + Pulsar + Corona) | Custody, treasury, regulated securities |
| PQ-heavy | ~5,085k (BLS + Pulsar + Corona + Magnetar) | Sovereign anchors, cross-chain bridges, long archival |
The 100× cost cliff between PQ-fast and PQ-strict is intentional: Corona's gas charge prices Module-LWE construction and parameter diversity. A rollup that does not need that intra-family diversity — which is not cross-family independence; only Magnetar's hash-based leg provides that — pays PQ-fast prices. A rollup that does, pays PQ-strict prices.
Failure modes
| Failure | Trigger | Effect | Recovery |
|---|---|---|---|
Unknown kind byte | caller passes a kind outside {0x01, 0x02, 0x03} | P3Q returns false; the rollup contract may revert | caller fix |
| Corona-kind sig malformed | sequencer bug or bad input | P3Q.verify(0x02,…) returns false | client re-submits with a valid sig; sequencer fix |
| Magnetar-kind sig malformed | sequencer bug or bad input | P3Q.verify(0x03,…) returns false | client re-submits with a valid sig |
| Corona group pubkey mismatch | sequencer rotation without a group-pubkey update on Z-Chain | P3Q.verify(0x02,…) returns false for every subsequent batch until the rotation tx lands | rotation tx updates the group pubkey; backfilled batches re-verify |
| Gas-budget exhaustion | a batch too small to amortize the 5M Corona verify | the batch is unprofitable | operator raises the minimum batch size so the verify amortizes over more txs |
| Validator missing a kind implementation | misconfigured validator, missing P3QVerifier registration | the validator fails to validate the batch and falls back to the normal path | validator config audit; rebuild with the full dispatch table |
| Cross-kind timing skew | one verifier stalls | the rollup contract runs out of gas | per-call timeout; revert; client re-submits |
Composition with other LPs
| LP | Role |
|---|---|
| LP-4450 | Pulsar threshold signature — kind 0x01 verifies it |
| LP-4440 | Corona threshold signature — kind 0x02 verifies it |
| LP-4540 | Magnetar threshold SLH-DSA — kind 0x03 verifies it |
| LP-4990 | PQ-heavy requires all three kinds; PQ-strict requires Pulsar and Corona; PQ-fast requires Pulsar only |
| LP-8506 | The P3Q family at slot 0x012205 — kind 0x01 and the unified ABI |
| LP-0122 | Cert leg composition reflects the verifier kinds |
| LP-0200 | The buffer-is-the-value guarantee applies to family verifies |
| LP-0120 | Slot registry; owns 0x012204, 0x012206, 0x012207 for the raw primitive verifiers |
| FIPS 204 | ML-DSA standard — the Pulsar-kind verifier is conformant |
| FIPS 205 | SLH-DSA standard — the Magnetar-kind verifier is conformant |
There is no fourth post-quantum family in the stack today. Code-based KEMs
such as HQC are KEMs, not signature schemes; their on-chain role is key
encapsulation, not batch authentication. A hypothetical code-based signature
family would add a fourth kind byte on the same slot, and the
P3QVerifier framework would absorb it without a new slot allocation.
Copyright
Copyright and related rights waived via CC0.