CheckSigFromStack for Arithmetic Values



Summary:

In a recent bitcoin-dev post, Jeremy discussed the possibility of using arithmetic operations in combination with Lamport signatures to enable signing operations. This implementation uses a bitwise expansion of a number and a lamport signature to sign transactions. The resulting script can be used for arbitrary values representable in small binary numbers. This is demonstrated with an example of signing a sequence lock of 16 bits. ZmnSCPxj notes that enabling `OP_ADD` could lead to the implementation of such signatures; however, this is not necessarily recommended, as these signatures are single-use-only and encouraging pubkey reuse should be avoided. Additionally, it seems more of a "bad but clever thing" than something that Bitcoin should fully embrace.


Updated on: 2023-06-14T23:54:59.657914+00:00