Day-1 pubKey_A-Bound Ed25519-PoKoS Rescue & Complete Classical Sunset (v4)
60-Second TL;DR (
ZNN-SPEC-PHASE1-v4): ReconcilingZDC-ZP1-HR-001,ZDC-QS-DEEZ-HR-001, and the Round-4 Independent Cryptographic & Source Audit (R4-02, R4-03, R4-04, R4-06, R4-09), Zenon Phase 1v4makes zero-knowledge seed rescue and classical sunset mathematically airtight without any stop-the-world state migration:
O(1)GenesisReceive- & Producer-Aware Exposure Resolver (B06, R4-02, R4-03fix): Replaces naiveHeight >= 1checks (which failed on unsignedHeight == 1GenesisReceiveblocks andHeight == 0PillarproducingAddressseals) without any O(All Accounts) activation stall—resolvingEXPOSEDvs.UNEXPOSEDvs.UNKNOWNinO(1)viaAuthRegistry[0x03](bounded<= 250Pillar/PTLCEd25519reveals) +AccountStore[0x0a]+ByHeight(1)/ByHeight(2)againstctx.InclusionMomentumStore()!- True
2^-128QROMWHIR-SHA3-v1+ Full32-BytepubKey_ABinding (B06, R4-04fix): Binds all32 BofpubKey_AonEXPOSEDaccounts (~2^126Grover), enforces256-bitclassical RBR (32bgrind +224bquery ->128bQROM), and documentsUNEXPOSEDaccounts with exact ZalkaMAXDEPTH = 2^64bounds (M ≈ 2^44parallel runs,W ≈ 2^98callsR4-06).- Complete Dual-Ledger
H_incEmbedded Sunset (B02, B12, R4-03, R4-09fix): Phase 1E (Spork #14) enforces sunset atH_incinside bothApplySendandGenerateEmbeddedReceive(overridingtargetMArewindR4-03!), upgrades embedded blocks toVersion = 2, deletes orphanptlcReclaimLockstorage on post-sunsetReclaim, and bindsMaxPreCRQCBitcoinHeightinSunsetAnchorCheckpoint.
1. Why RFC 8032 SHA-512 Key Expansion Blocks Shor — And How O(1) Exposure Resolution Works (B06, R4-02 Fix)
Every standard Zenon wallet (syrius, znn_cli_dart, go-zenon/wallet/keystore.go, go-zenon-v1/internal/crypto/ed25519.go) derives its Ed25519 public key from a 32-byte RFC 8032 private seed seed32 (whether seed32 came from SLIP-0010 over a 12/24-word BIP-39 mnemonic, a KeyFile, or a raw 32-byte key import M05):
Step 1 (RFC 8032): h512 = SHA512(seed32)
scalar_s = Clamp25519(h512[0:32])
pubKey_A = CompressEdwards([scalar_s] * B) // 32 bytes (~252-bit group order)
Step 2 (Zenon): addr20 = 0x00 || FIPS202_SHA3_256(pubKey_A)[0:19] // 19-byte (152-bit) truncation
Closing Both the 152-Bit Truncation Bypass (B06) and the GenesisReceive / Producer Gap (R4-02 Fix)
- Shor's Limit: Given
pubKey_A, Shor's algorithm recoversscalar_s([scalar_s] * B), neverseed32behindSHA-512. - Why
pubKey_AMust Be Pinned When Exposed (B06): Checking onlytargetAddress(152bits) would let an unbounded CRQC Grover-search randomseed32'values colliding on19bytes in~2^76ideal queries even whenpubKey_A(32 B) was already public on-chain. - Why
go-zenon-v1EnablesO(1)Exact Resolution Without Full-State Backfill (R4-02Proof): Direct source audit ofgo-zenon-v1/internal/vm/verifier/account_block.go:783-799&genesis/builder.go:188proves that on any0x00account chain, ONLYBlockTypeGenesisReceive (1)atHeight == 1is unsigned (len(PublicKey) == 0); every other block (UserSend,UserReceive) atHeight >= 1is signed! Thus, an account's firstAccountBlockkey reveal prior toSpork #10can ONLY reside atByHeight(1)orByHeight(2)—neverHeight >= 3! The only non-AccountBlockEd25519reveals on-chain areMomentumproducer headers (legacy_dpos.go:281,<= 150historical Pillar addresses) andPtlcContractPointTypeEd25519 = 0signature unlocks (ptlc.go:30), which are indexed in tinyAuthRegistry[0x03 || addr](< 15 KiBtotal!) without touchingAccountStore! - Normative 3-State Resolver (
ResolveLegacyEd25519Exposureonctx.InclusionMomentumStore(),R4-02, R4-03):- Check
AuthRegistry[0x03 || targetAddress](externalMomentumproducer /PTLCEd25519reveal) andAccountStore(targetAddress)[0x0a](legacyEd25519PK): if either is present (verifyingPubKeyToAddress(pk32) == targetAddress; conflicting keys fail closed), returnEXPOSED(hasExposedPK = 1, pk32)(~2^126Grover). - Else inspect
hh = AccountStore(targetAddress).Identifier():hh.Height == 0: returnUNEXPOSED(hasExposedPK = 0, [32]byte{0})(152-bitaddress bound).hh.Height == 1: loadblk1 := acct.ByHeight(1). Ifblk1 == nil(pruned/missing), returnUNKNOWN-> reject (ErrAuthUnknownExposure)! Ifblk1.BlockType == BlockTypeGenesisReceive, returnUNEXPOSED(0, [32]byte{0}); else extractpk32fromblk1.PublicKey->EXPOSED(1, pk32).hh.Height >= 2: loadblk1 := acct.ByHeight(1); ifblk1 != nil && blk1.BlockType != BlockTypeGenesisReceive, extractblk1.PublicKey; else loadblk2 := acct.ByHeight(2)and extractblk2.PublicKey(ifblk1orblk2isnil/pruned, returnUNKNOWN-> reject fail-closed!). (Pruner LawR4-02: Sovereign30-day block pruning NEVER deletesHeight in {1, 2}of unrotated0x00accounts—bounded permanently at<= 200 MB!)
- Check
2. Exact Security Boundary by Account Cohort (H06, B06, R4-02, R4-06 Reconciled)
Legacy 0x00 Cohort | On-Chain Secret Bound | Pre-Sunset (Spork #10..#13) Status | Post-Sunset (Spork #14, Enforced at H_inc B02, R4-03) Status |
|---|---|---|---|
Untouched 0x00 (UNEXPOSED: H == 0 or unsigned GenesisReceive only) | 152-bit addr20 (pubKey_A never revealed on-chain) | Migrate Day 1 via sponsor-submitted RescueWithPoKoS (0 Ed25519 key exposure B08, B09). | Permanent RescueWithPoKoS (2^76 ideal Grover; Zalka MAXDEPTH = 2^64 @ d=10: M = 2^44 parallel runs, W = 2^98 calls R4-06). |
Active 0x00 (Rotated Pre-CRQC) | 256-bit AuthRegistry PQ key + boundDigest32 (R4-01) | PQ-Authorized from H_confirm + 1 (activeRecord rejects 0x00 & prevents PoKoS override B08). | PQ-Authorized (2^128 Grover + NIST Cat. 1–2 signature security). |
Dormant 0x00 (EXPOSED History, Unrotated) | 32-byte pubKey_A ([0x0a], [0x03], or ByHeight(1..2)) | Vulnerable if CRQC arrives BEFORE Spork #14! Active holders MUST rotate via RotateKey pre-CRQC (B09). | Protected at ~2^126 Grover once Spork #14 activates pre-CRQC! 0x00 sigs are disabled at H_inc, and R_PoKoS requires seed32 matching all 32 B of pubKey_A (B06, R4-02)! |
(Note M05: PoKoS rescues any standard 32-byte RFC 8032 pre-SHA-512 seed across 12/24-word BIP-39, passphrased BIP-39, KeyFile, or raw seed imports; non-RFC-8032 MPC/FROST or raw clamped-scalar keys lacking a 32B pre-SHA-512 seed must rotate pre-sunset via RotateKey.)
3. Exact R_PoKoS Pure-SHA3 STARK Relation (circuitId = 0x01, B06, B08, R4-04)
Public Inputs (x — Reconstructed Against ctx.InclusionMomentumStore() by AuthRegistry #14)
genesisHash[32]&chainIdentifier(uint64)targetAddress[20]:0x00address (authState.activePubKeyHash == 0 && pendingEffectiveHeight == 0)hasExposedPK(uint8in{0, 1};UNKNOWNaborts before proof check!) &expectedPubKeyA[32](pk32whenhasExposedPK == 1, else[32]byte{0})popDigest[32]: ExactSHA3-256of the179-bytezenon-auth-pop:v3preimage (opByte = 0x02, binding sponsorsenderBlock.Address,senderBlock.Height,algId, andSHA3-256(newPublicKey)B08, M06)
(Sponsor & Zero-Balance Flow B08: Any funded/PoW 0x02 sponsor account submits RescueWithPoKoS. At H_confirm + 1, targetAddress claims pending UserReceives feelessly using client Equi-X PoW with 0 initial ZNN/QSR balance!)
Private Witness (w) & Verified Constraints (WHIR-SHA3-v1, True 2^-128 QROM R4-04)
- Private witness:
seed32[32](RFC 803232-byteEd25519seed). - Constraints:
h512 = SHA512(seed32);s = Clamp25519(h512[0:32]);pubKey_A = CompressEdwards([s]B).- Assert
0x00 || FIPS202_SHA3_256(pubKey_A)[0:19] == targetAddress. - If
hasExposedPK == 1: AssertpubKey_A == expectedPubKeyA(32-byteexact equalityB06!). - Absorb all public inputs into the
SHA3-256/SHAKE256Fiat-Shamir sponge with32-bitgrinding +224-bitclassical query security +256-bitextension field (<= 2^-128QROM soundnessR4-04).
- Projected Engineering Targets (Gated on
Gate ZP-Q20Physical QualificationB07, M11, R4-04):~57–86 KiBWHIR-SHA3-v1receipt (<= 128 KiBhard cap),~0.9–1.5 slaptop prove target,<= 3.5 ms(~1.2 mstypical) Cortex-A76 verify target (<= 8,000Keccak perms).
4. Complete Phase 1E Classical & Contract Sunset (Spork #14, B02, B11, B12, M09, R4-03, R4-09)
SporkBitLegacyCryptoSunset (Spork #14) enforces a complete, zero-stranded-funds sunset strictly at InclusionMomentumHeight (H_inc >= H_sunset) across BOTH ApplySend and GenerateEmbeddedReceive (R4-03 fix):
- Governance Precondition:
ActivateSpork(#14)reverts unlessSporkAddress,BridgeAdministrator, and>= 85%of active Pillar stake (M09) already hold active PQ ({0x01, 0x02, 0x03}) authentication records! - User, Hybrid & Embedded Block Version Sunset (
M09, R4-03): RejectsAccountBlock.Version == 1,algID == 0x00(Ed25519), andalgID == 0x81(AlgHybridEdMLDSA44) atH_inc >= H_sunset(while embeddedContractReceiveandContractSenddescendants emitVersion = 2fromSpork #10onwardR4-03, andAuthRegistry.UpgradeHybridToPureMLDSA44remains callable under theML-DSA-44half of an existing0x81record). BridgeContractClassical ECDSA Halt (B12, R4-03): Permanently disablesBridgeContract.Redeem,WrapToken,UpdateWrapRequest,UnwrapToken, andChangeTssECDSAPubKeyatH_inc >= H_sunset(in bothApplySendandReceiveBlockviactx.InclusionHeight()).SwapContract&PillarContractLegacysecp256k1Sunset (B12, R4-03): DisablesSwapContract.RetrieveAssetsandPillarContract.RegisterLegacyatH_inc >= H_sunset.- Two-Step Zero-Stranded-Funds
PtlcContract{0, 1, 2}Drain (B12, R4-03):- Step A (
Spork #13): CapsexpirationTime <= MaxClassicalPtlcExpiry(or forbids{0, 1, 2}creation onceSigLocktypes3 & 4activate). - Step B (
Spork #14atH_inc): DisablesUnlock,ProxyUnlock, andReclaimWithSignatureforpointType in {0, 1, 2}, while permitting post-expiryReclaim(id)back toptlcInfo.TimeLocked(calling bothDeletePtlcInfoandDeletePtlcReclaimLockso zero funds are stranded and zero[0x02]keys leakR4-03!).
- Step A (
- Height-Bounded
SunsetAnchorCheckpoint(B11, R4-09): Seals(H_sunset, MomentumHash_sunset, StateRoot_sunset, CommitteeHash_sunset, BitcoinAnchorHeight <= MaxPreCRQCBitcoinHeight)inparams.goand Bitcoin (SHA-256d). - Permanent
RescueWithPoKoS: Remains open forever for allRFC 803232-byteseed holders.