Re: [TLS] Fwd: Re: AD review of draft-ietf-tls-dtls-connection-id-07

Eric Rescorla <ekr@rtfm.com> Tue, 17 November 2020 09:46 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 5DBDF3A0DAC for <tls@ietfa.amsl.com>; Tue, 17 Nov 2020 01:46:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 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, URIBL_BLOCKED=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 scDfGchW87T1 for <tls@ietfa.amsl.com>; Tue, 17 Nov 2020 01:46:51 -0800 (PST)
Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) (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 6C36E3A0DA2 for <tls@ietf.org>; Tue, 17 Nov 2020 01:46:45 -0800 (PST)
Received: by mail-lj1-x22f.google.com with SMTP id r17so23524476ljg.5 for <tls@ietf.org>; Tue, 17 Nov 2020 01:46:45 -0800 (PST)
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=mR/dRlVp9SvGoj8kXEz60bcKOnutA1N+t1W+gwLfFqo=; b=fyaFWEbAg0ghGtdFMAyxXWtJYVMhk5kg1QvWBKJIBAvqS5wY3cfPGQeQXOLSQ+Ep7v J4Dggw2uMH7xRD0PMz4pr0451KKUhNWdMYTwM/ZaT+KuGyY6u0GMHh5v3pu6LUTT8gIj Wb8yU7WqRHUpPKn8bWKjtEZsa94MEat66fZJMc9e+gKW4f8d+tQQzEjZzN87PbB8xOAW ZF92jqfUSAdtA2RJI3GwcG+iIy6BTlwzQGj0uRZ5RW5ezqM1kYJ4dFoVeFBNy+0lKrD9 jdbWKpSos+1qC0bImFHc89WCWulzhkjTd36tFbBPqT7HGjeiDQZylZutQMsfWdS26BJE /+Iw==
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=mR/dRlVp9SvGoj8kXEz60bcKOnutA1N+t1W+gwLfFqo=; b=a20DEDTdo8y5vsCtED6Inj2/MUKan/hxB56K4/QcHZllpq+NgCv2qmEB9LyMsKnxHy nzB/uIeX3qDe7eSCf1k99zM8J8iFXnc2E424qfCIu5fhzhIQDz6mfWE1qr12UNbqIPwX EiC2jToalNlWcPjOJND6oCA8Bv6p12B+MRnqoh4nZo1pDL7Ddli9uUwkYKiSuWunZ6xN xymFT0xUu5gCQ1YP7Cm/yr9tHWl1KhFc7Mn9Ho7CTThKsf9YGr8kNLEO52RRG3s5og9e eEF3Ac8VTGLUoAzp2eiJtRV7tonVr9KAj9Ts5CiYNlSVKGeeHPvcrR0WRpdXWXx5f9Ye 2QpA==
X-Gm-Message-State: AOAM532Kek/RqskWtvbZEHVOssuhCgrPnudFKGUMs5lG5CJlJ9lGYkYW Vz9W3PWwZ++JoSzbB22y2BQL+vIfKfDeSZJjSTw0QQ==
X-Google-Smtp-Source: ABdhPJycTt5f5BEst7sXH3Aa1BJP5ijhm+MFOEoyzxI0IMAuTWKBt8F3N8l501inDdSSsWYWo2F5L58t0hrSp8Qwjb4=
X-Received: by 2002:a05:651c:1105:: with SMTP id d5mr1703301ljo.265.1605606403597; Tue, 17 Nov 2020 01:46:43 -0800 (PST)
MIME-Version: 1.0
References: <20201012200548.GD1212@kduck.mit.edu> <bab402e6-3353-d750-a849-21c91081f94e@gmx.net> <20201014212428.GP50845@kduck.mit.edu> <a7110178-6220-175e-869d-fcc44400f773@gmx.net> <CABcZeBNocUYZO9yxuG-DYh33ss+Dum1EOxHYEdww5OCR=rKFXw@mail.gmail.com> <20201024021316.GN39170@kduck.mit.edu> <CABcZeBPP_PFWtaNB4Wr+2MoY2+8Mh1Vxt9A-Hp5LaCg9DiLCFw@mail.gmail.com> <20201027010029.GG39170@kduck.mit.edu> <CABcZeBOQxpWMSuJiiXDB0Cf62iNU+hU8Wpd_Pd_1HOgXJYc0Kg@mail.gmail.com> <3e55d1fe-62b2-c62e-a085-032ecb43addb@gmx.net> <20201117060745.GI39170@kduck.mit.edu> <0579646f-f468-8bed-67c6-951239aa972b@gmx.net>
In-Reply-To: <0579646f-f468-8bed-67c6-951239aa972b@gmx.net>
From: Eric Rescorla <ekr@rtfm.com>
Date: Tue, 17 Nov 2020 01:46:07 -0800
Message-ID: <CABcZeBPbwm13umLvqd4wF_7oHabMW3o7Ex6kN_aZYdOfWTjODA@mail.gmail.com>
To: Achim Kraus <achimkraus@gmx.net>
Cc: Benjamin Kaduk <kaduk@mit.edu>, Watson Ladd <watsonbladd@gmail.com>, Joseph Salowey <joe@salowey.net>, "tls@ietf.org" <tls@ietf.org>, draft-ietf-tls-dtls-connection-id@ietf.org
Content-Type: multipart/alternative; boundary="00000000000055fde405b44a5f05"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/H0TPFdBF0fmXXgFVDvlhNFWrZzo>
Subject: Re: [TLS] Fwd: Re: AD review of draft-ietf-tls-dtls-connection-id-07
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: Tue, 17 Nov 2020 09:46:52 -0000

Argh, Good catch. I'll revise the proposal in light of this point.

-Ekr


On Tue, Nov 17, 2020 at 1:09 AM Achim Kraus <achimkraus@gmx.net> wrote:

> Hi Ben,
>
> Am 17.11.20 um 07:07 schrieb Benjamin Kaduk:
> > On Fri, Oct 30, 2020 at 01:28:12PM +0100, Achim Kraus wrote:
> >> Hi Ekr,
> >>
> >>> As for EtM
> >>>
> >>> Encrypt-then-MAC:
> >>> struct {
> >>>     uint8 marker = tls12_cid;
> >>>     uint8 cid_len;
> >>>     uint8 content_type = tls12_cid;      \
> >>>     uint16 DTLSCiphertext.version;       |  appears on wire
> >>>     uint64 seq_num; // includes epoch    |
> >>>     opaque cid[cid_len];                 /
> >>>     uint16 iv_length;
> >>>     opaque IV[iv_length];
> >>>     uint16 enc_content_length;
> >>>     opaque enc_content[enc_content_length];
> >>> };
> >>>
> >>
> >> I failed to understand the reasons behind this proposal.
> >>
> >> 1. Why should the "marker" be added, if the "content_type" is already in
> >> the MAC, and this special MAC is only applied for tls12_cid records.
> >> What is the intended benefit of that?
> >
> > This is another general hygiene item; we are preserving the invariant
> that
> > the first byte of the MAC input is the content type -- this is at present
> > (IIRC) invariant across all TLS versions and MtE/EtM, and not something
> to
> > change lightly.
>
> "All TLS versions"?
>
> TLS 1.2, RFC 5246
>
> https://tools.ietf.org/html/rfc5246#section-6.2.3.1
>
> The MAC is generated as:
>
>        MAC(MAC_write_key, seq_num +
>                              TLSCompressed.type +
>                              TLSCompressed.version +
>                              TLSCompressed.length +
>                              TLSCompressed.fragment);
>
>
> https://tools.ietf.org/html/rfc5246#section-6.2.3.3
>
> The additional authenticated data, which we denote as
>     additional_data, is defined as follows:
>
>        additional_data = seq_num + TLSCompressed.type +
>                          TLSCompressed.version + TLSCompressed.length;
>
>
> So, as far as I see, at least the TLS 1.2 variant doesn't do that.
> RFC6347 doesn't change that, so DTLS 1.2 also doesn't do that.
>
> Maybe you precise the "all" to a set of versions to make it easier to
> check it?
>
> best regards
> Achim
>