Bitcoin Forum
June 22, 2024, 05:34:39 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Calculate Z value from r and s  (Read 156 times)
elpanxaaa (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
May 05, 2020, 09: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
pooya87
Legendary
*
Offline Offline

Activity: 3486
Merit: 10666



View Profile
May 06, 2020, 04:31:54 AM
Last edit: May 06, 2020, 08:07:26 AM by pooya87
 #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.

.
.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!