<p>A P2TR address encodes a public key using <a href="https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki" rel="noreferrer">Bech32m</a>, which you can directly decode. This public key is often (as recommended by <a href="https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#constructing-and-spending-taproot-outputs" rel="noreferrer">BIP341</a>) the result of taking a different key (called &quot;internal key&quot;) and tweaking it with the commitment to a taproot script tree. The internal key is not part of the address so it cannot be decoded from it and is only revealed when spending via the script path. Since protocols using taproot usually aim to use the key path whenever possible and some even make the script path unspendable (e.g. <a href="https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki" rel="noreferrer">BIP86</a>), you will not be able to determine the internal key for most taproot addresses (or even determine whether it exists at all).</p>

CC BY-SA 4.0
2023-03-14T07:20:43.230Z
2023-03-14T07:20:43.230Z
Vojtěch Strnad
<p>Is it possible to extract the taproot internal key out of a P2TR address?</p>

<taproot><p2tr>
How to extract the internal key of a simple P2TR address?
Orny
# How to extract the internal key of a simple P2TR address?

(Asked by: username_0 on 2023-03-14)

Is it possible to extract the taproot internal key out of a P2TR address?

**Tags:** taproot, p2tr


---

## 1 answers

### Answer by username_1 on 2023-03-14. Score: 7 | Accepted answer

A P2TR address encodes a public key using [Bech32m](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki), which you can directly decode. This public key is often (as recommended by [BIP341](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#constructing-and-spending-taproot-outputs)) the result of taking a different key (called "internal key") and tweaking it with the commitment to a taproot script tree. The internal key is not part of the address so it cannot be decoded from it and is only revealed when spending via the script path. Since protocols using taproot usually aim to use the key path whenever possible and some even make the script path unspendable (e.g. [BIP86](https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki)), you will not be able to determine the internal key for most taproot addresses (or even determine whether it exists at all).


---

