Bitcoin Forum
May 12, 2024, 03:22:51 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Calculate z and z1 from ECDSA Signature  (Read 251 times)
elpanxaaa (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
May 06, 2020, 02:13:54 PM
 #1

Can anyone explain me any clearly answer or code in python with examples how we can calculate z and z' value fromECDSA Signature order? I search in google and youtube and i not saw any correctly answer i just see scam posts or video in youtube.
I Saw this explain at 2Coin.org but this page is not active anymore, who can help me with python code and to calculate manualy how to get z and z' from ECDSA Signature.

Example:

https://blockchain.info/tx/9ec4bc49e828d924af1d1029cacf709431abbde46d59554b62bc270e3b29c4b1

from this transaction we have:

ScriptSig: PUSHDATA(71)[30440220d47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad1022044e1ff2dfd8102cf7a47c21d5c9fd5701610d04953c6836596b4fe9dd2f53e3e01] PUSHDATA(65)[04dbd0c61532279cf72981c3584fc32216e0127699635c2789f549e0730c059b81ae133016a69c21e23f1859a95f06d52b7bf149a8f2fe4e8535c8a829b449c5ff]

ScriptSig: PUSHDATA(71)[30440220d47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad102209a5f1c75e461d7ceb1cf3cab9013eb2dc85b6d0da8c3c6e27e3a5a5b3faa5bab01] PUSHDATA(65)[04dbd0c61532279cf72981c3584fc32216e0127699635c2789f549e0730c059b81ae133016a69c21e23f1859a95f06d52b7bf149a8f2fe4e8535c8a829b449c5ff]


r1: d47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad1
r2: d47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad1

s1: 44e1ff2dfd8102cf7a47c21d5c9fd5701610d04953c6836596b4fe9dd2f53e3e
s2: 9a5f1c75e461d7ceb1cf3cab9013eb2dc85b6d0da8c3c6e27e3a5a5b3faa5bab

how we can calculate z and z1 with this info ? is anyone have any code in python ?
 

thank you in advance
1715484171
Hero Member
*
Offline Offline

Posts: 1715484171

View Profile Personal Message (Offline)

Ignore
1715484171
Reply with quote  #2

1715484171
Report to moderator
1715484171
Hero Member
*
Offline Offline

Posts: 1715484171

View Profile Personal Message (Offline)

Ignore
1715484171
Reply with quote  #2

1715484171
Report to moderator
1715484171
Hero Member
*
Offline Offline

Posts: 1715484171

View Profile Personal Message (Offline)

Ignore
1715484171
Reply with quote  #2

1715484171
Report to moderator
BitcoinCleanup.com: Learn why Bitcoin isn't bad for the environment
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
MixMAx123
Full Member
***
Offline Offline

Activity: 161
Merit: 168


View Profile
May 07, 2020, 04:51:48 PM
 #2

Can you please describe what the variable "z" represents?
coinlatte
Newbie
*
Offline Offline

Activity: 21
Merit: 16


View Profile
May 08, 2020, 08:32:19 AM
 #3

I guess that z and z' has the same meaning as in this Wikipedia article. If so, then z is simplified transaction hash. All you need to do is just calculate SHA-256(simplified_transaction) and that will be your z. The same for z', it will be just another simplified transaction signed using the same k value. Here you have two inputs, so for each of them you should create two different simplified transactions. Here is some example.
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10558



View Profile
May 08, 2020, 02:26:00 PM
 #4

I guess that z and z' has the same meaning as in this Wikipedia article. If so, then z is simplified transaction hash. All you need to do is just calculate SHA-256(simplified_transaction) and that will be your z. The same for z', it will be just another simplified transaction signed using the same k value. Here you have two inputs, so for each of them you should create two different simplified transactions. Here is some example.

it is not "simplified", the transaction is instead "modified" and it is a complicated process. and the example you shared like many others on SE are only covering a small portion of the entire difference cases so they only work for that special case which is usually spending a legacy P2PKH output with SIGHASH_ALL.
FWIW starter doesn't seem to communicate back at all. he already has another duplicate of this topic in another board and also asking the same 2 questions on SE.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!