pockets – Producing bitoin personal key and public key(like paper walle) with out trusting third occasion

0
91


You are going to should belief some program, similar to your working system. As much as you the place you find yourself drawing the road however I’ve two options, use bitcoin core (with out downloading blockchain), or use python with simply the binascii, hashlib and base58 libraries.

Bitcoin Core technique:

I might say if you need a key pair with the least quantity of belief obtain bitcoin core and whereas it is nonetheless syncing you’ll be able to go to Window->Console after which kind within the instructions:

getnewaddress
It’ll output a bitcoin deal with.

Then to get the personal key use dumpprivkey

dumpprivkey 3SomeBTCAddress...

Save the output. Then you’ll be able to shut every part down earlier than your PC has to obtain the entire blockchain.

====

Python and 16-sided die technique:

You should utilize a 16-sided cube to create a 64 size lengthy hexadecimal string that may be transformed to a WIF personal key. Roll the 16 sided die 64 instances, convert (10 – 16) to (a – f).

import hashlib, binascii, base58

dicerolls = "0123456789abcdef000000000000000000000000000000000000000000000001"

pkeyvbytes = "80"+dicerolls

firsthash = hashlib.sha256(binascii.unhexlify(pkeyvbytes)).hexdigest()

secondhash = hashlib.sha256(binascii.unhexlify(firsthash)).hexdigest()

createkey = pkeyvbytes+secondhash[:8]

WIF = base58.b58encode(binascii.unhexlify(createkey))

print(WIF)

LEAVE A REPLY

Please enter your comment!
Please enter your name here