Bitcoin Forum
May 10, 2024, 06:30:31 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Create a bip39 seed manually as it says Antonopoulos in "Mastering Bitcoin"  (Read 259 times)
il (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 04, 2018, 08:40:43 AM
 #1

Hi guys  Smiley,

I am trying to create a bip39 Mnemonic Code Words (seed) manually as explained by Antonolopulos in his book "Mastering Bitcoin" but I do not get the same results in the examples given.

Could someone from the forum explain it with more detailed steps?

https://www.dropbox.com/s/1w6mw8r0wl48y2n/Sin%20t%C3%ADtulo.png?dl=0

Thank you
1715322631
Hero Member
*
Offline Offline

Posts: 1715322631

View Profile Personal Message (Offline)

Ignore
1715322631
Reply with quote  #2

1715322631
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715322631
Hero Member
*
Offline Offline

Posts: 1715322631

View Profile Personal Message (Offline)

Ignore
1715322631
Reply with quote  #2

1715322631
Report to moderator
1715322631
Hero Member
*
Offline Offline

Posts: 1715322631

View Profile Personal Message (Offline)

Ignore
1715322631
Reply with quote  #2

1715322631
Report to moderator
1715322631
Hero Member
*
Offline Offline

Posts: 1715322631

View Profile Personal Message (Offline)

Ignore
1715322631
Reply with quote  #2

1715322631
Report to moderator
Pmalek
Legendary
*
Offline Offline

Activity: 2758
Merit: 7137



View Profile
December 04, 2018, 09:22:01 AM
 #2

You can try with the easyseed(1) utility that nullius created. Maybe that can help you further.
https://bitcointalk.org/index.php?topic=2664861.0

Edit: Have a look here as well.
https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#generating-the-mnemonic

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
December 04, 2018, 02:36:37 PM
 #3

What steps have you run and where isn’t it matching is probably a good place to start.

The others don’t seem to have noticed you referenced the book and sent an image through of it.
il (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 04, 2018, 05:31:01 PM
Last edit: December 05, 2018, 05:37:20 PM by il
 #4

Hi

Quote
You can try with the easyseed(1) utility that nullius created. Maybe that can help you further.
https://bitcointalk.org/index.php?topic=2664861.0
I don´t want any utility or program computer. If that were the case, I would not need it either, since I have both Trezor and Ledger and also this handy link:
https://iancoleman.io/bip39/


Quote
I did not know this page but basically it's the same information that I contribute in the image


Anyway, thanks to both of you  Smiley


What I want is to know the doubts that are generated when applying these steps

EXAMPLE:

Table 4-7: 256-bit entropy mnemonic code and resulting seed
Entropy input (256 bits):  2041546864449caff939d32d574753fe684d3c947c3346713dd8423e74abcf8c
Mnemonic (24 words): cake apple borrow silk endorse fitness top denial coil riot stay wolf luggage oxygen faint major edit measure invite love trap field dilemma oblige
Seed (512 bits): 3972e432e99040f75ebe13a660110c3e29d131a2c808c7ee5f1631d0a977fcf473bee22fce540af 281bf7cdeade0dd2c1c795bd02f1e4049e205a0158906c343

ENT = 256 bits
CS = 8 bits
ENT + CS = 264 bits
MS = 24 bits



Step 1: Create a random sequence (entropy) of 128 to 256 bits.

Random secuence or entropy input (256 bits)

binary format (I can get it fliping a coin)
0010000001000001010101000110100001100100010001001001110010101111111110010011100 1110100110010110101010111010001110101001111111110011010000100110100111100100101 0001111100001100110100011001110001001111011101100001000010001111100111010010101 0111100111110001100
(in this case I have used  the example's value and I have converted it to binary)

Same entropy input (256 bits) hexadecimal format:
2041546864449caff939d32d574753fe684d3c947c3346713dd8423e74abcf8c



Step 2: Create a checksum of the random sequence by taking the first few bits of its SHA256 hash

Doubt: I don't know how to get the cheksum

SHA256 of what? I must apply SHA256 to entropy input in binary format or hexadecimal format? If hexadecimal, in uppercase or lowercase? The results are different
If the case, convert the result, whatever it is, to binary format to obtain the first 8 digits in 0 and 1?
I don't know how to get it, but as the last word is oblige so we know that the result is: 11000001



Step 3: Add the checksum to the end of the random sequence.

random sequence  +  checksum
0010000001000001010101000110100001100100010001001001110010101111111110010011100 1110100110010110101010111010001110101001111111110011010000100110100111100100101 0001111100001100110100011001110001001111011101100001000010001111100111010010101 0111100111110001100    +    11000001


Step 4: Divide the sequence into sections of 11 bits, using those to index a dictionary of 2048 predefined words.

binary        decimal      seed           nº in wordlist
              (0,1,2,...)                 (1,2.3,...)

00100000010   258          cake           259
00001010101   85           apple          86
00011010000   208          borrow         209
11001000100   1604         silk           1605
01001001110   590          endorse        591
01010111111   703          fitness        704
11100100111   1831         top            1832
00111010011   467          denial         468
00101101010   362          coil           363
10111010001   1489         riot           1490
11010100111   1703         stay           1704
11111100110   2022         wolf           2023
10000100110   1062         luggage        1063
10011110010   1266         oxygen         1267
01010001111   655          faint          656
10000110011   1075         major          1076
01000110011   563          edit           564
10001001111   1103         measure        1104
01110110000   944          invite         945
10000100011   1059         love           1060
11100111010   1850         trap           1851
01010101111   687          field          688
00111110001   497          dilemma        498
10011000001   1217         oblige         1218




Thanks very much  Smiley
    
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
December 04, 2018, 08:48:29 PM
Merited by suchmoon (4)
 #5

You'll notice the numbers are out by "1"...

It's because in binary, the index numbers that are possible for an 11 bit sequence are actually 0-2047 (00000000000 to 11111111111)... but in the wordlist shown on github... the "index" numbers are displayed as 1-2048... simply because most people count from 1. Wink

So... to get from your calculated decimal value to the "correct" value in the github wordlist... you will need to add 1.

00100000010 -> 258 -> +1 -> github index: 259 -> cake

Likewise, when going from the github wordlist index... back to binary, you need to subtract 1... then convert that decimal number to binary...

cake -> github index: 259 -> -1 -> 258 -> 00100000010

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
il (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 04, 2018, 09:00:49 PM
 #6

Quote
It's because in binary, the index numbers that are possible for an 11 bit sequence are actually 0-2047 (00000000000 to 11111111111)... but in the wordlist shown on github... the "index" numbers are displayed as 1-2048... simply because most people count from 1. Wink

I imagined something like that.
Thanks  Smiley

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!