Re: [openpgp] Deprecating SHA1

"Neal H. Walfield" <> Fri, 30 October 2020 09:51 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id EC06D3A0D7E for <>; Fri, 30 Oct 2020 02:51:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id ud-CAAp8HwCl for <>; Fri, 30 Oct 2020 02:51:05 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 3336F3A0D7C for <>; Fri, 30 Oct 2020 02:51:02 -0700 (PDT)
Received: from ([] by with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from <>) id 1kYR3k-0005vm-5v for; Fri, 30 Oct 2020 09:51:00 +0000
Received: from ([] by with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <>) id 1kYR3j-0005ej-L6; Fri, 30 Oct 2020 10:50:59 +0100
Date: Fri, 30 Oct 2020 10:50:59 +0100
Message-ID: <>
From: "Neal H. Walfield" <>
To: "Neal H. Walfield" <>,
In-Reply-To: <>
References: <> <> <> <>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/26 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: text/plain; charset="US-ASCII"
X-SA-Exim-Scanned: No (on; SAEximRunCond expanded to false
Archived-At: <>
Subject: Re: [openpgp] Deprecating SHA1
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 30 Oct 2020 09:51:09 -0000

On Sun, 25 Oct 2020 02:03:43 +0100,
Phil Pennock wrote:
> For myself, even with the oldest key, using expiring subkeys and
> refreshing periodically with newer subkeys, everything _except_ the
> self-sig had updated automatically by the time I went looking.

Right.  User ID self signatures are the worse offenders, but subkey
binding signatures are also a problem.  I collected some statistics
about different projects.  You can find them here:

It seems that there are 19 certificates in the Debian keyring that
have non-revoked, live signing-capable subkeys that rely on SHA-1 in
someway.  10 use SHA1 for the subkey binding signature, and 9 only use
it for the primary key binding signature (the backsig).  That's just
over 2% of the certificates in the Debian keyring.  Arch is about the
same (2 of 76 certificates).

Although it is possible to fix the subkey binding signature by
adjusting the subkey's expiration time, using gpg, this won't update
the backsig, see:

> I think really we need some nice pgpkey-sanitycheck command-line tool,
> from any project, which looks purely at public key information, so
> doesn't need to care about internals (private keys, keyboxes, etc).
> Such a tool might then report on outdated algorithms used in important
> places, while avoiding getting into the political mess of which
> algorithm order preferences should be included in a key.
> Deprecating X without tools to make it _trivial_ for people to tell if
> they're affected by X is going to be frustrating.  In my previous email,
> I didn't mention the diagnostics I used to show people that their key
> was affected, but it involved `gpg --list-packets` and it was not
> pretty.

Indeed.  Unfortunately, `gpg --list-packets` doesn't show the content
of the backsig:

  $ gpg --export FPR | gpg --list-packets
  # off=806 ctb=89 tag=2 hlen=3 plen=346
  :signature packet: algo 1, keyid A23C95250F66162A
  	version 4, created 1603438577, md5len 0, sigclass 0x18
  	digest algo 10, begin of digest e9 34
  	hashed subpkt 27 len 1 (key flags: 02)
  	hashed subpkt 33 len 21 (issuer fpr v4 2...)
  	hashed subpkt 2 len 4 (sig created 2020-10-23)
  	hashed subpkt 9 len 4 (key expires after 3y0d0h5m)
**  	subpkt 32 len 156 (signature: v4, class 0x19, algo 1, digest algo 2)
  	subpkt 16 len 8 (issuer key ID A...)
  	data: [1024 bits]

For what it is worth, `pgpdump` `sq packet dump` (also at, and `rnp --list-packets` do show that

> I held off on "asking others to write software for me" in the previous
> post, keeping it to "this exists now".  This time around, I'm throwing
> out a "Hey, pgpkey-sanitycheck would be a nice tool to have, folks" and
> running away.

The tool that I used to conduct my analysis is available here:

(Eventually we plan to integrate a linter into `sq`.)

Justus was nice enough to upload it to

So it should be just a `cargo install sequoia-keyring-linter` away.

And, if I understood dkg correctly, he is in the process of packaging
it for Debian.

:) Neal