AussieHash
|
|
August 18, 2014, 07:19:04 AM Last edit: August 18, 2014, 08:12:40 AM by AussieHash |
|
I just finished setting up my trezor wallet. While copying down the seed I noticed that one of my seed words came up twice in the seed of 24 words. Is this normal? should I wipe the trezor and make a new seed?
If it works like electrum, then it shouldn't matter, there isn't a 1:1 correlation between words from that list and the hexadecimal seed, ie : if your seed were [abandon, ability, able, abandon, ability, able, abandon, ability, able] your seed would not be 010203010203010203 https://github.com/bitcoin/bips/blob/master/bip-0039/english.txtHaving said that ... maybe BIP39 generates the mnemonic from entropy, and then the hexadecimal seed from that. https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#Generating_the_mnemonicElectrum does it in reverse, the mnemonic is just a "human readable form" of the hexadecimal seed. Edit : electrum's seed routines still confuse the heck out of me NOTE: Below I am talking about electrum's native mnemonic seed, this is a separate scheme to the Trezor routines that are used by the trezor plugin https://github.com/spesmilo/electrum/blob/master/lib/mnemonic.py#L1656# Note about US patent no 5892470: Here each word does not represent a given digit. # Instead, the digit represented by a word is variable, it depends on the previous word.
def mn_encode( message ): assert len(message) % 8 == 0 out = [] for i in range(len(message)/8): word = message[8*i:8*i+8] x = int(word, 16) w1 = (x%n) w2 = ((x/n) + w1)%n w3 = ((x/n/n) + w2)%n out += [ words[w1], words[w2], words[w3] ] return out >> import electrum >> electrum.mnemonic.mn_encode('01010101010101010101010101010101') ['mystery', 'trade', 'bench', 'mystery', 'trade', 'bench', 'mystery', 'trade', 'bench', 'mystery', 'trade', 'bench'] >> electrum.mnemonic.mn_encode('00000000000000000000000000000000') ['like', 'like', 'like', 'like', 'like', 'like', 'like', 'like', 'like', 'like', 'like', 'like'] >> electrum.mnemonic.mn_encode('0000010000000101000000010101000000000000') ['almost', 'almost', 'almost', 'sorry', 'sorry', 'sorry', 'just', 'just', 'just', 'test', 'yesterday', 'bowl', 'like', 'like', 'like'] >> electrum.mnemonic.mn_encode('000001000000010100000001010100000000000001000000000000000000000') ['almost', 'almost', 'almost', 'sorry', 'sorry', 'sorry', 'just', 'just', 'just', 'test', 'yesterday', 'bowl', 'like', 'like', 'like', 'white', 'metal', 'beside', 'like', 'like', 'like'] >> electrum.mnemonic.mn_encode('01000000000000000000000000000000') ['white', 'metal', 'beside', 'like', 'like', 'like', 'like', 'like', 'like', 'like', 'like', 'like'] >> electrum.mnemonic.mn_encode('010203010203010203010203010203010203010203010203') ^^^^^^^^^^^^^^^^^^^^^^^^ ['child', 'shock', 'admit', 'less', 'hand', 'ever', 'beaten', 'violence', 'depend', 'child', 'shock', 'admit', 'less', 'hand', 'ever', 'beaten', 'violence', 'depend'] >> >> electrum.mnemonic.mn_decode(['like', 'like', 'like', 'like']) '00000000' >> electrum.mnemonic.mn_decode(['like', 'just', 'love', 'like', 'just', 'love','like', 'just', 'love','like', 'just', 'love']) '00285dfe00285dfe00285dfe00285dfe' ^^^^^^^^ ^^^^^^^^ >> electrum.mnemonic.mn_decode(['like', 'just', 'like', 'like', 'like', 'like','like', 'just', 'love','like', 'just', 'like', 'like', 'like', 'like']) '10014565e0000000000285dfe10014565e00000000' >> electrum.mnemonic.mn_decode(['just', 'just', 'just', 'just', 'just', 'just','just', 'just', 'just','just', 'just', 'just']) '00000001000000010000000100000001' >>
|