Re: [TLS] DTLS 1.3 AEAD additional data

Martin Thomson <mt@lowentropy.net> Thu, 23 April 2020 08:26 UTC

Return-Path: <mt@lowentropy.net>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8CECA3A16EC for <tls@ietfa.amsl.com>; Thu, 23 Apr 2020 01:26:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=T8ToHL1V; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=rZYibsCd
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 IFXQulClBQpU for <tls@ietfa.amsl.com>; Thu, 23 Apr 2020 01:26:19 -0700 (PDT)
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 11DBA3A16EA for <tls@ietf.org>; Thu, 23 Apr 2020 01:26:18 -0700 (PDT)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 565B95C0196; Thu, 23 Apr 2020 04:26:18 -0400 (EDT)
Received: from imap7 ([10.202.2.57]) by compute2.internal (MEProxy); Thu, 23 Apr 2020 04:26:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=mime-version:message-id:in-reply-to:references:date:from:to :cc:subject:content-type; s=fm2; bh=CunbMT/bt/ftidNp7yp492DQTgz+ n0DtxWzvPSLzoeU=; b=T8ToHL1V2ctSwL4HC9ij44Lq9RciyBuorUJR+jaQWw/b kemOJSK6Kmf214BZkRgCw/gJuRQ0+4OmRbP8aWZfehlBYqK/0reWloVKVSNNmeVb iylIx+tJNmLCyV32KYwZxFCLoTMXGrI1gMz7hqv5c5WLDzHKmOs3NAM2RD8IZpY4 dAsUpynvwV8tx2+zVaMExeTm4Y/a/jaZi4lgBR+M7Z+Fjt6WFi9MP96Zr0ZhZy10 LhWcfx53lKOwNUhtO0tjaH4VQEt9X5tIJYH7nZ2zUgsFihsR8GEHXCet2AQw5IkP Wps7Tw4GecKHXv3H78cbRL83qnsb3wjq4pZUrUzSBw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=CunbMT /bt/ftidNp7yp492DQTgz+n0DtxWzvPSLzoeU=; b=rZYibsCdMkvX56kK7IH6Ak VkULAG+BsYdvhrH2xbOuB4OIdSScL+m6t8E+UnrsX3k4bhbqM2/bR5wzxY2fecpt AaY1mPHdR2pzQrjScH5Dfw2m/+8JGhNrE5X7EFgd+9LOQGgy9aUHwbOqj0oG2Jov aE4y59iV4ncXAX5XFPS0M74uzMjj1edG8EsNxcjKrUmJ4D5HYLvBcdIyP2Z4zH8M ynuBM/ojtdyBMBNawuLgqUGk9sS1lwpBDYMDuBSxpuvtCeXQMFt3FhCSoqf0gE0l +l7rGaO2aQ3yTetovlUiuX+MtroLlErxuSDvfGKhe/XGhLjFZUSsEAjBLFADXSrg ==
X-ME-Sender: <xms:KVGhXpUMWa0YofIqUpa6x8onHk6UsN9tBv0uxifkr7yIGoiQkU0pog>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeelgddtfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfofgrrhht ihhnucfvhhhomhhsohhnfdcuoehmtheslhhofigvnhhtrhhophihrdhnvghtqeenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmtheslhhofigv nhhtrhhophihrdhnvght
X-ME-Proxy: <xmx:KVGhXlRww23tLx_gRxNP89xeBxNtkcnjHdVTW0dNFFkXxhQuRKSGbQ> <xmx:KVGhXtY_QimJHI-A8kPs5xCgtbITa8-Up1oP-smfyLCGbKm_ISJFWA> <xmx:KVGhXqcBkshKxzOwNpx6vJXc_KHw8J0eG1es78tT5cN3SNeyJrB1gA> <xmx:KlGhXiAvVcaw6uGe-Cc4WgsxtSyw4u9Dr7FEJf59acd67FpdWUHwDw>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id CD97E180093; Thu, 23 Apr 2020 04:26:17 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-dev0-351-g9981f4f-fmstable-20200421v1
Mime-Version: 1.0
Message-Id: <a3602c32-0721-4b3f-ad19-6c787e40d93b@www.fastmail.com>
In-Reply-To: <AM6PR08MB33189D58D3342BCD68D91F299BD30@AM6PR08MB3318.eurprd08.prod.outlook.com>
References: <AM6PR08MB3318911C71C0DDB90480694A9BD50@AM6PR08MB3318.eurprd08.prod.outlook.com> <CABcZeBMs+o4BU5VhqJKmQvnkEe9RkQXRv7Ej6pVD1-e1vdMoyA@mail.gmail.com> <CABcZeBM9Ri=Rz5kbWn08Vk-Y14MVSALwB1Bd9QV=HfWoq3XqSA@mail.gmail.com> <AM6PR08MB33184161239B6383EA7D776C9BD20@AM6PR08MB3318.eurprd08.prod.outlook.com> <CABcZeBM4wVkH_pdTZMakyV9Y=tk8PNDknHTFhjwX-sw3GOOaZw@mail.gmail.com> <AM6PR08MB3318D6A11587449627F6EA679BD20@AM6PR08MB3318.eurprd08.prod.outlook.com> <CABcZeBNcODKehe217nr2jSedy6N6Gun+QYcksFp2Oqv6gLrzzw@mail.gmail.com> <AM6PR08MB3318717D21E69A2373AC1ACE9BD20@AM6PR08MB3318.eurprd08.prod.outlook.com> <8371994b-799c-4196-a3cd-4b0f71e24b5e@www.fastmail.com> <CABcZeBNbehkW8FO29DS00m19+b=dH8V8esscu8OU-mmaJf6etQ@mail.gmail.com> <5b74a840-a1cd-4b5b-a0c5-65320b851325@www.fastmail.com> <CABcZeBOvm-nx6hKR79ChN=A4RFzWgt=-BzjORc=N7_A79tO6Ng@mail.gmail.com> <AM6PR08MB3318D5881B8D2BEFF938F2B79BD30@AM6PR08MB3318.eurprd08.prod.outlook.com> <1e6201d6-a078-4137-898d-d1554c22aa10@www.fastmail.com> <AM6PR08MB33189D58D3342BCD68D91F299BD30@AM6PR08MB3318.eurprd08.prod.outlook.com>
Date: Thu, 23 Apr 2020 18:25:57 +1000
From: Martin Thomson <mt@lowentropy.net>
To: Hanno Becker <Hanno.Becker@arm.com>, 'Eric Rescorla' <ekr@rtfm.com>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/oN6Dsvjao6A_u_Kx32cvaYmaLxY>
Subject: Re: [TLS] DTLS 1.3 AEAD additional data
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Apr 2020 08:26:21 -0000

