Re: [tsvwg] DTLS in SCTP solution
Magnus Westerlund <magnus.westerlund@ericsson.com> Thu, 30 March 2023 01:37 UTC
Return-Path: <magnus.westerlund@ericsson.com>
X-Original-To: tsvwg@ietfa.amsl.com
Delivered-To: tsvwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BF66DC15154F for <tsvwg@ietfa.amsl.com>; Wed, 29 Mar 2023 18:37:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-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_BLOCKED=0.001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 (1024-bit key) header.d=ericsson.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 7IxIL5gF6xMQ for <tsvwg@ietfa.amsl.com>; Wed, 29 Mar 2023 18:37:22 -0700 (PDT)
Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2085.outbound.protection.outlook.com [40.107.13.85]) (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 A401DC14CF0C for <tsvwg@ietf.org>; Wed, 29 Mar 2023 18:37:20 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b9kjV1XZ9C75tV5MizSDG88LREg0XWpcxa4vfrBqvF9UQFuWI3M7BRielNy9hnHFI70m+NPgpVKoMBa+QGCagTMiCjK01rf0G2XZk9gLtcZMjyFm3PrvWaJ1MJv4TaHCqyC/qlCiQTN60xR2IXLc14TQdp9lhuAGQT3azpGnVVknW+gzGcgkLM0GQlRZG7DtFQYfxpwLz+zPVFhN9bQMPovcylSzk/cbGl2PmMhiOgVXh3Z9onbcKcfwAOpp9+1r7U248BGJn7C6IEf8lR2+1gZW1AnQfQIVGRX8yi8dQnsl23fJVkJCa3507l5DafcE7FUjFnDno5WwLLXBpLMLQQ==
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=YYL4JbXGkbankwHVxb76lL3lczYz2JGVgWUyr5g4Chs=; b=NfXQqDaYybADQixQV5L66LScneS1EAxo1ft8LyCcEspSzk8EUHAr36JmbllMWwlobeWDVTPNrO8Sknyy+pnQlCxcmSx/JiEXlLkrzKWxQeJwBaz2HPSz+ojD++Zz80U8hUooDlQ5JreyfbmTfUZBi+jkoH7K5lGtJ/fDrLXVZvYFk0iP9ZsL/XF5sUVkZI8PHb21brWy0iN5dfKqCcUbBFKDwccibjenc0M2jU5vMQ+5sb2+6EamuT5swVLWqXb1olYKG38zM03RGdUSyY4uQpxUWJdW6FTVb9uYrO3bNNuedWg9FTfrEIwr3ZenrrU2qX1LRuvxI5bLdknvlg3oPA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YYL4JbXGkbankwHVxb76lL3lczYz2JGVgWUyr5g4Chs=; b=olu1kCKWaz5I3mQIzdSS8bUzgn7FpeXqyfEEPdaooJWDGu79tXn+8zugWGDn+QynkJEMpI5LaXJvgFJsmOzQCHN6S6U/eTHoDi7H0ryCTHq0gjK+NOScq6BI5EOoPrje1X9NEGOL8pCzQUer82YjyqYpxz1KDfxHCDWHZ4f1A5k=
Received: from DU0PR07MB8970.eurprd07.prod.outlook.com (2603:10a6:10:40e::17) by VI1PR07MB6270.eurprd07.prod.outlook.com (2603:10a6:800:139::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.22; Thu, 30 Mar 2023 01:37:15 +0000
Received: from DU0PR07MB8970.eurprd07.prod.outlook.com ([fe80::a374:8453:327a:9e50]) by DU0PR07MB8970.eurprd07.prod.outlook.com ([fe80::a374:8453:327a:9e50%4]) with mapi id 15.20.6222.033; Thu, 30 Mar 2023 01:37:15 +0000
From: Magnus Westerlund <magnus.westerlund@ericsson.com>
To: Michael Tuexen <michael.tuexen@lurchi.franken.de>
CC: tsvwg IETF list <tsvwg@ietf.org>, John Mattsson <john.mattsson@ericsson.com>
Thread-Topic: [tsvwg] DTLS in SCTP solution
Thread-Index: AQHZQeZiWO2APSZodUCmpCt91TORzq8Edd2AgACv5xGABUrsgIADlZRDgANECYCAAXf9Rw==
Date: Thu, 30 Mar 2023 01:37:15 +0000
Message-ID: <DU0PR07MB8970AB8BF53DDA87701193D2958E9@DU0PR07MB8970.eurprd07.prod.outlook.com>
References: <PA4PR07MB8414B23B0D6BF4F71CA52C5F95A09@PA4PR07MB8414.eurprd07.prod.outlook.com> <42858D2B-F323-49E2-9722-B97C084994FA@lurchi.franken.de> <DU0PR07MB8970FD29E4EE3881A033DF6395819@DU0PR07MB8970.eurprd07.prod.outlook.com> <D3C8AFC6-C702-4E2A-8577-5BCF2A03844C@lurchi.franken.de> <DU0PR07MB8970BA955D44911D97BDF7F0958B9@DU0PR07MB8970.eurprd07.prod.outlook.com> <722045F2-692E-49B3-821C-AC93AB241334@lurchi.franken.de>
In-Reply-To: <722045F2-692E-49B3-821C-AC93AB241334@lurchi.franken.de>
Accept-Language: en-US, sv-SE
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DU0PR07MB8970:EE_|VI1PR07MB6270:EE_
x-ms-office365-filtering-correlation-id: 49155030-2b31-4744-0711-08db30bf4a9a
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: livw7pF8/hIk1NDVHQ6JFKBeC3UF3ODxGduBVXCFUGUJWhWVnK3vvYLEyg1soqX9TzSu6fMqOwPtQH8U0cuTzEKUVZpEE8Xn2Su8G6ImMpRL7BGrBrcNdKRXyeQMSeVxgJ+4ZI4CsgJaDmSEAzhA5COpT7bdik9qQS8PwfmuVwwl2gZjYJng3HFJsIYVs3RSokflhckzMd9LmUQTRqthtpRboRAhWVx7H+y5k4uij7oD2EVM1kUMfpkp1G8AYNaAoJkM+jBmb821Uf0Ps3M8AdXkFtPC9cy/G+XZ/GzVuRovbNr6QRpKm/AmtZvbCv+XJlYdlMqjMxyN+ifDb7C20wDc+De/dve19l78Ov40HL63obfHkROa36muSucSrrRFpykNp/Q7KTNpeVAwdPRPVwyXP9KAR3fUrHz9MIoQpkYNNO1UEuv8LbXz1PUHKNwjE7Y7hksqrVbgKgno3C9za/7LF8Kn9hPJDtz0Iw9wNAHfE1IptitRA+nnpb7RkmcuJJSzndqxxJVFEooeoDO3pSu9zBu6J2NYFYnZPlcTP+nPTqxSSIMMwcDQVaWq4EsWZWyhL4mEU8QV3bsJEs7BvHRvYGm2gaaSI6PIoyrnw/Y=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR07MB8970.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(396003)(346002)(376002)(136003)(39860400002)(451199021)(91956017)(83380400001)(966005)(478600001)(186003)(7696005)(71200400001)(316002)(107886003)(9686003)(54906003)(2906002)(6506007)(86362001)(5660300002)(44832011)(8936002)(33656002)(122000001)(38100700002)(6916009)(66476007)(76116006)(66946007)(82960400001)(41300700001)(64756008)(8676002)(4326008)(66556008)(66446008)(52536014)(55016003)(166002)(38070700005); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: vI7dZg9OiOTfr/nOK9JZ98KoNF7gtk7YQAKLT88QB94hShDw2xkolmZC8w/Dtrr9kk3ogZ5crK3X7UUlGSn43aefFpAjremJLhSNNh5o8NTfsuyiSeeX7n0MSkFb77Vsl11i+CumNoqs9FHAMFg7CvPgO5bip8yE+ZkwDWmwP9YEJ2eA62yo3OR20WcHw9iy2TvBvs/vfezPyzOPDHvYWSDhOr6tZlSd2tYaJxKWlg6tkZyJwXXu0j0yfS1Je5nHUQUdX86OXfQW1HqgS8F0Q4esI1y4L1KnM9se5I4IaYjgn+mmCXRgPSXMTeQpmNU6GWgFIIh+i/K+6z5BeLxgdv0hFZicvwvlv9hy+yCETRCqD7ebFaf05RMMjLma7TOmawIk2JXMgDxAt2/DaorJKJAcn0ERmzZ36r2o+WLSVszDp2UAZtSwOmEg8DHDdgWlUn/8VZmL+x/w59xb6nAmnJO8rmRhwNvvFdUIO0dzhrnKCTQTUL0nef9GNIa6mFNIQFskTY3q+AipmvFMnJFZ8POLvaINXPLmW4WnjRLu7dmjw42stfUVXVh9ABBeGza2I9DdIwURx4cBXL8Wb0ktp+IaDYxfkAzSznH1nWNvQPpM4oKiBbn9Y1Q/jc6a9z9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/alternative; boundary="_000_DU0PR07MB8970AB8BF53DDA87701193D2958E9DU0PR07MB8970eurp_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DU0PR07MB8970.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 49155030-2b31-4744-0711-08db30bf4a9a
X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Mar 2023 01:37:15.1291 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: reSdH880J0xFmvuyGMel66cXkVvFRs5sMCsCKmJhLoR2SqYKVgD2ohdd+mzToHv8KIthyo7AbsKDNkXGU3OsRmOPilH7iB795DgzyH3jOyQ=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB6270
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/4rzGVq_6YHzXeK_GB9DDG0ua9NI>
Subject: Re: [tsvwg] DTLS in SCTP solution
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tsvwg/>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Mar 2023 01:37:26 -0000
Hi Michael and WG, Pruning the message to where there are questions. The summary are: 1. Bundling of crypto chunk will be reconsidered and may be impacted by 3) 2. The text on sending errors and aborts will be fixed 3. Currently handshakes messages etc are not path handled by SCTP. By using short HB intervals (<=2 seconds) one can ensure that the currently used path works, but an alternative was proposed by Michael that will be further considered and discussed. > > 4. I can see how you can implement this using a userland SCTP stack and a DTLS stack. > > However, I have a hard time to see how to implement this in a kernel SCTP stack. > > I guess one would do the encrypt/decrypt part in the kernel and the DTLS negotiation > > in userland, but the required socket API is not clear to me. > > In my opinion, whatever solution is been worked on, it should work for userland and > > kernel stacks. > > <Snipped> > MW: So lets start with an important thought from our perspective. We want to use a security mechanism that is well used and implemented with an active community to avoid the fate of having to few eyes looking at it and finding security flaws. Thus, we would like to use DTLS as it is. > From a specification perspective what the current proposal results in are an API between the crypto chunk and the protection engine that will have to be invoked for each sent or received packet after the association has been established. How one implements this can be debated and depends also if one has a kernel or userland SCTP implementation. One thought we have here when it comes to DTLS is that one can do the same optimization as for example Netflix did for TLS over TCP, where one keeps the handshake in user space and moves the per record processing into kernel or even HW acceleration. I don’t see that HW acceleration of SCTP is needed for the use case we have, but a kernel implementation likely want to have the DTLS record processing in the kernel. This would look similar to what this page has in its image under the “OpenSSL Module” heading: https://protect2.fireeye.com/v1/url?k=31323334-501cfaf3-313273af-454445554331-d0b951f46effb220&q=1&e=da5f6591-ef92-44df-b52a-35db44877ead&u=https%3A%2F%2Fwhisperlab.org%2Fintroduction-to-hacking%2Fnotes%2Fopenssl > From my perspective splitting DTLS into two parts implementation wise does not change the relationship for outer input, it only creates the need for an internal API in the implementation. But I think this shows how one can reduce the impact of this structuring. This is what I'm trying to understand. I do see no problem in doing the encryt/decrypt part inside the SCTP stack, I'm just wondering what function split is needed and how an API would need to look like. Let me ask this explicitly: Do you envision that your proposal can be implemented in a kernel stack using some extensions of the socket API? Or are you focussing on userland stacks. MW: I do envision that it can be implemented by kernels. However, I am not certain that the Socket API is sufficient. I think another API is likely needed to support either a per packet call out to user land for the crypto transformation, or for a split implementation with the DTLS record processing in the kernel on would need one API part that for SCTP stack to Crypto engine part in kernel, and another part of the API that is for configuring keys. Your statement above "we would like to use DTLS as it is" kills running DTLS conceptually on top of SCTP, since the services just don't match. The only way is to run it below SCTP, since the services of DTLS match the ones of IP. But you need to touch DTLS implementations to generate the packets you want. If you want to use existing DTLS implementations, you need to use SCTP over DTLS. The only problem is supporting multihoming there, which comes down to running a single SCTP association over multiple DTLS connections. MW: I think here is where we might differ from perspective. When I say DTLS as is I do mean that DTLS operates on either plain text payloads (datagrams) and produces protected payloads (datagrams). In our proposal the plain text is the set of chunks intended for one SCTP packet. The protection operation will produce a DTLS record that is the payload of the CRYPTO chunk. So yes there are a bit of wrapper code around DTLS stack, a stack built for FOO/DTLS/UDP would just not just work. But the most relevant in that the crypto operations are fully defined by DTLS not by CRYPTO chunk. This to avoid a specification that rots. Instead by keeping up with DTLS security issues and patching these and almost all the attack surface stays with that implementation. Cheers Magnus Westerlund
- [tsvwg] DTLS in SCTP solution Magnus Westerlund
- Re: [tsvwg] DTLS in SCTP solution Michael Tuexen
- Re: [tsvwg] DTLS in SCTP solution Magnus Westerlund
- Re: [tsvwg] DTLS in SCTP solution Michael Tuexen
- Re: [tsvwg] DTLS in SCTP solution Magnus Westerlund
- Re: [tsvwg] DTLS in SCTP solution Michael Tuexen
- Re: [tsvwg] DTLS in SCTP solution Magnus Westerlund
- Re: [tsvwg] DTLS in SCTP solution Michael Tuexen
- Re: [tsvwg] DTLS in SCTP solution Michael Tuexen