I'll give you some Python code critiques first:
-
import time is not used
-You have mixed tab and space indents. You should pick one, four spaces is preferred.
-YouHaveCamelCase defs and variables. Both should be lower case.
-Lines too long, 80 is PEP8, 120 is tolerable.
-Inconsistent white space, compare line 45 (OK) to 85 (none)
Then some Pythonic tips:
-Your programmatically seem to be fishing for how many balls/rolls should be entered, the exact number required to exceed N (Secp256k1 max) is:
rolls = int(math.ceil(math.log(N, base)))-I was going to say to use
base64 = 'ABCD...'; list(base64) to make the same list, but it looks like you don't even need to make it a list, a string will do just fine for your existing indexing. It might be easier for you to just use base64 builtin functions though -
http://docs.python.org/2/library/base64.htmlAnd hey, I
made one too...
**Dice to Bitcoin private key generator**
>How many sides on your dice?:75
Need 42 rolls of 75-sided dice. (261.610385001 bits)
Number of dice rolls so far: 0, need 42 more.
Input some dice rolling results,separated by spaces:)
>g
Generating random *insecure* dice rolls for remainder
dice used:
[7, 36, 73, 35, 68, 45, 1, 32, 72, 61, 71, 38, 14, 63, 7]
[21, 42, 47, 4, 72, 16, 25, 38, 73, 16, 9, 9, 46, 5, 61]
[14, 13, 72, 19, 38, 31, 48, 20, 32, 53]
====== Generated Address Information ============
Bitcoin Address:
1JumBSm2g8RTJCqB5uRHAJtb4H6EoA4wju
Private Key (Wallet Import Format):
5HxBYZeFgp2mZZ1UboHqfuz3er9NjvYSpYUm5FEZh9EwJmgtVko
Private Key (Hexadecimal 64 char) :
11edbc7fd8e518efa64622839ecb167b7d530f9f1fab9e94a2d1c234de8ac842
Public Key (Full 130 character):
042fd723ba3185607230be41ddcd1c5fbf1dbca2b2fad4edd5e677174c4e7f99135f3b3298ef0c4
45c64091770600adb9b3da2f0d905cb74182e79623a6c2f3dc8
---------
Bitcoin Address (Compressed):
17Gh5qrLfhhVctNSUJCqhHb5YDZLGLJHC7
Private Key (Wallet Import Format Compressed):
KwpZYK5RpiaoggH6pbKKpkrni3uxxTKnxqwXXjpsJBNWgxYLwjtE
Public Key (Compressed):
022fd723ba3185607230be41ddcd1c5fbf1dbca2b2fad4edd5e677174c4e7f9913
===================================================
(Press "Enter" for more dice keys, "C" and "Enter" to close.)