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

**URL:** <https://delvingbitcoin.org/t/public-key-recovery-for-ec-leaves-in-p2mr-bip-360/2603>\
**Category:** Protocol Design\
**Tags:** taproot, softfork, cryptography\
**Created:** [June 6, 2026, 9:55pm UTC](https://delvingbitcoin.org/t/public-key-recovery-for-ec-leaves-in-p2mr-bip-360/2603 "2026-06-06T21:55:49Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![conduition](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/conduition/32/384_2.png) [@conduition](https://delvingbitcoin.org/u/conduition)\
**Post date:** [June 10, 2026, 10:35pm UTC](https://delvingbitcoin.org/t/public-key-recovery-for-ec-leaves-in-p2mr-bip-360/2603/16 "2026-06-10T22:35:37Z")

</div>

The convo got a bit off topic, i’m gonna bring it back to the OP subject matter for a moment here. If we were to abstract @starius’ idea into a standalone signature scheme outside of Bitcoin that we could prove secure on its own, this might be how we might abstract it.

A secret key is a scalar 0 \< p \< n and auxiliary data d. The public key is a hash committing to pG and d:

q = H(pG, d)

(in the bitcoin context, the aux data d is simply the P2MR control block)

When signing, the signer constructs a Schnorr signature, prefixing the message with the public key q and the auxiliary data d.

\begin{equation} r \leftarrow \mathbb Z\_n \\ R = rG \\ e = H(R\ \|\ q\ \|\ d\ \|\ m) \\ s = r + ep \\ \end{equation}

One can view this as a fiat-shamir transform of a sigma protocol as with Schnorr.

1. The prover publishes their public key q and aux data d, and a commitment R = rG.
2. The verifier samples a random challenge e \leftarrow \mathbb Z\_n and sends it to the prover.
3. The prover responds with s = r + ep
4. The verifier checks q \stackrel{?}{=} H(e^{-1}(sG - R), d)

However this treats the aux data d as opaque data, so it doesn’t capture the security notions of P2MR completely.

---

_[View the full topic](https://delvingbitcoin.org/t/public-key-recovery-for-ec-leaves-in-p2mr-bip-360/2603)._
