Given the following information:
"curve": "P-256",
"qx": "729C51D177EBE2079A0FB7B0B3C2145159CF81EC61960E642A1744719AA9F913",
"qy": "8C36BCF51475016E614F8C7E0CB1B37C7EA65B4ECCF809852C9B2D0E438710BD"
The above coordinates are supposedly valid as per the test vector expected results:
"testPassed": true
I need to determine if the above public key coordinates are valid points on the curve or not. I have tried converting the coordinates in python into ints with:
>>> x = int("7C96DFF02F55B876A2A885A920E9FB5E30C6E1A4061A62517FD5C936A16AD363", 16)
>>> y = int("301ABC6B82DF5B6B6D3E8D56D7660D83A6E4F55E321BD2E57A5AC4A6A683374E", 16)
And then plugged those integer values into both of the following formulas:
y^2 = X^3 + 7 (secp256k1)
y^2 = x^3 - 3x + b where b is 41058363725152142129326129780047268409114441015993725554835256314039467401291
In neither case did the formula indicate that the values were valid.
Would anybody happen to know how I could go about validating these coordinates?
This gives me a (y^2) % 256 = 196
and a (x^3 -3x + b) % 256 = 93
Is my constant b value wrong perhaps?
– factor2 Jun 15 '21 at 17:00