Re: [openpgp] AEAD Chunk Size

Peter Pentchev <roam@ringlet.net> Mon, 18 March 2019 12:29 UTC

Return-Path: <roam@ringlet.net>
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 7CA6212797D for <openpgp@ietfa.amsl.com>; Mon, 18 Mar 2019 05:29:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
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 fT0syNfat5l7 for <openpgp@ietfa.amsl.com>; Mon, 18 Mar 2019 05:29:18 -0700 (PDT)
Received: from nimbus.fccf.net (nimbus.fccf.net [185.117.82.79]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 26929127963 for <openpgp@ietf.org>; Mon, 18 Mar 2019 05:29:18 -0700 (PDT)
Received: from straylight.m.ringlet.net (gw1.storpool.com [46.233.30.128]) by nimbus.fccf.net (Postfix) with ESMTPSA id A3D8B414 for <openpgp@ietf.org>; Mon, 18 Mar 2019 14:29:14 +0200 (EET)
Received: from roam (uid 1000) (envelope-from roam@ringlet.net) id 620003 by straylight.m.ringlet.net (DragonFly Mail Agent v0.11); Mon, 18 Mar 2019 14:29:14 +0200
Date: Mon, 18 Mar 2019 14:29:14 +0200
From: Peter Pentchev <roam@ringlet.net>
To: Vincent Breitmoser <look@my.amazin.horse>
Cc: Tobias Mueller <muelli@cryptobitch.de>, openpgp@ietf.org, Sebastian Schinzel <schinzel@fh-muenster.de>
Message-ID: <20190318122914.GH18475@straylight.m.ringlet.net>
References: <87mumh33nc.wl-neal@walfield.org> <F9VLV9HZWH.3RYL3UM3BN873@my.amazin.horse> <3WZ7-hy9V7TOy53p1gP5EXELzHJIqjouV9x0YTN3PWsBZedKkqvVCRm-2XzGZy-FYAYdTqP1-7YV4wbTWMWAYhSujQA6NmrnIuXfZLRHkdQ=@protonmail.com> <CAB941EE-6961-4CAB-9632-DFF738980467@icloud.com> <87h8co2t4v.wl-neal@walfield.org> <35C892F7-18A8-401E-828D-5CE180A3A731@icloud.com> <87r2brf0f1.wl-neal@walfield.org> <2a014c4a103ba7f52535546f7e77277ea2bdabdf.camel@cryptobitch.de> <90a28b7c-1b02-abbb-eb8d-bec5263a9f89@fh-muenster.de> <2HK22F68FITOF.35CB8RFLBNB8W@my.amazin.horse>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="Fnm8lRGFTVS/3GuM"
Content-Disposition: inline
In-Reply-To: <2HK22F68FITOF.35CB8RFLBNB8W@my.amazin.horse>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/n2SP77cGBwKFmW3T2nLn9dIob54>
Subject: Re: [openpgp] AEAD Chunk Size
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.29
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, 18 Mar 2019 12:29:21 -0000

On Mon, Mar 18, 2019 at 01:23:07PM +0100, Vincent Breitmoser wrote:
> 
> Hi,
> 
> a lot that Tobias is bringing up here resonates with me, I feel like we should
> be thinking more about the fully vs partially authenticated use cases, not just
> chunking on its own.
> 
> (As an aside, I'm not convinced the early integrity check should have much
> bearing on this discussion.  Transmission errors are (and should be) handled on
> other layers in mostly all cases, and noticing errors earlier than at the end of
> data that was going to be buffered anyways is not that big of a gain. In cases
> where this is a concern (like uh, tape drives?), a tool should be used that is
> actually meant for the job, e.g. par2)
> 
> Ideally, a receiver won't ever output unauthenticated plaintext, hence ideally
> all of the chunking discussions would be moot. What chunking brings to the table
> is to give the *sender* of a message the option to *allow* the *receiver* to
> emit partially authenticated plaintext, trading a truncation vulnerability for
> the ability to process data on a smaller buffer size than the entire plaintext.
> This is useful for $large amounts of data, or streamed workflows with unknown
> data sizes.
> 
> While following the discussion I've gone back and forth a couple of times
> between favoring the case for fully authenticated plaintext, or for supporting
> streamed workflows with fixed-size chunks (while sacrificing truncation). Both
> seem equally valid to me. However, I can't see a good use case for variable size
> chunking: it adds complexity to spec and implementations in particular on the
> receiving side, and pushes the onus on reasoning about chunk sizes to the
> implementations, which is basically impossible in the face of interoperability
> concerns.
> 
> I'd like to bring up a new proposal then: Support either no chunking, or
> fixed-size chunking. The advantage would be that the sender's position on
> authentication is made more explicit: If they don't do chunking, they expect the
> receiver to fully buffer and authenticate before processing, which could
> currently only be achieved implicitly via a large chunk size. If they use the
> fixed-size chunking, they explicitly offer the option to emit partially
> authenticated plaintext.

Not rejecting your idea outright, just curious how it would work with
e.g. instant messengers where there is streaming of irregularly-sized
packets coming at irregular intervals (and the users would expect that
Things Just Work(tm) for both two-character messages and five-megabyte
files sent over the wire).

G'luck,
Peter

-- 
Peter Pentchev  roam@{ringlet.net,debian.org,FreeBSD.org} pp@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13