I am trying to handle when a parsers goes off the rails and reads an EC public keys wrong (just the X and Y components, I know the curve prior).
Right now I check for the following (false means invalid):
- Is the key even on the Curve?
- Is the Public Key X component less than the Curve's Base Point X?
I am pretty confident in #1, but not as confident in #2. #2 was just made by never seeing a case that contradicted it.
So my question is, 1) are these two checks correct? 2) are there other checks that can detect bad public keys?