Re: [openpgp] AEAD Chunk Size

"Neal H. Walfield" <neal@walfield.org> Wed, 10 April 2019 08:48 UTC

Return-Path: <neal@walfield.org>
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 A91681202D3 for <openpgp@ietfa.amsl.com>; Wed, 10 Apr 2019 01:48:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=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 1jYuiYux_yIR for <openpgp@ietfa.amsl.com>; Wed, 10 Apr 2019 01:48:03 -0700 (PDT)
Received: from mail.dasr.de (mail.dasr.de [217.69.77.164]) (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 8DB471202D2 for <openpgp@ietf.org>; Wed, 10 Apr 2019 01:48:03 -0700 (PDT)
Received: from p57b22663.dip0.t-ipconnect.de ([87.178.38.99] helo=grit.huenfield.org.walfield.org) by mail.dasr.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from <neal@walfield.org>) id 1hE8te-0001za-V4; Wed, 10 Apr 2019 08:47:55 +0000
Date: Wed, 10 Apr 2019 10:47:54 +0200
Message-ID: <87ef6a2qmd.wl-neal@walfield.org>
From: "Neal H. Walfield" <neal@walfield.org>
To: Bart Butler <bartbutler@protonmail.com>
Cc: Jon Callas <joncallas@icloud.com>, "openpgp@ietf.org" <openpgp@ietf.org>, Justus Winter <justuswinter@gmail.com>, Peter Gutmann <pgut001@cs.auckland.ac.nz>
In-Reply-To: <cc75QwJwTIffqLK7fzZ3A2Pw1Vb3_lkhSHfYRPyASZcxceG2c0Cpbld529WsXosP7X9x4agikpGD4dVTXK8iaRkblS9Jokv1tD2TceQBbyE=@protonmail.com>
References: <87mumh33nc.wl-neal@walfield.org> <878swzp4fb.fsf@europa.jade-hamburg.de> <E65F6E9D-8B0B-466D-936B-E8852F26E1FF@icloud.com> <87d0m9hl62.wl-neal@walfield.org> <FEE9711C-3C64-493C-8125-89696B882E0A@icloud.com> <2di2bK8m-7HtDeoUEH9oPqs-bL-IKSE0CjkgFShPMLOlUyeDBVkVGApdjnIpS6YRAeKU3ibGCZCtwLden-N6zK5W4fqIghRGDa5dU720nEs=@protonmail.com> <73739F8A-5E9F-4277-B053-FDD2E8D81B17@icloud.com> <cc75QwJwTIffqLK7fzZ3A2Pw1Vb3_lkhSHfYRPyASZcxceG2c0Cpbld529WsXosP7X9x4agikpGD4dVTXK8iaRkblS9Jokv1tD2TceQBbyE=@protonmail.com>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/24.5 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: text/plain; charset="ISO-2022-JP"
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/ixhb_dgXVGsk0G1246nHGLXLKHo>
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: Wed, 10 Apr 2019 08:48:07 -0000

Hi Bart,

Thanks for this mail.  This much more succinct mail then I have been
able to write captures my concerns with Jon's line of thinking.

@Jon: I hope you'll take the time to respond to Bart's questions.

Thanks!

:) Neal

On Sun, 31 Mar 2019 06:11:25 +0200,
Bart Butler wrote:
> On Saturday, March 30, 2019 4:09 PM, Jon Callas <joncallas@icloud.com> wrote:
> > > On Mar 29, 2019, at 7:17 PM, Bart Butler bartbutler=40protonmail.com@dmarc.ietf.org wrote:
> > > 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?
> > 
> 
> > That is precisely the question. But the bigger question is whether you care about that. Sometimes it matters, sometimes it does not.
> > 
> 
> > For example, let’s suppose that I have a very large blob on mass storage. Media failures happen. If there’s a bad block on a disk, do you want to lose the whole file because of it? Sometimes you want to throw your hands up in the air. This is most common in an interactive protocol, and in general the answer is yes. For example, an SSL connection to a server, if there’s funny business going on, you want to blow up the connection and try over again. On the other hand, if you had an archival thing (e.g. tar file with some historic documents), you want to recover as much as you can.
> > 
> 
> > OpenPGP is in general the latter case rather than the former. I believe it’s less important to have strict semantics on failures because it’s usually storage.
> > 
> 
> 
> I agree. I would say my point is that with sufficiently small chunks, the user/decrypter can choose what kind of failure behavior is appropriate. Large chunks robs the decrypter of that.
> 
> > > Another piece of confusion is that Efail isn't a single vulnerability, it was several vulnerabilities related (at best) thematically.
> > 
> 
> > I understand Efail. Trust me.
> 
> I do. I was bit excessively pedantic defining everything because I felt that this thread has suffered from ambiguity in several terms.
> 
> > 
> 
> > > 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.
> > 
> 
> > I disagree. If you want to prevent something like Efail, you want larger chunks. Assuming that you believe that early release matters.
> > 
> 
> > Let’s rewind here, and not talk about Efail, let’s talk about the real issue. If you want the entire blob to have all-or-nothing semantics, then you want the fewest number of chunks as is reasonable. If you have attacker-controlled inputs, then every joint between the chunks is a vulnerability.
> 
> OK, I think this is the part that I don't understand. Why does it matter what chunking scheme is used here? If my app requires all-or-nothing semantics, I would program my app to enforce that all chunks must pass and not release plaintext unless that happened, with no truncation, etc. So why would every joint be a vulnerability?
> 
> > > 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?
> > 
> 
> > Let me summarize the conundrum: If you want strict AEAD no-release semantics, you want a fewer number of chunks.
> 
> I guess this is my fundamental question. You can force no-release semantics at the application level for any chunk size scheme, right?
> 
> > 
> 
> > > 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.
> > 
> 
> > Okay, here’s another thing that’s a pet peeve of mine. We’re arguing security and you brought up performance. I never mentioned performance, the people who want large chunks haven’t brought it up. They want large chunks because they perceive it to be more secure..
> > 
> 
> > If you respond to a security request with a performance answer, you literally don’t know what you’re talking about. So let’s toss that aside.
> 
> I apologize, I was not trying to create a strawman here, but I am completely at a loss for what the benefit of large chunks is.
> 
> >     Elided out of this, and possibly important is that “support” includes chunks smaller than that size. I should have said that, but I wanted it to be as stark as possible. So let me repeat it and abstract it with some variables:
> >     
> 
> >     (1) MUST support up to <small-chunk-size> chunks.
> >     
> 
> > 
> 
> > (2) SHOULD support up to <larger-chunk-size> chunks, as these are common..
> > (3) MAY support larger up to the present very large size.
> > (4) MAY reject or error out on chunks larger than <small-chunk-size>, but repeating ourselves, SHOULD support <larger-chunk-size>.
> > 
> 
> > Clauses (3) and (4) set up a sandbox for the people who want very large chunks. They can do whatever they want, and the rest of us can ignore them.. Why get rid of that? It doesn’t add any complexity to the code. It lets the people who want the huge ones do them in their own environment and not bother other people.
> > 
> 
> > My concern is over (1) and (2) and specifically that there’s both <small> and <large> sizes.
> > 
> 
> > I think that’s an issue. If there are two numbers we are apt to end up with skew before settling on one, so it’s better to agree on just one. That’s the real wart in my proposal.
> > 
> 
> 
> I'm OK with eliminating (2) and just using the MAY part to take care of any legacy 256K messages OpenPGP.js users might have. As I said, we don't have any of these messages in production yet and I'd err on the side of a cleaner spec. I just really want to understand the benefit of large chunks for security and right now I clearly do not.
> 
> [1.2 OpenPGP digital signature <application/pgp-signature (7bit)>]
> No public key for 99054465EF331E44 created at 2019-03-31T06:11:24+0200 using (unknown algorithm 22)
> [2  <text/plain; us-ascii (7bit)>]
> _______________________________________________
> openpgp mailing list
> openpgp@ietf.org
> https://www.ietf.org/mailman/listinfo/openpgp