Home GnuPG

cipher:kem:ecc: Raise an error by validating a point on curve.

Description

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>

Details

Provenance
gniibeAuthored on Wed, Apr 15, 3:54 AM
wernerCommitted on Tue, Apr 21, 11:15 AM
Parents
rC8b3612d62a74: cipher:ecc: Fix decoding a point on Montgomery curve.
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task