Ethereum: How does Electrum make a keypair out of a seed?
Understand Ethereum’s hierarchical arbitrarily deep key exchange (HA-DPKG) system with electronic
As the main Blockchain wallet for Ethereum, Electrum users give you a safe way to save and control their personal keys. One of the main features that distinguish Electrum from other wallets is its hierarchical arbitrarily deep key exchange (HA-DPKG) system that creates a unique pair of public and private keys to create multiple addresses for Blockchain. In this article, we will look at how Electrium generates the key from the seed, and explores the internal operation of HA-DPKG.
Key generation from seed

To generate the key with Electrium, you need to provide it with a seed that is a 12 -word phrase used as the first part of your public and private sector key. The seed serves as a password or input phrase controlling access to your Ethereum account. When creating an electric wallet, Electrum asks your seed in some format:
`
M/0 ‘/0/m/0’/1 *2^20 ‘/0/m/0’/12
`
In this example, the first part “/m/0” means original seed data (byte mix) and “M/0” – the second byte. The rest of the line follows in a specific format:
`
M/0 ‘/n1 *2^n/m/n
`
*2^n indicates that it is a 2 index raised to” n “. For example, if you provide seeds like G4PBQX8HJ9FRTVWLQYL3GFDF with N = 1, Electrum will generate the key sitting as follows:
`
M/0 ‘/0/m/0’/1 *2^20 ‘/0/m/0’/12
`
The resulting public and private pair of keys consists of 36 bytes.
Hierarchical address generation
After creating Tyrico, Electrum uses it to create a hierarchy of addresses that can be used for operations on Ethereum. To do this, Electrum takes on a byte of each seed and gives it a special role in creating a hierarchical address (ha). Roles are:
M/0: This denotes primary seed data.
- N1: The second byte is attributed to N1.
2^n: Each subsequent byte was assigned to N1 and N1 is more than the previous value.
By applying this hierarchical method, Electrum creates a ha address sequence from your key. For example:
`
0x00 01 02 03 … (m/0)
*2^20’00 = 0010101010101010
*2^21’00 = 01111111100
*2^22’00 = 000101101000
*2^23’00 = 1000000000000
1x … (N1, N1+1, …)
Address 0: 0x01 02 03 *2^20 ‘
Address 1: 0x11 12 13 *2^21 ‘
…
`
These HA addresses can be used for a variety of Ethereum network purposes, such as creating a cash address or generation of contract address.
Conclusion
In conclusion, Electrum uses seeds to generate the key, allowing users to create several addresses of Ethereum Blockchain. When it comes to how Electrum generates these keys and hierarchical extracts, you can better cover the internal HA-DPKG and improve your overall experience in this popular wallet.

Leave a Reply
Want to join the discussion?Feel free to contribute!