Re: [TLS] DTLS 1.3 sequence number lengths and lack of ACKs

"Tschofenig, Hannes" <hannes.tschofenig@siemens.com> Tue, 16 April 2024 13:47 UTC

Return-Path: <hannes.tschofenig@siemens.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 CC888C14F6FE for <tls@ietfa.amsl.com>; Tue, 16 Apr 2024 06:47:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.097
X-Spam-Level:
X-Spam-Status: No, score=-7.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_NONE=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=siemens.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YCKNUwgq-JBK for <tls@ietfa.amsl.com>; Tue, 16 Apr 2024 06:46:57 -0700 (PDT)
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2059.outbound.protection.outlook.com [40.107.6.59]) (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 27AC4C14F615 for <tls@ietf.org>; Tue, 16 Apr 2024 06:46:57 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HVK/7BvuoVItLL1YGquBeCKuBeddVxhZwhM3OJxQBE/p8py1BvuyZz/Zac6sHZAYM60Z3HABwWI7VMvZFMa6XpqcT5hrId7p5AWnqZ8fYIxJeyqXYESI1hWnZOOmMu+IJEfkqv1Fm3LRK3F4/A4xXU924fEIHwzmoTSeFTsqxrcNIyfxykCs3lTtLsd0nXzj3W0kLhhTnpyUWXPkEAZjZFpCOIoKzu8Nj+N8cMcRR8cv2lQt5NyVW+dsN6URikVLE/Juen3U7VaHPsBhKzRe8L/16WRtm/AES/5CZC++JR6WIO1SjJ6I7KXHfahnP7I9qVmraxzNwG5UxvHFIuPAnQ==
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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6sC9fYw4sOyTb9+UM1yBXVu+0ATG8DnfGdeJhRqiHKk=; b=hg2ufcinaF+BXc50h7SgB3er5HagofxO1UsUNZUdXuDKMviaJbg48uUUFAMQEP+SbBDQ8aTqNQ68UjF3lxr0Ls39FPL+vwnl/wlPxDaLp0Q+itTnd5nthVHei843qokTUf93iSozSbMX6083/+tOF6u3XwHxbg+ThZOOfUeoc1jhY/jWIQ4NtIFJjCb9ImmjKDLsEFEzVv3jIgmkZyM5dG/WcNo+JzPm4Tuv61LDz+vQv26V4b3KGUZIHbF/uXGgKork584YvYotLKQ+/yW0TXTso8togy4TLsi3mBziIdhJS2z7vl1F5bF1kcak3kSqwyX8+7l1Z1GQWg9Rjj9TTg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6sC9fYw4sOyTb9+UM1yBXVu+0ATG8DnfGdeJhRqiHKk=; b=SsozWv7EAlnvXrGj55ERs9hWVoLuHFr9z8cvqRtVn4j/PzIfNIZoTNUtB011CJSYKfhyPoPTbchfzc5hMyY2RAFjUlZv35FNCa7eL499lZlDBLTc50RoN8BN0YPOhc5/2omVSoy70iFF9ZwSmvQJkE1tJtuj//ACGnBX3mnXiRL4nN/Pw8yVQmQ0q8GVd+VYaxoLrQk6kNzU+dOgnpvk66QGCm/YdQVirKLqJcmPuxYp1H/LF3TLnwJSQOwU6q77SqQqilZJ3E+lqAswmvd3Mly6rAeb2mYltdEMQiGzpt4d3IBYUFLYlXEoaqoy9pcHU4KWdKSXy98qKwAHbyQlrQ==
Received: from AS8PR10MB7427.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5ab::22) by AS8PR10MB7898.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:63c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Tue, 16 Apr 2024 13:46:49 +0000
Received: from AS8PR10MB7427.EURPRD10.PROD.OUTLOOK.COM ([fe80::9172:20d1:3f36:a3d]) by AS8PR10MB7427.EURPRD10.PROD.OUTLOOK.COM ([fe80::9172:20d1:3f36:a3d%3]) with mapi id 15.20.7452.049; Tue, 16 Apr 2024 13:46:49 +0000
From: "Tschofenig, Hannes" <hannes.tschofenig@siemens.com>
To: David Benjamin <davidben@chromium.org>
CC: "<tls@ietf.org>" <tls@ietf.org>, Nick Harper <nharper@chromium.org>
Thread-Topic: [TLS] DTLS 1.3 sequence number lengths and lack of ACKs
Thread-Index: AQHajSGO/7SfkjgJV0yLdkGl/v/SQbFqoQ1QgABF0wCAAAeN4A==
Date: Tue, 16 Apr 2024 13:46:49 +0000
Message-ID: <AS8PR10MB7427850B0EAF94D651EBE0C0EE082@AS8PR10MB7427.EURPRD10.PROD.OUTLOOK.COM>
References: <CAF8qwaAyDTwdT12zdo=PfRH=zwVU5rJGnsrSgWrk4F1JHyZtDg@mail.gmail.com> <AS8PR10MB742794893207672B7C0F4079EE082@AS8PR10MB7427.EURPRD10.PROD.OUTLOOK.COM> <CAF8qwaDRnAp=nUXqi1C2kRtMSvF2W+F9rD5aK+vU4M1+tfoOwg@mail.gmail.com>
In-Reply-To: <CAF8qwaDRnAp=nUXqi1C2kRtMSvF2W+F9rD5aK+vU4M1+tfoOwg@mail.gmail.com>
Accept-Language: de-DE, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_9d258917-277f-42cd-a3cd-14c4e9ee58bc_ActionId=000e8144-a493-4988-a933-98cb23b797ab; MSIP_Label_9d258917-277f-42cd-a3cd-14c4e9ee58bc_ContentBits=0; MSIP_Label_9d258917-277f-42cd-a3cd-14c4e9ee58bc_Enabled=true; MSIP_Label_9d258917-277f-42cd-a3cd-14c4e9ee58bc_Method=Standard; MSIP_Label_9d258917-277f-42cd-a3cd-14c4e9ee58bc_Name=restricted; MSIP_Label_9d258917-277f-42cd-a3cd-14c4e9ee58bc_SetDate=2024-04-16T13:45:29Z; MSIP_Label_9d258917-277f-42cd-a3cd-14c4e9ee58bc_SiteId=38ae3bcd-9579-4fd4-adda-b42e1495d55a;
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: AS8PR10MB7427:EE_|AS8PR10MB7898:EE_
x-ms-office365-filtering-correlation-id: 58294eba-4b43-4d8c-e86e-08dc5e1baa6d
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: rfdEC8n5lowPm3hVk1q6Qd0hds7UqwaOs0UR3cV4hZnpkonG0aDiUW18ab1xWHyyEnichFfqrfLuDnMmio5L0HoB0vIs9sXJgk93T+xz3VDbWGsXSODvFGBccxwrC5Mn9WMaO12lBGPQMhYvKJ0vmEOAibphcAfZBtjIeDgqVYMBAIlRO66izvpwoP1yGD6PZVwqQYradXDStiybc/uH4l6UF4B9HSjz6n3bGI48Y/M68skbZf1DiFfi+2SHgW2t66dS2Og4LLjSQQ1xcQXpDdOaxxYLMq4UyxdaRkrJ0IAVJwIBUzp2s2pU74UGU14XBeWhoDK8geOQ1BcfqfnoW1qMb+QxK2YVcVWxe3RW9K9NhfALf80SQwloTIUhIUzNdraNztQhfuiK7y1MTmnxSq6M+DzvvxwtuV74a9s8wneP8vnZ0ORdNW0HDCD9EpCi6eizjpYwZKXwhtycsWXpSqJ+lefHA87eoQ8GWHaLr+tcJyfH0csvRooVDxWzPxCHUhE4jwm8ReehBR6MPMBX7KDHHjlL3oEN8phMMvqwuersct7CD6ok/i8uRQjBDg5dDBp6TC4LefpBT0tWTKiAYSPYQaNM7dCJK3g9KuuMfIvDvE18hZ85HJ0j3nqeD9+QJLB+eAEYxOZlB0ivRWh6DT/Y/Zg9YoExpevr3IYA87Q=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR10MB7427.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(366007)(38070700009); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: 3W/yTKJTHh7eEZoBT656ccZzsH8PS3mBYtffkutsneUPIul2Z0qRdibKsXKZHtYI3KyOzTdj96DP/6ndrqif0AWZMGOKbWUB5yqx3MeltWRN9HcXMFt4fKIP8DWi6jkbcHrDxz8ilcc05l5hRQAex/09/tm+8CRxQ9u754ZsuOlsuMiy6f5lVH9bjBXN7Rg30UaHBC/9ZHlwWTlTCVfHYuJFMITXWlnk4/r9gYHjTQyS8Aq6sVoBcNg6urf55KmZ00dJ7pFp5rqA/ZibgvE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6VMav5Oqo71O04IK5C0Qpg8u2BCcxZkNs5jcpkyudSN8TNL91PfX1omswlYShQlYA+mXK/0bZZPplditsbXUU/XH0SAT3WYnKORqIYUYY0iAxcWFkxBzT3lzhf44Wc2Ov2tn1yX+2DNWsmzWYzHrsPTBsxwBnQtr0hXIk8XtwTlUVk7WGpLYrhjgMW4hTl9kh6kGoN1jVx12uMbCCpJ056kgKGuheXT0wkrLN3BbOAmmF7sGilBAPAHK0y10dtn2vvCf3dCR4sLM+eb8Q==
Content-Type: multipart/alternative; boundary="_000_AS8PR10MB7427850B0EAF94D651EBE0C0EE082AS8PR10MB7427EURP_"
MIME-Version: 1.0
X-OriginatorOrg: siemens.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AS8PR10MB7427.EURPRD10.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 58294eba-4b43-4d8c-e86e-08dc5e1baa6d
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2024 13:46:49.5883 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: F/sgGmRDoRB9QGYX2CqvKB7DJ9mvhBm4kCWjIwXYwvoz0NdNUxyJ3JIIrGwHMOzuwe0pDFWnrzxRS0kJHEVujzQB3MgZnZHWezAhFiMaH7s=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR10MB7898
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/xkVTHCOiPQj2TgULY5Wf4UdRr_o>
Subject: Re: [TLS] DTLS 1.3 sequence number lengths and lack of ACKs
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.39
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, 16 Apr 2024 13:47:01 -0000

