gnupg/g10 (keygen.c)

cvs user wk cvs at cvs.gnupg.org
Fri Apr 1 10:48:23 CEST 2005


    Date: Friday, April 1, 2005 @ 11:03:15
  Author: wk
    Path: /cvs/gnupg/gnupg/g10

Modified: keygen.c

(keygen_set_std_prefs): Explain the chosen order of
AES key sizes.


----------+
 keygen.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletion(-)


Index: gnupg/g10/keygen.c
diff -u gnupg/g10/keygen.c:1.147 gnupg/g10/keygen.c:1.148
--- gnupg/g10/keygen.c:1.147	Mon Mar 14 20:19:20 2005
+++ gnupg/g10/keygen.c	Fri Apr  1 11:03:15 2005
@@ -325,7 +325,7 @@
     byte sym[MAX_PREFS], hash[MAX_PREFS], zip[MAX_PREFS];
     int nsym=0, nhash=0, nzip=0, val, rc=0;
     int mdc=1, modify=0; /* mdc defaults on, modify defaults off. */
-    char dummy_string[45]; /* enough for 15 items */
+    char dummy_string[45+1]; /* Enough for 15 items. */
 
     if (!string || !ascii_strcasecmp (string, "default"))
       {
@@ -335,6 +335,18 @@
 	  {
 	    dummy_string[0]='\0';
 
+            /* The rationale why we use the order AES256,192,128 is
+               for compatibility reasons with PGP.  If gpg would
+               define AES128 first, we would get the somewhat
+               confusing situation:
+
+                 gpg -r pgpkey -r gpgkey  ---gives--> AES256
+                 gpg -r gpgkey -r pgpkey  ---gives--> AES
+                 
+               Note that by using --personal-cipher-preferences it is
+               possible to prefer AES128.
+            */
+
 	    /* Make sure we do not add more than 15 items here, as we
 	       could overflow the size of dummy_string. */
 	    if(!check_cipher_algo(CIPHER_ALGO_AES256))




More information about the Gnupg-commits mailing list