Post
Topic
Board Development & Technical Discussion
Re: Private key to public key (TUTORIAL)
by
ricardosuperx
on 16/09/2020, 19:06:04 UTC
-snip-
rx = 23578750110654438173404407907450265080473019639451825850605815020978465167024^2 -
89565891926547004231252920425935692360644145829622209833684329913297188986597-
55066263022277343669578718895168534326250603453777594175500187360389116729240

rx = 25759636913902563110438328477658084082469757293658084474899962813078412260632-
34499628904269660561674201530767158034393542375844615658184142552908072257357

rx = 107052097246949097972335111955578833901346199583454032856173404268079174674938

Correct resultt:112711660439710606056748659173929673102114977341539408544630613555209775888121

Your calculations of dx, dy and c are correct.
However while calculating the rx you made a simple arithmetical mistake - you should deduct step by step, but not make the last deduction first and later deduct the result from the first part. I marked by red the wrong part of your calculation - you changed the sign of px:

instead of rx = c^2 – px – qx you calculated rx = c^2 + px – qx (wrong!!)

Your calculation should be the following:

rx = 23578750110654438173404407907450265080473019639451825850605815020978465167024^2 -
89565891926547004231252920425935692360644145829622209833684329913297188986597-
55066263022277343669578718895168534326250603453777594175500187360389116729240

rx = 25759636913902563110438328477658084082469757293658084474899962813078412260632 -
89565891926547004231252920425935692360644145829622209833684329913297188986597-
55066263022277343669578718895168534326250603453777594175500187360389116729240

rx = 51985834224671754302756393060410299575095596129676438680673216907690057945698-
55066263022277343669578718895168534326250603453777594175500187360389116729240

rx = 112711660439710606056748659173929673102114977341539408544630613555209775888121

PS. You can also calculate in your way, however instead of deducting you should should apply the addition to last 2 decimals deducted from the c*c. This is the possible way as well:
rx = c^2 – px – qx = rx = c^2 – (px + qx)
Keep in mind that as you combined the last 2 decimals, you should add them first and later deduct from the 1st part}. In general, you mistake is simple math arithmetical. Just be careful with the calculation.


-snip-
rx = 23578750110654438173404407907450265080473019639451825850605815020978465167024^2 -
89565891926547004231252920425935692360644145829622209833684329913297188986597-
55066263022277343669578718895168534326250603453777594175500187360389116729240

rx = 25759636913902563110438328477658084082469757293658084474899962813078412260632-
34499628904269660561674201530767158034393542375844615658184142552908072257357

rx = 107052097246949097972335111955578833901346199583454032856173404268079174674938

Correct resultt:112711660439710606056748659173929673102114977341539408544630613555209775888121

Your calculations of dx, dy and c are correct.
However while calculating the rx you made a simple arithmetical mistake - you should deduct step by step, but not make the last deduction first and later deduct the result from the first part. I marked by red the wrong part of your calculation - you changed the sign of px:

instead of rx = c^2 – px – qx you calculated rx = c^2 + px – qx (wrong!!)

Your calculation should be the following:

rx = 23578750110654438173404407907450265080473019639451825850605815020978465167024^2 -
89565891926547004231252920425935692360644145829622209833684329913297188986597-
55066263022277343669578718895168534326250603453777594175500187360389116729240

rx = 25759636913902563110438328477658084082469757293658084474899962813078412260632 -
89565891926547004231252920425935692360644145829622209833684329913297188986597-
55066263022277343669578718895168534326250603453777594175500187360389116729240

rx = 51985834224671754302756393060410299575095596129676438680673216907690057945698-
55066263022277343669578718895168534326250603453777594175500187360389116729240

rx = 112711660439710606056748659173929673102114977341539408544630613555209775888121

PS. You can also calculate in your way, however instead of deducting you should should apply the addition to last 2 decimals deducted from the c*c. This is the possible way as well:
rx = c^2 – px – qx = rx = c^2 – (px + qx)
Keep in mind that as you combined the last 2 decimals, you should add them first and later deduct from the 1st part}. In general, you mistake is simple math arithmetical. Just be careful with the calculation.


I was calculating c^2 - (px - qx)
Thanks for reporting where I was wrong
The correct is like this: (c^2 - px) - qx