Bitcoin Forum
February 17, 2020, 10:45:53 AM *
News: Latest Bitcoin Core release: 0.19.0.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: HOWTO GUIDE: Generating New Spork Keys  (Read 187 times)
marshalljp
Copper Member
Jr. Member
*
Offline Offline

Activity: 42
Merit: 1


View Profile
May 07, 2019, 03:05:50 PM
 #1

Since there was so many questions on how to generate spork keys here is my guide. I can't promise everything is entirely accurate but this is what worked for me:

Some friendly links:
http://lenschulwitz.com/base58
http://www.fileformat.info/tool/hash.htm
https://en.bitcoin.it/wiki/Wallet_import_format

Important: If you are going to change the prefixes for your coin, make sure to do that before this. Otherwise you will break things after you change prefixes

Use following command to generate ESCDA key. If final spork key is not a digit as first character of output it’s wrong from my testing.

openssl ecparam -genkey -name secp256k1 -text -noout -outform DER | xxd -p -c 1000 | sed 's/41534e31204f49443a20736563703235366b310a30740201010420/PrivKey: /' | sed 's/a00706052b8104000aa144034200/\'$'\nPubKey: /'

--- SAMPLE - DO NOT USE ---
PrivKey: 11265dcc6d5e26dbabfac9699540e38e7ca6aad8842891d3e6322ea9ab2cbb55
PubKey: 04ae5f52611fc9f3dcd3f2db88ad4a9b10ab218389cacd1ed07cc893af6ad2f3e6618090edb5403 8e5a26d2c6d04db4a6c901a8bf52a72fef484f478519fdf0b02
--- SAMPLE - DO NOT USE ---

1 - Take a private key:
11265dcc6d5e26dbabfac9699540e38e7ca6aad8842891d3e6322ea9ab2cbb55

2. Add a 0xef byte in front of it for testnet addresses or 0x80 for mainnet addresses. If you change these bytes in the chainparams.cpp, you have to use the changed bytes here.
Mainnet: 8011265dcc6d5e26dbabfac9699540e38e7ca6aad8842891d3e6322ea9ab2cbb55
Testnet: ef11265dcc6d5e26dbabfac9699540e38e7ca6aad8842891d3e6322ea9ab2cbb55

3 - Perform SHA-256 binary hash on the extended key - I used this tool: http://www.fileformat.info/tool/hash.htm
Mainnet: 9b861c61c65dd712d4ce27949e7a277626b2d8146f07b28144177b7fb188c300
Testnet: f7bcbbf85aa39c1568a24e1be8b7a0710a62742340a45cc239026069ced15901

4 - Perform SHA-256 hash on result of SHA-256 binary hash from step 3.
Mainnet: 1830fee682b46641133e8866a846093ec671714cf82e721500ff5bca00b3173c
Testnet: 12c046617eb7b3725c478f454c77a37c814a0147d6f55c57fd617d42bebe4606

5 - Take the first 4 bytes of the second SHA-256 hash, this is the checksum
Mainnet: 1830fee6
Testnet: 12c04661

6 - Add the 4 checksum bytes from step 5 at the end of the extended key from point 2
Mainnet: 8011265dcc6d5e26dbabfac9699540e38e7ca6aad8842891d3e6322ea9ab2cbb551830fee6
Testnet: ef11265dcc6d5e26dbabfac9699540e38e7ca6aad8842891d3e6322ea9ab2cbb5512c04661

7. Encode to base58 - http://lenschulwitz.com/base58

--- SAMPLE SPORK KEYS - DO NOT USE ---
Mainnet: 5HwqemD1riinKNfSeXoeQnbwCBLDrea7BXJ1BtBfYbYvSV9C9df
Testnet: 91iUEW2ZSwnvHSAjGshZHP9tqqgw1p7JXU9xGWYAtLHyDWcAPMA
--- SAMPLE SPORK KEYS - DO NOT USE ---

8. Shameless self promotion:
Check out the Historia project
https://bitcointalk.org/index.php?topic=5010022.80
https://historia.network



1581936353
Hero Member
*
Offline Offline

Posts: 1581936353

View Profile Personal Message (Offline)

Ignore
1581936353
Reply with quote  #2

1581936353
Report to moderator
1581936353
Hero Member
*
Offline Offline

Posts: 1581936353

View Profile Personal Message (Offline)

Ignore
1581936353
Reply with quote  #2

1581936353
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1581936353
Hero Member
*
Offline Offline

Posts: 1581936353

View Profile Personal Message (Offline)

Ignore
1581936353
Reply with quote  #2

1581936353
Report to moderator
heal
Member
**
Offline Offline

Activity: 176
Merit: 10


View Profile WWW
May 12, 2019, 02:00:59 PM
 #2

Is not necessary convert the PUBkey to WIF format?
heal
Member
**
Offline Offline

Activity: 176
Merit: 10


View Profile WWW
May 12, 2019, 02:51:56 PM
Last edit: May 12, 2019, 04:43:26 PM by heal
 #3

Works for me thx
but how to encode to base58 with another prefix?
flyx
Full Member
***
Offline Offline

Activity: 313
Merit: 100


>>I am student at school<<


View Profile
February 03, 2020, 04:35:55 PM
 #4



Code:
openssl ecparam -genkey -name secp256k1 -text -noout -outform DER | xxd -p -c 1000 | sed 's/41534e31204f49443a20736563703235366b310a30740201010420/PrivKey: /' | sed 's/a00706052b8104000aa144034200/\'$'\nPubKey: /'



What are ### ? are them come from alert.hex  ? or where

openssl ecparam -genkey -name secp256k1 -text -noout -outform DER | xxd -p -c 1000 | sed 's/###########/PrivKey: /' | sed 's/###########/\'$'\nPubKey: /'


I'm a student .. interested to coding .. I study and work at small shop to make little money for college
 -- I'll appreciate if you can help me to pay for college , Thanks guys --

BTC: 1Ck5CzQb15QWw6BnzQ7PeQaQtecsdRFft2      Qtum: Qfep6Wc6FXZVXhqFD1eZwdU9Q3pU2Funve
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!