Using Gaussian Elimination to Reveal Secret Key

92 Views Asked by At

I've come across an article that shows how unknown information could be revealed from an ECDSA signature where there were some reuse of parameters use to calculate the signature.

Specifically, the following equations:

$$s_{1,1} = k^{-1}_1(h_{1,1} + r_1x_1)$$ $$s_{1,2} = k^{-1}_1(h_{1,2} + r_1x_2)$$ $$s_{2,1} = k^{-1}_2(h_{2,1} + r_2x_1)$$ $$s_{2,2} = k^{-1}_2(h_{2,2} + r_2x_2)$$

When the parameters $s$, $h$, and $r$ are known can be used to calculate $k$ or $x$ by using gaussian elimination. For example, to calculate $x_2$:

$$x_2 = \frac{r_1s_{1,2}(h_{2,2}s_{2,1} - h_{2,1}s_{2,2}) - r_2s_{2,2}(h_{1,2}s_{1,1} - h_{1,1}s_{1,2})}{r_1r_2(s_{1,2}s_{2,1} - s_{1,1}s_{2,2})}$$

In my case, I have the following equations:

$$s_1 = k^{-1}(h_1 + rx_1)$$ $$s_2 = k^{-1}(h_2 + rx_2)$$ $$s_3 = k^{-1}(h_3 + rx_3)$$

I know the values of the $s$, $h$ and $r$ parameters. $r$ is the same value across all three equations.

I do not know any of the $x$ parameters or $k$, but I also know that $k$ is equal for all three equations.

Is it possible to use gaussian elimination (or any other method) to calculate the value of the shared $k$, or any individual $x$ parameter for the above three equations?

If so, could someone please show the steps involved in this as I must admit that I am lost.

Note that each equation is calculated modulo the order parameter of the ECDSA curve ($n$) but I've omitted it as that operation will be performed on the outcome of the equation.