Skip to main content
2 of 3
detail

Verify that a point belongs to secp256r1

I need to verify that the point in this public key
04 11 95 23 03 f0 f1 f1 45 67 14 98 e4 39 80 ce 25 39 02 6e 72 34 fe 02 38 8a ea cc fb 3a 3d 4d dc d9 6d 3c fe 8b 55 bf ea c3 3a a1 59 13 54 b3 91 79 45 b7 3b 49 d9 0e 96 2a de 79 d3 49 dc 79 ca is in secp256r1. I already know the parameters $a$ and $b$ of the curve, but they are pretty big and they are in hexadecimal. I've been trying to pass it to decimal, but I'm not getting it. Should I compute it in hexadecimal? I do also don't understand what are the coordinates of the public key. I mean, public key is supposed to be a point with x-coordinate and the least important part of the y-coordinate, as public key begins by 04, isn't it? I'm really sorry, but I'm confused about how to approach this. Thanks.

Note: I saw some questions that were basically the same as mine, but the numbers were much smaller. I do also have PARI/GP to use. Thanks

EDIT: I tried with SageMath, and the result was
x = 7952820305943964896387440755453080309860162614086706018596179476145265003996
y = 98344895439910594971593461997930184197459096557735598026509132013917697767882
a = 115792089210356248762697446949407573530086143415290314195533631308867097853948 b = 41058363725152142129326129780047268409114441015993725554835256314039467401291
Then, I tried y^2 == x^3 + a*x + b, and it gave False, but I know beforehand that the point belongs to the curve. Can you tell me what I am doing wrong, please? Thanks.