[git] GnuPG - branch, master, updated. gnupg-2.1.0-beta751-12-g557cc11

by Werner Koch cvs at cvs.gnupg.org
Fri Jul 25 08:25:07 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  557cc11a605dd280d03c52d8b546deed8c4c714d (commit)
      from  f2011e4622e708f6461a591c58ac95bc3b2befbe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 557cc11a605dd280d03c52d8b546deed8c4c714d
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jul 24 16:16:53 2014 +0200

    gpg: Switch to an EdDSA format with prefix byte.
    
    * g10/keygen.c (gen_ecc): USe "comp" for EdDSA.

diff --git a/g10/keygen.c b/g10/keygen.c
index d6b2dd0..af5d34d 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -1526,12 +1526,23 @@ gen_ecc (int algo, const char *curve, kbnode_t pub_root,
   if (!curve || !*curve)
     return gpg_error (GPG_ERR_UNKNOWN_CURVE);
 
-  keyparms = xtryasprintf ("(genkey(ecc(curve %zu:%s)(flags nocomp%s%s)))",
-                           strlen (curve), curve,
-                           (((keygen_flags & KEYGEN_FLAG_TRANSIENT_KEY)
-                             && (keygen_flags & KEYGEN_FLAG_NO_PROTECTION))?
-                            " transient-key" : ""),
-                           (!strcmp (curve, "Ed25519")? " eddsa":""));
+  /* Note that we use the "comp" flag with EdDSA to request the use of
+     a 0x40 compression prefix octet.  */
+  if (algo == PUBKEY_ALGO_EDDSA)
+    keyparms = xtryasprintf
+      ("(genkey(ecc(curve %zu:%s)(flags eddsa comp%s)))",
+       strlen (curve), curve,
+       (((keygen_flags & KEYGEN_FLAG_TRANSIENT_KEY)
+         && (keygen_flags & KEYGEN_FLAG_NO_PROTECTION))?
+        " transient-key" : ""));
+  else
+    keyparms = xtryasprintf
+      ("(genkey(ecc(curve %zu:%s)(flags nocomp%s)))",
+       strlen (curve), curve,
+       (((keygen_flags & KEYGEN_FLAG_TRANSIENT_KEY)
+         && (keygen_flags & KEYGEN_FLAG_NO_PROTECTION))?
+        " transient-key" : ""));
+
   if (!keyparms)
     err = gpg_error_from_syserror ();
   else
@@ -3448,9 +3459,8 @@ quickgen_set_para (struct para_data_s *para, int for_subkey,
 }
 
 
-
 /*
- * Unattended generaion of a standard key.
+ * Unattended generation of a standard key.
  */
 void
 quick_generate_keypair (const char *uid)

-----------------------------------------------------------------------

Summary of changes:
 g10/keygen.c |   26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list