Bitcoin Forum
June 14, 2024, 07:13:08 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Pubkey & Sigscript  (Read 296 times)
rasem_ (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 10


View Profile
December 23, 2020, 04:27:39 PM
Merited by suchmoon (4), o_e_l_e_o (2), ABCbits (1), Pmalek (1), Husna QA (1)
 #1

Good day!

Im new from BTC.
I take a random BTC transaction: 6db26c6da67bfb3f87de32de61fe63b5f5beeb573f710e0620748b730d97b47a
using https://www.blockchain.com/btc/tx/6db26c6da67bfb3f87de32de61fe63b5f5beeb573f710e0620748b730d97b47a

The input wallet is 1JyzsWNPQ5LWoagkcrHzExCPfa6FDo7vU7

How can I get pub key from:

Pkscript
76a914c541bd83f6dcefcbcb19a78b4e21d8fd4c73a24a88ac
Sigscript
483045022100a4122309203bfcfe8f9ea9f7b2d503895fc0669300d5b26fb15d88b5626f3a8d022 027b2ed245627fc0edc5d26b61dd7ac501ec7152ec405d93500cfd1ee1007e6ee0121034acce93c 52ec4ceef893014f139ca3a8ac817cef1bd397d328981b68d6bf7b67

to get then from it wallet: 1JyzsWNPQ5LWoagkcrHzExCPfa6FDo7vU7
?
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18587


View Profile
December 23, 2020, 04:53:10 PM
Merited by suchmoon (4), ranochigo (1), ABCbits (1), Pmalek (1), hosseinimr93 (1)
 #2

The public key is right there as the last 66 characters (33 bytes) of the ScriptSig.

The compressed public key is:
Code:
034acce93c52ec4ceef893014f139ca3a8ac817cef1bd397d328981b68d6bf7b67

Which gives the address:
Code:
1JyzsWNPQ5LWoagkcrHzExCPfa6FDo7vU7

For future, if you look up the transaction on blockstream.info instead, and click on the "Details" tab, you will find the "ScriptSig (ASM)" field much easier to interpret - https://blockstream.info/tx/6db26c6da67bfb3f87de32de61fe63b5f5beeb573f710e0620748b730d97b47a?expand
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
December 23, 2020, 04:54:54 PM
Merited by o_e_l_e_o (2), ABCbits (1), Pmalek (1), hosseinimr93 (1), citb0in (1)
 #3

It's 034acce93c52ec4ceef893014f139ca3a8ac817cef1bd397d328981b68d6bf7b67.

The formatting for Blockchain.com is always kind of weird when copied. This is a compressed public key.

48 - OP_Pushbytes_72

3045022100a4122309203bfcfe8f9ea9f7b2d503895fc0669300d5b26fb15d88b5626f3a8d02202 7b2ed245627fc0edc5d26b61dd7ac501ec7152ec405d93500cfd1ee1007e6ee01 - ECDSA signature

21 - OP_Pushbytes_33 for compressed public keys


034acce93c52ec4ceef893014f139ca3a8ac817cef1bd397d328981b68d6bf7b67 - Public key

Note that a compressed public key is always 33 bytes while uncompressed is 65 bytes.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
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!