Fair enough. I don’t have a strong preference as long as we document it somewhere.

Ciao
Hannes

From: David Benjamin <davidben@chromium.org>
Sent: Tuesday, April 16, 2024 3:18 PM
To: Tschofenig, Hannes (T CST SEA-DE) <hannes.tschofenig@siemens.com>
Cc: <tls@ietf.org> <tls@ietf.org>; Nick Harper <nharper@chromium.org>
Subject: Re: [TLS] DTLS 1.3 sequence number lengths and lack of ACKs

Regarding UTA or elsewhere, let's see how the buffered KeyUpdates issue pans out. If I haven't missed something, that one seems severe enough to warrants an rfc9147bis, or at least a slew of significant errata, in which case we may as well put the fixups into the main document where they'll be easier for an implementator to find.

Certainly, as someone reading the document now to plan an implementation, I would have found it much, much less helpful to put crucial information like this in a separate UTA document instead of the main one, as these details influence how and whether to expose the 8- vs 16-bit choice to Applications Using TLS at all.

David



On Tue, Apr 16, 2024, 05:17 Tschofenig, Hannes <hannes.tschofenig@siemens.com<mailto:hannes.tschofenig@siemens.com>> wrote:
Hi David,

thanks again for these comments.

Speaking for myself, this exchange was not designed based on QUIC. I believe it pre-dated the corresponding work in QUIC.

