Skip to content

Latest commit

 

History

History
93 lines (74 loc) · 8.57 KB

slip-0132.md

File metadata and controls

93 lines (74 loc) · 8.57 KB

SLIP-0132 : Registered HD version bytes for BIP-0032

Number:  SLIP-0132
Title:   Registered HD version bytes for BIP-0032
Type:    Standard
Status:  Active
Authors: Clark Moody <[email protected]>
Created: 2018-02-08

Abstract

BIP-0032 defines the derivation scheme for hierarchical deterministic wallets, which encode their public and private keys in an extended serialization format known as xpub. The xpub prefix is an artifact of Base58 encoding the four version bytes of the serialization format.

Motivation

The BIP repository defines public and private key version bytes for Bitcoin's mainnet and testnet. However, other cryptocurrencies use different version bytes for encoding HD seeds, and the BIP repository is focused on Bitcoin. Thus, we propose this SLIP act as a registry for all coin HD version bytes.

Since BIP-0032 does not specify the address format for a given derivation path, wallet developers have proposed altering the version bytes to achieve this. With the activation of SegWit on Bitcoin, the number of ways of encoding an address public key has increased. While BIP-0049 proposes a method for encoding P2WPKH-nested-in-P2SH addresses, its original version failed to change the HD seed version bytes (retained xpub prefix), leading to unsustainable user confusion. Either the user must know that the xpub uses BIP-0049 derivation, or the consumer of the xpub must scan both address spaces (P2PKH and P2WPKH-in-P2SH).

BIP-0084 proposes a native-SegWit derivation scheme, encoding P2WPKH addresses in Bech32. However, the extended serialization format was originally presented with a zpub prefix but no version bytes. This is an issue since multiple values of the version bytes may encode to the same prefix.

A final important motiviation for establishing a clearinghouse of HD version bytes is the fact that the extended serialization format does not encode the coin type. The SLIP-0032 proposal attempts a remedy by including the full BIP-0032 derivation path within the serialized key. Along with a human-readable prefix of xpub and Bech32 encoding, SLIP-0032 should greatly improve the wallet ecosystem. Until wallets begin implementation of SLIP-0032, however, this registry aims to alleviate the confusion.

Registered HD version bytes

These are the registered HD version bytes for extended serialization of public and private keys.

