diff options
author | Werner Koch <[email protected]> | 2005-04-01 09:03:15 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2005-04-01 09:03:15 +0000 |
commit | c43423f0bdf096970b304bf2154764e08d79347f (patch) | |
tree | 3c19849bdc7ff4681f55c896d052a968eec878ec | |
parent | * exec.h, exec.c (set_exec_path): Remove some dead code and change all (diff) | |
download | gnupg-c43423f0bdf096970b304bf2154764e08d79347f.tar.gz gnupg-c43423f0bdf096970b304bf2154764e08d79347f.zip |
(keygen_set_std_prefs): Explain the chosen order of
AES key sizes.
Diffstat (limited to '')
-rw-r--r-- | g10/keygen.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/g10/keygen.c b/g10/keygen.c index 1f325ceb5..c238b07d2 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -325,7 +325,7 @@ keygen_set_std_prefs (const char *string,int personal) 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 @@ keygen_set_std_prefs (const char *string,int personal) { 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)) |