<p>There are actually 5 address types commonly in use at the moment (P2PKH, P2SH, P2WPKH, P2WSH, and P2TR), and two of them encode a 32-byte (256-bit) value, not a 20-byte (160-bit) one, so the actual number of possible addresses is 2*2^256 + 3*2^160.</p>
<p>You technically can convert between some address types, for example both P2PKH and P2WPKH encode the same type of public key hash. However, you should never do this, because 1) the recepient will almost certainly not monitor the blockchain for payments to the converted address, and 2) they might not even be able to spend coins sent to the converted address, for example if their private key is on a hardware security module that only works for their original address type. <strong>Always send to the exact address you are given.</strong></p>

CC BY-SA 4.0
2024-11-05T10:04:22.713Z
2024-11-05T10:04:22.713Z
Vojtěch Strnad
<p>Let's say Bob tells you to send him btc and he gives you a p2pkh address whose underlying 160-bit number is, say, 12345. You can't just convert that to the taproot representation of 12345 and send btc to that taproot address; Bob wouldn't receive that right?</p>
<p>So, effectively, for any given 160-bit number, there are 4 different addresses you can generate from it, and sending btc to one address type would indeed send only to that address type, and the other 3 would not receive it?</p>

<address><public-key><address-generation>
Are there 2^160 possible addresses or 4*2^160 (4 address types) possible addresses?
LaserEye99
# Are there 2^160 possible addresses or 4*2^160 (4 address types) possible addresses?

(Asked by: username_0 on 2024-11-05)

Let's say Bob tells you to send him btc and he gives you a p2pkh address whose underlying 160-bit number is, say, 12345. You can't just convert that to the taproot representation of 12345 and send btc to that taproot address; Bob wouldn't receive that right?

So, effectively, for any given 160-bit number, there are 4 different addresses you can generate from it, and sending btc to one address type would indeed send only to that address type, and the other 3 would not receive it?

**Tags:** address, public-key, address-generation


---

## 1 answers

### Answer by username_1 on 2024-11-05. Score: 7 | Accepted answer

There are actually 5 address types commonly in use at the moment (P2PKH, P2SH, P2WPKH, P2WSH, and P2TR), and two of them encode a 32-byte (256-bit) value, not a 20-byte (160-bit) one, so the actual number of possible addresses is 2\*2^256 + 3\*2^160.

You technically can convert between some address types, for example both P2PKH and P2WPKH encode the same type of public key hash. However, you should never do this, because 1) the recepient will almost certainly not monitor the blockchain for payments to the converted address, and 2) they might not even be able to spend coins sent to the converted address, for example if their private key is on a hardware security module that only works for their original address type. **Always send to the exact address you are given.**


---

