LPsLux Proposals
Precompiles
LP-4805

P3Q Corona and Magnetar Verifier Kinds

Final

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

Category
Core
Created
2026-06-03

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:

SlotkindNameFamilyVerifies
0x0122050x01PulsarModule-LWEPulsar / FIPS 204 ML-DSA-65 threshold
0x0122050x02CoronaModule-LWECorona threshold signatures
0x0122050x03MagnetarHash-basedMagnetar / 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

Propertykind=0x01 Pulsarkind=0x02 Coronakind=0x03 Magnetar
Slot0x0122050x0122050x012205
PQ familyModule-LWE (ML-DSA params)Module-LWE (Ringtail params)Hash-based
Underlying schemeFIPS 204 ML-DSA-65Corona thresholdFIPS 205 SLH-DSA
Verifier coreluxfi/pulsar/verifyluxfi/corona/sign.Verify (bespoke; NOT byte-equal to FIPS 204)luxfi/magnetar/verify (FIPS 205 conformant)
Solidity ABIP3Q.verify(0x01,sig,h,pk)→boolP3Q.verify(0x02,sig,h,pk)→boolP3Q.verify(0x03,sig,h,pk)→bool
Signature size3,309 B33,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,0005,000,00030,000
State semanticsstatelessstatelessstateless
Constant-timeyesyesyes

Three primitive kinds resting on two independent hardness assumptions:

  • Module-LWE — kind 0x01 Pulsar: hardness reduces to Module-LWE and Module-SIS.
  • Module-LWE — kind 0x02 Corona: hardness reduces to Module-LWE and Module-SIS.
  • Hash collision resistance — kind 0x03 Magnetar: 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:

  1. reads the leading kind byte from calldata;
  2. looks up the registered P3QVerifier for that kind;
  3. charges Verifier.GasCost();
  4. calls Verifier.Verify(sig, messageHash, groupPubKey);
  5. 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:

OffsetSizeField
01kind (= 0x02)
11mode (= 0x01 reserved)
24sigLen
6sigLensig bytes (Module-LWE polynomial commitments, ~33 KB)
6+sigLen4groupPubKeyLen
10+sigLengroupPubKeyLengroupPubKey
10+sigLen+pkLen32messageHash

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:

OffsetSizeField
01kind (= 0x03)
11mode (= 0x01 reserved)
24participant_bitmap_len
6participant_bitmap_lenbitmap of participating signers (set bits participate)
6+blen4slh_sig_len
10+blenslh_sig_lenSLH-DSA-192f sig bytes (~35,664 B)
10+blen+slen4groupPubKeyLen
14+blen+slengroupPubKeyLengroupPubKey
14+blen+slen+pkLen32messageHash

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:

ParameterSig sizeSign time (Spark)Sign time (M1 Max)Production fit
SLH-DSA-192s ("small")~16 KB795 ms1,575 msbreaks the 1-second round budget
SLH-DSA-192f ("fast")~35 KB36 ms71 msfits 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.

VerifierSlot + kindFamilyGas
BLS aggregatestandard pairing precompilePairings (classical)5,000
P3Q Pulsar0x012205 kind=0x01Module-LWE50,000
P3Q Corona0x012205 kind=0x02Module-LWE5,000,000
P3Q Magnetar0x012205 kind=0x03Hash-based30,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:

VerifierSlot + kindGasVerify time CPUVerify time Blackwell (projected)
ecrecover (secp256k1)0x013,000~10 μs~3 μs
BLS pairingstandard5,000~6 ms~10 μs
P3Q Pulsar0x012205 0x0150,000~80 μs~50 μs
P3Q Magnetar0x012205 0x0330,000~1.92 ms~50 ms
P3Q Corona0x012205 0x025,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 modePer-batch gasUse 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

FailureTriggerEffectRecovery
Unknown kind bytecaller passes a kind outside {0x01, 0x02, 0x03}P3Q returns false; the rollup contract may revertcaller fix
Corona-kind sig malformedsequencer bug or bad inputP3Q.verify(0x02,…) returns falseclient re-submits with a valid sig; sequencer fix
Magnetar-kind sig malformedsequencer bug or bad inputP3Q.verify(0x03,…) returns falseclient re-submits with a valid sig
Corona group pubkey mismatchsequencer rotation without a group-pubkey update on Z-ChainP3Q.verify(0x02,…) returns false for every subsequent batch until the rotation tx landsrotation tx updates the group pubkey; backfilled batches re-verify
Gas-budget exhaustiona batch too small to amortize the 5M Corona verifythe batch is unprofitableoperator raises the minimum batch size so the verify amortizes over more txs
Validator missing a kind implementationmisconfigured validator, missing P3QVerifier registrationthe validator fails to validate the batch and falls back to the normal pathvalidator config audit; rebuild with the full dispatch table
Cross-kind timing skewone verifier stallsthe rollup contract runs out of gasper-call timeout; revert; client re-submits

Composition with other LPs

LPRole
LP-4450Pulsar threshold signature — kind 0x01 verifies it
LP-4440Corona threshold signature — kind 0x02 verifies it
LP-4540Magnetar threshold SLH-DSA — kind 0x03 verifies it
LP-4990PQ-heavy requires all three kinds; PQ-strict requires Pulsar and Corona; PQ-fast requires Pulsar only
LP-8506The P3Q family at slot 0x012205 — kind 0x01 and the unified ABI
LP-0122Cert leg composition reflects the verifier kinds
LP-0200The buffer-is-the-value guarantee applies to family verifies
LP-0120Slot registry; owns 0x012204, 0x012206, 0x012207 for the raw primitive verifiers
FIPS 204ML-DSA standard — the Pulsar-kind verifier is conformant
FIPS 205SLH-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 and related rights waived via CC0.