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