On Thu, Apr 23, 2020, at 18:11, Hanno Becker wrote:
> You criticize that an implicit CID which is still included in the AAD 
> requires state on the receiver when processing multiple records within 
> a single datagram, which is true. I'm saying that the same holds for 
> the PR 143 which adds the implicit CID to the AAD even if it's not in 
> the header. In that sense, this (valid) issue exists on both cases. 

Right, but that is why I don't like 143..
 
> There is nothing subjective here: You cannot make full use of the 
> compression features such as length omission independently of the 
> underlying datagram layer, because you have to know that the record 
> you're sending will be the last. So clearly sending is _harder_ if you 
> have to decide on the header format already during record protection, 
> while if you can protect the record on the basis of the logical header 
> data alone, choice of header format and choice of packing into 
> datagrams can be handled entirely independently. 

Those are new, optional features, so I'm assuming that any costs associated with exercising them justify any complexity.

> > The authenticated logical header being different than what is sent on the wire is a bug in my opinion. Authenticating all the bytes you send makes the protocol simpler and less error prone.
> 
> So far, there hasn't been any substance to the claim that 
> authenticating the logical header is a "bug" or "defect", while in 
> (a)-(c) above I provide multiple reasons why it is in fact beneficial.

I don't agree with your reasoning.  As far as a bug, let me just say that having to allocate and construct a pseudo-header separate to the actual header is work that no longer has to be done.  So receiver logic is easier.