<p>Multisig addresses are defined as follows:</p>

<p>base58(0x05 + [20-byte scripthash] + [4-byte checksum])</p>

<p>For testnet, it's 0xC4 instead of 0x05, indeed.</p>

CC BY-SA 3.0
2012-09-18T13:51:42.390Z
2012-09-18T13:51:42.390Z
Pieter Wuille
<p>Normally when validating a bitcoin address I Base58 decode the string, validate the checksum, throw away the checksum, and end up with 21 bytes. Then I verify that the address is fr the correct network:
If the first byte is 0x00 I have an address for the production network
If the first byte is 0x6F I have an address for the test network</p>

<p>For this multisig address 2N5vbPQB7pMqyVa8JRcpZdCQLQCwDZCMyfo I get 0xC4 as the first byte. 
Does this mean that 0xC4 is the prefix for all multisig addresses on the production network?
In that case, what is the prefix for the test network?</p>

<development>
How do I validate the correctness of a bitcoin multisig address?
Jan
# How do I validate the correctness of a bitcoin multisig address?

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

Normally when validating a bitcoin address I Base58 decode the string, validate the checksum, throw away the checksum, and end up with 21 bytes. Then I verify that the address is fr the correct network:
If the first byte is 0x00 I have an address for the production network
If the first byte is 0x6F I have an address for the test network

For this multisig address 2N5vbPQB7pMqyVa8JRcpZdCQLQCwDZCMyfo I get 0xC4 as the first byte.
Does this mean that 0xC4 is the prefix for all multisig addresses on the production network?
In that case, what is the prefix for the test network?

**Tags:** development


---

## 1 answers

### Answer by username_1 on 2012-09-18. Score: 2

Multisig addresses are defined as follows:

base58(0x05 + [20-byte scripthash] + [4-byte checksum])

For testnet, it's 0xC4 instead of 0x05, indeed.


---

