Bitcoin Forum
June 19, 2024, 09:23:57 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to get public key and scriptPubKey and scriptSig from private key?  (Read 1442 times)
widewave (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


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

Who can give me some clue in bitcoin code?
Thank you!
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:  

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