Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: victorkimba17 on May 25, 2018, 06:36:44 AM



Title: Generate public key for mining genesis block
Post by: victorkimba17 on May 25, 2018, 06:36:44 AM
in chainparams.cpp, a public key is used to mine genesis block:

Code:
048E794284AD7E4D776919BDA05CDD38447D89B436BDAF5F65EBE9D7AD3A0B084908B88162BB60B1AA5ED6542063A30FC9584A335F656A54CD9F66D6C742B67F55

How to generate similar public key using ecdsa library ?


Title: Re: Generate public key for mining genesis block
Post by: victorkimba17 on May 25, 2018, 06:53:20 AM
found a helpful link

https://bitcoin.stackexchange.com/questions/59644/how-do-these-openssl-commands-create-a-bitcoin-private-key-from-a-ecdsa-keypair/59646#59646


Title: Re: Generate public key for mining genesis block
Post by: seo.sapota4 on May 29, 2018, 12:26:19 PM
in chainparams.cpp, a public key is used to mine genesis block:

Code:
048E794284AD7E4D776919BDA05CDD38447D89B436BDAF5F65EBE9D7AD3A0B084908B88162BB60B1AA5ED6542063A30FC9584A335F656A54CD9F66D6C742B67F55

How to generate similar public key using ecdsa library ?


echo "Generating BitCoin private key"
openssl ec -in $PRIVATE_KEY -outform DER|tail -c +8|head -c 32|xxd -p -c 32 > $BITCOIN_PRIVATE_KEY