0

Given:

p  = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
r  = 0xd47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad1
s1 = 0x44e1ff2dfd8102cf7a47c21d5c9fd5701610d04953c6836596b4fe9dd2f53e3e
s2 = 0x9a5f1c75e461d7ceb1cf3cab9013eb2dc85b6d0da8c3c6e27e3a5a5b3faa5bab
z1 = 0xc0e2d0a89a348de88fda08211c70d1d7e52ccef2eb9459911bf977d587784c6e
z2 = 0x17b0f41c8c337ac1e18c98759e83a8cccbc368dd9d89e5f03cb633c265fd0ddc

How is "P" calculated? Which calculator/script is used to calculate z1*s2, in here ((z1*s2 - z2*s1)/(r*(s1-s2))) and so on????

Thanks so much, I will appreciate your clarification.

Murch
  • 75,206
  • 34
  • 186
  • 622
Bill
  • 1
  • 1
  • I've edited your question to remove the all-caps text. Could you please provide more context? – Murch May 12 '18 at 23:56
  • This is the algorithm to determine the the secret key from two signatures with the same nonce. – Pieter Wuille May 13 '18 at 00:03
  • And the data is from https://bitcoin.stackexchange.com/questions/35848/recovering-private-key-when-someone-uses-the-same-k-twice-in-ecdsa-signatures which gives Python and Ruby examples. – dave_thompson_085 May 13 '18 at 15:39
  • I tired to run the python script from bitcoin.stackexchange.com/questions/35848/… on https://ideone.com/ but I keep getting a syntax error, please where did I go wrong. The example there is not actually working.... – Bill May 14 '18 at 06:58
  • the example is working fine if you select Python instead of Python 3 – Mike D May 14 '18 at 09:02

1 Answers1

1

How is "P" calculated?

P is one of the parameters for the secp256k1 curve as defined in http://www.secg.org/sec2-v2.pdf.

Which calculator/script is used to calculate z1*s2, in here ((z1*s2 - z2*s1)/(r*(s1-s2))) and so on????

Any calculator you want. They are just integers (albeit large integers) so you can use anything that can do large integer computations.

Ava Chow
  • 70,382
  • 5
  • 81
  • 161