Re: [TLS] PR#28: Converting cTLS to QUIC-style varints
Eric Rescorla <ekr@rtfm.com> Mon, 16 November 2020 15:31 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 08DE73A11A9 for <tls@ietfa.amsl.com>; Mon, 16 Nov 2020 07:31:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 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, 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.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 42qzgljgS7-M for <tls@ietfa.amsl.com>; Mon, 16 Nov 2020 07:31:36 -0800 (PST)
Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (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 9BD943A11A8 for <tls@ietf.org>; Mon, 16 Nov 2020 07:31:35 -0800 (PST)
Received: by mail-lf1-x12b.google.com with SMTP id u18so25661289lfd.9 for <tls@ietf.org>; Mon, 16 Nov 2020 07:31:35 -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=OJlhRvyUZBQsQJEekcsVpEhiDeC2Xy1C9hxxqobyVHE=; b=cBOke987QHAsg1Ii8veEE4OArYEpix8VvA5x4jQ5jpUyN9w0GYH0PxjCZuSwfi8/IL +WxsoiWEjR/1JN7JKBbIMyUwTEPcrY1ahlvbNMSicBnM1wqi6hXyJuew5eGTvgacee3Y VPBJi5pUP+c/7ZKT8X+Lb9ZEUWvEszGoXej9JDiSDFaBqEHvI8br1CwpRsn7eqKXQsn4 NJWf8RI+qsR7rbhR84vqts9xM/epdhiGU1i/JZFtjSnjEnjOIeYVAuZDTnZE5yiA+VYn xmzINOMUpUOn1/eGnGImfhJ+Q1UBQ8tkEeJNPXcPgC7cR/Tz8xN4+hvhGlcJ5lIGZZn0 oD2Q==
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=OJlhRvyUZBQsQJEekcsVpEhiDeC2Xy1C9hxxqobyVHE=; b=IODSJI6mwHRPbQC8xGg0t82CppLii7UjXd5Eet72ZPUKxPq8ppEFeSr3+g7HPWnWKM hQjZfGMlX2lEh2FHHl7Z14Fl+0Mctl8npQbJImMtJgKlj5AFAV8eesxG4y1AXR0ZYx9M fPetTBeXhiZb158o0nwd9N3aiqf34SCiFoZqqhCB6yhB2/fMaj4U/PyFRprbKy9O3Mja L1YDBmJtZfUhmtMCjgkQNGoEaK6Jzor7mZct6u1cBXd7itfHSeICijRg5ADECKZ5lejq 3pLTYgR1ZuBnWpnHro8K2JTO21X+7+IN+vwkp9s5nIOtJ529Ze6S09fWWheKC7Bff145 9p/w==
X-Gm-Message-State: AOAM531VQ78ulA3Sxyf987pxpfAOCco3d0tpzrBJrnPBL9mcXmaEmny1 bHrkKVfRVOvAUr1/BoNmttL2kiSWSryu6N40GASG0g==
X-Google-Smtp-Source: ABdhPJzJs6rwhSYtuhKqVtxn/gnkrWlaHUuQdLknWFz81OS1oCmFPEtkPC2ehLYxdhGs9tC++TkYMZ5mOheVyZupiO0=
X-Received: by 2002:a19:c3cd:: with SMTP id t196mr5661350lff.26.1605540693877; Mon, 16 Nov 2020 07:31:33 -0800 (PST)
MIME-Version: 1.0
References: <CABcZeBPNFhGoLhgqeR9ObwyU68BYq=hXG1PhXcqNsNDNFGGyaw@mail.gmail.com> <CAOYVs2rEDtgJFVpiQkcaaYG2LAyW1hB5Cou4kUoG2_dkxMFTww@mail.gmail.com> <CABcZeBP3BUDEeiV2T-kxYTmC841XE_BrXhPHSoRqfdH0hHd-6w@mail.gmail.com> <BBA456AB-EC42-47DD-A3E3-5FC0E9E7A534@akamai.com> <CAOYVs2r+AiEs0q6sybqT2CbtLtj4KE4onr-3qjr5vZ5RFPiKOQ@mail.gmail.com> <CABcZeBNQ3tk-rGpdJ88q0oaUXXq4B7NQWKp8P8uQOyxA7Lwstg@mail.gmail.com> <CACdeXi+xOTA7m9fAQzbrDRXA+B3iwB3-0dc7K1+QVbyvaueMQg@mail.gmail.com> <CABcZeBPrtt5CNQrJfZD-3uCqG8uUe8bzzQJjwZvnz5yHh8MMDQ@mail.gmail.com> <AM0PR08MB37161638A7E0B8723F783C76FAE30@AM0PR08MB3716.eurprd08.prod.outlook.com>
In-Reply-To: <AM0PR08MB37161638A7E0B8723F783C76FAE30@AM0PR08MB3716.eurprd08.prod.outlook.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 16 Nov 2020 07:30:57 -0800
Message-ID: <CABcZeBPrELE42K_dhsvUZ89Btk-2O8BxXhS3A74pUBB-8xTtug@mail.gmail.com>
To: Hannes Tschofenig <Hannes.Tschofenig@arm.com>
Cc: Nick Harper <nharper@google.com>, "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000bb3d1105b43b128c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/MUd3iEKawRN8zrRFCw8COF-Tb0w>
Subject: Re: [TLS] PR#28: Converting cTLS to QUIC-style varints
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: Mon, 16 Nov 2020 15:31:38 -0000
On Mon, Nov 16, 2020 at 7:09 AM Hannes Tschofenig <Hannes.Tschofenig@arm.com> wrote: > FWIW the current scheme described in > https://tools.ietf.org/html/draft-ietf-tls-ctls-01 only offers variable > length encoded integers of one to three bytes. We need more than that. > I think that's easy to fix by making the longest version 4 bytes. TBH I had forgotten i used 3. > I am in favor of the “deterministic” version, if deterministic means no > overlaps in the encoded number ranges. > Yes. So for instance 0x8000 would be 128. Hence, I am in favor of 2 but would leave the details of how we encode it > open to work in the group. There are various possible designs and none of > them is rocket science. > Yep. If it looks like we are getting consensus I will work up a proposal. -Ekr > > Ciao > > Hannes > > > > *From:* TLS <tls-bounces@ietf.org> *On Behalf Of * Eric Rescorla > *Sent:* Sunday, November 15, 2020 9:13 PM > *To:* Nick Harper <nharper@google.com> > *Cc:* <tls@ietf.org> <tls@ietf.org> > *Subject:* Re: [TLS] PR#28: Converting cTLS to QUIC-style varints > > > > Trying to close out this discussion, it seems to me like there are three > major options: > > > > 1. The current scheme > > 2. The current scheme with a deterministic minimal encoding (e.g., the two > byte version is offset by 127) > > 3. The QUIC scheme > > > > I don't think that the QUIC scheme with deterministic encoding makes > sense, because the virtue of the QUIC scheme is commonality with something > already defined. I'm hearing that people are not as excited about moving to > QUIC as I had expected and to the best of my knowledge, there is no valid > reason to encode to > 2^32-1 in TLS. I also don't think using encoding (1) > but mandating minimal length makes sense, as it's just as easy to do a > deterministic minimal encoding. > > > > As Christian observes it *is* significantly more painful to do (2): the > conventional way to encode vectors in TLS with minimal copying is: > > > > - Mark your current place --> X > > - Skip forward the length of the length field --> L > > - Encode the value > > - Encode (current position - (X + L)) at X > > > > But this won't be possible in (2). As MT observes, if you think of this as > a two-pass system, there is not as much of a problem here [though not > necessarily no problem]. Also, if you use a separate buffer, there is no > problem. As noted above by MT and others, cTLS expands the transcript and > so having a deterministic compression scheme is perhaps not as important, > given that decompression is deterministic, but it still seems nice to have. > > > > Given the above, I think my preference would be (1) or (2), with, I think, > a slight preference for (2). > > > > -Ekr > > > > > > > > > > > > > > > > > > > > On Tue, Oct 6, 2020 at 5:33 PM Nick Harper <nharper@google.com> wrote: > > I have no strong opinion on how this is formatted. I'd base my decision on > what the maximum value cTLS needs to encode: If 2^22-1 is sufficient, let's > keep it as is, otherwise let's change it to the QUIC format (or some other > change to increase the max value). I do like that the existing scheme, > compared to QUIC varints, is more efficient for values 64-127 and just as > efficient for the rest. > > > > On Mon, Oct 5, 2020 at 8:09 PM Eric Rescorla <ekr@rtfm.com> wrote: > > I don't have a strong opinion on whether to require a minimal encoding, > but if we're not going to use QUIC's encoding as-is, then I would rather > stick with the existing scheme, which has twice as large a range for the 1 > byte encoding and is thus more compact for a range of common cases. > > > > -Ekr > > > > > > On Mon, Oct 5, 2020 at 7:31 PM Marten Seemann <martenseemann@gmail.com> > wrote: > > In that case, why use QUIC's encoding at all? It would just put the burden > on the receiver to check that the minimal encoding was used. > > Would it instead make more sense to modify QUIC's encoding, such that the > 2-byte encoding doesn't encode the numbers from 0 to 16383, but the numbers > from 64 to (16383 + 64), and equivalently for 4 and 8-byte encodings? > > > > On Tue, Oct 6, 2020 at 9:22 AM Salz, Rich <rsalz@akamai.com> wrote: > > Can you just say “QUIC rules but use the minimum possible length”? > > _______________________________________________ > 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. >
- [TLS] PR#28: Converting cTLS to QUIC-style varints Eric Rescorla
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Marten Seemann
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Martin Thomson
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Eric Rescorla
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Eric Rescorla
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Salz, Rich
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Marten Seemann
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Eric Rescorla
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Christian Huitema
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Rob Sayre
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Hannes Tschofenig
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Martin Thomson
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Salz, Rich
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Michael D'Errico
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Blumenthal, Uri - 0553 - MITLL
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Michael D'Errico
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Salz, Rich
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Michael D'Errico
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Salz, Rich
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Michael D'Errico
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Christian Huitema
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Michael D'Errico
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Nick Harper
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Martin Thomson
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Nick Harper
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Christian Huitema
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Peter Gutmann
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Watson Ladd
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Michael D'Errico
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Mohit Sethi M
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Anders Rundgren
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Mohit Sethi M
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Michael D'Errico
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Eric Rescorla
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Salz, Rich
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Hannes Tschofenig
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Eric Rescorla
- Re: [TLS] PR#28: Converting cTLS to QUIC-style va… Mohit Sethi M