<p>It depends on what you mean by public key.</p>
<p>P2TR outputs encode an &quot;x-only pubkey&quot;, that is a public key with just the X coordinate. The Y coordinate is implicitly the even one (on elliptic curve like secp256k1, every X coordinate has either exactly 2 corresponding Y coordinates, or none; and one of those two will always be odd, and one will be even).</p>
<p>Older mechanisms, such as the ECDSA signing used in older Bitcoin scripts, use a public key where the Y coordinate is identified exactly. Either by sending it in full, or sending just its parity.</p>
<p>So, if you would use a public key directly, without tweaking, as a P2TR address, then it is indeed possible to recover the public key's X coordinate from it. Which of the two Y coordinates it was will be lost.</p>
<p>Is this safe to do? In simple cases, yes. BIP341 recommends always tweaking, even when there are no scripts involved, because of interaction with certain other protocols that could be built on top. But if all you're going for is single-key signing, you could in theory get away with using keys untweaked.</p>

CC BY-SA 4.0
2021-09-18T20:46:09.977Z
2023-11-07T23:49:04.310Z
2023-11-07T23:49:04.310Z
Pieter Wuille
<p>Given some public key, is turning it into a working P2TR address and then going back from P2TR to get the same pubkey possible? I've read about the tweaking but don't really get it - do you need to tweak the pubkey?</p>

<public-key><p2tr><key-tweaking>
Can you use un-tweaked public key with P2TR?
monke
# Can you use un-tweaked public key with P2TR?

(Asked by: username_0 on 2021-09-18)

Given some public key, is turning it into a working P2TR address and then going back from P2TR to get the same pubkey possible? I've read about the tweaking but don't really get it - do you need to tweak the pubkey?

**Tags:** public-key, p2tr, key-tweaking


---

## 1 answers

### Answer by username_1 on 2021-09-18. Score: 3 | Accepted answer

It depends on what you mean by public key.

P2TR outputs encode an "x-only pubkey", that is a public key with just the X coordinate. The Y coordinate is implicitly the even one (on elliptic curve like secp256k1, every X coordinate has either exactly 2 corresponding Y coordinates, or none; and one of those two will always be odd, and one will be even).

Older mechanisms, such as the ECDSA signing used in older Bitcoin scripts, use a public key where the Y coordinate is identified exactly. Either by sending it in full, or sending just its parity.

So, if you would use a public key directly, without tweaking, as a P2TR address, then it is indeed possible to recover the public key's X coordinate from it. Which of the two Y coordinates it was will be lost.

Is this safe to do? In simple cases, yes. BIP341 recommends always tweaking, even when there are no scripts involved, because of interaction with certain other protocols that could be built on top. But if all you're going for is single-key signing, you could in theory get away with using keys untweaked.


---

