aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keygen.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-07-06g10: Fix keysize with --expert.NIIBE Yutaka1-2/+2
* g10/keygen.c (ask_keysize): It's 768 only for DSA. -- (forwardport of 1.4 commit ca1fc596267b42a894a3fc85c3733007c672ed1f) GnuPG-bug-id: 2238 Signed-off-by: NIIBE Yutaka <[email protected]>
2015-02-12Use inline functions to convert buffer data to scalars.Werner Koch1-8/+6
* include/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- This fixes sign extension on shift problems. Hanno Böck found a case with an invalid read due to this problem. To fix that almost all uses of "<< 24" and "<< 8" are changed by this patch to use an inline function from host2net.h. (back ported from commit 2183683bd633818dd031b090b5530951de76f392) Signed-off-by: Werner Koch <[email protected]>
2015-01-28gpg: Allow predefined names as answer to the keygen.algo prompt.Werner Koch1-10/+12
* g10/keygen.c (ask_algo): Add list of strings. -- Signed-off-by: Werner Koch <[email protected]> (backported from commit b1d5ed6ac842469afcb84868d0f6641dc286a6c7)
2014-12-12gpg: release DEK soon after its use.NIIBE Yutaka1-1/+1
* g10/keygen.c (generate_subkeypair): Release DEK soon. -- This fixes the out_of_core error in the test case of adding RSA-4096 subkey to RSA-4096 primary key with configuration: s2k-cipher-algo S10 Debian-bug-id: 772780 Cherry-picked da66ad5bba4215b9ddd0cb927a89aa75355632aa from STABLE-BRANCH-1-4 branch.
2014-10-03gpg: Add build and runtime support for larger RSA keysDaniel Kahn Gillmor1-2/+3
* configure.ac: Added --enable-large-secmem option. * g10/options.h: Add opt.flags.large_rsa. * g10/gpg.c: Contingent on configure option: adjust secmem size, add gpg --enable-large-rsa, bound to opt.flags.large_rsa. * g10/keygen.c: Adjust max RSA size based on opt.flags.large_rsa * doc/gpg.texi: Document --enable-large-rsa. -- This is a cherry-pick of 534e2876acc05f9f8d9b54c18511fe768d77dfb5 from STABLE-BRANCH-1-4 against STABLE-BRANCH-2-0 Some older implementations built and used RSA keys up to 16Kib, but the larger secret keys now fail when used by more recent GnuPG, due to secure memory limitations. Building with ./configure --enable-large-secmem will make gpg capable of working with those secret keys, as well as permitting the use of a new gpg option --enable-large-rsa, which let gpg generate RSA keys up to 8Kib when used with --batch --gen-key. Debian-bug-id: 739424 Minor edits by wk. GnuPG-bug-id: 1732
2014-09-26gpg: Add shortcut for setting key capabilities.Werner Koch1-1/+17
* g10/keygen.c (ask_key_flags): Add shortcut '='. * doc/help.txt (gpg.keygen.flags): New.
2014-06-27gpg: Limit keysize for unattended key generation to useful values.Werner Koch1-2/+12
* g10/keygen.c (gen_elg): Enforce keysize 1024 to 4096. (gen_rsa): Enforce keysize 1024 to 4096. (gen_dsa): Enforce keysize 768 to 3072. -- It was possible to create 16k RSA keys in batch mode. In addition to the silliness of such keys, they have the major drawback that under GnuPG and Libgcrypt, with their limited amount of specially secured memory areas, the use of such keys may lead to an "out of secure memory" condition.
2014-06-03gpg: Fix glitch entering a full expiration time.Werner Koch1-1/+2
* g10/keygen.c (ask_expire_interval): Get the current time after the prompt. -- This almost avoid that an entered full ISO timestamp is not used as given but off by the time the user required to enter the timestamp. GnuPG-bug-id: 1639
2013-10-11gpg: Fix --version output and explicitly disable ECC.Werner Koch1-3/+3
* g10/misc.c (openpgp_pk_algo_name): New. Replace all calls in g10/ to gcry_pk_algo_name by a call to this function. (map_pk_openpgp_to_gcry): Map algo PUBKEY_ALGO_ELGAMAL_E to GCRY_PK_ELG. (openpgp_pk_test_algo): Use PUBKEY_ALGO_ELGAMAL_E instead of GCRY_PK_ELG_E. Return an error for ECC algos. (openpgp_pk_test_algo2): Return an error for ECC algos. * g10/gpg.c (build_list): Avoid printing ECC two times. * include/cipher.h: Do not use GCRY_PK_* macros for PUBKEY_ALGO_*. -- Due to recent changes to adjust for use with Libgcrypt 1.6, "gpg --version" printed two question marks. This patches fixes that and also make sure that gpg does advertise any ECC features. The patch in build_list is not really needed. Signed-off-by: Werner Koch <[email protected]>
2013-10-04gpg: Allow setting of all zero key flagsDaniel Kahn Gillmor1-3/+0
* g10/keygen.c (do_add_key_flags): Do not check for empty key flags. (cherry picked from commit b693ec02c467696bf9d7324dd081e279f9965151)
2013-10-04Remove trailing white space from some files.Daniel Kahn Gillmor1-133/+133
--
2013-08-30gpg: Use 2048 as the default keysize in batch mode.Werner Koch1-7/+7
* g10/keygen.c (gen_elg, gen_dsa, gen_rsa): Set default keysize to 2048. Signed-off-by: Werner Koch <[email protected]>
2011-01-10Fix bug#1307.Werner Koch1-1/+1
2010-09-29Fix memory leakWerner Koch1-1/+1
2010-02-17Fix bug#1186Werner Koch1-1/+1
2009-12-04Allow for default algorithms in a parameter fileWerner Koch1-28/+59
2009-12-03Backported some stuff from trunkWerner Koch1-0/+2
2009-09-03Fix bug#1122.Werner Koch1-22/+50
Note that msgmerge 0.17 is completely broken as it always prepends a fuzzy null entry to all po files.
2009-07-23Print status of CRL checks in the audit log.Werner Koch1-1/+1
2009-07-20Fix bug 1091.Werner Koch1-7/+10
Doc fixes. Replace assert by error message.
2009-07-09Changed default hash algorithm preferencesWerner Koch1-12/+35
2009-05-20Allow generation of DSA2 keys without --enable-dsa2.Werner Koch1-11/+3
2009-05-20Fix bug#1056.Werner Koch1-1/+1
2009-05-17Changed default algo and size.Werner Koch1-86/+136
2009-05-15Made card key generate with backup key work for 2048 bit.Werner Koch1-9/+33
Improved card key generation prompts.
2009-05-13Print keyid in gpg --list-packets.Werner Koch1-2/+6
Add some not yet code to app-nks.c Changed batch mode expiration time computation
2009-01-08Update spanish translation.Werner Koch1-0/+9
Cleanups. Allow utf-8 in email addresses.
2008-12-11Make gpg not depend on the RIPE-MD160 implementaion in Libgcrypt.Werner Koch1-1/+2
Fix SIG_ID computation.
2008-12-09Flush keyserver search output.Werner Koch1-21/+43
Add trustdb chnages from 1.4. Check algo usage for batch key generation.
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-32/+37
2008-08-11Cehck for expire date overflows.Werner Koch1-15/+23
2008-06-16Add controlo statement %ask-passphraseWerner Koch1-29/+68
2008-06-01Changes the header presented before requesting the user ID.Werner Koch1-3/+22
2007-12-04Allow configuraton of pinentry tooltip.Werner Koch1-2/+16
Other minor buf fixes.
2007-07-05Fixed card key generation of gpg2.Werner Koch1-823/+954
Reveal less information about timings while generating a key.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-01-31Included LIBICONV in all Makefiles.Werner Koch1-2/+2
g10/ * passphrase.c (passphrase_get): Set the cancel flag on all error from the agent. Fixes a bug reported by Tom Duerbusch. sm/ * gpgsm.c (main): Let --gen-key print a more informative error message.
2007-01-15 * parse-packet.c (read_protected_v3_mpi): Make sure to stopWerner Koch1-1/+1
reading even for corrupted packets. * keygen.c (generate_user_id): Need to allocate one byte more. Reported by Felix von Leitner.
2006-12-06Fixes for CVE-2006-6235Werner Koch1-19/+42
2006-11-21Final fix which should now pass all tests.Werner Koch1-1/+2
2006-11-21No more warnings for AMD64 (at least when cross-compiling). Thus tehre is aWerner Koch1-11/+11
good chance that gpg2 will now work. Other cleanups. Updated gettext.
2006-10-19FixesWerner Koch1-0/+2
2006-09-14Take advantage of newer gpg-error features.Werner Koch1-1/+1
2006-08-21Migrated more stuff to doc/Werner Koch1-5/+3
Migrated the gpg regression tests. Some changes tp the gpg code to fix bugs and for the use in testing. make distcheck works now with gpg enabled.
2006-08-16With --enable-gpg the keyservers are now build and a first test using gpg2Werner Koch1-11/+13
shows no prblems. Needs more testing of course.
2006-07-26Fixed memory allocation bug and typos.Werner Koch1-0/+2
2006-06-30A couple of fixes. gpg2's key generation does now work.Werner Koch1-1/+1
2006-06-27Ported patches from 1.4.x Werner Koch1-29/+94
2006-06-22* options.h, gpg.c (main), keygen.c (keygen_upd_std_prefs,David Shaw1-1/+28
keygen_add_std_prefs, proc_parameter_file): Add --default-keyserver-url to specify a keyserver URL at key generation time, and "Keyserver:" keyword for doing the same through a batch file.
2006-06-10* keygen.c (gen_card_key): Add optional argument to return a pointerDavid Shaw1-8/+13
(not a copy) of the stub secret key for the secret key we just generated on the card. (generate_card_subkeypair): Use it here so that the signing key on the card can use the card to generate the 0x19 backsig on the primary key. Noted by Janko Heilgeist and Jonas Oberg.