Bitcoin Forum
May 10, 2024, 05:09:02 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: generate last word in 24 word seed key  (Read 117 times)
someloser (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
August 10, 2023, 12:45:13 AM
Last edit: August 11, 2023, 05:35:10 PM by someloser
 #1

ti-84 calculator to generate 24 random words and python & vs code (offline) to output 8 last word options, picking one of those at random with dice.
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715360942
Hero Member
*
Offline Offline

Posts: 1715360942

View Profile Personal Message (Offline)

Ignore
1715360942
Reply with quote  #2

1715360942
Report to moderator
1715360942
Hero Member
*
Offline Offline

Posts: 1715360942

View Profile Personal Message (Offline)

Ignore
1715360942
Reply with quote  #2

1715360942
Report to moderator
1715360942
Hero Member
*
Offline Offline

Posts: 1715360942

View Profile Personal Message (Offline)

Ignore
1715360942
Reply with quote  #2

1715360942
Report to moderator
un_rank
Hero Member
*****
Offline Offline

Activity: 714
Merit: 685


- Jay -


View Profile WWW
August 10, 2023, 01:37:48 PM
 #2

I am not the best with javascript and cannot be of much help. But is there any exact reason for why you want to generate your own seed, especially if you are not particularly sure of how to go about it?

I consider it safer to have it generated on an open source, reputable wallet software lik bitcoincore, than to attempt to do it directly. Also there is no significant added security if you go for 24 words over 12, both are technically impossible to break.

- Jay -

██████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██████████████████████
.SHUFFLE.COM..███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
█████████████████████
████████████████████
██████████████████████
████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
██████████████████████
██████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
.
...Next Generation Crypto Casino...
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10558



View Profile
August 10, 2023, 02:00:53 PM
Merited by vapourminer (2), hosseinimr93 (2), ABCbits (1)
 #3

This is not how we generate a seed phrase, we don't pick words then brute force the last one to have a correct checksum. Instead we generate a fixed length entropy and compute the checksum on that, then encode the whole thing into words.

If you want to see how it's done and use the source code that is already available, check out the BIPs page. It has 4 implementation in JavaScript that you can use: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#other-implementations

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

Activity: 3444
Merit: 10558



View Profile
August 11, 2023, 03:53:49 AM
 #4

@pooya87
Is that what I'm doing, picking words then brute force? According to the article I posted, I am randomly generating 24 words using my scientific calculator ti-84, then generating the last word with the entropy from the 24 words and validating the checksum.
Maybe I'm misunderstanding the code you posted since I can't tell if after computing "cs" it is replacing the whole word or just the extra bits.
Basically when you generate words like this you are generating 11 bits at a time so your last word is also 11 "generated" bits but the last word in a BIP39 mnemonic is partly the checksum and partly the generated bits so the extra bits you generated should be discarded or changed.
If you keep randomly selecting the last word then validating the checksum until you get a correct sequence, that is brute forcing. Otherwise if you are discarding the extra bits and replacing them with checksum, it is not.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!