delvingbitcoin

Lamport signatures and other CAT tricks

Lamport signatures and other CAT tricks

Original Postby moonsettler

Posted on: February 15, 2024 10:44 UTC

The concept of a 'neutered CAT' is being explored as a potential evolution in the world of Bitcoin scripting.

This proposition involves reducing the maximum output size from the current MAX_SCRIPT_ELEMENT_SIZE of 520 bytes to a mere 80 bytes. Such a modification is underpinned by a desire to prevent open-ended second-order effects which could arise from the ability to assemble SIGHASH or CTV templates on the stack for detailed introspection, which may not have been originally intended. By imposing this limitation, it directly curtails the possibility of using these mechanisms for purposes beyond their initial design, thus safeguarding against unforeseen complications.

The motivation behind this proposal extends beyond simple restriction. By setting an 80-byte limit, it aligns with the standard size for a signed data carrier, which inherently must be less than 84 bytes to avoid enabling the construction of CoinSwap Transaction Version (CTV) templates on the stack. This size also carefully considers various cryptographic and blockchain-specific requirements, such as Merkle inclusion which necessitates space for two hashes (20/32 bytes each), LN-symmetry aiming for enhancement of Lightning Network protocols through two 32-byte hashes, and separate signatures ranging between 64 and 72 bytes, catering to different applications like zero-confirmation bonds and staking contracts.

This initiative represents a middle ground in the ongoing debate within the Bitcoin community, balancing the conservative perspective, which emphasizes preserving Bitcoin's fundamental characteristics, against the more progressive viewpoint advocating for advanced tools that empower developers. By establishing a compromise, it seeks to accommodate the needs and concerns of both factions, potentially paving the way for innovative developments while maintaining the integrity and security of the network.