Hybrid Post-Quantum Signatures in Bitcoin Cash Script (Schnorr-secp256k1 + SLH-DSA-SHA2-128s)
Author: bitcoincashautist, mainnet_pat
Last Edit Date: 2026-12-06 (revision 1.1)
Abstract. Post-quantum (PQ) signature proposals for Bitcoin-derived networks generally assume that native opcode support via consensus hard fork is a prerequisite, because stateless hash-based schemes require thousands of hash evaluations per spend. While consensus proposals such as CHIP-2026-06 offer the cleanest long-term path for native verification and Double-Spend Proof (DSP) coverage, Bitcoin Cash’s May 2025 and May 2026 virtual machine upgrades make a complete FIPS 205 Pure SLH-DSA-SHA2-128s verifier executable in pure BCH Script today, with no consensus change.
Building on mainnet_pat's first mainnet SPHINCS+ contract—which verified atomic SLH-DSA signatures over an introspection-constructed sighash—we present a modular, DSProof-ready, non-malleable hybrid Schnorr-secp256k1 + SLH-DSA-SHA2-128s verifier with byte-for-byte wire parity with CHIP-2026-06 v0.2. Four design choices bring the verifier comfortably inside consensus limits while making it composable across arbitrary contracts: runtime meta-programming of the WOTS+ hash-chain dispatch table via OP_DEFINE paired with non-malleable VM-budget padding, AND-composed hybrid authentication, sighash verification rather than construction via OP_CHECKSIGVERIFY and OP_CHECKDATASIGVERIFY over a strictly 64-byte BCH Schnorr signature, and a standardized 4-part P2SH32 template separating a 12-byte self-pinning preamble, a 6-byte filler check, per-UTXO key commitment, and a static, PQ-namespaced (0x505100..0x505111) 639-byte verifier_body. The verifier body is a pure, audit-once (4 -> 1) module with a single constant SHA256 across all UTXOs and contracts—supporting all BCH sighash flags, external sighash gating via OP_PICK, MAST-style lazy loading via <0x5051> OP_DEFINE, and 128-bit post-quantum binding soundness in the Quantum Random Oracle Model for SHA-256.
Keywords: Blockchain · Post-Quantum Cryptography · SLH-DSA · SPHINCS+ · Hybrid Signatures · Schnorr · DSProofs · Bitcoin Cash Script.
The reference Libauth / Bitauth IDE templates live in templates/ (and can be opened directly in Bitauth IDE via the convenience links below):
- Blank template: templates/hybrid-schnorr-slhdsa-128s.template.json (Open in Bitauth IDE)
-
Mainnet spend vector (TX
d6566a2f...e341): templates/hybrid-schnorr-slhdsa-128s-debug.mainnet-d6566a2f474e904833aac4991c4c8423701a32aeb65dc8c022eb17e102ede341.json (Open in Bitauth IDE;verifier_bodyinlined intoprevout_0for interactive stack stepping ininput_0;BCH_2026_05measured:L = 9,745B,opCost = 6,966,007 / 7,828,800,hashDigestIterations = 4,040 / 4,893,sigChecks = 2 / 227) -
Verification & metrics script: templates/check-metrics.mjs (verifies
BCH_2026_05execution,SHA256(verifier_body), and VM budget metrics via@bitauth/libauth) -
Canonical
SHA256(verifier_body):0x9103374c1b889957e6cec8496562b7d17e7db3ca14f085fedafbe2ee017afb1a
Full paper:
- Gitlab: ac-0353f40e / pqcash · GitLab
- Github mirror: https://github.com/A60AB5450353F40E/pqcash