Bitcoin Forum
September 27, 2018, 10:33:23 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How to get public key and scriptPubKey and scriptSig from private key?  (Read 1332 times)
widewave
Newbie
*
Offline Offline

Activity: 25
Merit: 0


View Profile
January 02, 2014, 02:48:12 PM
 #1

Who can give me some clue in bitcoin code?
Thank you!
1538087603
Hero Member
*
Offline Offline

Posts: 1538087603

View Profile Personal Message (Offline)

Ignore
1538087603
Reply with quote  #2

1538087603
Report to moderator
1538087603
Hero Member
*
Offline Offline

Posts: 1538087603

View Profile Personal Message (Offline)

Ignore
1538087603
Reply with quote  #2

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

Posts: 1538087603

View Profile Personal Message (Offline)

Ignore
1538087603
Reply with quote  #2

1538087603
Report to moderator
1538087603
Hero Member
*
Offline Offline

Posts: 1538087603

View Profile Personal Message (Offline)

Ignore
1538087603
Reply with quote  #2

1538087603
Report to moderator
sidazhang
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
January 06, 2014, 06:00:15 AM
 #2

This question doesn't sound right. Could you post your specific case?

You can get your pubkey from your privateKey, that is called Elliptic curve crytography
scriptSig is signture + pubkey where the signature proves that you have the private key
scriptPubkey is typically something like op_dup op_hash160 pubkeyhash op_checksig or just pubkey op_checksig and the pubkey hash is the sha256 + hash160 of your publickey. But the question doesn't actually make a lot of sense I am afraid

Below is probably a good article to start you off.
http://procbits.com/2013/08/27/generating-a-bitcoin-address-with-javascript
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!