Coin.Community - Address Generation: Difference between revisions

From Coin Community Wiki
Jump to navigation Jump to search
(Created page with "'''While we try to use best practices to generate secure keys there is always the possibility of error. For this reason we do not sell funded coins and do not recommend you fu...")
 
No edit summary
 
Line 2: Line 2:


Keys used in the assembled Coin.Community coins are generated on a dedicated offline laptop running liveboot linux. The python script below is used to generate the mini-key formatted keys. They are then printed on a laser printer and placed under the tamper evident holograms as soon as possible.
Keys used in the assembled Coin.Community coins are generated on a dedicated offline laptop running liveboot linux. The python script below is used to generate the mini-key formatted keys. They are then printed on a laser printer and placed under the tamper evident holograms as soon as possible.
import hashlib
from binascii import hexlify as hx
import random
rand = random.SystemRandom()
B58_ALPHA = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
def sha256(s):
    return hashlib.sha256(s).digest()
def gen_candidate():
    candidate = "S"
    for i in xrange(29):
        candidate = candidate + rand.choice(B58_ALPHA)
    return candidate
def test_candidate(candidate):
    return sha256(candidate + "?")[0] == chr(0)
while True:
    c = gen_candidate()
    if test_candidate(c):
        print c, hx(sha256(c))

Latest revision as of 23:39, 14 April 2019

While we try to use best practices to generate secure keys there is always the possibility of error. For this reason we do not sell funded coins and do not recommend you fund our coins.

Keys used in the assembled Coin.Community coins are generated on a dedicated offline laptop running liveboot linux. The python script below is used to generate the mini-key formatted keys. They are then printed on a laser printer and placed under the tamper evident holograms as soon as possible.

import hashlib
from binascii import hexlify as hx
import random
rand = random.SystemRandom()

B58_ALPHA = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"

def sha256(s):
    return hashlib.sha256(s).digest()

def gen_candidate():
    candidate = "S"
    for i in xrange(29):
        candidate = candidate + rand.choice(B58_ALPHA)
    return candidate

def test_candidate(candidate):
    return sha256(candidate + "?")[0] == chr(0)

while True:
    c = gen_candidate()
    if test_candidate(c):
        print c, hx(sha256(c))