aboutsummaryrefslogtreecommitdiffstats
path: root/g10/cipher.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-05-31gpg: Remove MDC optionsWerner Koch1-2/+4
* g10/gpg.c: Turn options --force-mdc, --no-force-mdc, --disable-mdc and --no-disable-mdc into NOPs. * g10/encrypt.c (use_mdc): Simplify. MDC is now almost always used. * g10/cipher.c (write_header): Include extra hint and make translatable. * g10/options.h (struct opt): Remove fields force_mdc and disable_mdc. -- The MDC is now always used except with --rfc2440 which will lead to a a big fat warning. This is a stripped down version of commit 253e8bdd9014cbe6dc06adce9d9dd2f8f4b31709 which could not directly be applied due to the AEAD mechanisms there. Signed-off-by: Werner Koch <[email protected]>
2018-05-31gpg: Turn --no-mdc-warn into a NOP.Werner Koch1-1/+1
* g10/gpg.c (oNoMDCWarn): Remove. (opts): Make --no-mdc-warn a NOP. (main): Don't set var. * g10/options.h (struct opt): Remove 'no_mdc_var'. * g10/cipher-cfb.c (write_header): Assume opt.no_mdc_warn is false. * g10/mainproc.c (proc_encrypted): Ditto. -- Users should not be allowed to suppress the warning that they are shooting into their foot. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 96350c5d5afcbc7f66c535e38b9fcc7355622855)
2017-12-13gpg: Print a warning for too much data encrypted with 3DES et al.Werner Koch1-3/+23
* 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]>
2017-12-13gpg: Simplify cipher:write_header.Werner Koch1-6/+2
* g10/cipher.c (write_header): Use write_status_printf. Signed-off-by: Werner Koch <[email protected]>
2017-12-13indent: Re-indent g10/cipher.cWerner Koch1-103/+109
--
2017-03-07Remove -I option to common.NIIBE Yutaka1-4/+4
* dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2016-04-29gpg: Remove all assert.h and s/assert/log_assert/.Werner Koch1-3/+2
Signed-off-by: Werner Koch <[email protected]>
2016-01-12common: Fix iobuf API of filter function for alignment.NIIBE Yutaka1-1/+1
* common/iobuf.h (IOBUFCTRL_DESC): Change the call semantics. * common/iobuf.c (iobuf_desc): Add the second argument DESC. (print_chain, iobuf_close, do_open, iobuf_sockopen, iobuf_ioctl) (iobuf_push_filter2, pop_filter, iobuf_write_temp): Change calls of iobuf_desc. (file_filter, file_es_filter, sock_filter, block_filter): Fill the description. * common/t-iobuf.c (every_other_filter, double_filter): Likewise. * g10/armor.c, g10/cipher.c, g10/compress-bz2.c, g10/compress.c, g10/decrypt-data.c, g10/encrypt.c, g10/mdfilter.c, g10/progress.c, g10/textfilter.c: Likewise. -- Newer GCC warns against possible alignment difference of pointers. This change can silence those warnings. Signed-off-by: NIIBE Yutaka <[email protected]>
2014-08-14gpg: Remove options --pgp2 and --rfc1991.Werner Koch1-1/+1
* g10/gpg.c (oRFC1991, oPGP2): Remove (opts): Remove --pgp2 and --rfc1991. * g10/options.h (CO_PGP2, CO_RFC1991): Remove. Remove all users. (RFC2440, PGP2): Remove. Remove all code only enabled by these conditions. * tests/openpgp/clearsig.test: Remove --rfc1991 test. -- The use of PGP 2.c is considered insecure for quite some time now (e.g. due to the use of MD5). Thus we remove all support for _creating_ PGP 2 compatible messages.
2011-09-20Replace gcry_md_start_debug by gcry_md_debug.Werner Koch1-1/+1
This is to allow building with Libgcrypt master (1.6) which has some cleanups in the API/ABI.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-2/+2
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2009-06-05Add full Camellia support.David Shaw1-8/+8
* configure.ac: Remove Camellia restriction. * gpg.c (main), misc.c (openpgp_cipher_test_algo): Remove Camellia restriction. * misc.c (map_cipher_openpgp_to_gcry), main.h: Add macros for openpgp_cipher_open, openpgp_cipher_get_algo_keylen, and openpgp_cipher_get_algo_blklen to wrap around the corresponding gcry_* functions, but pass the algorithm number through map_cipher_openpgp_to_gcry. This is needed in case the gcry algorithm number doesn't match the OpenPGP number (c.f. Camellia). * encr-data.c, pubkey-enc.c, mainproc.c, cipher.c, encode.c, seskey.c, passphrase.c, seckey-cert.c: Use new openpgp_cipher_* macros here.
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/.
2006-12-06Fixes for CVE-2006-6235Werner Koch1-1/+1
2006-10-02Fix for bug 537Werner Koch1-1/+1
2006-04-19Continued with merging.Werner Koch1-3/+3
Still does not build.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-38/+38
The gpg part does not yet build.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-30/+43
to libgcrypt functions, using shared error codes from libgpg-error, replacing the old functions we used to have in ../util by those in ../jnlib and ../common, renaming the malloc functions and a couple of types. Note, that not all changes are listed below becuause they are too similar and done at far too many places. As of today the code builds using the current libgcrypt from CVS but it is very unlikely that it actually works.
2003-06-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+152
'GNUPG-1-9-BRANCH'.
2003-05-03* packet.h, build-packet.c (build_sig_subpkt), export.cDavid Shaw1-1/+1
(do_export_stream), import.c (remove_bad_stuff, import), parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt): Remove vestigal code for the old sig cache subpacket. This wasn't completely harmless as it caused subpacket 101 to disappear on import and export. * options.h, armor.c, cipher.c, g10.c, keyedit.c, pkclist.c, sign.c, encode.c, getkey.c, revoke.c: The current flags for different levels of PGP-ness are massively complex. This is step one in simplifying them. No functional change yet, just use a macro to check for compliance level. * sign.c (sign_file): Fix bug that causes spurious compression preference warning. * sign.c (clearsign_file): Fix bug that prevents proper warning message from appearing when clearsigning in --pgp2 mode with a non-v3 RSA key. * main.h, misc.c (compliance_option_string, compliance_string, compliance_failure), pkclist.c (build_pk_list), sign.c (sign_file, clearsign_file), encode.c (encode_crypt, write_pubkey_enc_from_list): New functions to put the "this message may not be usable...." warning in one place. * options.h, g10.c (main): Part two of the simplification. Use a single enum to indicate what we are compliant to (1991, 2440, PGPx, etc.) * g10.c (main): Show errors for failure in export, send-keys, recv-keys, and refresh-keys. * options.h, g10.c (main): Give algorithm warnings for algorithms chosen against the --pgpX and --openpgp rules. * keydb.h, pkclist.c (algo_available): Make TIGER192 invalid in --openpgp mode. * sign.c (sign_file), pkclist.c (algo_available): Allow passing a hint of 0.
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-152/+0
'GNUPG-1-9-BRANCH'.
2002-08-13* encode.c (encode_simple): Fix problem with using compression algo 2 andDavid Shaw1-18/+3
symmetric compressed files. * encode.c (encode_simple, encode_crypt): If we are not using a MDC, compress even if a file is already compressed. This is to help against the chosen ciphertext attack. * pkclist.c (select_algo_from_prefs): Fix requested algorithm bug so the request succeeds even if the requested algorithm is not the first found. * cipher.c (write_header), encode.c (use_mdc, encode_simple, encode_crypt, encrypt_filter), g10.c (main): Be more eager to use a MDC. We use a MDC if the keys directly support it, if the keys list AES (any) or TWOFISH anywhere in the prefs, or if the cipher chosen does not have a 64 bit blocksize.
2002-06-29Update head to match stable 1.0David Shaw1-58/+51
2000-07-14See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch1-14/+35
2000-01-27See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch1-2/+2
2000-01-24See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner KochWerner Koch1-1/+0
1999-12-08See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner KochWerner Koch1-2/+2
1999-11-13See ChangeLog: Sat Nov 13 17:44:23 CET 1999 Werner KochWerner Koch1-1/+1
1999-10-26See ChangeLog: Tue Oct 26 14:10:21 CEST 1999 Werner KochWerner Koch1-8/+10
1999-09-18See ChangeLog: Sat Sep 18 12:16:08 CEST 1999 Werner KochWerner Koch1-19/+40
1999-05-17See ChangeLog: Mon May 17 21:54:43 CEST 1999 Werner KochWerner Koch1-3/+22
1999-04-18See ChangeLog: Sun Apr 18 10:11:28 CEST 1999 Werner KochWerner Koch1-3/+3
1999-04-09See ChangeLog: Fri Apr 9 12:26:25 CEST 1999 Werner KochWerner Koch1-4/+1
1999-04-07See ChangeLog: Wed Apr 7 20:51:39 CEST 1999 Werner KochWerner Koch1-6/+13
1999-01-09See ChangeLog: Sat Jan 9 18:54:57 CET 1999 Werner KochWerner Koch1-0/+1
1998-12-23See ChangeLog: Wed Dec 23 13:34:22 CET 1998 Werner KochWerner Koch1-3/+3
1998-12-10See ChangeLog: Thu Dec 10 20:15:36 CET 1998 Werner KochWerner Koch1-0/+1
1998-07-29edit-key is now completeWerner Koch1-6/+10
1998-07-06intermediate releaseWerner Koch1-6/+1
1998-07-02partly added creation of OP partial length headersWerner Koch1-22/+35
1998-04-14applied Mathews typo and grammar fixesWerner Koch1-1/+1
1998-04-07cipher reorganisiertWerner Koch1-29/+8
1998-04-04cast5 does now workWerner Koch1-0/+12
1998-04-02release 0.2.14Werner Koch1-1/+1
1998-03-19some cleanupsWerner Koch1-2/+2
1998-02-24Renamed to GNUPGV-0-2-8Werner Koch1-4/+4
1998-01-07patchlevel 2Werner Koch1-3/+6