aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | gpg: Fix packet length checking in symkeyenc parser.Werner Koch2018-02-061-7/+10
| | | | | | | | | | | | | | | | | | | | * g10/parse-packet.c (parse_symkeyenc): Move error printing to the end. Add additional check to cope for the 0je extra bytes needed for AEAD. -- Fixes-commit: 9aab9167bca38323973e853845ca95ae8e9b6871 GnuPG-bug-id: 3780
* | Add a new OpenPGP card vendor.Werner Koch2018-02-011-0/+1
| | | | | | | | --
* | gpg: Rename a misnomed arg in open_outfile.Werner Koch2018-01-282-11/+13
| | | | | | | | | | | | * g10/openfile.c (open_outfile): Rename inp_fd to out_fd. Signed-off-by: Werner Koch <[email protected]>
* | agent: Fix sending connecting process uid to pinentry.NIIBE Yutaka2018-01-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * agent/command-ssh.c (get_client_info): Use LOCAL_PEERCRED. -- LOCAL_PEERUID was wrong (while there is LOCAL_PEERUUID). For FreeBSD and macOS, we can use LOCAL_PEERCRED to get uid. GnuPG-bug-id: 3757 Fixes-commit: 28aa6890588cc108639951bb4bef03ac17743046 Signed-off-by: NIIBE Yutaka <[email protected]>
* | Merge branch 'STABLE-BRANCH-2-2' into masterNIIBE Yutaka2018-01-262-1/+4
|\| | | | | | | Signed-off-by: NIIBE Yutaka <[email protected]>
| * agent: Fix last commit.NIIBE Yutaka2018-01-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Check ucred.h as well as sys/ucred.h. * agent/command-ssh.c: Add inclusion of ucred.h. -- It was T2981, adding ucred.h for Solaris. We also need sys/ucred.h for FreeBSD and macOS. Signed-off-by: NIIBE Yutaka <[email protected]>
| * agent: More fix for get_client_pid for portability.NIIBE Yutaka2018-01-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Check sys/ucred.h instead of ucred.h. * agent/command-ssh.c: Include sys/ucred.h. -- It's *BSD and macOS thing. Fixes-commit: f7f806afa5083617f4aba02fc3b285b06a7d73d4 Signed-off-by: NIIBE Yutaka <[email protected]>
* | Merge branch 'STABLE-BRANCH-2-2' into masterWerner Koch2018-01-2548-1075/+1206
|\| | | | | | | Signed-off-by: Werner Koch <[email protected]>
| * doc: Note --quick-gen-key as an alias for --quick-generate-keyWerner Koch2018-01-251-0/+2
| | | | | | | | --
| * scd: Support KDF Data Object of OpenPGPcard V3.3.NIIBE Yutaka2018-01-221-25/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | * scd/app-openpgp.c (do_getattr, do_setattr): Add KDF support. (pin2hash_if_kdf): New. (verify_a_chv): Add PINLEN arg. Use pin2hash_if_kdf. (verify_chv2, do_sign): Follow the change of verify_a_chv. (verify_chv3, do_change_pin): Use pin2hash_if_kdf. -- GnuPG-bug-id: 3152 Signed-off-by: NIIBE Yutaka <[email protected]>
| * gpg: Fix the use of future-default with --quick-add-key.Werner Koch2018-01-181-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (parse_key_parameter_part): Add arg clear_cert. (parse_key_parameter_string): Add arg suggested_use and implement fallback. Change callers to pass 0 for new arg. (parse_algo_usage_expire): Pass the parsed USAGESTR to parse_key_parameter_string so that it can use it in case a subkey is to be created. -- The problem here was that future-default gives the primary and subkey algorithm. However, when using future-default for adding a key, the second part was always used which is for encryption. If the caller now wanted to create a signing subkey using the future-default parameters this did not worked. gpg --batch --passphrase "" --quick-add-key FPR future-default encr aready worked as did gpg --batch --passphrase "" --quick-add-key FPR ed25519 sign but gpg --batch --passphrase "" --quick-add-key FPR future-default sign does only work with this fix. GnuPG-bug-id: 3747 Signed-off-by: Werner Koch <[email protected]>
| * doc: Note pinentry-mode for passphrase optsAndre Heinecke2018-01-091-6/+11
| | | | | | | | | | | | | | * doc/gpg.texi (--passphrase, --passphrase-file, --passphrase-fd): Note that pinentry-mode needs to be loopback. Signed-off-by: Andre Heinecke <[email protected]>
| * gpg: Print all keys with --decrypt --list-only.Werner Koch2018-01-081-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/mainproc.c (proc_pubkey_enc): Use dedicated error code for list-only and put the key into PKENC_LIST. (print_pkenc_list): Take care of the new error code. -- If the secret keys exist in --list-only mode it was not printed in --list-only mode. GnuPG-bug-id: 3718 Signed-off-by: Werner Koch <[email protected]>
| * gpg: Allow "futuredefault" as alias for "future-default".Werner Koch2018-01-011-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (parse_key_parameter_string): Allow "futuredefault" and use case-insensitive matching (quick_generate_keypair): Ditto. (parse_algo_usage_expire): Ditto. -- The man page is sometimes rendered in a way that the hyphen may be not be considered as part of the string. And while at it we also allow case-insensitivity. GnuPG-bug-id: 3655 Signed-off-by: Werner Koch <[email protected]>
| * gpg: Allow the use of "cv25519" and "ed25519" in the keygen parms.Werner Koch2017-12-291-0/+7
| | | | | | | | | | | | | | | | | | | | * g10/keygen.c (gen_ecc): Map curve names. -- See https://lists.gnupg.org/pipermail/gnupg-users/2017-December/059619.html Signed-off-by: Werner Koch <[email protected]>
| * scd: Fix for inactive card at start by internal CCID driver.NIIBE Yutaka2017-12-271-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * scd/ccid-driver.c (do_close_reader): Set NULL on close. (bulk_in): Move DEBUGOUT and check by EP_INTR. (ccid_get_atr): Clear powered_off flag after initial status check. -- Many card readers automatically turn on inserted card, but some defaults to turning off at start. GnuPG-bug-id: 3508 Signed-off-by: NIIBE Yutaka <[email protected]>
| * build: Increase libassuan min version to 2.5.0Kristian Fiskerstrand2017-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | -- assuan_sock_set_system_hooks is used unconditionally in gnupg since commit 9f641430dcdecbd7ee205d407cb19bb4262aa95d, and as such it requires libassuan 2.5.0 (function introduced in commit 90dc81682b13a7cf716a8a26b891051cbd4b0caf) For a detailed description see: https://lists.gnupg.org/pipermail/gnupg-devel/2017-December/033323.html
| * kbx: Simplify by removing custom memory functions.Werner Koch2017-12-226-126/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kbx/keybox-util.c (keybox_set_malloc_hooks): Remove. (_keybox_malloc, _keybox_calloc, keybox_realloc) (_keybox_free): Remove. (keybox_file_rename): Remove. Was not used. * sm/gpgsm.c (main): Remove call to keybox_set_malloc_hooks. * kbx/kbxutil.c (main): Ditto. * kbx/keybox-defs.h: Remove all separate includes. Include util.h. remove convenience macros. * common/logging.h (return_if_fail): New. Originally from keybox-defs.h but now using log_debug. (return_null_if_fail): Ditto. (return_val_if_fail): Ditto. (never_reached): Ditto. -- Originally the KBX code was written to allow standalone use. However this required lot of ugliness like separate memory allocators and such. It also precludes the use of some standard functions from common due to their use of the common gnupg malloc functions. Dropping all that makes things easier. Minor disadvantages: the kbx call done for gpg will now use gcry malloc fucntions and not the standard malloc functions. This might be a bit slower but removing them even fixes a possible bug in keybox_tmp_names which is used in gpg and uses gpg's xfree which is actually gcry_free. Signed-off-by: Werner Koch <[email protected]>
| * common: Use larger buffer for homedir in case of 64 bit UIDs.Werner Koch2017-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/homedir.c (_gnupg_socketdir_internal): Enlarge PREFIX by 6 bytes for "/gnupg". -- The temporary buffer was to short for the extra "/gnupg". However the 20 bytes for the UID is large enough for all 32 bit UIDs and would only fail (detected) if a 64 bit UID is used. Fixes-commit: 17efcd2a2acdc3b7f00711272aa51e5be2476921 Reported-by: Rainer Perske. Signed-off-by: Werner Koch <[email protected]>
| * Post release updatesWerner Koch2017-12-202-1/+5
| | | | | | | | --
| * Release 2.2.4gnupg-2.2.4Werner Koch2017-12-201-1/+30
| |
| * po: Auto-updateWerner Koch2017-12-201-12/+21
| | | | | | | | --
| * po: Update Czech translationPetr Pisar2017-12-191-763/+548
| | | | | | | | Signed-off-by: Werner Koch <[email protected]>
| * po: Update Russian translationIneiev2017-12-191-4/+3
| |
| * wks: New server options --check, --with-dir, with-file.Werner Koch2017-12-192-17/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * tools/gpg-wks-server.c (aCheck, oWithDir, oWithFile): New const. (opts): New options --check, --with-dir, and --with-file. (main): Call command_check_key. (command_list_domains): Implement option --with-dir. (fname_from_userid): New. (command_check_key): New. (command_remove_key): Implement existsing command. (command_revoke_key): Call command_remove_key as a simple implementation. Signed-off-by: Werner Koch <[email protected]>
| * po: Auto-updateWerner Koch2017-12-1926-105/+93
| | | | | | | | | | | | -- Mainly due to removed translations in debug messages.
| * po: Fix a string in de and nl. Mark a string in ro and sk fuzzy.Werner Koch2017-12-194-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- These wrong translations are propably due to accidently removing a fuzzy mark. A German translation (gpgsm audit feature) was actually reversed. A Dutch translation has an unused ": %s" at the end. I am not 100% of the Romanian and Slovak strings, thus I marked them as fuzzy. GnuPG-bug-id: 3619 Signed-off-by: Werner Koch <[email protected]>
| * conf: New option --status-fd.Werner Koch2017-12-185-18/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * tools/gpgconf.c (oStatusFD): New const. (opts): New option --status-fd. (statusfp): New var. (set_status_fd): New. (gpgconf_write_status): New. (gpgconf_failure): New. (main): Set status fd and replace exit by gpgconf_failure. * tools/gpgconf-comp.c: Repalce exit by gpgconf_failure. (gc_process_gpgconf_conf): Print a few warning status messages. Signed-off-by: Werner Koch <[email protected]>
* | gpg: New maintainer option --debug-set-iobuf-size.Werner Koch2018-01-244-6/+23
| | | | | | | | | | | | | | | | | | | | * g10/gpg.c (opts): Add new option. (opt_set_iobuf_size): New var. (set_debug): Set the option. * tests/openpgp/armor.scm: Use this option to revert the buffer size to the one which used to exhibit the tested bugs. Signed-off-by: Werner Koch <[email protected]>
* | iobuf: Increase the size of the buffer. Add iobuf_set_buffer_size.Werner Koch2018-01-242-35/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/iobuf.c (IOBUF_BUFFER_SIZE): Rename to DEFAULT_IOBUF_BUFFER_SIZE and increase to 64k. (iobuf_buffer_size): New var. Always use this instead of the macro. (iobuf_set_buffer_size): New. (struct file_filter_ctx_t): Add field delayed_rc. (file_filter) [!W32]: Try to fill the supplied buffer. -- I did some test to see whether this has an effect. A test program piped 100 million random bytes to gpg to symmetric encryption only w/0 compression. Single read means the old behaviour, multi read the new behaviour which fills up the buffer when the read(2) returned only 4k in once call. 8k buffer single read User time (seconds): 0.09 System time (seconds): 0.04 Percent of CPU this job got: 6% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.04 8k buffer multi read User time (seconds): 0.08 System time (seconds): 0.05 Percent of CPU this job got: 6% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.04 64k buffer single read User time (seconds): 0.09 System time (seconds): 0.06 Percent of CPU this job got: 6% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.20 64k buffer multi read User time (seconds): 0.11 System time (seconds): 0.06 Percent of CPU this job got: 8% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.01 128k buffer single read User time (seconds): 0.09 System time (seconds): 0.05 Percent of CPU this job got: 7% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.05 128k buffer multi read User time (seconds): 0.11 System time (seconds): 0.05 Percent of CPU this job got: 8% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.01 512k buffer single read: User time (seconds): 0.08 System time (seconds): 0.08 Percent of CPU this job got: 7% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.21 512k buffer multi read: User time (seconds): 0.10 System time (seconds): 0.06 Percent of CPU this job got: 7% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.05 Does not make much of a difference :-(. Maybe it changes depending on the type of used filters. Signed-off-by: Werner Koch <[email protected]>
* | gpg: Fix AEAD encryption for chunk sizes other than 64 KiB.Werner Koch2018-01-242-210/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/cipher-aead.c (do_flush): Init ERR. Fix remaining chunklen computation. (do_free): Add dummy encryption. Close the cipher handle. * g10/decrypt-data.c (aead_underflow): Rewrite. -- Until we have integrated test into the test suite extensive tests can also be done with a script like this: --8<---------------cut here---------------start------------->8--- #!/bin/sh set -e GPG="../g10/gpg --rfc4880bis --pinentry-mode=loopback" GPG="$GPG --passphrase abc --batch" MKTDATA="$HOME/b/gnupg-2.0/tools/mk-tdata" for chunksize in 6 7 12 13 14 30; do for count in $(seq 1 200) $(seq 8100 8200) \ $(seq 16350 16400) $(seq 20000 20100); do if [ ! -f "testfile-$count" ]; then $MKTDATA $count >"testfile-$count" fi echo "testing chunk size 2^$chunksize with $count bytes" $GPG --force-aead --aead-algo ocb --s2k-mode 0 --cipher AES -v -z 0 \ -c --chunk-size $chunksize \ <"testfile-$count" >"testfile-$count.gpg" 2>/dev/null $GPG -vd <"testfile-$count.gpg" >"testfile-$count.out" 2>/dev/null if ! cmp "testfile-$count" "testfile-$count.out"; then echo "FAILED comparing count $count" >&2 exit 1 fi done done echo All good --8<---------------cut here---------------end--------------->8--- Signed-off-by: Werner Koch <[email protected]>
* | gpg: Rename a variable in decrypt-data for clarity.Werner Koch2018-01-241-38/+38
| | | | | | | | | | | | | | | | * g10/decrypt-data.c (decode_filter_context_s): Rename field 'defer' to 'holdback' and replace 'defer_filled' flag into 'holdbacklen'. Change all users. Signed-off-by: Werner Koch <[email protected]>
* | gpg: New option --chunk-size.Werner Koch2018-01-237-59/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/gpg.c (opts): New option --chunk-size. (oChunkSize): New const. (build_list_aead_test_algo, build_list_aead_algo_name): New. (my_strusage): List AEAD algos. (main): Implement --chunk-size.. * g10/options.h (struct opt): Add field 'chunk_size'. (DBG_IPC): Remove duplicated macro. * g10/main.h (DEFAULT_AEAD_ALGO): Depend on Libgcrypt version. * g10/misc.c (openpgp_aead_test_algo): Ditto. * g10/cipher-aead.c: Silence if not in debug mode. * g10/decrypt-data.c: Ditto. -- And that new option immediatley revealed bugs in our chunking code :-(.
* | gpg: Copy the AEAD prefs to the user ID struct.Werner Koch2018-01-231-3/+11
| | | | | | | | | | | | | | | | | | | | * g10/getkey.c (fixup_uidnode): Copy the AEAD prefs. -- With this patch AEAD preferences are now properly created and displayed. Signed-off-by: Werner Koch <[email protected]>
* | gpg: Clear the symmetric passphrase cache for encrypted session keys.Werner Koch2018-01-231-2/+10
| | | | | | | | | | | | | | | | * g10/mainproc.c (proc_symkey_enc): Clear the symmetric key cache on error. (proc_encrypted): Need to take are of the checksum error. Signed-off-by: Werner Koch <[email protected]>
* | gpg: Implement AEAD for SKESK packets.Werner Koch2018-01-2311-105/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/packet.h (PKT_symkey_enc): Add field aead_algo. * g10/build-packet.c (do_symkey_enc): Support version 5 packets. * g10/parse-packet.c (parse_symkeyenc): Ditto. * g10/encrypt.c (encrypt_symmetric): Force using a random session key in AEAD mode. (encrypt_seskey): Add and support arg aead_algo. (write_symkey_enc): Ditto. (encrypt_simple): Adjust accordingly. (encrypt_filter): Ditto. * g10/gpgcompose.c (sk_esk): For now call encrypt_seskey without AEAD support. * g10/mainproc.c (symkey_decrypt_seskey): Support AEAD. Nver call BUG but return an error. (proc_symkey_enc): Call symkey_decrypt_seskey in a bug compatible way. * g10/import.c (check_prefs): Check AEAD preferences. * g10/keyedit.c (show_prefs): Print AEAD preferences. -- For easier debugging this patch also changes some diagnostics to also print the encryption mode with the cipher algorithm. Signed-off-by: Werner Koch <[email protected]>
* | gpg: Unify AEAD parameter retrieval.Werner Koch2018-01-228-66/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/pkclist.c (select_aead_from_pklist): Return the AEAD_algo. * g10/encrypt.c (use_aead): Return the AEAD algo. (encrypt_simple): Adjust for this change. (encrypt_crypt): Ditto. (encrypt_filter): Ditto. * g10/sign.c (sign_symencrypt_file): Ditto. * g10/misc.c (MY_GCRY_CIPHER_MODE_EAX): New. (openpgp_aead_algo_info): New. * g10/cipher-aead.c (MY_GCRY_CIPHER_MODE_EAX): Remove. (write_header): Use new fucntion. * g10/decrypt-data.c (MY_GCRY_CIPHER_MODE_EAX): Remove. (decrypt_data): Use new function. Also allow for chunkbytes other than 10. -- Note that other chunk bytes than 10 and in particular 0 (64 byte chunks) have not yet been tested. Signed-off-by: Werner Koch <[email protected]>
* | gpg: Refactor function encrypt_seskey.Werner Koch2018-01-223-54/+113
| | | | | | | | | | | | | | | | | | * g10/encrypt.c (encrypt_seskey): Allocate the buffer for the encrypted key and returns that buffer and its length. (encrypt_simple): Adjust for above change. (write_symkey_enc): Ditto. Signed-off-by: Werner Koch <[email protected]>
* | gpg: Support EAX if for latest Libgcrypt.Werner Koch2018-01-213-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/cipher-aead.c (MY_GCRY_CIPHER_MODE_EAX): New. (write_header): Use it. * g10/decrypt-data.c (MY_GCRY_CIPHER_MODE_EAX): New. (decrypt_data): Use it. * g10/misc.c (openpgp_aead_test_algo): Allow EAX. -- This allows the use of EAX when the latest Libgcrypt master is used. Signed-off-by: Werner Koch <[email protected]>
* | gpg: First take on PKT_ENCRYPTED_AEAD.Werner Koch2018-01-2112-131/+1228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/openpgpdefs.h (PKT_ENCRYPTED_AEAD): New const. * g10/dek.h (DEK): Increase size of use_aead to 4 bits. * g10/filter.h (cipher_filter_context_t): Add new fields for AEAD. * g10/packet.h (PKT_encrypted): Add fields aead_algo, cipher_algo, and chunkbyte. * g10/build-packet.c (do_encrypted_aead): New. (build_packet): Call it. * g10/parse-packet.c (dump_sig_subpkt): Handle SIGSUBPKT_PREF_AEAD. (parse_one_sig_subpkt, can_handle_critical): Ditto. (parse_encrypted): Clear new PKT_ENCRYPTED fields. (parse_encrypted_aead): New. (parse): Call it. * g10/gpg.c (main): Take care of --rfc4880bis option when checking compliance. * g10/cipher-aead.c: Replace the stub by real code. * g10/decrypt-data.c (decode_filter_ctx_t): Add fields for use with AEAD. (aead_set_nonce): New. (aead_set_ad): New. (decrypt_data): Support AEAD. (aead_underflow): New. (aead_decode_filter): New. * g10/encrypt.c (use_aead): Make that new fucntion work. (encrypt_simple): Use default_aead_algo() instead of EAX. * g10/mainproc.c (proc_encrypted): Support AEAD. (do_proc_packets): Support PKT_ENCRYPTED_AEAD. -- This code has seen only a very few manual tests. Encrypting always uses a 64k chunks and decryption has not been tested with larger chunks. Those small chunks make debugging much faster. Tests can be done using: gpg --rfc4880bis --pinentry-mode=loopback --passphrase abc \ --force-aead --aead-algo ocb --s2k-mode 0 --cipher AES \ -v -z 0 --status-fd 2 -c <INFILE >OUTFILE and gpg --rfc4880bis --pinentry-mode=loopback --passphrase=abc \ --status-fd 2 -v -d <INFILE >OUTFILE Signed-off-by: Werner Koch <[email protected]>
* | gpg: Add stub function for encrypting AEAD.Werner Koch2018-01-107-10/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | * g10/cipher.c (cipher_filter): Rename to cipher_filter_cfb. * g10/cipher-aead.c: New. Right now only with a stub function. * g10/Makefile.am (gpg_sources): Add file. * g10/encrypt.c (encrypt_simple): Push either cipher_filter_cfb or cipher_filter_aead. (encrypt_crypt): Ditto. (encrypt_filter): Ditto. * g10/sign.c (sign_symencrypt_file): Ditto. Signed-off-by: Werner Koch <[email protected]>
* | gpg: New option --force-aeadWerner Koch2018-01-108-20/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/dek.h (DEK): Turn fields use_mdc, algo_printed and symmetric into single bit vars. Make sure they are always set to 1 or 0. (DEK): New field use_aead. * g10/options.h (struct opt): New field force_aead. * g10/pkclist.c (select_aead_from_pklist): New. * g10/gpg.c (oForceAEAD): New const. (opts): New options "--force-aead". (main): Set new option. * g10/encrypt.c (use_aead): New. (encrypt_simple): Implement new flags DEK.use_aead. (encrypt_crypt): Ditto. (encrypt_filter): Ditto. * g10/sign.c (sign_symencrypt_file): Ditto. -- This patch should be enough to detect whether AEAD can be used. Not tested. Signed-off-by: Werner Koch <[email protected]>
* | gpg: Add option and preference framework for AEAD.Werner Koch2018-01-1011-16/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/openpgpdefs.h (aead_algo_t): New. (SIGSUBPKT_PREF_AEAD): New. * g10/gpg.c (oAEADAlgo, oPersonalAEADPreferences): New. (opts): New options --aead-algo and --personal-aead-preferences. (set_compliance_option): Clar aead algo. (main): Parse and check the new options * g10/options.h (struct opt): Add fields def_aead_algo and personal_aead_prefs. * g10/packet.h (PREFTYPE_AEAD): New enum value. (PKT_user_id): Add field flags.aead. (PKT_public_key): Add field flags.aead. * g10/pkclist.c (select_algo_from_prefs): Support PREFTYPE_AEAD. * g10/getkey.c (fixup_uidnode): Set AEAD flag. (merge_selfsigs): Ditto. * g10/kbnode.c (dump_kbnode): Show aead flag. * g10/keyedit.c (show_prefs): Ditto. (show_key_with_all_names_colon): Ditto. * g10/keygen.c (aead_presf, n_aead_prefs): New vars. (set_one_pref): Suppport PREFTYPE_AEAD. (keygen_set_std_prefs): Parse AEAD preferences. (keygen_get_std_prefs): Ditto. (add_feature_aead): New. (keygen_upd_std_prefs): Call that and build AEAD pref packet. * g10/main.h (DEFAULT_AEAD_ALGO): New const. * g10/misc.c (openpgp_aead_test_algo): New. (openpgp_aead_algo_name): New. (string_to_aead_algo): New. (default_aead_algo): New. -- This is only used in --rfc4880bis mode and not really tested. Signed-off-by: Werner Koch <[email protected]>
* | doc: Include NEWS from 2.2.4Werner Koch2017-12-201-0/+30
| | | | | | | | --
* | Merge branch 'STABLE-BRANCH-2-2' into masterWerner Koch2017-12-1820-253/+430
|\| | | | | | | | | | | -- Signed-off-by: Werner Koch <[email protected]>
| * gpgconf: Show --compliance in expert mode.Werner Koch2017-12-181-2/+2
| | | | | | | | | | | | | | * tools/gpgconf-comp.c (gc_options_gpg): Set compliance to expert. (gc_options_gpgsm): Ditto. Signed-off-by: Werner Koch <[email protected]>
| * sm: Allow explicit setting of the default --compliance=gnupgWerner Koch2017-12-183-4/+8
| | | | | | | | | | | | | | | | | | | | * sm/gpgsm.c (main): Allow setting of the default compliance. * tools/gpgconf-comp.c (gc_options_gpgsm): Add "compliance". -- This is required so that we can use this option in in gpgconf.conf. Signed-off-by: Werner Koch <[email protected]>
| * po: Update Japanese translation.NIIBE Yutaka2017-12-181-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * po/ja.po: Fix message with no "%s". -- Backport of master commit from: 77e2fcb4ffbad8577a2cf41f17bf92dec6a93ad8 The wrong message caused segmentation fault for key generation when no expiration is specified. GnuPG-bug-id: 3619 Signed-off-by: NIIBE Yutaka <[email protected]>
| * gpg: Print a warning for too much data encrypted with 3DES et al.Werner Koch2017-12-132-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/filter.h (cipher_filter_context_t): Remove unused filed 'create_mdc'. Turn field 'header' into a bit field. Add new fields 'short_blklen_warn' and 'short_blklen_count'. * g10/cipher.c (write_header): Print a warning if MDC is not used. (cipher_filter): Print a warning for long messages encrypted with a short block length algorithm. -- Note that to test this warning in a reliable way compression needs to be disabled. Signed-off-by: Werner Koch <[email protected]>
| * gpg: Simplify cipher:write_header.Werner Koch2017-12-131-6/+2
| | | | | | | | | | | | * g10/cipher.c (write_header): Use write_status_printf. Signed-off-by: Werner Koch <[email protected]>