Trying to understand how old @ElectrumWallet seeds were encoded.
What's going on here?
The only part that i get is that it transfroms x in base16.
https://github.com/spesmilo/electrum/blob/1.9.8/lib/mnemonic.py#L1659
Trying to understand how old @ElectrumWallet seeds were encoded.
What's going on here?
The only part that i get is that it transfroms x in base16.
https://github.com/spesmilo/electrum/blob/1.9.8/lib/mnemonic.py#L1659
Takes each sequential 8 letter chunk of the message, converts it to base 16 (hexadecimal), from that hex it derives a number identifying one of the words from the wordlist (takes the value or the hex mod 1626), then derives 2 more words deterministically. All three words are used
Inspired by United States Patent 5892470
# Abstract:
A computer-based method and system for encoding a number as a sequence of words. The system has a table of words from which the words in the sequence are selected. Each word in the table has an index. To encode the number, the system first calculates an integer quotient of the number divided by a count of the words in the table and calculates a remainder of the number divided by the count of the words in the table. The system then repeats the following until the integer quotient is zero. The system selects the word in the table that is indexed by the remainder. The system then adds that word to the sequence. The system then calculates a new remainder of the integer quotient divided by the count of the words in the table and calculates a new integer quotient of the integer quotient divided by the count of the words in the table. The sequence of the words when complete represents the encoding of the number. The present invention also provides a computer-based method and system for decoding an encoding of a number to determine the number represented by the encoding. The system initializes the number to zero. The system then repeats the following for each word in the encoding. The system determines the index of the word in the table of words. The system multiplies the number by the count of words in the table. The system then adds the determined index to the number. When the process is complete, the number contains the value represented by the encoding.
Thanks buddy.