Skip to main content

3-Phase Spork Rollout & Ed25519-PoKoS Seed Rescue

TL;DR: Zenon's on-chain SporkContract (z1qxemdeddedxsp0rkxxxxxxxxxxxxxxxx956u48) allows a zero-hard-fork-drama, three-phase migration:

  1. Phase 1 (PostQuantumAccountsSpork) enables 0x02 PQ addresses, ML-DSA-44 (0x01) + SLH-DSA-SHAKE-128s (0x03), AuthRegistry in-place key rotation on 0x00 accounts, Account-Chain PK caching, and Witness Plasma pricing.
  2. Phase 2 (PostQuantumConsensusSpork) adds FN-DSA-512 (0x02), transitions Pillar Momentum producers off Ed25519, upgrades BridgeContract to t-of-n PQ Guardians, and enables X25519MLKEM768 on go-libp2p.
  3. Phase 3 (LegacyCryptoSunsetSpork) disables raw Ed25519/secp256k1 verification across the entire ledger while keeping AuthRegistry.RescueWithPoKoS open permanently—allowing any dormant user who still holds their 24-word BIP-39 mnemonic to recover unmigrated 0x00 funds safely even after quantum computers break Ed25519.

1. Three-Phase Spork Activation Schedule​

Spork BitSpork NameConsensus & State Rules Activated (EnforcementDelay = 6 Momentums)
Bit 5 (9th)PostQuantumAccountsSpork• Accept AccountBlock.Version ∈ {1, 2}
• Enable 0x02 PQ user addresses (ML-DSA-44, SLH-DSA-SHAKE-128s, Hybrid 0x81)
• Deploy AuthRegistryContract (RotateKey with revokeLegacy lockout)
• Activate AccountStore[0x09] Public-Key Caching & ABWitnessBytePlasma = 17 surcharge
• Rotate SporkAddress and BridgeInfo.Administrator to SLH-DSA-SHAKE-128s (0x03)
Bit 6 (10th)PostQuantumConsensusSpork• Enable FN-DSA-512 (algID = 0x02)
• Require Pillar BlockProducingAddresses to sign Momentums with algID ∈ {0x01, 0x02} after 30-epoch migration window
• Enable Bridge.UnwrapTokenPQ (t-of-n Guardian ML-DSA-44 / FN-DSA-512 quorum) & PTLC types 3..4
• Enforce X25519MLKEM768 on go-libp2p and retire legacy DevP2P RLPx
Bit 7 (11th)LegacyCryptoSunsetSpork• Reject AccountBlock.Version == 1 and algID == 0x00 (Ed25519) across all 0x00 accounts
• Reject PTLC pointType ∈ {0, 1, 2} and Pillar.RegisterLegacy
• Enable AuthRegistry.RescueWithPoKoS (STARK seed-ownership proof) for unmigrated 0x00 accounts

2. Solving the "Dormant Account Dilemma" with Ed25519-PoKoS​

Every blockchain transitioning off elliptic curves faces the Bitcoin BIP-361 dilemma:

  • If you never disable Ed25519 on unmigrated 0x00 accounts (Height >= 1), a CRQC eventually steals every dormant user's ZNN/QSR and crashes the market.
  • If you permanently freeze unmigrated 0x00 accounts at Phase 3, legitimate long-term holders (stakers, cold-storage users, estates) who missed the migration announcement lose their life savings.

Why BIP-39 + SLIP-0010 + RFC 8032 Creates a Quantum Trapdoor Asymmetry​

Look at how every standard Zenon wallet (syrius, znn_cli_dart, go-zenon-v1/internal/crypto/slip0010.go + ed25519.go) derives an Ed25519 public key from a 24-word mnemonic:

