Page MenuHome GnuPG

gcry_pk_get_param aborts program with error on "Curve25519"
Closed, ResolvedPublic


In libgcrypt 1.9.3, the call

gcry_pk_get_param(GCRY_PK_ECC, "Curve25519")

causes the program to abort (!) with the following message: "Fatal: _gcry_mpi_ec_get_affine: Getting Y-coordinate on Montgomery is not supported".

I expected the call to produce a valid sexp result, as it does in libgcrypt version 1.8.5.

I have observed the error (that is, print and abort) using libgcrypt 1.9.3 on both Linux (Ubuntu 20.04, x86_64, libgcrypt compiled from release tarball) and Mac OS (11.2.2, x86_64, libgcrypt installed via homebrew).

Using libgcrypt 1.8.5 (the system default for Ubuntu 20.04), the call returns a valid sexp, as expected.

The attached program shows that sexps are returned for "NIST P-256" and "Ed25519", NULL is returned for "NoSuchCurve"; and "Curve25519" causes the fatal error (on 1.9.3 but not 1.8.5).