1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00
Daniel Kahn Gillmor 76afaed65e
gpg: Add option --weak-digest to gpg and gpgv.
* g10/options.h: Add additional_weak_digests linked list to opts.
* g10/main.h: Declare weakhash linked list struct and
additional_weak_digest() function to insert newly-declared weak
digests into opts.
* g10/misc.c: (additional_weak_digest): New function.
(print_digest_algo_note): Check for deprecated digests; use proper
gcry_md_algos type.
* g10/sig-check.c: (do_check): Reject weak digests in addition to MD5.
* g10/gpg.c: Add --weak-digest option to gpg.
* doc/gpg.texi: Document gpg --weak-digest option.
* g10/gpgv.c: Add --weak-digest option to gpgv.
* doc/gpgv.texi: Document gpgv --weak-digest option.

--
gpg and gpgv treat signatures made over MD5 as unreliable, unless the
user supplies --allow-weak-digests to gpg.  Signatures over any other
digest are considered acceptable.

Despite SHA-1 being a mandatory-to-implement digest algorithm in RFC
4880, the collision-resistance of SHA-1 is weaker than anyone would
like it to be.

Some operators of high-value targets that depend on OpenPGP signatures
may wish to require their signers to use a stronger digest algorithm
than SHA1, even if the OpenPGP ecosystem at large cannot deprecate
SHA1 entirely today.

This changeset adds a new "--weak-digest DIGEST" option for both gpg
and gpgv, which makes it straightforward for anyone to treat any
signature or certification made over the specified digest as
unreliable.

This option can be supplied multiple times if the operator wishes to
deprecate multiple digest algorithms, and will be ignored completely
if the operator supplies --allow-weak-digests (as before).

MD5 is still always considered weak, regardless of any further
--weak-digest options supplied.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

Capitialized some comments, shorted a line in do_check, and changed
subject to name the option.  -wk
2015-10-19 14:24:27 +02:00
..
2008-06-25 11:14:48 +00:00
2014-12-14 12:15:21 +01:00
sm/
2006-11-14 10:23:21 +00:00
2010-06-10 10:39:44 +00:00
DCO
2013-04-17 11:26:27 +02:00
2015-10-18 18:45:40 +02:00
2003-01-09 13:24:01 +00:00
2009-07-22 13:33:46 +00:00
2010-06-10 10:39:44 +00:00
2007-07-04 19:49:40 +00:00
2007-03-08 18:31:56 +00:00
2014-07-03 11:03:22 +02:00
2015-10-18 18:45:40 +02:00
2013-04-19 12:01:22 +02:00
2013-02-12 14:15:21 +09:00
2007-05-08 13:59:41 +00:00
2006-08-21 20:20:23 +00:00
2015-09-28 18:40:38 +02:00
2008-06-25 11:14:48 +00:00
2012-11-30 12:47:49 -05:00
2009-07-22 13:33:46 +00:00
2011-08-12 14:40:47 +02:00
2006-12-06 16:38:34 +00:00