ERC-1581 A derivation path standard for non-wallet key purposes (Non-wallet usage of keys derived from BIP-32 trees)
Stagnant · Accounts & wallets · created 2018-11-13
Defines a dedicated derivation path within the BIP32 key tree for keys not used to custody assets, such as messaging keys, so that non-asset keys can also be safely backed up and managed from the same master key as a wallet.
Why it is needed
BIP32 and BIP44 only define key trees for wallets that custody blockchain assets. But applications that interact with the blockchain often also need separate key pairs for non-blockchain functions where privacy or security matters. Reusing a wallet key for this purpose can create security weaknesses, while using a completely independent key increases the amount of information that must be backed up and migrated, complicating credential management. A dedicated derivation path needs to be separate from the wallet path while still sharing the same master key, but without a standardized path, users are forced to give up either security or management convenience.
In depth
Derivation path level structure
It consists of five levels: m / purpose' / coin_type' / subpurpose' / key_type' / key_index. An apostrophe (') attached to a path level indicates that BIP32 hardened derivation is used at that level. This structure follows BIP43's recommendation and an amendment extending it to non-Bitcoin uses.
Fixed prefix 43'/60'/1581'
The leading m / 43' / 60' / 1581' are fixed values that in order denote BIP43 -> Ethereum (coin_type 60) -> this EIP. Every subtree beneath this prefix falls within the scope of this EIP.
The key_type level
key_type indicates the purpose for which a key is used. The spec states that names should be generic rather than tied to a specific service, giving 'instant messaging' as a good example while noting that a specific protocol name like 'Whisper' is not appropriate. The goal is to let the same identity be reused across multiple services. This level also uses hardened derivation. However, the concrete list of key_type values is marked only as TBD (to be determined) in the source.
The key_index level and splitting large identifiers
key_index is a variable-length field that identifies a specific key. In the simple case it is a single number between 0 and 2^31-1. When a larger identifier such as a hash or GUID is needed, the value is split across multiple BIP32 levels, left-aligned starting from the most significant bit and padded with zeros if needed. Every level except the last uses hardened derivation, and only the last level uses public (non-hardened) derivation. This means each level can hold 31 bits of the identifier. For example, using key_type 4' with a 62-bit ID (hex 0x2BCDEFFEDCBAABCD), the full path becomes m / 43' / 60' / 1581' / 4' / 1469833213' / 1555737549.
Rule for using a random identifier (GUID)
If you want to use a random identifier, the spec explains that it is convenient to generate a 128-bit GUID, then fix the most significant bit of every 32-bit word except the last one to 1, and fix the most significant bit of the last word to 0.
Proposal status
This EIP is a Standards Track ERC created on 2018-11-13 and is currently in Stagnant status. In other words, it is a proposal where discussion has stopped and is no longer progressing, and parts of it, such as the key_type list, remain incomplete as TBD.