Re: [TLS] Record-level ACKs in DTLS 1.3

Eric Rescorla <ekr@rtfm.com> Thu, 05 March 2020 14:39 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 A6A643A1595 for <tls@ietfa.amsl.com>; Thu, 5 Mar 2020 06:39:23 -0800 (PST)
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 CFTNFor36zYM for <tls@ietfa.amsl.com>; Thu, 5 Mar 2020 06:39:21 -0800 (PST)
Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (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 6E8043A159A for <tls@ietf.org>; Thu, 5 Mar 2020 06:39:19 -0800 (PST)
Received: by mail-lf1-x12f.google.com with SMTP id x22so4816433lff.5 for <tls@ietf.org>; Thu, 05 Mar 2020 06:39:19 -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=8xrj0XzIOHB74mqYAl+u/AzN/cL74LYUA1yv9VCnISY=; b=ENp3ZOBi+YaPKqU4JslSLM3eca1hrkZkAYbymhDO26K+wTMNReyjX3sTw7d10PhxYg AxNyuH7wUNtYXX36vDr2pibr7WLhpjxuFONhQs6gySe0bBkwpBrCpiM4CSJsSP7PnUlX V21oNp9dCEEMUSHhwMa+UoyfXdCSnA7BZR5EjHhs/6pLSqx5GptAw5Bvhf6zXrs0g8oS ryFuhcilFci0LIAIR3pbW/2K7mQsaX6VtlqHdoKoR4LuoNBRwZg7P7JhAIF6TTrMsS94 p4VSuMM+xWvAxlXvKIAUSvLHcZnZtuqZOFyC8p2uxff0B4lh5nDG/35EcnE8TBLjks9P XX2w==
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=8xrj0XzIOHB74mqYAl+u/AzN/cL74LYUA1yv9VCnISY=; b=NQ+0pdbFP+lzV8r14Gl/NOpLKGQXeVeG055QbzOu7fAoXG0fEPBIWDfoOZl3I9DoeO L3v93NSIZwAuV2KSdKLo3qGlI3+b1AtWcgnisdbbGZEWmC7Nzco5DMg4LZyxR1YnEzX1 Ak6hQr/hkiK1+EfQ9E8wOs38CJnM6H1C2cMaAUnZSvvzwMlD5MyIEHqQj6taAlTEKBBu lDBeThT2ns+E6vCKMHDw/alVZJuLDmDgKrJnCFz5vE9sID+KlbhoBfuaR/0iAiNuB5yY YBbuP/z356a12CkVu7HJWo1g3veJMDbwduy4N18c54lAr1SWc9/FeY6sn/XdZwEUtar1 J7ZA==
X-Gm-Message-State: ANhLgQ1cZXiqX94MGus93Fec72Ida+f04gKWksxrZo3VbnpYApFh6wVU l8d8wPvUOAc/2HY6YqyynDQPzLHnNCjn5QkCWM4KYFnYWNSvTA==
X-Google-Smtp-Source: ADFU+vtl2gqqCCP+Usm0+GYGOTtJe1zajMdTzS8+PBissi+iyZdKKj3KImYazMryzqKU2llEzipXzPWzw+JMlYfZIWk=
X-Received: by 2002:a05:6512:1041:: with SMTP id c1mr5856840lfb.14.1583419157677; Thu, 05 Mar 2020 06:39:17 -0800 (PST)
MIME-Version: 1.0
References: <AM6PR08MB3318E5A347314EB509AC91759BE80@AM6PR08MB3318.eurprd08.prod.outlook.com><CABcZeBNZ4SZzdAs64a4H3g8ato=-zTJv=0ACgCLDcAn5gnSOkQ@mail.gmail.com> <AM6PR08MB3318B0F99E60EE48B6DC34449BE50@AM6PR08MB3318.eurprd08.prod.outlook.com>
In-Reply-To: <AM6PR08MB3318B0F99E60EE48B6DC34449BE50@AM6PR08MB3318.eurprd08.prod.outlook.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Thu, 05 Mar 2020 06:38:40 -0800
Message-ID: <CABcZeBPeW=MrH01Li-j_bgOBr3VuT=ErxEL-Sn0FzKVbKA4YrQ@mail.gmail.com>
To: Hanno Becker <Hanno.Becker@arm.com>
Cc: "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000006c9c9005a01c804a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/G8R6cC5C4PJaerlQb7UbwByzno4>
Subject: Re: [TLS] Record-level ACKs in DTLS 1.3
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, 05 Mar 2020 14:39:24 -0000

Hanno,


> Hi Ekr,
>
> thanks for your prompt reply.
>
> > Thanks for your note. I don't think your proposal will be an
> > improvement. It destroys information which could otherwise be used for
> > improve round-trip and loss estimation (cf. the difference between
> > QUIC and TCP ACKs).
>
> What information is destroyed that was there before? You can still
> use handshake metadata in place of record sequence numbers and
> do the same analysis as before.
> Also, with QUIC and TCP, we're mainly talking about throughput
optimization
> at the application stage, where DTLS doesn't ACK anyway.

If you retransmit a record with exactly the same contents,
it is not possible which version was received. It's true that




> > Second, it prevents the receiver from saying
> > some non-sensical things like acknowledging part of a received packet.
> > It's of course true that the current design allows you to ACK
> >non-received packets, but that's much more straightforward to detect.
>
> I don't think this is actually a complication: In both cases you
> have a list of messages you've sent which are tagged somehow -- either
> by a record sequence number or handshake metadata which at this point
> can be treated opaque -- and if you receive an ACK for a non-existent
> tag, you ignore it or fail, whatever the policy.

Sure, but now you just have some new artificial rule
that you can't process part of a handshake message,
even though you can actually say that.


> Beyond that, I consider the more fine-grained ACKing at the handshake
> level a benefit, because it allows to acknowledge parts of records
> containing multiple handshake messages only some of which could be
> processed. Example:
>
>     +---------------------------------+
>     | Seq No 1                        |---------------> Received
>     | Fragment 0..a                   |
>     +---------------------------------+
>
>     +---------------------------------+     lost
>     | Seq No 1                        |----------x
>     | Fragment a+1..b                 |
>     +---------------------------------+
>
>     +-----------------+----------+
>     | Seq No 1        | Seq no 2 |-------------------> Received
>     | Fragment b+1..N | complete |
>     +-----------------+----------+
>
> If this happens with an implementation which only supports contiguous
> reassembly (I think GnuTLS does it this way, or at least used to), it
> will drop the second fragment, but the second message might still be
> buffered and hence ACK'ed. With record-level ACKs, such fine-grained
> ACKing isn't possible, and HS Seq No 2 will need to be resent even
> though it has been received.

Yes, I agree that this is true, however, those implementations
have already decided that they favor implementation simplicity
over high performance, so I don't think this consideration
is relevant here.


> >  I don't think your proposal will be an improvement.
>
> I uphold this: ACKing at the handshake level does not lead to
complications
> while (a) easing memory efficient implementations for IoT devices and
> (b) increasing conceptual clarity by avoiding the current semantic
ambiguity
> of record level ACK with dependency on implementation-specific handshake
> level details like buffering and reassembly strategy.

I don't really agree with (b) for the reasons above. It introduces new
complications. As for (a) I believe that in practice the state that
must be kept is quite small (in general, there will only be no
retransmission at all and so you will only need one or slightly more
extant flight). The TLS handshake already requires you to store quite
a bit of state (hashes, etc.)  so I'm not persuaded by this argument.

I think we're down to a difference of technical judgement now, so
I'll leave it to the chairs to determine how to address this comment.

-Ekr