Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines ERC-1581, which proposes deriving separate keys for off-chain purposes from the same master key used by a wallet.

This explanation is based on the following specification.

For other Ethereum improvement proposals, see the following page.

Overview

ERC-1581 uses hierarchical deterministic (HD) key derivation, as defined by BIP-32, to provide a systematic way to manage keys for purposes outside the blockchain.

BIP-32 and BIP-44 are widely associated with cryptocurrency wallet key management. ERC-1581 defines a separate logical key subtree derived from the same master key, allowing non-wallet uses to coexist with existing wallet derivation paths.

The proposal separates keys for purposes such as authentication, encryption, and message signing from the keys used by a cryptocurrency wallet, while deriving them from the same master key.

Motivation

Many blockchain applications also use off-chain technologies, including external authentication and data processing.

For privacy and security, such applications may require multiple keys. Reusing a wallet's transaction-signing key for unrelated purposes can introduce risks. Managing entirely independent master keys, however, complicates backup and migration.

The proposal addresses this trade-off by defining a separate derivation branch that coexists with BIP-44-compatible wallets.

Keys can be separated by purpose while retaining a common master key for backup and recovery. Applications can use dedicated keys without requiring users to manage a separate master key for every purpose.

Specification

Path Structure

ERC-1581 uses the BIP-32 path structure to organize keys hierarchically.

text
m / purpose' / coin_type' / subpurpose' / key_type' / key_index

An apostrophe indicates hardened derivation. In BIP-32, hardened children cannot be derived from the parent extended public key alone. Hardened derivation also protects against certain parent private-key recovery risks associated with non-hardened derivation.

The path follows the purpose-based approach introduced by BIP-43 and can accommodate Ethereum-related uses outside the Bitcoin wallet structure.

Purpose, Coin Type, and Subpurpose

The first three levels are fixed.

text
m / 43' / 60' / 1581'
  • 43': Identifies the purpose convention based on BIP-43.
  • 60': Identifies Ethereum's coin type.
  • 1581': Identifies the subpurpose assigned to ERC-1581.

The subtree beneath these three levels is reserved for the purposes covered by ERC-1581.

Key Type

The fourth level identifies the purpose of a key.

The proposal recommends general categories, such as instant messaging, rather than service-specific identifiers such as Whisper. This would allow applications to use the same key type for the same identity across compatible services.

The original proposal anticipates future standardization of key types.

This level uses hardened derivation.

Key Index

The fifth level identifies a particular key. In the simplest case, the index is an integer between 0 and 2^31-1.

Larger identifiers, such as a 128-bit GUID or a hash value, can be split across multiple derivation levels. Each level carries 31 bits of identifier data, arranged starting with the most significant bits.

The following rules apply.

  • The final level uses non-hardened derivation, allowing public derivation.
  • All preceding levels in the index use hardened derivation.

For example, suppose the key type is 4' and the index is the 62-bit value 0x2BCDEFFEDCBAABCD. The original article gives the following path.

text
m / 43' / 60' / 1581' / 4' / 1469833213' / 1555737549

This approach allows large or randomly generated identifiers to be represented in a reproducible derivation path.

For identifiers such as 128-bit GUIDs, multiple 32-bit child-number fields can be used, with the high bit serving as the hardened flag rather than identifier data. The underlying identifier chunks must follow the 31-bit rule described above. Implementations should verify the numerical example against the linked specification before using it to derive keys.

Citation

Michele Balistreri (@bitgamma), "ERC-1581: Non-wallet usage of keys derived from BIP-32 trees [DRAFT]," Ethereum Improvement Proposals, no. 1581, November 2018. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-1581.

Conclusion

ERC-1581 proposes a dedicated derivation subtree for non-wallet keys, enabling purpose-specific key management from the same master key used for a wallet.