0

Here are codes in function bytes_to_words():

w[0] = SWAP32LE(*(const uint32_t*)(src + (i * 4)));
w[1] = w[0] % word_list_length;
...
words += word_list[w[1]];

Then I try a case whose mnemonics are:

gesture mouth bids aglow tudor bawled insult listen jewels sugar calamity alley obvious sovereign jubilee legion oyster gumball using payment gumball giving sedan splendid giving

And the Seed should be:

688b988f7de513383daa61f282807fe5aabe71a639aa58b9cb6beab6f5f80a0c

I'd like to generate first mnemonics "gesture" with seed above so I calculate 688b988f mod 1626 and get 1441 which is not right index of wordlist...

Is there anything wrong with the process?

Mooooo
  • 459
  • 2
  • 8

1 Answers1

2

Example, taking your seed number:

688b988f7de513383daa61f282807fe5aabe71a639aa58b9cb6beab6f5f80a0c

Then byte swapped (and split):

8f988b68 3813e57d f261aa3d e57f8082 a671beaa b958aa39 b6ea6bcb 0c0af8f5

The first 4 bytes are:

8f988b68

Which as decimal is:

2409139048

Then:

2409139048 mod 1626 = 538 = words[538] = gesture

Which (following on from this question), is the first of the 3 words (gesture, mouth, bids), generated from the 4 bytes 8f988b68.

jtgrassie
  • 19,111
  • 4
  • 14
  • 51