Home GnuPG

ecc: Improve gcry_mpi_ec_curve_point

Description

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>

Details

Provenance
wernerAuthored on Jun 5 2018, 2:33 PM
Parents
rC6606ae44e0de: mpi: New internal function _gcry_mpi_cmpabs.
Branches
Unknown
Tags
Unknown