Post
Topic
Board Electrum
Re: Using six sided dice to generate 12 random words from electrum wordlist
by
btchris
on 01/12/2014, 19:13:08 UTC

As the redditor eventually figured out, it's vulnerable to modulo bias (even after the improvement, albeit less so). Using a truncated SHA-256 of enough truly random data (e.g. 50 dice rolls or a deck of cards (at least the first 25 cards cards of a very well shuffled deck)) as the initial seed would eliminate any bias (at least any predictable bias, so long as SHA-256 isn't broken, and if it were there'd be much bigger Bitcoin problems).

More concretely, I'd do this (25+ cards seem easier to me than 50+ dice rolls, but pick your poison...)

  1. Shuffle a deck of cards very well.
  2. Record at least the first 25 cards in the deck, e.g. if the first three are king of spades, 9 of diamonds, and ten of hearts, you'd have: ks9dth
  3. Plug your random data into this one-liner in Linux (assuming you have Electrum installed):

Code:
python /usr/local/lib/python2.7/dist-packages/electrum/mnemonic.py `echo ks9dthac3d7d4s... | sha256sum | cut -c1-32`