Ethereum Foundation explains how eth2 validator keys separate signing from withdrawals

Ethereum Foundation explains how eth2 validator keys separate signing from withdrawals

The Ethereum Foundation outlined how eth2 validators would manage signing and withdrawal keys in a post published by Carl Beekhuizen on 21 May 2020. The design assigns validators two key types, with different roles and storage requirements.

In a proof-of-stake system, validators use signatures to identify their actions. Signed messages can help establish whether a validator followed the rules or acted against consensus. In eth2, the validator’s public key serves as its identity.

Two keys, two roles

A signing key lets a validator sign attestations and propose blocks. Since a validator must sign at least once per epoch, its client software needs access to this key. That requirement also means the key is used on an internet-connected system, which the Ethereum Foundation identified as a potential security exposure.

The withdrawal key controls the validator’s funds, including transfers and withdrawals. The post said these functions would not be available until at least phase 1. As a validator would need its withdrawal key only occasionally, the Foundation said it could be kept offline in cold storage.

The separation limits what an exposed signing key can do. But there is a related custody detail: under the described derivation scheme, someone with the mnemonic can derive the withdrawal key and then the signing key. The mnemonic therefore acts as a backup for all of a validator’s keys and needs careful protection.

Deriving many keys from one mnemonic

Deriving many keys from one mnemonic

Keeping two unrelated keys for every validator would create a growing storage burden. The post described EIPs 2333 and 2334 as standards for linking withdrawal and signing keys and deriving them from a single mnemonic, a sequence of words used to encode and back up secret information.

EIP 2333 sets out a tree-based derivation method. A seed, which can come from a mnemonic, forms the root; a path through branches identifies a particular key. Following this structure lets one seed generate many keys without storing each one separately.

Under EIP 2334, a validator’s signing key is derived as a child of its withdrawal key. The post gave the practical paths as m/12381/3600/i/0 for withdrawal keys and m/12381/3600/i/0/0 for signing keys, where i represents the validator’s index. A single mnemonic could therefore support multiple validators by using different branches.

Keystores and the deposit process

Keystores and the deposit process

Validator clients use keystore files to import signing keys. The files encrypt private keys with a user’s password; the Foundation said users could store or transfer them safely if they did not keep the password on the same computer.

For phase 0, the post said withdrawal keystores were not needed because transfers and withdrawals were unavailable. A validator instead needed to retain the mnemonic securely and provide the client with a signing-key keystore and its password.

Becoming a validator required 32 ETH per validator, alongside deposit data containing the validator’s public keys. The data was recorded in the deposit contract on eth1, then copied over by eth2 nodes monitoring that contract. The post also said the Foundation was working on an interface called Eth2 Launchpad, with a further update promised shortly; it did not describe the interface as already available.