Ethereum: BIP39 Calculation of a handbag phrase – how is several control amounts worth?
Introduction
Mnemonic phrases are a key component of the Ethereum public key, allowing consumers to safely manage their personal keys and achieve funds. The BIP39 Standard (Bitcoin Improvement Offer 39) provides mnemon phrases that can be used to obtain many control quantities to generate a system, ensuring safe storage and transfer of mismatched information.
Quantity Control Generation
BIP39 Each word posfraze is associated with a certain value of control value. The value of this control quantity is generated using a valid bag function that takes into account the previous management value to create another. The process includes:
- Initiation : The first 12 words POSFRASE is used as the original amount of control.
2.
3.
Calculation of several control amounts
To show how a few controls work, let’s consider the example of Passphzraze: Hello World Bitcoin (12 words). If we divide 2048. A list of words in groups of 16 words, receiving 32 groups:
| Group | Words |
| — | — |
| 1 | H l e w o r l d b i t c o n t |
| 2 | … | | | | | | | | | |
| 3 | … | | | | | | | | | |
Each group of group calculated management amount **
For each group we will calculate the values of the control quantity using a valid hash feature:
- Group 1 : Initial Verification amount
2.
- Group 3 : Update the management amount from the previous 4 values and connect the password “L”
Using a programming language such as “Python”, we can mimic the function of rolling bags to calculate the control quantities of each group:
`Python
Import the hashlib
DEF GERTERATE_checkxum (Word List):
Initialize the amount of control with the original word list
Control = B ”
Calculate each amount of group control
I am in the range (0, Len (Wordlist), 16):
Group_words = Wordlist [I: I+16]
Upgrade the value of the control quantity using a valid hash function
New_checkcum = hashlib.rollsum (Group_words)
Connect a new check amount with password and add the previous 4 values
Checkcums += hashlib.sha1 (New_checkxum) .digest () [: 4]
The amount of control control
Generate the control quantities of each group
Wordlist = B’hell World Bitcoin’.encode ()
Checkscsums = Generates_checkxum (Wordlist)
Print (control quantities)
``
Publishing Sample
Starting the upper code will provide a list of 32 control values that can be combined with passwords to get several valid Ethereum public keys.
In conclusion, it is very important to understand how a few controls do BIP39 to understand the safe generation of Mnemon phrases. By calculating the value of each group of controls, we can ensure that our Mnemon phrases can be used to obtain multiple valid public keys of Ethereum, providing an additional security layer from the illegal approach not -renamed information.