For the inverse you need to solveinverting the discrete logarithm problem; namelyprivate key from public key, given $P = [x]G$ overwe have a prime curve $E$ with the generatorwell defined problem; $G$the discrete logarithm problem; namely, find $x$.
- given $P$ over a prime curve $E(\mathbb{F}_p)$ with the generator $G$, find $x$ such that $P= [x]G$ .
There are many works for speeding the discrete logarithm, currentlylogarithm;
Currently best achievement arefor Secp256k1 is performed with Pollard's Rho and this is based on the on the Floyd's cycle-finding algorithmparallel Pollard's kangaroo. Best record can achieve 112-bit.
If you where to run the script and input a private key it will print the points calculated in the process of deriving the public key. Now take any of the calculated points (π
π₯,π
π¦) and indicate([2] or [1]) if it was derived using point doubling or point addition formula and I'll reverse the calculation the give you the value of ππ₯ and ππ¦ that was used in deriving the new points π
π₯ π
π¦ (Deleted comment)
The obtaining the public key from the private key $k$ fromand base point $G$ is calculated as $P = [k]G$ that, this is scalar multiplication and means add $G$ itself $k$-times ( consider integer value of $k$).
$$[k]G : = \underbrace{G + G + \cdots + G}_{k-times}$$
This is a very long method and we performhave better alternatives like double-and-add method*; ( if $k$ is integer than it takes roughly $\lfloor \log_2{k}\rfloor+1 $-time.)
Now, this speeds up the calculation, and notice that it is depending on the value of bits of the $k$.
There is always doubling, however, there can be point addition only if the current bit value of $k$ is 1Actually, this is not good since can cause side channel attacks. So, for every bit of the key, there is no test value for the reversing, so you need toWe use a tree structuredouble-and-add method to follow the the cases. Do you see where is is going? In the final you will have $2^{n}$ where $n$ is the number of bits of $k$, possible values ondemonstrate the treeproblem. Notice two points;
- YouThere is always doubling
- There can be point addition only if the current bit value of $k$ is 1.
So, for every bit of the key;
we may return back to either only doubled case or added and doubled case.
There is no test value for the reversing, i.e. how to determine that it was only double or add-and-double.
So one needs to use a tree structure to follow the the cases. Can we see where is is going?
For every step, we need to branch and this is exactly, two branch.
In the final, the tree will have depth $n$ where $n$ is the number of bits of $k$, possible values on the tree and $2^n$ leaves.
This is exactly same as the number of the bits of the key that needed to determine.
Now, one faces two problems;
- One cannot store such tree since you need around $2^{256}$ storage for Secp256k1, and
- YouOne cannot compute such tree since you need reach $2^{256}$ computing power for Secp256k1. The best available one, the bitcoin miners can reach $2^{93}$ in a year, so you still need $2^{163}$ year to achieve this.