Cosmos Derivation Path Spec Proposal Completed
We’re happy to report that Confio completed the Cosmos hierarchical deterministic (HD) key derivation spec. This is a proposal to change the way keys are generated within the Cosmos ecosystem.
HD wallets allow you to generate public and private keys for multiple blockchains with one single mnemonic seed phrase. Following the BIP44 spec, each blockchain is assigned a number (a value called
coin_type), which is used to cryptographically determine a unique and independent key pair for each chain, all using the same seed phrase.
Cosmos Hub uses the ATOM
coin_type “118” and a good amount of other chains built with the Cosmos SDK have been using this identifier as well. This allows those chains to use existing tools built for the Cosmos Hub, such as the Cosmos Ledger app, without any modifications. However convenient, the downside is that all these chains necessarily will be using the same keypair, which renders the use of a single mnemonic seed phrase pointless if users wish to keep their identities on all chains separated.
In order to get the best of both worlds, Confio proposes to use an alternative path that is still BIP32 and BIP43 compliant, replacing the
purpose value with a Cosmos specific identifier and replacing
chain_index, listing all Cosmos blockchains using a registry similar to SLIP44. This results in a path structure
m / 7564153' / chain_index’ / 1’ / a where
m is a constant,
7564153’ is the BIP43 purpose identifying this is a Cosmos specific derivation path,
chain_index’ is the Cosmos blockchain registry,
1’ is arbitrary, and
a is an account index.
Implementing this will require some changes in the clients doing the derivation work, such as wallets. For example, some flexibility in the Cosmos Ledger app is needed, as applications connecting to the Ledger app are currently restricted to using the
m / 44’ / 118’ path, among other things. We encourage you to read the proposal here!