Re: [TLS] SCHC for DTLS

Eric Rescorla <ekr@rtfm.com> Mon, 30 May 2022 16:13 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 2B581C15AAD7 for <tls@ietfa.amsl.com>; Mon, 30 May 2022 09:13:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.905
X-Spam-Level:
X-Spam-Status: No, score=-1.905 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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.20210112.gappssmtp.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 GBamUF4IZwPR for <tls@ietfa.amsl.com>; Mon, 30 May 2022 09:13:18 -0700 (PDT)
Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 679D9C15AAD4 for <tls@ietf.org>; Mon, 30 May 2022 09:13:18 -0700 (PDT)
Received: by mail-il1-x134.google.com with SMTP id d3so7854743ilr.10 for <tls@ietf.org>; Mon, 30 May 2022 09:13:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BLGBC8TK3qAS8p3lLHCimuKyoKkG07/9MxjYSqZ6syw=; b=qFgLxeLF7ZmDjNKpX/VBSbW8/MDm0JfKPn59/y5Qu6yyqdj3Pw/ecrTojkbSbyReP5 2cAu50b3xY/AiyUWbE5EEv2iQEsvan42d69ZbQDhkL12ZyM2TG8QxUNQgW8WYT3dUAh7 gffh4tJnlA8dl3FeKElvXXPLUcLefwSyNMwgIybPgohB2WsaL5HCc3zjL+4rqmrgt6AC /gTDMNpdT0vtSPq+WIZdKi3zSVHekcDm3wQJk/dRcinn9NNhorpT9paMSeVxZsAF7sgB S/SDCldJhSZ66CZrVdOZg+N0hkLUXUIfGIVufRxQru4UmVymCUaagD5JdX6EbFTlv0S0 wHFg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BLGBC8TK3qAS8p3lLHCimuKyoKkG07/9MxjYSqZ6syw=; b=mPfw5DY66L2YIs1Xig87S/fYWwW5sFIq/xa1zJJdEaHqN0ZbvhXm3ba7BYqwgpfpN6 pK0uzR0Lz1JJbXzIgfWIPEE7l4J/UxWnk4I+XafsQkazyZi98TmSWWDdH4y9Snnbl3sF KiA3qkOqXXQO1vIRC5aRXNW4xRg1RMUyjc3+y3pdLpwl03byKNj9ROoHiCRZFlmlhfUE 0eCsRF6vJc2ZQkcAyR5YhocLBHv7mjepIo+xuCJvaGzodr1BUKY2Fis40dX5LaC6w0JH XvlgBSj1UQwrWyxJs3w99wsc101QLHNGv56+Jfgq3FCJYBE9QMeiWL6PMUevomSmFTis VO3Q==
X-Gm-Message-State: AOAM530UhQGra/ElaX6yvLZrfnkGCTdF8aKIRd1FU0CVhlFpYNCjNGb9 2StBloUG16BKsiZ7nctHWRaM5hs7l+THD6rZU66y+WGZvjdDdg==
X-Google-Smtp-Source: ABdhPJySBsvOUxLOkOFbXkfPQzvbHEWeQMbvMa0hlagJ0BB83VNZu/dYZO9zhW2xb+VPAmshrREJPGaPqJirNLBUccY=
X-Received: by 2002:a92:cbd0:0:b0:2d1:48cb:1739 with SMTP id s16-20020a92cbd0000000b002d148cb1739mr27981315ilq.10.1653927197034; Mon, 30 May 2022 09:13:17 -0700 (PDT)
MIME-Version: 1.0
References: <f92962a4-dd76-5fd0-2a4d-91d4de87d251@htt-consult.com> <CABcZeBPLHiSO8V88C-8bwgxsH6vcNBs1t3rb0bggzJBKZPMT3g@mail.gmail.com> <DBBPR08MB5915042FBEF11C5A93DB12C6FADD9@DBBPR08MB5915.eurprd08.prod.outlook.com> <55d0ed70-9f53-8d3c-c421-927065f33348@htt-consult.com>
In-Reply-To: <55d0ed70-9f53-8d3c-c421-927065f33348@htt-consult.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 30 May 2022 09:12:41 -0700
Message-ID: <CABcZeBNVkTVzLEwmkt1arT0jeGnz3+Tarx+v0e33EcTgucfOYQ@mail.gmail.com>
To: Robert Moskowitz <rgm-sec@htt-consult.com>
Cc: Hannes Tschofenig <Hannes.Tschofenig@arm.com>, "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000010618f05e03cef92"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/cs3CqYwcLfvMbMY23UzlcK6D1QM>
Subject: Re: [TLS] SCHC for DTLS
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.34
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: Mon, 30 May 2022 16:13:22 -0000

