Skip to content

Commit 7a32141

Browse files
authored
Merge pull request #1584 from jonatack/2024-04-bip32-amendment
BIP32 amendment: base58chk-encoded extended keys are always 111 chars
2 parents 2fd67e5 + f1c296b commit 7a32141

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bip-0032.mediawiki

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Extended public and private keys are serialized as follows:
137137
* 32 bytes: the chain code
138138
* 33 bytes: the public key or private key data (ser<sub>P</sub>(K) for public keys, 0x00 || ser<sub>256</sub>(k) for private keys)
139139
140-
This 78 byte structure can be encoded like other Bitcoin data in Base58, by first adding 32 checksum bits (derived from the double SHA-256 checksum), and then converting to the Base58 representation. This results in a Base58-encoded string of up to 112 characters. Because of the choice of the version bytes, the Base58 representation will start with "xprv" or "xpub" on mainnet, "tprv" or "tpub" on testnet.
140+
This 78 byte structure can be encoded like other Bitcoin data in Base58, by first adding 32 checksum bits (derived from the double SHA-256 checksum), and then converting to the Base58 representation. This results in a Base58-encoded string of exactly 111 characters. Because of the choice of the version bytes, the Base58 representation will start with "xprv" or "xpub" on mainnet, "tprv" or "tpub" on testnet.
141141

142142
Note that the fingerprint of the parent only serves as a fast way to detect parent and child nodes in software, and software must be willing to deal with collisions. Internally, the full 160-bit identifier could be used.
143143

0 commit comments

Comments
 (0)