agent_is_eddsa_key is broken currently

NIIBE Yutaka gniibe at fsij.org
Wed Jan 15 07:12:29 CET 2014


With the development version of GnuPG (master branch), I generated
secp256k1 key.

However, in the function agent_pksign_do, it is recognized a key for
EdDSA, because the function agent_is_eddsa_key returns TRUE.

I think that it's forgotten to be edited, copying agent_is_dsa_key.
Possible edit would be:

diff --git a/agent/findkey.c b/agent/findkey.c
index aa2c6a2..6464b02 100644
--- a/agent/findkey.c
+++ b/agent/findkey.c
@@ -812,14 +812,10 @@ agent_is_eddsa_key (gcry_sexp_t s_key)
     return 0;
 
   if (key_parms_from_sexp (s_key, NULL, algoname, sizeof algoname, NULL, 0))
-    return 0; /* Error - assume it is not an DSA key.  */
+    return 0; /* Error - assume it is not an EdDSA key.  */
 
-  if (!strcmp (algoname, "dsa"))
-    return GCRY_PK_DSA;
-  else if (!strcmp (algoname, "ecc"))
-    return GCRY_PK_ECDSA; /* FIXME: Check for the EdDSA flag.  */
-  else if (!strcmp (algoname, "ecdsa"))
-    return GCRY_PK_ECDSA;
+  if (!strcmp (algoname, "eddsa"))
+    return 1;
   else
     return 0;
 }
-- 





More information about the Gnupg-devel mailing list