Re: [openpgp] AEAD Chunk Size

"Neal H. Walfield" <neal@walfield.org> Fri, 12 April 2019 13:46 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 3A5BB120706 for <openpgp@ietfa.amsl.com>; Fri, 12 Apr 2019 06:46:13 -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=unavailable 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 N1Se2pYE5a1A for <openpgp@ietfa.amsl.com>; Fri, 12 Apr 2019 06:46:11 -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 ACAB21206EC for <openpgp@ietf.org>; Fri, 12 Apr 2019 06:46:11 -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 1hEwVL-0002zF-Dk; Fri, 12 Apr 2019 13:46:07 +0000
Date: Fri, 12 Apr 2019 15:46:06 +0200
Message-ID: <875zrj2v6p.wl-neal@walfield.org>
From: "Neal H. Walfield" <neal@walfield.org>
To: Derek Atkins <derek@ihtfp.com>
Cc: Marcus Brinkmann <marcus.brinkmann=40ruhr-uni-bochum.de@dmarc.ietf.org>, openpgp@ietf.org
In-Reply-To: <sjm36mnuyyt.fsf@securerf.ihtfp.org>
References: <87mumh33nc.wl-neal@walfield.org> <878swzp4fb.fsf@europa.jade-hamburg.de> <E65F6E9D-8B0B-466D-936B-E8852F26E1FF@icloud.com> <ea6da6cb-08c1-fabd-038b-53d6d6aeb366@ruhr-uni-bochum.de> <sjm36mnuyyt.fsf@securerf.ihtfp.org>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) 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=US-ASCII
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/aFUY49Hvu3cv3RImbC1IVsGuSdg>
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: Fri, 12 Apr 2019 13:46:13 -0000

On Fri, 12 Apr 2019 15:36:58 +0200,
Derek Atkins wrote:
> Marcus Brinkmann <marcus.brinkmann=40ruhr-uni-bochum.de@dmarc.ietf.org>
> writes:
> 
> > The main question here is: What should a conforming application look like?
> >
> > The current behaviour of GnuPG is that it will process internally (e.g.,
> > through the decompression and signature verification layer) and output
> > externally unauthenticated plaintext.  If an AEAD chunk is modified by
> > an attacker, GnuPG will detect the modification and cancel the
> > operation, but only at the end of each chunk.  Due to the asynchronous
> > buffer management in GnuPG, quite often some part of the modified chunk
> > has then already been processed and output, depending on the particular
> > state of the buffers, the buffer size and the chunk size.  This
> > behaviour increases the surface for chosen ciphertext attacks and
> > possibly adaptive chosen plaintext attacks (if an oracle is exposed).
> 
> In my mind, this sounds like the implementation is broken.  If it
> releases AEAD plaintext before the end of the AEAD chunk then it is
> non-conforming and should be considered broken.

I fully agree with you.

Given this position, it seems to me that all implementations will
necessarily fail on very large chunks (e.g., 4 exabytes).  So, why
even allow them [1]?  It seems to me that these permissible options
just create a temptation to create broken implementations.

Thanks,

:) Neal

  [1] https://mailarchive.ietf.org/arch/msg/openpgp/n1-e2shFQMqLphGY2VUvxdr9T40