We spent a fair bit of time working to shrink the DTLS 1.3 record layer, so
I'm not sure how much room there is for optimization.
See: https://www.rfc-editor.org/rfc/rfc9147.html#name-the-dtls-record-layer

Specifically, the longest header (w/o CID) is 5 octets and the shortest is
2 octets. The sequence number is used for the IV, so there's no extra there.

-Ekr

On Mon, May 30, 2022 at 6:28 AM Robert Moskowitz <rgm-sec@htt-consult.com>
wrote:

> Greetings Hannes,
>
> This is for the record layer.  And I really don't know how much would be
> gained.
>
> But as I would see it, this use of SCHC would be for UDP/DTLS/cipher.
> Since it is starting with UDP, SCHC would have to be an IP Protocol (not
> currently defined as such).  So you loose 1 byte for the SCHC rule, against
> the 8 probably saved in compressing UDP to 0 bytes.  Then there is the
> cipher.  Try AES-GCM-12; what is currently used for the IV?  Can something
> like rfc8750 be added to use the seq # in the DTLS header and gain maybe 16
> bytes?  I really don't know the DTLS header at all.  I have tried to find
> some decent layout as I am use to for ESP in 4303 (Fig 1) for side-by-side
> comparison.
>
> But if it means being able to fit over some UHF carrier for unmanned
> aircraft (UA) Network Remote ID (Net-RID) and Command and Control (C2)?
> Worth the effort.
>
> So this is not something I could do myself, but something that I see using
> and thus pitching in on doing it.
>
> On 5/30/22 05:33, Hannes Tschofenig wrote:
>
> Bob, is this about compressing the DTLS record layer or the DTLS handshake
> protocol?
>
> For the former, I wonder how much is there actually to compress (when
> using DTLS 1.3)?
>
>
>
> *From:* TLS <tls-bounces@ietf.org> <tls-bounces@ietf.org> *On Behalf Of *
> Eric Rescorla
> *Sent:* Friday, May 27, 2022 5:30 PM
> *To:* Robert Moskowitz <rgm-sec@htt-consult.com> <rgm-sec@htt-consult.com>
> *Cc:* <tls@ietf.org> <tls@ietf.org> <tls@ietf.org> <tls@ietf.org>
> *Subject:* Re: [TLS] SCHC for DTLS
>
>
>
>
>
>
>
> On Fri, May 27, 2022 at 6:27 AM Robert Moskowitz <rgm-sec@htt-consult.com>
> wrote:
>
> Is there any activity to define SCHC rules for DTLS?
>
>
>
> Not to my knowledge.
>
>
>
> -Ekr
>
>
>
>
> I want this for Unmanned Aircraft (UA) Network Remote ID (Net-RID)
> communications from the UA to the Net-RID Service Provider (SP).
>
> See
>
> https://datatracker.ietf.org/doc/draft-moskowitz-drip-secure-nrid-c2/
>
> I am compressing ESP traffic using rfc 8750 and:
>
> https://datatracker.ietf.org/doc/draft-mglt-ipsecme-diet-esp/
>
> SCHC is negotiated in IKE (and will be in HIP) and SA tables allow the
> ESP receiver to recognize a SCHC compressed ESP Header and act properly.
>
> It is not so simple with DTLS.  First UDP is below DTLS, so how do you
> compress it?  The way I see it, SCHC would need to be assigned an IP
> Protocol type so that the transport processing can start right up with
> the SCHC rule for UDP and then on to DTLS and then the cipher.
>
> Or at least how I see the challenge.
>
> So I am looking for any extant work on SCHC for DTLS and/or interest in
> this activity.
>
> The CoAP SCHC work, rfc 8824, dodge DTLS compression.  Or that is how I
> read it.
>
> Thanks
>
> Bob
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
> 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.
>
>
>