I tried to observe / implement the discrete logarithm problem but I noticed something about it; but before I get into it let me give some clarification which is open to correction.
a = b^x mod P
Where as
a = the public key of the address;
b = the generator point of the secp256k1 koblitz curve (this is the curve in context);
x = the discrete log;
P = the modular integer.
I coupled all parameters below:
A = 044f355bdcb7cc0af728ef3cceb9615d90684bb5b2ca5f859ab0f0b704075871aa385b6b1b8ead809ca67454d9683fcf2ba03456d6fe2c4abe2b07f0fbdbb2f1c1 (uncompressed public key)
034f355bdcb7cc0af728ef3cceb9615d90684bb5b2ca5f859ab0f0b704075871aa : (compressed public key)B = 04 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8 (uncompressed generator point)
02 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798 (compress generator point)
X = ?
P = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F
I don't actually know what part of the parameters I should use ( compressed or uncompressed)
N. B : I tried the uncompressed public key to Mod P but the uncompressed public key exceeded the Mod P in size.
What should I do about this?
We are given a discrete logarithm problem (DLOG) ( also called the index calculus ); That is given
a, b,andPfindxsuch thata = b^x mod Pis held. The above is actually the multiplicative notation for finite field DLOG as used by OP. ECC DLOG is additive and has different notation as;Aand the baseBfindxsuch thatA = [x]Bis held on the curve E(FP).[x]Bsimply means that add the pointBx-times to itself.Compression
The beginning byte provides information about compression.
02compression and choosey03compression and choose-y04No compressionTo find the
y, put thexinto the curve equation and solve the quadratic residue by the Tonelli-Shanks algorithm.In your case, both are given, no problem. Use the uncompressed public key.
The current record for secp256k1 is 114-bit On 16 June 2020 by Aleksander Zieniewic and they provided their software. So, if you don't have a low target, you cannot break the discrete log.
A point
Qin the Elliptic curve when used affine coordinate system it has two coordinates asQ=(x,y)wherex,yfrom the defining field (P in your case). When checking a point Q is either on the curve or not putxandyinto the curve equationy^2 = x^3+ax+band check the equality.To uncompress insert the value of
xinto the equationx^3+ax+b mod Pto get let say valuea, then use the Tonelli-Shanks algorithm to find the square root ofain this equationy^2 = a mod Pto findyand-y. According to compression value chooseyor-y.update per comment
Compression a point requires information about what is the compression. Now you have given two forms of the public key
a;04-ysince starts wiht03Using capitals here not to confuse with hex
a;You can use the curve equation to derive the second part with chosen
-yAnd you can compare the coordinate values with
or use yours eye and mind;