Bitcoin Forum
May 12, 2024, 06:21:17 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can create a new pszMainKey? (alert key)  (Read 230 times)
Many Coins (OP)
Member
**
Offline Offline

Activity: 266
Merit: 11

Lord Shiva


View Profile
February 13, 2018, 04:38:17 PM
Merited by DannyHamilton (2), ABCbits (1)
 #1

Hello!

How can I create a new pszMainKey on Bitcoin Core 0.8?

Code:
static const char* pszMainKey = "04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284";

on Ubuntu 16.04 for example

Thank you.
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
February 13, 2018, 07:09:08 PM
Merited by ABCbits (2), DannyHamilton (1)
 #2

Install openssl and run this command:

Code:
openssl genpkey -algorithm ec -outform der -pkeyopt ec_paramgen_curve:secp256k1 -text

You should get output that looks like this:
Code:
priv:
    7a:b0:fa:87:78:00:2e:01:cb:03:d2:c3:3a:89:e7:
    e2:1e:b2:06:e8:cc:4f:04:2f:26:d1:96:d0:92:4a:
    32:2a
pub:
    04:29:ff:48:50:d3:3f:2c:a4:0d:fb:86:12:f4:5c:
    fc:d2:92:58:ca:01:38:12:8f:25:90:17:23:d8:ad:
    6e:66:b4:ce:87:ea:9c:1a:93:ed:22:87:ef:a9:b4:
    4d:92:45:39:87:26:84:93:7b:db:2c:75:9f:29:10:
    a1:cd:4c:0e:32
Field Type: prime-field
Prime:
    00:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
    ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:fe:ff:
    ff:fc:2f
A:    0
B:    7 (0x7)
Generator (uncompressed):
    04:79:be:66:7e:f9:dc:bb:ac:55:a0:62:95:ce:87:
    0b:07:02:9b:fc:db:2d:ce:28:d9:59:f2:81:5b:16:
    f8:17:98:48:3a:da:77:26:a3:c4:65:5d:a4:fb:fc:
    0e:11:08:a8:fd:17:b4:48:a6:85:54:19:9c:47:d0:
    8f:fb:10:d4:b8
Order:
    00:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
    ff:fe:ba:ae:dc:e6:af:48:a0:3b:bf:d2:5e:8c:d0:
    36:41:41
Cofactor:  1 (0x1)

The hex under pub is what you put for pszMainKey. The hex under priv is the private key. Keep that somewhere safe. When you enter the hex, make sure you remove the colons (Smiley and the line breaks.



Note that the alert system has a number of DoS vulnerabilities and was removed from Bitcoin.

Many Coins (OP)
Member
**
Offline Offline

Activity: 266
Merit: 11

Lord Shiva


View Profile
February 13, 2018, 07:21:31 PM
 #3

Install openssl and run this command:

Code:
openssl genpkey -algorithm ec -outform der -pkeyopt ec_paramgen_curve:secp256k1 -text

....



Note that the alert system has a number of DoS vulnerabilities and was removed from Bitcoin.

WOW! It's working! Thank you!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!