cipher:kem:ecc: Raise an error by validating a point on curve.
* cipher/ecc-ecdh.c (_gcry_ecc_curve_mul_point): Add new argument ENABLE_MONT_CHECK to enable check for Montgomery curve. Add point validation. Raise GPG_ERR_INV_DATA on failure. (_gcry_ecc_mul_point): Call _gcry_ecc_curve_mul_point with Montgomery curve check disabled. * cipher/kem-ecc.c (ecc_mul_point): Call _gcry_ecc_curve_mul_point with Montgomery curve check enabled. * src/gcrypt-int.h (_gcry_ecc_curve_mul_point): Change the proto.
Reported by Calif.io in collaboration with Claude and Anthropic
Research.
- GnuPG-bug-id: T8212
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>