Re: [TLS] NextProtoNeg concerns

Adam Langley <agl@google.com> Fri, 18 November 2011 13:32 UTC

Return-Path: <agl@google.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 D210121F8A97 for <tls@ietfa.amsl.com>; Fri, 18 Nov 2011 05:32:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.977
X-Spam-Level:
X-Spam-Status: No, score=-102.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RTResCxkVu2A for <tls@ietfa.amsl.com>; Fri, 18 Nov 2011 05:32:06 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by ietfa.amsl.com (Postfix) with ESMTP id 4723E21F8A80 for <tls@ietf.org>; Fri, 18 Nov 2011 05:32:05 -0800 (PST)
Received: by iaeo4 with SMTP id o4so4480242iae.31 for <tls@ietf.org>; Fri, 18 Nov 2011 05:32:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record; bh=9qm6EXNWfT+wwR8e6JEtXWYSvpQgRPVH1XdL025DeGA=; b=hslBiuvsb5BHu2P5ezIci8pj4WCzpwADDzEKk84Uhsz3TWIiFzIKQQjYmJ8J6s/mYq Cpsam3h0wmMQ5KzUtYmQ==
Received: by 10.42.19.195 with SMTP id d3mr964230icb.21.1321623125643; Fri, 18 Nov 2011 05:32:05 -0800 (PST)
MIME-Version: 1.0
Received: by 10.42.19.195 with SMTP id d3mr964224icb.21.1321623125541; Fri, 18 Nov 2011 05:32:05 -0800 (PST)
Received: by 10.231.37.195 with HTTP; Fri, 18 Nov 2011 05:32:05 -0800 (PST)
In-Reply-To: <4F26370A-E4DA-4EDF-8D33-D77F2D9C89FB@checkpoint.com>
References: <4F26370A-E4DA-4EDF-8D33-D77F2D9C89FB@checkpoint.com>
Date: Fri, 18 Nov 2011 08:32:05 -0500
Message-ID: <CAL9PXLxKuT_n22JjGYvtMqdNtvw3=N9Pev5Y8M4pzLn9Vq+zyQ@mail.gmail.com>
From: Adam Langley <agl@google.com>
To: Yoav Nir <ynir@checkpoint.com>
Content-Type: text/plain; charset="UTF-8"
X-System-Of-Record: true
Cc: "tls@ietf.org List" <tls@ietf.org>
Subject: Re: [TLS] NextProtoNeg concerns
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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: Fri, 18 Nov 2011 13:32:06 -0000

On Fri, Nov 18, 2011 at 12:17 AM, Yoav Nir <ynir@checkpoint.com> wrote:
> If you are defining a new extension/handshake message to carry a new kind of data (application type) there is no value to this without a definition of the format, either in the same document or in a companion document.

I agree. The current, sparse form of the draft was simply intended to
omit details in order that the more salient points be obvious.

I would absolutely expect that any draft would end up specifying the
format of the messages; something like:

"Protocols are named by opaque, non-empty byte strings and the list of
protocols is serialized as a concatenation of 8-bit, length prefixed
byte strings. Implementations MUST ensure that the empty string is not
included and no byte strings are truncated."

"The NextProtocol message has the following format:

struct {
  opaque selected_protocol<0..255>;
  opaque padding<0..255>;
} NextProtocol;

The contents of selected_protocol are a protocol but need not have
been advertised by the server. The length of padding should be 32 -
((len(selected_protocol) + 2) % 32). Note that len(selected_protocol)
does not include its length prefix."


Cheers

AGL