aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sign.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* gpg: Rework ECC support and add experimental support for Ed25519.Werner Koch2013-11-151-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]>
* gpg: Add pinentry-mode feature.Werner Koch2013-02-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/gpg.c: Include shareddefs.h. (main): Add option --pinentry-mode. * g10/options.h (struct opt): Add field pinentry_mode. * g10/passphrase.c: Include shareddefs.h. (have_static_passphrase): Take care of loopback pinentry_mode. (read_passphrase_from_fd): Ditto. (get_static_passphrase): New. (passphrase_to_dek_ext): Factor some code out to ... (emit_status_need_passphrase): new. * g10/call-agent.c (start_agent): Send the pinentry mode. (default_inq_cb): Take care of the PASSPHRASE inquiry. Return a proper error code. (agent_pksign): Add args keyid, mainkeyid and pubkey_algo. (agent_pkdecrypt): Ditto. * g10/pubkey-enc.c (get_it): Pass new args. * g10/sign.c (do_sign): Pass new args. * g10/call-agent.c (struct default_inq_parm_s): New. Change all similar structs to reference this one. Change all users and inquire callback to use this struct, instead of NULL or some undefined but not used structs. This change will help to eventually get rid of global variables. -- This new features allows to use gpg without a Pinentry. As a prerequisite the agent must be configured to allow the loopback pinentry mode (option --allow-loopback-pinentry). For example gpg2 --pinentry-mode=loopback FILE.gpg may be used to decrypt FILE.gpg while entering the passphrase on the tty. If batch is used, --passphrase et al. may be used, if --command-fd is used, the passphrase may be provided by another process. Note that there are no try-again prompts in case of a bad passphrase.
* gpg: Fix honoring --cert-digest-algo when recreating a certChristian Aistleitner2013-01-111-0/+2
| | | | | * g10/sign.c (update_keysig_packet): Override original signature's digest algo in hashed data and for hash computation.
* gpg: Make commit 2b3cb2ee actually workWerner Koch2012-12-191-2/+3
| | | | | | * g10/sign.c (update_keysig_packet): Use digest_algo. (cherry-picked from commit d23ec86095714d388acac14b515445fe69f019e9)
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-10/+10
| | | | | | | | | | | | | | | | | | | 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.
* Honor --cert-digest-algo when recreating a cert.David Shaw2012-02-011-2/+7
| | | | | | | | * g10/sign.c (update_keysig_packet): Honor --cert-digest-algo when recreating a cert. This is used by various things in --edit-key like setpref, primary, etc. Suggested by Christian Aistleitner.
* Replace gcry_md_start_debug by gcry_md_debug.Werner Koch2011-09-201-3/+3
| | | | | This is to allow building with Libgcrypt master (1.6) which has some cleanups in the API/ABI.
* Extend algo selection menu.Werner Koch2011-02-031-38/+38
| | | | | | | This allows to add an ECC key and to set the capabilities of an ECDSA key. Fix printing of the ECC algorithm when creating a signature.
* Truncate the DSA hash; fixes regression.Werner Koch2011-01-211-3/+0
| | | | Removed left over debug code.
* Make most of the selftests work.Werner Koch2011-01-211-0/+3
| | | | | Note that there is still a problem with tests/openpgp/sigs.test while using the option --digest-algo SHA256.
* Editorial changes and allow building with old libgcrypts.Werner Koch2011-01-211-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Integrating http://code.google.com/p/gnupg-ecc/source/detail?r=15 .Andrey Jivsov2011-01-061-22/+16
| | | | | | | | | | 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.
* Make public key data structure easier to read.Werner Koch2010-10-201-5/+44
| | | | | Check vor v1 card while signing.
* Fix a signing problem with the cardWerner Koch2010-10-181-53/+23
|
* Exporting secret keys via gpg-agent is now basically supported.Werner Koch2010-10-011-2/+3
| | | | | | A couple of forward ported changes. Doc updates.
* Removed more secret key related code.Werner Koch2010-09-061-1/+1
| | | | | | It builds fine and passes some of the tests but there are quite some features which don't work yet.
* Even less prompts for a new key now.Werner Koch2010-09-011-16/+19
|
* Provide a useful pinentry prompt.Werner Koch2010-04-271-4/+1
|
* Decryption and signi via agent is now implemented.Werner Koch2010-04-231-4/+10
|
* More changes on the way to remove secring.gpg.Werner Koch2010-04-211-0/+3
|
* Generating an OpenPGP key cia gpg-agent basically works.Werner Koch2010-04-201-61/+111
|
* Use gpg_err_set_errno to assign values to ERRNO.Werner Koch2010-04-011-6/+6
|
* Some minor changes and typo fixes.Werner Koch2010-02-261-6/+9
| | | | | Started to implement a TCP option in gpg-connect-agent.
* Various changes to eventually support openpgp keys in pgp-agent.Werner Koch2010-02-021-188/+192
| | | | | | Comment fixes. Minor chnages in preparation of a W32CE port.
* Some changes to suport g13.Werner Koch2009-09-301-3/+4
|
* Print 'empty file' warning only with --verbose.Werner Koch2009-05-111-1/+1
|
* Remove hacks which are not anymore needed since we now require Libgcrypt 1.4Werner Koch2008-09-291-3/+1
|
* Support DSA2.Werner Koch2007-12-121-7/+9
| | | | | | Support Camellia for testing. More audit stuff.
* Started to implement the audit log feature.Werner Koch2007-11-191-1/+1
| | | | | | | | Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
* Ported changes from 1.4.Werner Koch2007-10-251-43/+15
| | | | | Add copyright notices.
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* Implemented the --gen-key command as we can't use the gpgsm-gencert.sh under ↵Werner Koch2007-06-211-0/+1
| | | | Windows.
* [w32] gpg-agent is now started automagically by gpgsm.Werner Koch2007-06-201-4/+1
|
* Added LIBINTL to more Makefile targets.Werner Koch2007-01-301-2/+3
| | | | | | | | | | | | | | | | | | | | doc/ * com-certs.pem: Added the current root certifcates of D-Trust and S-Trust. g10/ * status.c (write_status_begin_signing): New. * sign.c (sign_file, sign_symencrypt_file): Call it. * textfilter.c (copy_clearsig_text): Call it. * call-agent.c (agent_scd_pksign): Pass --hash-rmd160 to SCD if required. * gpg.c (main): Let --no-use-agent and --gpg-agent-info print a warning. * misc.c (obsolete_option): New.
* Fixes for CVE-2006-6235Werner Koch2006-12-061-20/+30
|
* Fix for bug 537Werner Koch2006-10-021-6/+6
|
* Take advantage of newer gpg-error features.Werner Koch2006-09-141-6/+6
|
* Preparing a new releasegnupg-1.9.22Werner Koch2006-07-271-45/+56
|
* Ported patches from 1.4.x Werner Koch2006-06-271-1/+8
|
* g10/ does build again.Werner Koch2006-05-231-1/+1
|
* Merged recent changes from 1.4Werner Koch2006-04-281-37/+86
|
* Still merging 1.4.3 code backWerner Koch2006-04-211-2/+3
|
* Continued with merging.Werner Koch2006-04-191-33/+33
| | | | | Still does not build.
* Merged with gpg 1.4.3 code. Werner Koch2006-04-191-271/+379
| | | | | The gpg part does not yet build.
* Minor fixesWerner Koch2003-09-301-37/+1
|
* Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch2003-09-231-16/+49
|
* Adjusted for use with current libgcrypt (1.1.42).Werner Koch2003-07-281-4/+4
|
* * keygen.c (generate_keypair): Create an AUTHKEYTYPE entry for cards.Werner Koch2003-07-231-1/+37
| | | | | | (do_generate_keypair): Abd generate the authkey. (check_smartcard): Changed menu accordingly.
* * options.h (DBG_CIPHER): Reintroduced it.Werner Koch2003-07-031-0/+2
| | | | | | | | | | | | | | | | | | * seskey.c (encode_session_key): Debug output of the session key. * pubkey-enc.c (get_it): Handle card case. * call-agent.c (agent_scd_pkdecrypt): New. * pkglue.c (pk_encrypt): Add RSA support. * g10.c (main): Default to --use-agent. * keygen.c (show_smartcard): Print info about the public key. (check_smartcard): Check for existing key here. (gen_card_key): And not anymore here. (fpr_is_zero): New. (generate_keypair): Generate both keys for a card. (smartcard_change_url): Nw.
* * app-openpgp.c (store_fpr): Fixed fingerprint calculation.Werner Koch2003-07-011-3/+4
| | | | | | | | * keygen.c (gen_card_key): Obviously we should use the creation date received from SCDAEMON, so that the fingerprints will match. * sign.c (do_sign): Pass the serialno to the sign code. * keyid.c (serialno_and_fpr_from_sk): New.