Re: [TLS] Choice of Additional Data Computation

Eric Rescorla <ekr@rtfm.com> Fri, 24 April 2020 21:35 UTC

Return-Path: <ekr@rtfm.com>
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 4668C3A0C14 for <tls@ietfa.amsl.com>; Fri, 24 Apr 2020 14:35:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.com
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 OXvonfe_aMtk for <tls@ietfa.amsl.com>; Fri, 24 Apr 2020 14:35:16 -0700 (PDT)
Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) (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 040963A0C11 for <tls@ietf.org>; Fri, 24 Apr 2020 14:35:16 -0700 (PDT)
Received: by mail-lf1-x12c.google.com with SMTP id 198so8951660lfo.7 for <tls@ietf.org>; Fri, 24 Apr 2020 14:35:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ERGAc3ZNSx/eTFj+M6w2AanT2uv1DHXV2gXbBdZykmg=; b=Vl4eyBWXRb2l2z7q4RYLWSia58fjhYFG8zvrsguLW11zbbNMZEnat5k+CJ56w6+T6e 4nVaVPQa17Mv2LNUpKUnFvgIgwPRqHzEFHcjOCmiq887H/c/hxEkJgURhJtMIOzkZRxA 6t8Zrw/ZbgjoBWxA9L6268XWnU0qDtqAwN5ftRyJa3ougqWuPRlOwTNOzWTIpx464sY2 Rh+69mWRhP8ViJjN4ZVkKNvx31G+Ryd+SMQ6sVCBt1IKwCxn6BK8z6w2jr8vk3R90DYD YTeuSabaXubRx30hSDpTRH9kScI3Pw7UoXviD3Epuyh0YsAf9WbzNVN0taEPzeQazUey 8llA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ERGAc3ZNSx/eTFj+M6w2AanT2uv1DHXV2gXbBdZykmg=; b=tgt6r7G5DVD/PbPgKIwfztWOpGngJxNqvVaIWuDnr8S2N+/LpHs+CteYDMAQHD8Iap vnipeMkzuAe0nc88LWhUdRxEdXoVqyqD9WegC2+GruQayOA6WA9gPIp5Xp4CSz/fllXP WwDU5HnqCHpRT6AmhE+4seHT0WutK0JWEiv3aJ9B7F1Hos96gFbmdCGZW3pq78z8lDzE qXy4sLXOGzvDJ972l8+yozpaXxRvRx8lb/nhcvLRX5L3bh5ld5SSXZzfi+CUhDjol72e 0kjyuXHkl1LfOB6hgdKSkJCA0pTuxl2dLditjhkgSi1icv54z52ja/9WEJYgKjUPUJoV N6Qg==
X-Gm-Message-State: AGi0Pub0oB71sXubuibk6ZK5H37jys8mkMOcKJeNuNRT3J98vpwNzEUa K0ISF7xF6ebJrpZQ5TNa0Fg+1mjiTjGf7IBW85Fguw==
X-Google-Smtp-Source: APiQypIxidvWlMR8OjzMnAh5xZV+f9vz4+FugHMCV1Mvl+n8+5DqU9uGz7B3H1VMIcjmldL0YPfIsevjizJz6SegTuU=
X-Received: by 2002:a19:f806:: with SMTP id a6mr7637741lff.201.1587764114186; Fri, 24 Apr 2020 14:35:14 -0700 (PDT)
MIME-Version: 1.0
References: <AM0PR08MB371694E826FA10D25F2BA53EFAD00@AM0PR08MB3716.eurprd08.prod.outlook.com> <93042b37-37e1-5b6a-3578-a750054d0507@gmx.net> <AM0PR08MB3716541F4825F8D43DC3D308FAD00@AM0PR08MB3716.eurprd08.prod.outlook.com> <CACLV2m4-Qcx-xKWP201VCY73HVyjCzHVCb6PrntnBWhA8fBQYg@mail.gmail.com> <AM6PR08MB3318B6ABD411C8C476C3D10B9BD00@AM6PR08MB3318.eurprd08.prod.outlook.com> <CABcZeBOwK7m465LsbY3U+bHv0XA2rcGOTEBStTtTNkwAYvWeQA@mail.gmail.com> <CACLV2m5Md2+Ffc978ZJ+BeZwRgcXTV3xE0vXzmvNgnot_c71xQ@mail.gmail.com> <AM6PR08MB331862B6F143652F4B4C10EE9BD00@AM6PR08MB3318.eurprd08.prod.outlook.com> <CABcZeBMKoVrcN-=aTvy6py5bhOwOVrhgVLmtX2tthc=Oa54b_Q@mail.gmail.com> <CACLV2m7knyt-gQoQq2v1Kz-J62DPjCpb6faJFfDgJ-8mprHwxQ@mail.gmail.com> <CD3D3519-281A-469E-AB5C-FB5E26816958@arm.com> <CABcZeBPJZKOCN7p52htHBERCVVxBJSTvJfOwn5=u6zZJLRfkfQ@mail.gmail.com> <CACLV2m6D=DrHH+66V1HC8RMQytggpkcxutZD=p0GP1dpcqjhVw@mail.gmail.com>
In-Reply-To: <CACLV2m6D=DrHH+66V1HC8RMQytggpkcxutZD=p0GP1dpcqjhVw@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 24 Apr 2020 14:34:37 -0700
Message-ID: <CABcZeBMWKDvNsgeZUFtv7vj0b2vnyhM34YxY4auvkVKHRTP+RA@mail.gmail.com>
To: chris - <chrispatton@gmail.com>
Cc: Thomas Fossati <Thomas.Fossati@arm.com>, "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000003751805a4102429"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/HFiecuLpon_PgtN_H9VarjjuxKo>
Subject: Re: [TLS] Choice of Additional Data Computation
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: Fri, 24 Apr 2020 21:35:19 -0000

On Fri, Apr 24, 2020 at 2:29 PM chris - <chrispatton@gmail.com> wrote:

> But I'd like to hear Chris weigh in on whether he thinks we should have
>> them explicitly in the AD (and whether that should be true in QUIC too).
>>
>
> I would need to study the specs in order to provide an intelligent answer
> here. Off the hip, it would seem to depend on how the boundaries between
> record headers and ciphertexts are determined. Taking a quick look at
> draft-37, Fig. 4: the "full" header includes three values that are excluded
> from the "minimal" header, the length of the ciphertext being one of the
> fields. Presumably, when using the "minimal" header, the length is a
> parameter that the sender and receiver already agree on.
>

Yes. It's "the rest of the UDP datagram".

-Ekr



> If this is case, then I don't see a need to add the length to the AD. If
> the attacker manages to convince the receiver to use the wrong length
> parameter (maybe this is negotiated during the handshake?), then as Ekr
> points out, AEAD decryption would fail, thereby "implicitly authenticating
> the input length".
>
> Chris P.
>