Re: [openpgp] Version 5 key and fingerprint proposal

Jon Callas <joncallas@icloud.com> Fri, 10 March 2017 22:13 UTC

Return-Path: <joncallas@icloud.com>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2EC9C128E19 for <openpgp@ietfa.amsl.com>; Fri, 10 Mar 2017 14:13:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=icloud.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cj-hcSMnEI6w for <openpgp@ietfa.amsl.com>; Fri, 10 Mar 2017 14:13:38 -0800 (PST)
Received: from st13p27im-asmtp004.me.com (st13p27im-asmtp004.me.com [17.162.190.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C30A21293E8 for <openpgp@ietf.org>; Fri, 10 Mar 2017 14:13:38 -0800 (PST)
Received: from process-dkim-sign-daemon.st13p27im-asmtp004.me.com by st13p27im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OMM00E00DH7R400@st13p27im-asmtp004.me.com> for openpgp@ietf.org; Fri, 10 Mar 2017 22:13:37 +0000 (GMT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=4d515a; t=1489184017; bh=EcGb7pOOenxJT170xQVt3Jkk3k2ooSX0zBzTQg222JI=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=LpgaW4z31bS6oIwIkDiFOGz3FKAq3ecdHhL23BMfmOV0qyfIiHXdcZZ6EuYDWJohS g8WAk0xP1RkKZ7xPyfKbSwj/FpfAd0ktZhQ+fv1CR8IcjFsjSmijbpWKa0Rjmla3j/ LvaNHqb7/edpBDKTdnM/uTv5nlbKbHi2Fc8HQcprGfBFL8VRRY5ymmryUma9a7waQ6 +AYPY2vIZDBCEblQ05Z0/y8ngUSanm18wst0TGWK9/+1H5/mu5KC9i02x1hwhl0L0W 6uBkc9xxpySlmo+dHLo7bL0/MRiQaSl9knt5fj+IwQZFFd0EiesQQpH0tG1pCNJ7sK ecuV+FOqJngUg==
Received: from icloud.com ([127.0.0.1]) by st13p27im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OMM012K0DQNB630@st13p27im-asmtp004.me.com>; Fri, 10 Mar 2017 22:13:37 +0000 (GMT)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-10_15:,, signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1703100172
Content-type: text/plain; charset="us-ascii"
MIME-version: 1.0 (Mac OS X Mail 10.2 \(3259\))
From: Jon Callas <joncallas@icloud.com>
In-reply-to: <87varhculg.fsf@wheatstone.g10code.de>
Date: Fri, 10 Mar 2017 14:13:35 -0800
Content-transfer-encoding: quoted-printable
Message-id: <2BC88897-B957-4E4E-B109-DFF4EFA14B4D@icloud.com>
References: <87varlou5m.fsf@wheatstone.g10code.de> <20170307230605.GA2@hashbang.sh> <87efy8ntcx.fsf@wheatstone.g10code.de> <20170309174531.GB2@hashbang.sh> <20170309184745.GC2@hashbang.sh> <CABcZeBMhpXy-e9Mtp8LwfqfAVW_ks3JBw1H2N3H_0c4gpQBqpg@mail.gmail.com> <DAC23A62-14BF-4AAA-8E52-09029B279E8F@icloud.com> <87varhculg.fsf@wheatstone.g10code.de>
To: Werner Koch <wk@gnupg.org>
X-Mailer: Apple Mail (2.3259)
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/yYXPNgTsCt0dJBqqy2ahF9-MXLs>
Cc: IETF OpenPGP <openpgp@ietf.org>, Jon Callas <joncallas@icloud.com>
Subject: Re: [openpgp] Version 5 key and fingerprint proposal
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Mar 2017 22:13:41 -0000

> On Mar 10, 2017, at 2:08 AM, Werner Koch <wk@gnupg.org> wrote:
> 
> On Thu,  9 Mar 2017 23:01, joncallas@icloud.com said:
>> At the risk of sending this into a rathole, a viable alternative would
>> be to use SHA512/t as a truncation function. It's got a well-defined
> 
> We had a discussion here on the merits of SHA-256 over SHA-512 with the
> two arguments I already mentioned:
> 
>  - SHA-256 is much faster on smaller 32 bit systems
>  - SHA-256 is anyway required to verify existing signatures.
> 
> An advantage of SHA-512 is that this would benefit an X25519-only based
> implementation because that requires SHA-512 anyway.

This is a different suggestion, one about SHA512/t, which has an output length of 't' bits. It's a cute little hack that NIST put on top of SHA-512 to get a variable-output hash function.

I didn't bring in performance discussions because this is about fingerprints where it doesn't matter so much one way or the other. But since you did, you're right, that on a 32-bit system, SHA256 is faster. But on a 64-bit system, SHA-512 is faster, often like 1.5x faster.

But anyway, the suggestion is because if you're going to generate a 200-bit fingerprint, using a variable output hash function solves the problem of having to figure out how to truncate, as well as any issues in truncation.

	Jon