Re: [openpgp] AEAD mode chunk size

Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> Sun, 01 July 2018 17:26 UTC

Return-Path: <marcus.brinkmann@ruhr-uni-bochum.de>
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 EFFF3130DF0 for <openpgp@ietfa.amsl.com>; Sun, 1 Jul 2018 10:26:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.301
X-Spam-Level:
X-Spam-Status: No, score=-4.301 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_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ruhr-uni-bochum.de
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 4Hnb9R3LQ-ln for <openpgp@ietfa.amsl.com>; Sun, 1 Jul 2018 10:26:30 -0700 (PDT)
Received: from out2.mail.ruhr-uni-bochum.de (out2.mail.ruhr-uni-bochum.de [134.147.42.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8589C12F1A2 for <openpgp@ietf.org>; Sun, 1 Jul 2018 10:26:30 -0700 (PDT)
Received: from mx2.mail.ruhr-uni-bochum.de (localhost [127.0.0.1]) by out2.mail.ruhr-uni-bochum.de (Postfix mo-ext) with ESMTP id 41JckD2sjdz4xJp for <openpgp@ietf.org>; Sun, 1 Jul 2018 19:26:28 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ruhr-uni-bochum.de; s=mail-2017; t=1530465988; bh=NQN7ohrh55alJ+ZU/hV5qizgN2bbOP0TnJ2LqZJ2xgY=; h=Subject:To:References:From:Date:In-Reply-To:From; b=tn+2vgE1Pddv7IeA1AD8/LyRzF/c6mIqoGNzsxDEZ3mYey78pgp8Rioy/Sh9+NDhC GYhaJezwiEkusJQ9LRX+Qgq5DW67Ltf7wXKGkTipDoexQiT6xHHIoj7jFwPnWW8z3N zDfI2DhwFXmiJyMm5riPfHI6HA83xqRPjV3TOEwc=
Received: from out2.mail.ruhr-uni-bochum.de (localhost [127.0.0.1]) by mx2.mail.ruhr-uni-bochum.de (Postfix idis) with ESMTP id 41JckD1mmRz4xLh for <openpgp@ietf.org>; Sun, 1 Jul 2018 19:26:28 +0200 (CEST)
X-Envelope-Sender: <marcus.brinkmann@ruhr-uni-bochum.de>
X-RUB-Notes: Internal origin=134.147.42.227
Received: from mail1.mail.ruhr-uni-bochum.de (mail1.mail.ruhr-uni-bochum.de [134.147.42.227]) by out2.mail.ruhr-uni-bochum.de (Postfix mi-int) with ESMTP id 41JckD19T8z4xJp for <openpgp@ietf.org>; Sun, 1 Jul 2018 19:26:28 +0200 (CEST)
Received: from [192.168.142.139] (p5B04976F.dip0.t-ipconnect.de [91.4.151.111]) by mail1.mail.ruhr-uni-bochum.de (Postfix) with ESMTPSA id 41JckC60KzzynK for <openpgp@ietf.org>; Sun, 1 Jul 2018 19:26:27 +0200 (CEST)
To: openpgp@ietf.org
References: <b82fee80-d265-5659-fad0-8cc47cce2703@ruhr-uni-bochum.de> <20180701171208.GB7965@genre.crustytoothpaste.net>
From: Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Openpgp: preference=signencrypt
Message-ID: <1de9ba23-e4ee-1341-bc3a-8227f23d4bcd@ruhr-uni-bochum.de>
Date: Sun, 1 Jul 2018 19:26:24 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <20180701171208.GB7965@genre.crustytoothpaste.net>
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YUjmHFB3SKZHZLZzawhqWDA9e5JS39wbe"
X-Virus-Scanned: clamav-milter 0.99.4 at mail1.mail.ruhr-uni-bochum.de
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/4BWXbi_Aw3fopiYfNngbtC3XzEo>
Subject: Re: [openpgp] AEAD mode chunk size
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.26
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: Sun, 01 Jul 2018 17:26:34 -0000

On 07/01/2018 07:12 PM, brian m. carlson wrote:
> I agree with this.  The original specification I submitted limited the
> value to something smaller for this reason.
...

> The reason I specified a lower bound of 64 bytes per chunk is that it
> doesn't make sense to have chunks that are, for example, 1 byte long.
> That's a great way to be wasteful and potentially DoS a recipient, since
> each AEAD chunk involves some block cipher overhead.
> 
> Of course, trailing chunks may be smaller, and that's okay; the document
> anticipates that.

I'd be fine with having a lower limit as well, and if the best way to
express that is "2^(6+c) with 0 <= c <= 10" instead of "2^c with 6 <= c
<= 16" then that's fine with me, too.

I dug your original change, it can be found here:
https://gitlab.com/openpgp-wg/rfc4880bis/merge_requests/4/diffs

Here is your original wording for reference:

  An implementation MUST support chunk size octets with values from 0
  to 10.  An implementation MAY support other chunk sizes.  Chunk size
  octets with values larger than 127 are reserved for future extensions.

Thanks!
Marcus