Step 1 (BIP-39): seed64 = PBKDF2_HMAC_SHA512(mnemonic, "mnemonic" || passphrase, 2048)
Step 2 (SLIP-0010): master = HMAC_SHA512("ed25519 seed", seed64)
child_0 = HMAC_SHA512(master.ChainCode, 0x00 || master.Key || 0x8000002c) // 44'
child_1 = HMAC_SHA512(child_0.ChainCode, 0x00 || child_0.Key || 0x80011ebc) // 73404'
leaf = HMAC_SHA512(child_1.ChainCode, 0x00 || child_1.Key || (0x80000000 + idx))
Step 3 (RFC 8032): h512 = SHA512(leaf.Key[0:32])
scalar_s = Clamp25519(h512[0:32])
pubKey_A = CompressEdwards([scalar_s] * B)
Step 4 (Zenon): addr20 = 0x00 || FIPS202_SHA3_256(pubKey_A)[0:19]

Observe where Shor's algorithm stops:

  • Given pubKey_A on-chain, a quantum computer running Shor's algorithm easily recovers scalar_s (inverting Step 3's scalar multiplication [scalar_s] * B).
  • HOWEVER, a quantum computer CANNOT invert SHA512(leaf.Key[0:32]) to find leaf.Key! SHA-512 preimage search requires 2^128+ Grover work over a 512-bit state (completely infeasible).
  • Therefore:
    • Quantum Attacker: Knows scalar_s and pubKey_A, does NOT know leaf.Key.
    • Rightful Wallet Owner: Holds the 24-word mnemonic, therefore knows leaf.Key (and child_1 if stricter path provenance is desired)!

3. Exact Ed25519-PoKoS Relation on Zenon​

AuthRegistry.RescueWithPoKoS(targetAddress, algId, newPublicKey, starkProof) verifies a post-quantum hash-based STARK proof (FRI over Goldilocks/Mersenne31/KoalaBear field using SHA3-256 / Poseidon2 Merkle commitments—zero elliptic curves or pairings!) proving the NP relation R_PoKoS:

Public Inputs (x)​

  • chainId: uint64 (1 on Alphanet)
  • targetAddress: 20-byte 0x00 Zenon address (authRecord MUST NOT already exist)
  • newKeyDigest: SHA3-256([algId] || newPublicKey) (32 bytes — binds the proof non-malleably to the exact destination PQ key so mempool front-runners cannot steal the proof!)

Private Witness (w — Never Revealed On-Chain)​

  • leafSeed32: 32-byte SLIP-0010 leaf key (leaf.Key[0:32])

Circuit Constraints Verified Inside the STARK​

  1. Compute h = SHA-512(leafSeed32).
  2. Clamp s = h[0:32] per RFC 8032 (s[0] &= 248, s[31] &= 127, s[31] |= 64).
  3. Compute fixed-base Edwards25519 scalar multiplication A = [s]B over GF(2^255 - 19) and encode compressed 32-byte pubKey_A.
  4. Compute derivedAddr = 0x00 || SHA3-256(pubKey_A)[0:19] and assert derivedAddr == targetAddress.
  5. Bind newKeyDigest into the Fiat-Shamir transcript challenge so the proof is valid only for (chainId, targetAddress, newKeyDigest).
Hardware Wallet & Raw-Seed Caveat
  1. Standard BIP-39 / Syrius / Ledger / CLI Wallets: 100% compatible with RescueWithPoKoS, because RFC 8032 always hashes a 32-byte seed leafSeed32 through SHA-512 before clamping scalar_s. Only the single SHA-512 + [s]B + SHA3-256 step needs to be proven (~45,000 Plonky3/Starky trace rows; proof size ~65–110 KB, client prove time ~0.8s, validator verify time ~2.5 ms).
  2. Non-Standard "Raw Clamped Scalar" Keys: Any custom tool that bypassed RFC 8032 seed hashing and generated a bare scalar s directly without a pre-SHA-512 32-byte seed MUST migrate via AuthRegistry.RotateKey during Phase 1 or Phase 2 (before LegacyCryptoSunsetSpork).