Re: [openpgp] First remarks on the last I-D

Daniel Huigens <d.huigens@protonmail.com> Mon, 13 June 2022 10:42 UTC

Return-Path: <d.huigens@protonmail.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 CF3BBC157B53 for <openpgp@ietfa.amsl.com>; Mon, 13 Jun 2022 03:42:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.109
X-Spam-Level:
X-Spam-Status: No, score=-2.109 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=protonmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cXITQv34CyZs for <openpgp@ietfa.amsl.com>; Mon, 13 Jun 2022 03:42:01 -0700 (PDT)
Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch [185.70.40.134]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C1BB6C157B51 for <openpgp@ietf.org>; Mon, 13 Jun 2022 03:42:01 -0700 (PDT)
Date: Mon, 13 Jun 2022 10:41:53 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1655116919; x=1655376119; bh=pLPBTEeWgrAueo20qrYqd9ZzLmeRq6OrEIC9Xmkk37o=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=IqXL9kfAcokfgNPNc8E7EeyYYW1kV1rWdAlxFzHZd0QuwxAtvZuja4vAfG7z9Ivoi 49t29VqD3ZgZJfNTdCpxE3gcUeuHJMV97SZVZRgn1/GA8mnsGBZJ+JDZLpa1pZ39IH M51Frm3O9uPGVkCRjUU1nJiJHPR61uUA7Pc7Q5RlZGDpETBQW2iPQT8sIzBhrxJo06 qv085yE1ZtpwCws0HPecf+KGPDQwo/CXfwqC8rAmDrl8ocO/+SVdZA+6uNRwTCzIoj CmiJRoq6VtuSnii+0MHDFbKgV9WFETFYz63jXHgtZMhiEU2jcynVafSw11Z2M4899f NxqxoLq7f2Gsg==
To: "Robert J. Hansen" <rjh@sixdemonbag.org>
From: Daniel Huigens <d.huigens@protonmail.com>
Cc: openpgp@ietf.org, Jon Callas <joncallas=40icloud.com@dmarc.ietf.org>
Reply-To: Daniel Huigens <d.huigens@protonmail.com>
Message-ID: <p_7pskU0MxbpIjGwmAUTMmFsJxjA8QRQCGDbCfrYQTSXocrlDUFDdNuHXChjBwy3RAc2eA_mRIyGFDWD6u5peNNL_F9I3yUYXAa5Khy5XqE=@protonmail.com>
In-Reply-To: <4dd0ad8b-9de7-15e6-a9ef-e0401acd69f8@sixdemonbag.org>
References: <BB9D0AB9-CC8C-420E-8082-E9F64B09BF46@ribose.com> <18396bf2-5319-87c3-095e-f804632618f2@cs.tcd.ie> <5100C338-C6DC-4BB1-86A4-DAC353AA82CC@icloud.com> <7547a547-bb71-2bdd-f85e-91d46476bc6@nohats.ca> <54B2F360-C996-4A5D-BE3D-6EA405406C68@icloud.com> <YqPEw8OIlf0PG40T@camp.crustytoothpaste.net> <25c3a7b5-07ef-1521-1a14-43ef0c7b4043@cs.tcd.ie> <SY4PR01MB6251D365368552630ECCD720EEA99@SY4PR01MB6251.ausprd01.prod.outlook.com> <4dd0ad8b-9de7-15e6-a9ef-e0401acd69f8@sixdemonbag.org>
Feedback-ID: 2934448:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/I734rCziOoebYjIIRPxQu7bcCgQ>
Subject: Re: [openpgp] First remarks on the last I-D
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.39
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: Mon, 13 Jun 2022 10:42:05 -0000

> Sooner or later, someone has to implement this. (...)
> Talk about the various efficiencies of CCM mode versus OCB mode, etc.,
> bores the heck out of me. I want to know which one is going to be simpler.

As one data point, we have experimental implementations of AEAD using
OCB, EAX and GCM in OpenPGP.js and GopenPGP. In both cases, we had to
implement OCB and EAX ourselves, due to lack of library support
(well - we implemented EAX on top of CTR so that was arguably a bit
simpler). GCM was already implemented so that was much simpler, and
also more performant due to having native / assembly implementations.


(Jon Callas wrote:)

> (...) my advice on this issue is merely to be careful, especially with GCM. GHASH is brittle as all heck; someone's going to get it wrong and it will be a brouhaha we don't need. (...)
> There are plenty of other options: OCB if we need the speed, I don't think we do; CCM is safe and boring and explicitly on lots of lists; EAX is just fine it's just a spite mode; rolling one's own check with CMAC/OMAC or HMAC is also totally fine; SIV is also nice. Pick two.

I agree we should be careful, but for any of these other options, we
would have (had) to roll our own implementation. I'm not sure whether
that's safer than relying on an existing implementation from a crypto
library. And in both Web Crypto and Go's built-in crypto library, GCM
is the only AEAD mode available, unfortunately. Of course I hope that
will change, and that we can add OCB, for example, but for now that's
the way it is. So I think that while it's not ideal, having GCM
(in addition to OCB) in the standard is better than not having it.

Best,
Daniel