Is generating public key x point from private key more costly than the euclidean inversion used in this type of point addition ?
Yes. Elliptic curve multiplication is generally considered more computationally expensive than any point addition, because it involves lots of double-and-add operations.
It seems to take absolutely forever compare to the multiplication.
Unless I misunderstood the question, neither the former nor the latter are very complex algorithmically.
Hey,
Thanks for your input! My point was that it seems to me that the inversion is some type of search algorithm and is well suited for a
CPU where the instructions are executed in serial fashion, and maybe can't be executed in parallel to take full advantage of the
FPGA architecture.
In the diagram i have posted, i don't see much room for changing the algorithm to execute in parallel, except maybe running the inversion logic in parallel with the last multiplication, but that gives only ~10% efficiency boost due to inversion being much slower than multiplication.
Is the inversion part of the scalar multiplication for generation x from k as well ?
According to our dear AI friend, this is what the process is:
// Initial point (x1,y1) and scalar value (k)
reg [255:0] x1, y1, k;
// Resulting point (x2,y2)
reg [255:0] x2, y2;
// Loop through each bit in the scalar value
for (int i = 0; i < 256; i++)
{
// If the current bit in the scalar is 1, add the initial point to the result
if (k[i])
{
// Use the secp256k1 elliptic curve equation to calculate the new x and y coordinates
x2 = (x1^2 * 3 + 7) % p;
y2 = (y1^2) % p;
}
// Double the initial point
x1 = (x1^2) % p;
y1 = (y1^2 * 2) % p;
}
So which part is the inversion ? '% p' ?
Sorry for the lame questions.