Anyway, there are different usage environments and, as you said, there is a difference in the amount of messages that may be lost. For some environments the loss 255 messages amounts to losing the message exchanges of several days, potentially weeks. As such, for those use cases the shorter sequence number space is perfectly fine. For other environments this is obviously an issue and you have to select the bigger sequence number space.

More explanation about this aspect never hurts. Of course, nobody raised the need for such text so far and hence we didn’t add anything. As a way forward, we could add text to the UTA document. In the UTA document(s) we already talk about other configurable parameters, such as the timeout.

Ciao
Hannes

From: TLS <tls-bounces@ietf.org<mailto:tls-bounces@ietf.org>> On Behalf Of David Benjamin
Sent: Friday, April 12, 2024 11:36 PM
To: <tls@ietf.org<mailto:tls@ietf.org>> <tls@ietf.org<mailto:tls@ietf.org>>
Cc: Nick Harper <nharper@chromium.org<mailto:nharper@chromium.org>>
Subject: [TLS] DTLS 1.3 sequence number lengths and lack of ACKs

Hi all,

Here's another issue we noticed with RFC 9147: (There's going to be a few of these emails. :-) )

DTLS 1.3 allows senders to pick an 8-bit or 16-bit sequence number. But, unless I missed it, there isn't any discussion or guidance on which to use. The draft simply says:

> Implementations MAY mix sequence numbers of different lengths on the same connection

I assume this was patterned after QUIC, but looking at QUIC suggests an issue with the DTLS 1.3 formulation. QUIC uses ACKs to pick the minimum number of bytes needed for the peer to recover the sequence number:
https://www.rfc-editor.org/rfc/rfc9000.html#packet-encoding

But the bulk of DTLS records, app data, are unreliable and not ACKed. DTLS leaves all that to application. This means a DTLS implementation does not have enough information to make this decision. It would need to be integrated into the application-protocol-specific reliability story, if the application protocol even maintains that information.

Without ACK feedback, it is hard to size the sequence number safely. Suppose a DTLS 1.3 stack unconditionally picked the 1-byte sequence number because it's smaller, and the draft didn't say not to do it. That means after getting out of sync by 256 records, either via reordering or loss, the connection breaks. For example, if there was a blip in connectivity and you happened to lose 256 records, your connection is stuck and cannot recover. All future records will be at higher and higher sequence numbers. A burst of 256 lost packets seems within the range of situations one would expect an application to handle.

(The 2-byte sequence number fails at 65K losses, which is hopefully high enough to be fine?  Though it's far far less than what QUIC's 1-4-byte sequence number can accommodate. It was also odd to see no discussion of this anywhere.)

David