Author

Topic: Calculate Z value from r and s (Read 164 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
May 06, 2020, 12:25:09 AM
#3
https://bitcoin.stackexchange.com/a/32546 (it's on first page of search result) should answer your question, it has explanation on youtube with example code on C# and Python language.

P.S. I assume you're talking about ECDSA since you're asking the question in Bitcoin forum
legendary
Activity: 3472
Merit: 10611
May 05, 2020, 11:31:54 PM
#2
you should first explain what it is you are trying to do and what you have in mind when you say "Z".

if Z is the 256-bit value used in creation of the signature then you can't compute it from r and s, it is computed from the data that was signed. in which case it depends on what was signed, for example in message signing the normalized UTF-8 decode of the message string + a fixed string added to the start of it then hashed twice with SHA256. for a transaction this is a lot more complicated and is not something i can cover in one comment because it includes transaction serialization and working with scripts and changes based on the script type being spent.
newbie
Activity: 2
Merit: 0
May 05, 2020, 04:07:08 PM
#1
Can anyone explain me any clearly answer or code in python with examples how we can calculate Z value from r and s ?? I search in google and youtube and i not saw any correctly answer i just see scam posts or video in youtube.

thank you in advance
Jump to: