1
$\begingroup$
slope (s) = 75359724952757581356787150982223137069297282952438962440225639443485944634025
Qx = 112711660439710606056748659173929673102114977341539408544630613555209775888121
Qy = 25583027980570883691656905877401976406448868254816295069919888960541586679410

Derived x and y-coordinate from performing point doubling using the above values

Using the below formula;

s = (3 * Qx**2) * pow(2 * Qy, -1, p) % p 
Rx = (s**2 - 2 * Qx) % p
Ry = (s * (Qx - Rx) - Qy) % p
Rx = 115780575977492633039504758427830329241728645270042306223540962614150928364886
Ry = 78735063515800386211891312544505775871260717697865196436804966483607426560663

Secp256k1 elliptic curve perameters

Gx = 55066263022277343669578718895168534326250603453777594175500187360389116729240
Gy = 32670510020758816978083085130507043184471273380659243275938904335757337482424
p = 115792089237316195423570985008687907853269984665640564039457584007908834671663

The above Rx and Ry vairables is derived from slope (s), Qx and Qy by performing point doubling on elliptic curve and all the vairables provided above are valid points on the curve.

Is there any formula that can be used to derive Ry base solely on the slope (s), Gx, Gy, p and Rx?

$\endgroup$
1
  • 1
    $\begingroup$ Is there a specific reason that you convert this question into something that makes no sense as a question? Besides,in SO, if the answer is find useful for you you can upvote and satisfies your question then you can accept it so that other may find that the answer is correct and useful. This is the way this community works. $\endgroup$
    – kelalaka
    Sep 12, 2023 at 20:58

1 Answer 1

2
$\begingroup$

Given $Q = (Q_x, Q_y)$ the doubling formula under the condition that $Q_y \neq 0$

\begin{align} s & =\frac{3 Q_x^2+a}{2Q_y} &(1)\\ R_x & = s^2 -2 Q_x \mod p & (2)\\ R_y & = s\cdot (Q_x-R_x) -Q_y \mod p & (3) \end{align}

So, basically asking;

  • given $s, G_x, G_y, p$, and $R_x$ find $R_y$;

Then, can we find the $R_y$? let see..

  1. Find $Q_x$ using (2)

$$ \color{red}{Q_x} = -\frac{R_x - s^2}{2} \mod p $$

  1. Use this in (1)

    $$s = \frac{3 \color{red}{Q_x}^2+a}{2Q_y}$$

    to get $Q_y$

    $$\color{blue}{Q_y} = \frac{3 \color{red}{Q_x}^2+a}{2s}$$

  2. Use (3) to get $R_y$

    $$R_y = s \cdot (\color{red}{Q_x}-R_x) -\color{blue}{Q_y} \mod p,$$

    where we know $p, s, R_x, Q_x$, and $Q_y$ so that we can find $R_y$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.