Re: [TLS] PR#28: Converting cTLS to QUIC-style varints

Eric Rescorla <ekr@rtfm.com> Tue, 06 October 2020 01:42 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 DB3393A0E21 for <tls@ietfa.amsl.com>; Mon, 5 Oct 2020 18:42:24 -0700 (PDT)
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 nLeg9UwpcqQA for <tls@ietfa.amsl.com>; Mon, 5 Oct 2020 18:42:23 -0700 (PDT)
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 C7CB63A0E1D for <tls@ietf.org>; Mon, 5 Oct 2020 18:42:22 -0700 (PDT)
Received: by mail-lf1-x12b.google.com with SMTP id b22so13156606lfs.13 for <tls@ietf.org>; Mon, 05 Oct 2020 18:42:22 -0700 (PDT)
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=ZBDEehi0NY/f5D8xGisToU1NC08DQrTwkfbUGlatWvo=; b=FPeCrtsREAmK36aMeCEPJ7htTdetV0gVw7NlqkF7A3yKThN9T/0Q/l9BpXuJe3HMkD rbUDtgj8otY0VIO6ajrvzXfhYXI3b6xnX8MhAOar9xJLbE6p2TVrtpWfrafIHyWdF3SB NDF4AtST463toJiHRzkaMMTKXTNEH00OYkeXVUx197a0JdmiGggNYn2/o2wYv27ck/q/ jzGYozXGGNSW+K5UJ5cFNOjel3VN2F8pd1WxVEAEP4uuaqGIqCMjL3oJLCXJekvuSULC SgT9Feqj/fqfjJzUQ6o/N/xvOf7ZxD5OY4Z4FOAq4GgaQ//4zsNXARSkDQvkNwihKY3P 7Tbg==
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=ZBDEehi0NY/f5D8xGisToU1NC08DQrTwkfbUGlatWvo=; b=ss5V6IvoUez0H3tZ5c8wfml2aEHZuaIQidroB35cWRsiaxLu9S4HDVPagxP5wvkwIO DGuD2gq6DNiB9egytwKz4cVyGVXTOWaNe7uxz5OaZV2NoQl2e3SdUZ+bhw4bIQLzYS+B wK2BDjF6XPjBfXJt5SU+BHEUJ2NNl243VCFPzojZvSNRauc8LQx6sysVNPSKvootWi2h GG1xA7Zu/SAnyui+0adAxGuMt8uHXGVt8tXPGR9cWArXZIlnD2kXP93k8ShRPhq9ACyw UvjIKC5BeDqcvxdxLn2h6rrMwMgnFxmT3NsZEOmx+6TpKbeJE9bi8eCYMtOM7SWEYpK6 ZOiA==
X-Gm-Message-State: AOAM532zmYaYka1wcXv+bVBvQk1dR+kzwE8nLi5GrIUW+8bA2CTnnVfa uSUql/T3msgSFt/Qqm4Ltbet00bMrT0k7xpPIenf+Z+ovxGLjA==
X-Google-Smtp-Source: ABdhPJzKTFWCUhH0fPL6WWO0ZnIukl2q1ZmnIV5XrbQ2m5mfDHwGiUQ3prBwnsOOKb8wjP4Cvww72rq75yaUuiYln5M=
X-Received: by 2002:a19:5e15:: with SMTP id s21mr617462lfb.579.1601948540900; Mon, 05 Oct 2020 18:42:20 -0700 (PDT)
MIME-Version: 1.0
References: <CABcZeBPNFhGoLhgqeR9ObwyU68BYq=hXG1PhXcqNsNDNFGGyaw@mail.gmail.com> <CAOYVs2rEDtgJFVpiQkcaaYG2LAyW1hB5Cou4kUoG2_dkxMFTww@mail.gmail.com> <6285bb83-747b-471a-9970-be15dbd8618e@www.fastmail.com>
In-Reply-To: <6285bb83-747b-471a-9970-be15dbd8618e@www.fastmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 5 Oct 2020 18:41:44 -0700
Message-ID: <CABcZeBMpLcBtrH59Zi5+BbFWmXUvqvMccjtb489sMJ5S3O3rPg@mail.gmail.com>
To: Martin Thomson <mt@lowentropy.net>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000bab29705b0f6b5dc"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/nmubFJFCmlrQjibSaI2Mr2Upbao>
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: Tue, 06 Oct 2020 01:42:25 -0000

On Mon, Oct 5, 2020 at 6:38 PM Martin Thomson <mt@lowentropy.net> wrote:

> Oh, I consider that to be a feature.  One that I exploit.  It's sometimes
> awkward to build a structure then prepend a length that has a
> variable-length encoding.  If you know the maximum length, the varint
> encoding allows you to avoid having to move memory.
>
> That said, cTLS won't authenticate both the value and the specific
> encoding of numeric values as the varint encoding is erased.  I don't
> consider that to be a serious problem, but it means that cTLS transcripts
> can't be directly compared.  I would note that in the draft: people
> shouldn't be processing cTLS messages that way, but they might be surprised
> to learn of this.
>

You could fix this by requiring the minimal encoding, right?

-Ekr


> On Tue, Oct 6, 2020, at 12:31, Marten Seemann wrote:
> > One thing that’s a bit annoying about QUIC’s variant format is that
> > there are multiple ways to encode a number. This has led to some
> > complications in the specification (e.g. QUIC requires you to use the
> > minimal encoding for frame types, but allows all encodings everywhere
> > else).
> > It would be nice to have an unambiguous way to encode a number.
> >
> > On Tue, Oct 6, 2020 at 07:35 Eric Rescorla <ekr@rtfm.com> wrote:
> > > Hi folks,
> > >
> > > cTLS uses a bespoke varint format. Now that QUIC is nearly done, I
> propose adopting their varint format.
> > >
> > > https://github.com/tlswg/draft-ietf-tls-ctls/pull/28
> > >
> > > Any objections?
> > > -Ekr
> > >
> > > _______________________________________________
> > > TLS mailing list
> > > TLS@ietf.org
> > > https://www.ietf.org/mailman/listinfo/tls
> > _______________________________________________
> > TLS mailing list
> > TLS@ietf.org
> > https://www.ietf.org/mailman/listinfo/tls
> >
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>