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

Hanno Becker <Hanno.Becker@arm.com> Thu, 05 March 2020 15:28 UTC

Return-Path: <Hanno.Becker@arm.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 9D02F3A1667 for <tls@ietfa.amsl.com>; Thu, 5 Mar 2020 07:28:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=B804fm4c; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=B804fm4c
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 PJa2oztg6YS9 for <tls@ietfa.amsl.com>; Thu, 5 Mar 2020 07:28:49 -0800 (PST)
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80051.outbound.protection.outlook.com [40.107.8.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EDA973A1664 for <tls@ietf.org>; Thu, 5 Mar 2020 07:28:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t+HIsRHVTh6fBiwsmuSPhhuuQgzMKKpYdQyAlvUE+vY=; b=B804fm4cPNb2bTDgfPx9/Om7EiXeVQMp44wvJ+8qgddYBk+32rfklsKRCT73Q/Fv/BnXVeranP89x32CTTLODVUbystQ0hHAHyJPKx/Dy+dbZuuVWWOkGGMe1E3XwyLqqvIz65ajEIWyMEyoaBU7nmK1olJVUZ94Vx1EzTUoBJ8=
Received: from AM0PR0102CA0054.eurprd01.prod.exchangelabs.com (2603:10a6:208::31) by VI1PR08MB2973.eurprd08.prod.outlook.com (2603:10a6:803:4d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15; Thu, 5 Mar 2020 15:28:46 +0000
Received: from AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:0:cafe::b6) by AM0PR0102CA0054.outlook.office365.com (2603:10a6:208::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.15 via Frontend Transport; Thu, 5 Mar 2020 15:28:46 +0000
Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; ietf.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;ietf.org; dmarc=bestguesspass action=none header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT020.mail.protection.outlook.com (10.152.16.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.11 via Frontend Transport; Thu, 5 Mar 2020 15:28:45 +0000
Received: ("Tessian outbound d1ceabc7047e:v42"); Thu, 05 Mar 2020 15:28:45 +0000
X-CheckRecipientChecked: true
X-CR-MTA-CID: 6d421df8876ea1fc
X-CR-MTA-TID: 64aa7808
Received: from d17ff000aeaa.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D9109422-5014-4BAE-9D96-4501BA375A47.1; Thu, 05 Mar 2020 15:28:40 +0000
Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d17ff000aeaa.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 05 Mar 2020 15:28:40 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=neH5VpMPwdbCvG+asb8wA5q5LWSDNuO0Q8X7Nqnt8mzXrUnlOmeUxEUs7kQbejXOZwTaH5khxfgWe45vI0y3U7Kq6g1H4FbZwKwwYiYfAxId8bRJb1tTkFpAS7neLASLZzhpLjF4Qlh1ASzmXNVV5YoiE8lTblltRKLk0zPaKbl10Ry7CjpkbRAQgdhXw2jym9Jvecz9TXLmtBG277+ClNQJ+1u4sv54ULk0XoyX+HYW9E3UU43z1Neh0t9eADiX5FvM67AgKth3b8aatKMtD/k8JUo7JScMhrmm3xU9BcZMvH6CQRNYw6S016IN1movUcKrbeZE+0PN0f4RCLHuFQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;bh=t+HIsRHVTh6fBiwsmuSPhhuuQgzMKKpYdQyAlvUE+vY=; b=e+Sisf/4F4bfM0ImiZk8gk3iiSHQ30qAUaDRXRueK6s3x3s0CpT0vm+hHGlzleKiVljyUggyvN27fpUMFRwhtK2qQjBiL3eZn2DkqO8RSsyI/5ObF673nliwLnDWb6mv0M9/SMvGacvYLIY/+jvpQP7uZYxLSIo0QOADV1jrupTJQJirqX3cAJWhGwNuLvUYwMU1He5sC9rEsOw8KlCVHwdgOwfKNilZxpAA/Gu332Hw/gbDNsk6/UVx/eD6kurgi6Zh0bpmHCDjt8RxswYnhQlP8c0E302H1RWUNrenLxHlPxywykTOix1jVYgerdOVEXVckZtwr9XQL8jMFsB8EA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t+HIsRHVTh6fBiwsmuSPhhuuQgzMKKpYdQyAlvUE+vY=; b=B804fm4cPNb2bTDgfPx9/Om7EiXeVQMp44wvJ+8qgddYBk+32rfklsKRCT73Q/Fv/BnXVeranP89x32CTTLODVUbystQ0hHAHyJPKx/Dy+dbZuuVWWOkGGMe1E3XwyLqqvIz65ajEIWyMEyoaBU7nmK1olJVUZ94Vx1EzTUoBJ8=
Received: from AM6PR08MB3318.eurprd08.prod.outlook.com (52.135.163.143) by AM6PR08MB4038.eurprd08.prod.outlook.com (20.179.1.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.18; Thu, 5 Mar 2020 15:28:38 +0000
Received: from AM6PR08MB3318.eurprd08.prod.outlook.com ([fe80::cc7b:fca1:7ea2:9c61]) by AM6PR08MB3318.eurprd08.prod.outlook.com ([fe80::cc7b:fca1:7ea2:9c61%6]) with mapi id 15.20.2772.019; Thu, 5 Mar 2020 15:28:38 +0000
From: Hanno Becker <Hanno.Becker@arm.com>
To: Eric Rescorla <ekr@rtfm.com>
CC: "tls@ietf.org" <tls@ietf.org>
Thread-Topic: [TLS] Record-level ACKs in DTLS 1.3
Thread-Index: AQHV7ix8mXje6TWNu0+lhHSpDYxOZKgwrrWAgAeP3L+AAdycAIAACPNL
Date: Thu, 05 Mar 2020 15:28:38 +0000
Message-ID: <AM6PR08MB33185DF8F4B8BDE6254F0D5F9BE20@AM6PR08MB3318.eurprd08.prod.outlook.com>
References: <AM6PR08MB3318E5A347314EB509AC91759BE80@AM6PR08MB3318.eurprd08.prod.outlook.com><CABcZeBNZ4SZzdAs64a4H3g8ato=-zTJv=0ACgCLDcAn5gnSOkQ@mail.gmail.com> <AM6PR08MB3318B0F99E60EE48B6DC34449BE50@AM6PR08MB3318.eurprd08.prod.outlook.com>, <CABcZeBPeW=MrH01Li-j_bgOBr3VuT=ErxEL-Sn0FzKVbKA4YrQ@mail.gmail.com>
In-Reply-To: <CABcZeBPeW=MrH01Li-j_bgOBr3VuT=ErxEL-Sn0FzKVbKA4YrQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Hanno.Becker@arm.com;
x-originating-ip: [217.140.106.51]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-HT: Tenant
X-MS-Office365-Filtering-Correlation-Id: ff5c4802-e2e2-4536-590d-08d7c119e518
X-MS-TrafficTypeDiagnostic: AM6PR08MB4038:|VI1PR08MB2973:
X-Microsoft-Antispam-PRVS: <VI1PR08MB2973EE0F6F6C7827D429B6D49BE20@VI1PR08MB2973.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000;
x-forefront-prvs: 03333C607F
X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(136003)(346002)(376002)(39860400002)(396003)(366004)(189003)(199004)(86362001)(9686003)(52536014)(6506007)(19627405001)(66556008)(66446008)(81166006)(55016002)(6916009)(66476007)(26005)(53546011)(64756008)(66946007)(91956017)(8676002)(76116006)(81156014)(4326008)(8936002)(478600001)(316002)(186003)(5660300002)(33656002)(2906002)(7696005)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB4038; H:AM6PR08MB3318.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts)
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original: wYHDhDCaG0XzHy95Q71FiYJ0bI7OpAd2ihDD9m4/pizBAOAVqqPaH4a8TErxvw7iEm3yLFcp4b/5EUX35JWkn7uhmrhxkMwVaXPH2JibLMte1LFe+t21EZehYh+FYgKIEL1qpB5ZlfhRFH4OExZILxTM0/MeV/zQ74sLN8N398SWyWMWiWGBxn3xhe9lr/71FWH+FgRT5xEl1hml26vZI+onBKMVDw63B0TXcLC/KKofTmvzN9kT1kEP9MaiGKm+TxIiX843kUMIcOY35kbacP76fqgZqmXgbOBNqVYcR9kwdhLVF13BVqXhKAGRff0ulv9CCz+cZawGBA7AZurwFBfF21qjABoKDEvpQohzYAXb2JFdfb1WFvDcdru76iXzVZIJSFOG/GsecjHDYmrKo3dKnlUHn/gzmroMeR4LdAsobIhS4R555l477Zblh1MI
x-ms-exchange-antispam-messagedata: u1Gwy1tLev5nXj8GQI4r5b330GXL4U7RLiojoSsVhIpgWNrJaQNnDFvKED4edIqC/ifnjwSsQUKFcltnRwAe8YOfIjtPAbsjx4fHUc05Ctb2F6rMwMQAlnw0Qyd/80O/chf/UmyMMWqPGHJRbDdClw==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_AM6PR08MB33185DF8F4B8BDE6254F0D5F9BE20AM6PR08MB3318eurp_"
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4038
Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Hanno.Becker@arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com
X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(346002)(39860400002)(376002)(199004)(189003)(26826003)(478600001)(6862004)(19627405001)(53546011)(86362001)(316002)(5660300002)(52536014)(81156014)(4326008)(8676002)(81166006)(2906002)(8936002)(36906005)(30864003)(9686003)(70586007)(6506007)(356004)(55016002)(33656002)(70206006)(7696005)(26005)(186003)(336012); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB2973; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; MX:1;
X-MS-Office365-Filtering-Correlation-Id-Prvs: 63d8a1aa-8579-420e-7f4a-08d7c119e0d9
X-Forefront-PRVS: 03333C607F
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: eTM5pSLpronpWivomIXrq8Jt60H2KAy+i17htSvDFVGutj8/c8jPGcWsjmSdYi67vd4+LS3+igDsQ1Yc009eO8LsNj803RYWXJ8zA5pRBr7jI+MPABkom8PtOdhQ4eirQHM0Zejy5h2NogBXenJ57Hs9sdcZ4BLoHyCSb2xpG/0MY4f+Q3P7xynJIdvJKA1jS+e9sKkaW4Elf1N3AcI2O15cQbTLDrkCAH1ypwMmLpnl9QbgSrot57M/YBslipBVkURVJT2zo6PVIyU8wzM9FhYCkvmwe3DwTx9VtgGjTYi9kTrcBtqYGKsJ4J/Nt1GwXUb9DKxQzE7/eSTXOl+yOVrzxPC1LMODtABwRmNlNtDxd34aPMJH7jDYfevehMIP2zQzFmRh4nNTBTahRLdAtENTHSJ5zr9ygNloPVhRm1gmGERxTt/NDb4X+1lej/GB
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2020 15:28:45.7345 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: ff5c4802-e2e2-4536-590d-08d7c119e518
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2973
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/f6wAtpxeAVvaKQSk6ypFWnm3OPM>
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 15:28:54 -0000

Hi Ekr,

> 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.

DTLS 1.3 should suit the case of IoT devices and lossy IoT networks,
together with the long-term prospect of post-quantum cryptography
and the large cryptographic material that goes along with it. In such
context, it is / will be important to be able to deal with excessive
fragmentation and retransmission efficiently.

Moreover, note that in the face of a PMTU change, retransmission on the
basis of buffered opaque record content without knowledge of the underlying
handshake structure doesn't work, and will require retransmission of the entire flight.
This is avoided with ACKing at the handshake level, which makes retransmissions
agnostic to PMTU changes.

> 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.

It would be nice to hear some more opinions on this here, too.

Thanks for the discussion,

Cheers,
Hanno

________________________________
From: Eric Rescorla <ekr@rtfm.com>
Sent: Thursday, March 5, 2020 2:38 PM
To: Hanno Becker <Hanno.Becker@arm.com>
Cc: tls@ietf.org <tls@ietf.org>
Subject: Re: [TLS] Record-level ACKs in DTLS 1.3

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
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.