Coin Public Key Private Key Address Encoding BIP 32 Path
Bitcoin 0x0488b21e - xpub 0x0488ade4 - xprv P2PKH or P2SH m/44'/0'
Bitcoin 0x049d7cb2 - ypub 0x049d7878 - yprv P2WPKH in P2SH m/49'/0'
Bitcoin 0x04b24746 - zpub 0x04b2430c - zprv P2WPKH m/84'/0'
Bitcoin 0x0295b43f - Ypub 0x0295b005 - Yprv Multi-signature P2WSH in P2SH -
Bitcoin 0x02aa7ed3 - Zpub 0x02aa7a99 - Zprv Multi-signature P2WSH -
Bitcoin Testnet 0x043587cf - tpub 0x04358394 - tprv P2PKH or P2SH m/44'/1'
Bitcoin Testnet 0x044a5262 - upub 0x044a4e28 - uprv P2WPKH in P2SH m/49'/1'
Bitcoin Testnet 0x045f1cf6 - vpub 0x045f18bc - vprv P2WPKH m/84'/1'
Bitcoin Testnet 0x024289ef - Upub 0x024285b5 - Uprv Multi-signature P2WSH in P2SH -
Bitcoin Testnet 0x02575483 - Vpub 0x02575048 - Vprv Multi-signature P2WSH -
Groestlcoin 0x0488b21e - xpub 0x0488ade4 - xprv P2PKH or P2SH m/44'/17'
Groestlcoin 0x049d7cb2 - ypub 0x049d7878 - yprv P2WPKH in P2SH m/49'/17'
Groestlcoin 0x04b24746 - zpub 0x04b2430c - zprv P2WPKH m/84'/17'
Groestlcoin 0x0295b43f - Ypub 0x0295b005 - Yprv Multi-signature P2WSH in P2SH -
Groestlcoin 0x02aa7ed3 - Zpub 0x02aa7a99 - Zprv Multi-signature P2WSH -
Groestlcoin Testnet 0x043587cf - tpub 0x04358394 - tprv P2PKH or P2SH m/44'/1'
Groestlcoin Testnet 0x044a5262 - upub 0x044a4e28 - uprv P2WPKH in P2SH m/49'/1'
Groestlcoin Testnet 0x045f1cf6 - vpub 0x045f18bc - vprv P2WPKH m/84'/1'
Groestlcoin Testnet 0x024289ef - Upub 0x024285b5 - Uprv Multi-signature P2WSH in P2SH -
Groestlcoin Testnet 0x02575483 - Vpub 0x02575048 - Vprv Multi-signature P2WSH -
Kylacoin 0x038f332e - kpub 0x038f2ef4 - kprv P2PKH or P2SH -
Kylacoin Testnet 0x045f1cf6 - vpub 0x045f18bc - vprv P2PKH or P2SH -
Litecoin 0x019da462 - Ltub 0x019d9cfe - Ltpv P2PKH or P2SH m/44'/2'
Litecoin 0x01b26ef6 - Mtub 0x01b26792 - Mtpv P2WPKH in P2SH m/49'/2'
Litecoin Testnet 0x0436f6e1 - ttub 0x0436ef7d - ttpv P2PKH or P2SH m/44'/1'
Vertcoin 0x0488b21e - vtcp 0x0488ade4 - vtcv P2PKH or P2SH m/44'/28'
Polis 0x03e25d7e - ppub 0x03e25945 - pprv P2PKH m/44'/1997'
Syscoin 0x04b24746 - zpub 0x04b2430c - zprv P2WPKH m/84'/57'
Syscoin 0x02aa7ed3 - Zpub 0x02aa7a99 - Zprv Multi-signature P2WSH -
Yilacoin 0x02e8de8f - cpub 0x02e8da54 - cprv P2PKH or P2SH -
Yilacoin Testnet 0x03f72812 - qpub 0x03f723d8 - qprv P2PKH or P2SH -

Bitcoin Test Vectors

Mnemonic: abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about

m/44'/0'/0'
xprv9xpXFhFpqdQK3TmytPBqXtGSwS3DLjojFhTGht8gwAAii8py5X6pxeBnQ6ehJiyJ6nDjWGJfZ95WxByFXVkDxHXrqu53WCRGypk2ttuqncb
xpub6BosfCnifzxcFwrSzQiqu2DBVTshkCXacvNsWGYJVVhhawA7d4R5WSWGFNbi8Aw6ZRc1brxMyWMzG3DSSSSoekkudhUd9yLb6qx39T9nMdj
m/44'/0'/0'/0/0 address:
1LqBGSKuX5yYUonjxT5qGfpUsXKYYWeabA

m/49'/0'/0'
yprvAHwhK6RbpuS3dgCYHM5jc2ZvEKd7Bi61u9FVhYMpgMSuZS613T1xxQeKTffhrHY79hZ5PsskBjcc6C2V7DrnsMsNaGDaWev3GLRQRgV7hxF
ypub6Ww3ibxVfGzLrAH1PNcjyAWenMTbbAosGNB6VvmSEgytSER9azLDWCxoJwW7Ke7icmizBMXrzBx9979FfaHxHcrArf3zbeJJJUZPf663zsP
m/49'/0'/0'/0/0 address:
37VucYSaXLCAsxYyAPfbSi9eh4iEcbShgf

m/84'/0'/0'
zprvAdG4iTXWBoARxkkzNpNh8r6Qag3irQB8PzEMkAFeTRXxHpbF9z4QgEvBRmfvqWvGp42t42nvgGpNgYSJA9iefm1yYNZKEm7z6qUWCroSQnE
zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs
m/84'/0'/0'/0/0 address:
bc1qcr8te4kr609gcawutmrza0j4xv80jy8z306fyu

Test vectors generation code

References