Public key recovery for EC leaves in P2MR (BIP-360)

Posted by sipa

Jun 7, 2026/14:09 UTC

In the domain of cryptographic security, particularly concerning EC keys and their implementation in blockchain technologies, a critical vulnerability has been identified. Specifically, if there is a tree structure where related Elliptic Curve (EC) keys P and P' = P + t⋅G are located in different leaves of the same tree, and the element e does not commit to the control block — essentially the path within the tree — this setup allows for the potential forgery of signatures. The scenario posits that with a valid signature for P, it becomes feasible to forge a signature for P'.

Further exploration into this topic reveals nuances in the Pay-to-Taproot (P2TR) construction, an innovation in Bitcoin scripting that facilitates more private and efficient transactions. The assumption initially was that in the P2TR case outlined in the table, there exists only a single script leaf because the key path represents the primary method for spending, not a mere component of a leaf. However, this assumption overlooks configurations where the P2TR output might have two literal leaves, leading to a difference in data requirements; specifically, the script spend would necessitate an additional 32 bytes.

The distinction between spending through a key path or a script path is predominantly dependent on whether the mechanism employed is tweak-based or tree-based. This difference highlights not only a crucial aspect of the implementation detail but also impacts the overall security and functionality of the cryptographic scheme in question. Understanding these subtleties can significantly influence the development and secure application of such cryptographic structures in real-world blockchain scenarios.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

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

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiDecoding BitcoinWarnet
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

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

Give Feedback