Post
Topic
Board Development & Technical Discussion
Re: How to get public key and scriptPubKey and scriptSig from private key?
by
sidazhang
on 06/01/2014, 06:00:15 UTC
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