Home GnuPG

ecc: Fix bug in gcry_pk_get_param for Curve25519.

Description

ecc: Fix bug in gcry_pk_get_param for Curve25519.

* cipher/ecc-curves.c (_gcry_ecc_get_param_sexp): Simplify.
* cipher/pubkey.c (map_algo): Also map EDDSA to ECC.
* tests/curves.c (check_get_params): Add simple param lookup tests by
for all curves.

There is no actual need to compute affine ccordinates given that we
already got them in the curve parameter table. Thus most code could
be removed and thus won't run into the problem getting an Y coordinate
for a Montgomery curve.

EDDSA was not mapped to ECC: The map function was written a year
before EDDSA and I obviously forgot to add it.

  • GnuPG-bug-id: T5490
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Jun 17 2021, 11:08 AM
Parents
rC84ad6ac02c45: build: Fix broken mlock detection
Branches
Unknown
Tags
Unknown
Tasks
T5490: gcry_pk_get_param aborts program with error on "Curve25519"