Re: [openpgp] AEAD Chunk Size

Bart Butler <> Sat, 30 March 2019 02:18 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 238A4120090 for <>; Fri, 29 Mar 2019 19:18:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id MgWEHNgs3tjl for <>; Fri, 29 Mar 2019 19:18:02 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 13EAF12006A for <>; Fri, 29 Mar 2019 19:18:02 -0700 (PDT)
Date: Sat, 30 Mar 2019 02:17:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=default; t=1553912279; bh=Bbw46eNaDo0Id7afYPNU73BhzH6J6Rdo1A9yn+rKUak=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=cUvvtEhZHr4INKcpvyGYrd2+nLQL5OI92XVfT2DKJXVGTLUNL9tq018r3Mut3jo5B /ptOb7agmWVLVpCQOrJryXnN7K8Gm+7G29ZUfAir1OFMFBIcHH9auuZliZDPj3DgTp fi8IZA+3s6twGyN6x7qC47Zilai63S1UqOop1QSU=
To: Jon Callas <>
From: Bart Butler <>
Cc: "Neal H. Walfield" <>, "" <>, Justus Winter <>, Jon Callas <>, Peter Gutmann <>
Reply-To: Bart Butler <>
Message-ID: <>
In-Reply-To: <>
References: <> <> <> <> <>
Feedback-ID: XShtE-_o2KLy9dSshc6ANALRnvTQ9U24aqXW2ympbGschdpHbU6GYCTUCtfmGhY9HmOyP1Uweyandwh1AVDFrQ==:Ext:ProtonMail
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="---------------------8742fc61603bbff7f35b1fcf95e6a382"; charset=UTF-8
Archived-At: <>
Subject: Re: [openpgp] AEAD Chunk Size
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: Sat, 30 Mar 2019 02:18:06 -0000

Hi Jon,

As others have noted, there is a lot of confusion on this thread, some of which you touched in your AEAD Conundrum message, like when we say AEAD should not release unauthenticated plaintext, do we mean the entire message or the chunk?

Another piece of confusion is that Efail isn't a single vulnerability, it was several vulnerabilities related (at best) thematically.

So to be very specific, for the purpose of the following discussion, the advantage of smaller AEAD chunks is specifically to prevent Efail-style ciphertext malleability/gadget attacks, and the prohibition on releasing unauthenticated plaintext is applied to individual chunks, which is sufficient to foil this kind of attack in email.

The kind of attack we are talking about is fundamentally about exfiltration of plaintext data to an attacker-controlled endpoint. Borrowing from your AEAD Conundrum message, if the first chunk passes and is released, and the second chunk fails, that is OK, at least for email, because the part that was modified (the second chunk) is never released, so you get a truncated message and an error, but the truncated message without the modifications isn't going to exfiltrate itself.

Now if releasing ANY authenticated chunk of a message that hasn't been fully authenticated (in an AEAD sense) is a real problem for your application, I'd argue that you're trying to make AEAD do something it's not suited for and you should enforce this in your application if it applies to you, probably by not streaming.

So to recap, small-chunk AEAD provides specific value in preventing ciphertext malleability/gadget attacks, particularly in HTML email, which is a common use case.

What value does large-chunk AEAD actually provide? What I'm getting from the AEAD Conundrum message is that it's a way for the message encrypter to leverage the "don't release unauthenticated chunks" prohibition to force the decrypter to decrypt the whole message before releasing anything. Why do we want to give the message creator this kind of power? Why should the message creator be given the choice to force her recipient to either decrypt the entire message before release or be less safe than she would have been with smaller chunks?

Coming back to Neal's point, it's really hard to see any sort of value in really large AEAD chunks, because the performance overhead is negligible at that point and the only security 'benefit' that I can see is the encrypter trying to use the spec to force the decrypter to not stream, which does not seem like something at all desirable.


P.S. ProtonMail doesn't use V5 keys or the new draft yet, but some users of OpenPGP.js have started using them with 256kB chunks, so we are not arguing on behalf of ourselves for the 256kB chunk size. The proposed language seems more or less OK in this regard, as most implementations will presumably keep 256kB support so these early adopters will not lose interoperability with their messages.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, March 29, 2019 1:42 PM, Jon Callas <> wrote:



> > On Mar 29, 2019, at 6:20 AM, Neal H. Walfield wrote:
> > 

> > > As I mentioned earlier, we really need some data on real-world use cases
> > > rather than hypothesising problematic corner cases that will rarely, if ever,
> > > occur.
> > 

> > Efail occured. Why is that not enough?

> Many of us think that Efail is orthogonal to this problem and consequently while it’s a real issue, as a rationale, it’s lacking.

> You might disagree with us, and I respect that. Nonetheless, I find Efail to be unconvincing. I’d love to debate this further, but do you have another rationale, or it only Efail?

> Jon

> openpgp mailing list