diff --git a/docs/coins/README.md b/docs/coins/README.md new file mode 100644 index 0000000000..fab5dd47d1 --- /dev/null +++ b/docs/coins/README.md @@ -0,0 +1,37 @@ + +List of used BIP-44 derivation paths +------------------------------------ + +| coin | curve | getPublicKey | getAddress | sign | derivation | note | +|----------------|----------------|----------------|------------------|------------------|-----------------|--------------| +| Bitcoin | secp256k | 44'/0'/a' | 44'/0'/a'/y/i | 44'/0'/a'/y/i | [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) | [7](#BitcoinDiagram) | +| Ethereum | secp256k | 44'/60'/a'{/0}[1](#ETHPublicKey) | 44'/60'/a'/0/i | 44'/60'/a'/0/i | BIP-32 | | +| Ripple | secp256k | - | 44'/144'/a'/0/i | 44'/144'/a'/0/i | BIP-32 | [2](#Ripple) | +| Stellar | ed25519 | - | 44'/148'/a' | 44'/148'/a' | [SLIP-0010](https://github.com/satoshilabs/slips/blob/master/slip-0010.md) | [3](#Stellar) | +| Cardano | ed25519 | 44'/1815'/a' | 44'/1815'/a'/0/i | 44'/1815'/a'/0/i | [Cardano's own](https://cardanolaunch.com/assets/Ed25519_BIP.pdf)[4](#Cardano) | | +| Lisk | ed25519 | 44'/134'/a' | 44'/134'/a' | 44'/134'/a' | SLIP-0010 | | +| NEM | ed25519 | - | 44'/43'/a'/0'/0' | 44'/43'/a'/0'/0' | SLIP-0010 | [5](#NEM) | +| Monero | ed25519 | 44'/128'/a'[6](#Monero) | 44'/128'/a' | 44'/128'/a' | SLIP-0010 | | + + +## Notes + + +1. This should probably be `44'/60'/a'`, but unfortunately MyEtherWallet sends `44'/60'/a'/0`. So for backwards compatibility we allow both options. trezor.wallet.io sends `44'/60'/a'/0` for MEW compatibility. + +2. Although Ripple does not have the concept of change, it uses secp256k and has normal derivation defined. For interoperability reasons we use `44'/144'/a'/0/i`. + +3. Defined by Stellar themselves in their [SEP-0005](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0005.md). + +4. Which allows normal derivation on ed25519. + +5. NEM's path should probably be `44'/60'/a'`, but due to historical reasons this is set to `44'/60'/a'/0'/0'`. + +6. Actually it is GetWatchKey for Monero. + +7. With some exceptions. The following diagram shows a path should be validated for Bitcoin-like coins: + +![](bitcoin-path-check.svg) + + + diff --git a/docs/coins/bitcoin-path-check.svg b/docs/coins/bitcoin-path-check.svg new file mode 100644 index 0000000000..f2b6c7d141 --- /dev/null +++ b/docs/coins/bitcoin-path-check.svg @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Path = p'/c'/a'/y/x + + + + + + + + c == 0 + + + + + + + + + + uses change + + + + + + + T + + + + + + + + a < 10 + + + + + + + + x < 1000000 + + + + + + + + y == 0 or 1 + + + + + + + + y == 0 + + + + + + + F + + + + + + + + + + if segwit-enabled + + + + + + + + p == 44 + + + + + + + F + + + + + + + + p == 49 or 84 + + + + + + + T + + + + + + + + + + if segwit-enabled + + + + + + + F + + + + + + + T + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OK! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + len(path) == 5 + + + + + + + + \ No newline at end of file