Lamport signatures and other CAT tricks

Lamport signatures and other CAT tricks

Original Postby moonsettler

Posted on: December 3, 2023 00:47 UTC

The correspondence presents a detailed analysis of a blockchain-based script that processes signature data, designed to manage an input of approximately 4-5KB.

This includes handling 140 instances of 20-byte hashes, merkle control bytes, preimages, and sighash bytes, posing questions about the script's viability on an Inquisition signet, which closely resembles Bitcoin's mainnet.

There is also a discussion on integrating quantum-resistant signatures in taproot architecture, specifically within P2TR outputs. The feasibility of a soft fork to facilitate a script-only update path for Taproot, if necessary, is questioned.

The script employs a witness structure with multiple verification operations such as OP_DUP, OP_TOALTSTACK, OP_CAT, OP_HASH160, and conditional checks (OP_IF, OP_SWAP, OP_ENDIF) to validate a Merkle proof. This indicates a sophisticated approach to ensuring data integrity and preparing for possible future quantum threats. The programmer seeks feedback for optimizing the script's efficiency and compatibility with current and emerging blockchain protocols.

The email further describes a cryptographic procedure using an alt-stack to perform operations for different byte counts. Data elements are concatenated, hashed, and conditionally swapped to verify a Merkle tree structure. A root hash, serving as a public key, is created from aggregated Merkle tree roots and sighash bytes. Private keys from a BIP-32 HD wallet seed the generation of preimages contributing to this root hash. An introspection mechanism confirms transaction compliance. Users maintain privacy by keeping their private keys confidential while engaging in verifiable transactions with deterministic public keys.