Home GnuPG

ecc: Check the input length for the point.

Description

ecc: Check the input length for the point.

* cipher/ecc-misc.c (_gcry_ecc_mont_decodepoint): Check the length
of valid point representation.

In the use case of GnuPG, ECDH decryption for anonymous recipient may
try to decrypt with different curves. When the input data of
ephemeral key does not match one of the private key, it should return
GPG_ERR_INV_OBJ.

(cherry picked from commit 060c378c050e7ec6206358c681a313d6e1967dcf)
(cherry picked from commit 5f814e8a4968c01a7ffc7762bcaf3ce040594caf)

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
  • GnuPG-bug-id: T5423

Details

Provenance
gniibeAuthored on May 6 2021, 6:06 AM
wernerCommitted on Aug 22 2021, 2:11 PM
Parents
rC7529b8e455e3: hwf-x86: fix use of wrong operand type
Branches
Unknown
Tags
Unknown
Tasks
T5423: libgcrypt 1.8 ECDH