ecc: Improve gcry_mpi_ec_curve_point
* mpi/ec.c (_gcry_mpi_ec_curve_point): Check range of coordinates. * tests/t-mpi-point.c (point_on_curve): New.
Due to the conversion to affine coordinates we didn't detected points
with values >= P. The solution here might not be the best according
to the NIST standard (it is done there at an earlier opportunity) but
it reliably detects points we do not expect to receive.
The new test vectors have been compared against gnutls/nettle.
- Reported-by: Stephan Müller
- Signed-off-by: Werner Koch <wk@gnupg.org>