I have an ECPoint object "pointW" that I would like to check for whether it actually lies on some EllipticCurve "curve". How can I do this? I would prefer a solution using Java Crypto API but Bouncy Castle would also be fine. Thank you!
Asked
Active
Viewed 740 times
1 Answers
2
There might be a more straightforward way but if you've got the EllipticCurve
object, you can always just substitute the coordinates of your point into the equation of the curve.

biziclop
- 48,926
- 12
- 77
- 104
-
There is so much functionality - especially BC provides many checking and conversion methods - that I thought there had already to exist a method like this and I didn't feel like re-coding the wheel. I finally ended up doing as you suggested and it turned out to be much less effort than I had expected. – Thomas Lieven May 02 '14 at 14:23
-
@Thomas- Am trying to check the same whether Qc(Public key) is on curve p-256 or not. I got the EC from public but how to validate, could pls share api in java. EllipticCurve ec = publicKey.getParams().getCurve(); – Pand005 Nov 05 '19 at 15:36