aboutsummaryrefslogtreecommitdiffstats
path: root/g10/export.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-11-15gpg: Rework ECC support and add experimental support for Ed25519.Werner Koch1-1/+1
* agent/findkey.c (key_parms_from_sexp): Add algo name "ecc". (agent_is_dsa_key): Ditto. (agent_is_eddsa_key): New. Not finished, though. * agent/pksign.c (do_encode_eddsa): New. (agent_pksign_do): Use gcry_log_debug functions. * agent/protect.c (agent_protect): Parse a flags parameter. * g10/keygen.c (gpg_curve_to_oid): Move to ... * common/openpgp-oid.c (openpgp_curve_to_oid): here and rename. (oid_ed25519): New. (openpgp_oid_is_ed25519): New. (openpgp_oid_to_curve): New. * common/t-openpgp-oid.c (test_openpgp_oid_is_ed25519): New. * g10/build-packet.c (gpg_mpi_write): Write the length header also for opaque MPIs. (gpg_mpi_write_nohdr): New. (do_key): Use gpg_mpi_write_nohdr depending on algorithm. (do_pubkey_enc): Ditto. * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Use gpg_mpi_write_nohdr. * g10/export.c (transfer_format_to_openpgp): * g10/keygen.c (ecckey_from_sexp): Return the error. (gen_ecc): Repalce arg NBITS by CURVE. (read_parameter_file): Add keywords "Key-Curve" and "Subkey-Curve". (ask_curve): New. (generate_keypair, generate_subkeypair): Use ask_curve. (do_generate_keypair): Also pass curve name. * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Print curve name. * g10/parse-packet.c (mpi_read): Remove workaround for Libcgrypt < 1.5. (parse_key): Fix ECC case. Print the curve name. * g10/pkglue.c (mpi_from_sexp): Rename to get_mpi_from_sexp. (pk_verify, pk_check_secret_key): Add special case for Ed25519. * g10/seskey.c (encode_md_value): Ditto. * g10/sign.c (do_sign, hash_for, sign_file): Ditto. -- Be warned that this code is subject to further changes and that the format will very likely change before a release. There are also known bugs and missing code. Signed-off-by: Werner Koch <[email protected]>
2013-01-08gpg: Remove a function wrapper.Werner Koch1-1/+1
* g10/keydb.h (keydb_search): Remove macro. * g10/keydb.c (keydb_search2): Rename to keydb_search. Change all callers.
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-1/+1
The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
2011-12-02Avoid possible double free in export.c.Werner Koch1-1/+1
* g10/export.c (transfer_format_to_openpgp): Avoid possible double free of LIST. Reported by NIIBE Yutaka.
2011-08-10Fixed set but unused variable bugsWerner Koch1-13/+13
2011-04-29Re-indentation of keydb.c and error code changes.Werner Koch1-1/+1
Returning -1 as an error code is not very clean given that gpg error has more descriptive error codes. Thus we now return GPG_ERR_NOT_FOUND for all search operations and adjusted all callers.
2011-04-26Fixed regression in OpenPGP secret key export.Werner Koch1-4/+3
The protection used in the exported key used a different iteration count than given in the S2K field. Thus all OpenPGP keys exported from GnuPG 2.1-beta can't be imported again. Given that the actual secret key material is kept in private-keys-v1.d/ the can be re-exported with this fixed version.
2011-04-25Fix regression in gpg's mail address parsing.Werner Koch1-1/+1
Since 2009-12-08 gpg was not able to find email addresses indicated by a leading '<'. This happened when I merged the user id classification code of gpgsm and gpg.
2011-03-08Require libgcrypt 1.5Werner Koch1-14/+3
Without Libgcrypt 1.5 is was not possible to use ECC keys. ECC is major new feature and thus it does not make sense to allow building with an older Libgcrypt without supporting ECC. Also fixed a few missing prototypes.
2011-02-03Fix test for gcry_pk_get_curve.Werner Koch1-1/+1
Add a compatibility fixes for the non-curve case. Remove -lber from the dirmngr link line.
2011-02-02Sample ECC keys and message do now work.Werner Koch1-35/+113
Import and export of secret keys does now work. Encryption has been fixed to be compatible with the sample messages. This version tests for new Libgcrypt function and thus needs to be build with a new Libgcrypt installed.
2011-01-21Editorial changes and allow building with old libgcrypts.Werner Koch1-12/+10
Changed order of some conditional to make to put the special case into the true branch. Indentation changes. Minor other changes to make the ECC code more similar to the rest of our code. It builds but many sefltests still fail. Need to fix that before using it with an ECDH enabled libgcrypt. [/] 2011-01-21 Werner Koch <[email protected]> * configure.ac: Need Libgcrypt 1.4.6 due to AESWRAP. (HAVE_GCRY_PK_ECDH): Add new test. [agent/] 2011-01-21 Werner Koch <[email protected]> * cvt-openpgp.c (GCRY_PK_ECDH) [!HAVE_GCRY_PK_ECDH]: New. [include/] 2011-01-21 Werner Koch <[email protected]> * cipher.h (GCRY_PK_USAGE_CERT): Remove compatibility macros because we now require libgcrypt 1.4.6. (GCRY_PK_ECDH): Add replacement.
2011-01-20All standard keyserver commands are now using dirmngr.Werner Koch1-0/+54
2011-01-06Integrating http://code.google.com/p/gnupg-ecc/source/detail?r=15 .Andrey Jivsov1-0/+12
The following works: gpg2 --gen-key (ECC) gpg2 --list-keys gpg2 --list-packets ~/.gnupg/pubring.gpg gpg2 --list-packets <private key from http://sites.google.com/site/brainhub/pgpecckeys> ECDH doesn't work yet as the code must be re-written to adjust for gpg-agent refactoring.
2010-10-01Exporting secret keys via gpg-agent is now basically supported.Werner Koch1-153/+598
A couple of forward ported changes. Doc updates.
2010-09-06Removed more secret key related code.Werner Koch1-416/+421
It builds fine and passes some of the tests but there are quite some features which don't work yet.
2010-04-21More changes on the way to remove secring.gpg.Werner Koch1-1/+1
2010-04-20Generating an OpenPGP key cia gpg-agent basically works.Werner Koch1-1/+1
2009-12-08Unification of the search descriptor usage.Werner Koch1-2/+3
2009-09-30Some changes to suport g13.Werner Koch1-1/+1
2007-11-19Started to implement the audit log feature.Werner Koch1-1/+1
Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-02-14 * export.c (do_export_stream): Allow reset-subkey-passwd alongWerner Koch1-1/+4
with sexp-format.
2006-12-06Fixes for CVE-2006-6235Werner Koch1-4/+5
2006-10-02Fix for bug 537Werner Koch1-9/+9
2006-04-19Continued with merging.Werner Koch1-1/+0
Still does not build.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-158/+367
The gpg part does not yet build.
2005-11-18* keyedit.c (keyedit_menu, menu_clean): Simplify clean options to justDavid Shaw1-27/+16
"clean", and add "minimize". * import.c (parse_import_options): Make help text match the export versions of the options. * options.h, export.c (parse_export_options, do_export_stream): Reduce clean options to two: clean and minimize. * trustdb.h, trustdb.c (clean_one_uid): New function that joins uid and sig cleaning into one for a simple API outside trustdb.
2005-11-10* options.h, import.c (parse_import_options, clean_sigs_from_all_uids,David Shaw1-1/+1
import_one): Add import-minimal option. Similar to export-minimal, except it works on the way in.
2005-11-10* trustdb.h, trustdb.c (clean_sigs_from_uid): Add flag to remove allDavid Shaw1-18/+7
non-selfsigs from key during cleaning. Change all callers. * export.c (do_export_stream): Use it here so we don't need additional minimize code in the export path.
2005-11-02* import.c (import_one): Do collapse_uids() before we do any cleaningDavid Shaw1-2/+2
so keyserver mangled keys with doubled user IDs can be properly cleaned - possibly sigs on the different user IDs cancel each other out. * import.c (parse_import_options), export.c (parse_export_options): List "xxx-clean" before the longer options so we don't end up with a partial match on the longer options. * trustdb.c (clean_uids_from_key): Return proper number of cleaned user IDs. Don't count user IDs as cleaned unless we actually delete something.
2005-10-17exported subkeys are now merged into one output keyblockWerner Koch1-75/+177
2005-10-06Yet another fix for the gpg.c renameWerner Koch1-0/+15
2005-09-14* main.h, misc.c (parse_options): Add the ability to have helpDavid Shaw1-15/+22
strings in xxx-options commands. * keyserver.c (keyserver_opts), import.c (parse_import_options), export.c (parse_export_options), g10.c (parse_list_options, main): Add help strings to xxx-options.
2005-08-04Fixes pertaining to revocation creation with subkey-only exported card keysWerner Koch1-0/+11
2005-07-27Converted all m_free to xfree etc.Werner Koch1-6/+5
2005-07-19* configure.ac [W32]: Always set DISABLE_KEYSERVER_PATH.Werner Koch1-1/+51
* export.c (parse_export_options): New option export-reset-subkey-passwd. (do_export_stream): Implement it. * misc.c (get_libexecdir): New. * keyserver.c (keyserver_spawn): Use it
2005-06-10* options.h, export.c (do_export_stream), keyedit.c (keyedit_menu,David Shaw1-9/+2
menu_clean_subkeys_from_key), trustdb.h, trustdb.c (clean_subkeys_from_key): Remove subkey cleaning function. It is of very limited usefulness since it cannot be used on any subkey that can sign, and can only affect multiple selfsigs on encryption-only subkeys.
2005-06-08* options.h, g10.c (main), export.c (parse_export_options,David Shaw1-20/+33
do_export_stream): Add export-options export-clean-sigs, export-clean-uids, export-clean-subkeys, and export-clean which is all of the above. Export-minimal is the same except it also removes all non-selfsigs. export-unusable-sigs is now a noop.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2005-05-14* build-packet.c (do_comment): Removed. (build_packet): IgnoreDavid Shaw1-5/+7
comment packets. * export.c (do_export_stream): Don't export comment packets any longer. * options.h, g10.c (main): Remove --sk-comments and --no-sk-comments options, and replace with no-op.
2005-01-01* options.h, import.c (parse_import_options, delete_inv_parts): AddDavid Shaw1-1/+12
import-unusable-sigs flag to enable importing unusable (currently: expired) sigs. * options.h, export.c (parse_export_options, do_export_stream): Add export-unusable-sigs flag to enable exporting unusable (currently: expired) sigs.
2004-11-26* export.c (do_export_stream): Allow export-minimal to work with secretDavid Shaw1-4/+7
keys, even though a non-selfsig secret key signature is rare.
2004-11-26* options.h, export.c (parse_export_options, do_export_stream), import.cDavid Shaw1-6/+10
(parse_import_options, import_keys_internal): Make the import-options and export-options distinct since they can be mixed together as part of keyserver-options.
2004-11-25* options.h, export.c (parse_export_options, do_export_stream): AddDavid Shaw1-22/+38
"export-minimal" option to disregard any sigs except selfsigs.
2004-10-28* delkey.c, export.c, keyedit.c, pkclist.c, revoke.c, skclist.c: Fix a fewDavid Shaw1-1/+1
missed possible \"username\" quotes.
2004-10-14* export.c (do_export_stream) [ENABLE_SELINUX_HACKS]: Don't allowWerner Koch1-0/+8
secret key export. * import.c (import_secret_one) [ENABLE_SELINUX_HACKS]: Likewise
2004-03-05* revoke.c (export_minimal_pk), export.c (do_export_stream), passphrase.cDavid Shaw1-36/+26
(passphrase_to_dek), keyserver.c (print_keyrec): A few more places to use --keyid-format. * options.h, g10.c (main), export.c (parse_export_options, do_export_stream): Remove --export-all and the "include-non-rfc" export-option as they are no longer meaningful with the removal of v3 Elgamal keys.
2004-02-14* keyserver.c (argsep): Move to misc.c.David Shaw1-5/+5
* main.h, misc.c (parse_options), export.c (parse_export_options), import.c (parse_import_options), g10.c (main): Use it here to allow for options with optional arguments. Change all callers.
2003-12-28* main.h, misc.c (parse_options): Add a "noisy" flag to enable and disableDavid Shaw1-3/+4
the messages about which option didn't match or matched ambiguously. Change all callers (g10.c, keyserver.c). * main.h, import.c (import_options), export.c (export_options): Pass the noisy flag through.