New Proposal:String Substring Search in Bitcoin Script - OP_ISSUBSTR

Posted by Vojtěch Strnad

Mar 20, 2025/00:23 UTC

In a recent discussion on implementing a unique game within the Bitcoin development community, an innovative approach was suggested to enhance user interaction and security. The core idea revolves around leveraging the user's public key in a split format, excluding a specific string, "goodluck," which is then reintroduced during the execution phase. This method involves the user providing two parts of their public key, with the "goodluck" segment removed at the outset. During the game's operation, this missing piece is ingeniously inserted back into the sequence through a scripted command.

The technical implementation of this concept uses a straightforward yet effective script. The script contains the "goodluck" text followed by a series of operations: OP_SWAP switches the positions of the top two items on the stack, OP_CAT concatenates them, and this process is repeated to integrate the "goodluck" section fully. Finally, OP_CHECKSIG is employed to verify the signature against the now-complete public key. The initial stack required for this setup comprises three elements: the user's digital signature and the two segments of their public key, with the middle "goodluck" part excluded.

This technique not only introduces an engaging mechanism for user participation but also underscores the versatility and potential for creativity within Bitcoin's scripting language. Such discussions and exchanges of ideas are pivotal for the ongoing development and innovation in the realm of cryptocurrency, reflecting a vibrant and collaborative community dedicated to exploring new possibilities.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiBitcoin Transcripts Review
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project?

Give Feedback