Bitcoin Forum
October 29, 2020, 11:47:56 AM *
News: Latest Bitcoin Core release: 0.20.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin and SageMath question  (Read 77 times)
imjustagirl
Jr. Member
*
Offline Offline

Activity: 117
Merit: 6


View Profile
December 12, 2019, 10:56:43 PM
 #1

I was reading up on Bitcoin formulas, but I cannot get this one to work in SageMath.
This was supposed to be for related nonces and I was trying it with my own transactions.
c = k2-k1 where c is the difference between the two nonces.

p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
K = GF(p)
K((r2*z1)+(r1*s2*c)-(r1*z2))/((s1*r2)-(s2*r1))

Doesn't come up with the right result! It's supposed to give me k1.

This one works fine: K((z1*s2 - z2*s1)/(r*(s1-s2))) for repeated R's.

Did I mess up the formula or SageMath? Or everything together?  Angry Ugh! It bugs me. Thank you for any constructive thoughts.



1JPnqMd1Q43L3KbZ7SoTSdRCD2aLj2sikF Tip Me!
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!