Ethereum: How Determinist Wallets generate Keys
Determist wallets are an Ethereum wallet that allows users to safely store and manage their private keys. One of the main features of the deterministic wallets is how they generate new addresses for each transaction, as well as how many keys they use.
In this article, we will look at how deterministic purses know how many keys to generate a wallet file in case of loss or recovery.
How do deterministic wallets work
A deterministic purse uses a combination of public and private keys to manage its assets. The main generation process of each transaction is as follows:
1
Initial key generation : When the user creates a new wallet, it generates the original key set (such as a private key and address) used to sign the transactions.
- Generation of the transaction address : For each transaction, the safe uses its own public key to generate a new address. This address is not always unique; Several addresses may have the same private key.
3
The main derivative function (KDF) : To add an additional security layer, the wallet uses the main derivative function (KDF) to combine public and private keys with other data. Ethereum used KDF is called KECCAK-256 with a fixed salt value.
Determinist wallets: How are the keys generated
Determinist wallets use a combination of algorithms and techniques to generate new keys for each transaction, including:
1
Random Generation : Random Number Generator (RNG) is used to generate additional entropy, which is combined with existing keys using the KDF.
- Main expansion : RNG generated entropy is then used to expand the public and private key kit. This enlargement process ensures that multiple addresses can have the same private key.
Wallet File Loss or Recovery
When the user loses their wallet file, they may not have access to it. However, they can restore their wallet from backups. In this scenario, wallet KDF is used to restore new keys to each transaction.
The main generation process of deterministic purses is related to:
1
KDF Re -initialization
: The safe re -initializes his KDF with a fixed salt value and generates a new set of public and private keys.
- Entropy generation : New RNG is used to generate additional entropy, combined with existing keys using KDF.
3
Generation of the address : The safe uses his or her public key to generate a new address for each transaction.
Determinist wallets: How many key is generated
In case of loss or recovery of the wallet file, deterministic purses generate a new address set for each transaction already generated. This ensures that all transactions are taken into account and, if necessary, can be recovered.
For example, let’s say the user creates 10,000 new addresses in 10,000 transactions using their deterministic purse. In case of loss or recovery of the wallet file, the wallet will generate new addresses for each transaction already generated.
In conclusion, deterministic wallets use a combination of algorithms and techniques to generate new keys to each transaction, including random generation, key expansion and re -initialization of the KDF. When the user loses their wallet file, they can restore it from backups, and the wallet will restore new keys to all transactions already generated.
Example of use of use
The user creates a deterministic wallet with 10,000 new addresses in 10,000 transactions. The macrals are stored on an external device or hard drive. Wallet file in case of loss or recovery:
- The purse re -initializes your KDF with a fixed salt value.
- New RNG is used to generate additional entropy for all existing keys.
3.