Re: [hybi] Masking only Payload/Extension Data

John Tamplin <jat@google.com> Wed, 09 March 2011 19:03 UTC

Return-Path: <jat@google.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6780D3A6965 for <hybi@core3.amsl.com>; Wed, 9 Mar 2011 11:03:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.815
X-Spam-Level:
X-Spam-Status: No, score=-105.815 tagged_above=-999 required=5 tests=[AWL=0.161, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4km1NlSkEVHW for <hybi@core3.amsl.com>; Wed, 9 Mar 2011 11:03:49 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id A9FBF3A680F for <hybi@ietf.org>; Wed, 9 Mar 2011 11:03:48 -0800 (PST)
Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id p29J54Se026642 for <hybi@ietf.org>; Wed, 9 Mar 2011 11:05:04 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1299697504; bh=Ksxzvaax9b2J5bGrMJIeZENqSng=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=veVzgbkwWYZ/ze+hrjOKeeiRrzSE8oUnnc98aBX92H5rY8mNyHvHCChwB6eDpatIZ 5YWdERnMX+ntMB/wkQucg==
Received: from ywg4 (ywg4.prod.google.com [10.192.7.4]) by wpaz37.hot.corp.google.com with ESMTP id p29J4oJu031018 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <hybi@ietf.org>; Wed, 9 Mar 2011 11:05:03 -0800
Received: by ywg4 with SMTP id 4so429875ywg.24 for <hybi@ietf.org>; Wed, 09 Mar 2011 11:05:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=qcC7dzzZbsVpD5oqS2ovUqAN7L8fI9mXYqI6NLmDMok=; b=xdSaHN/nDPVR2Rdl6apHHyOj/J5OlLgLE0a7KPHcmmX/W2xJqAZIJja6+YgvtMHMeu 5r9alWYMtRNpKI0jcnfQ==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=Seq9USc/fCTQ5CLvJ5Lq1FQuq9vNBkxFU/Tp3NaWVdWc2f7QSdJjjIntkMqrqFYGCK ixecfBlMrpfGRsMlQ1ow==
Received: by 10.150.99.19 with SMTP id w19mr8046096ybb.295.1299697501105; Wed, 09 Mar 2011 11:05:01 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.200.16 with HTTP; Wed, 9 Mar 2011 11:04:41 -0800 (PST)
In-Reply-To: <OF36FEDDC6.06951577-ON8825784E.0062343E-8825784E.0066AC27@playstation.sony.com>
References: <4D77B885.5050109@callenish.com> <OF36FEDDC6.06951577-ON8825784E.0062343E-8825784E.0066AC27@playstation.sony.com>
From: John Tamplin <jat@google.com>
Date: Wed, 09 Mar 2011 14:04:41 -0500
Message-ID: <AANLkTinau4g1pB_ccJ31u7WRi5npYtHvXE5YRn5uTbeV@mail.gmail.com>
To: Yutaka_Takeda@playstation.sony.com
Content-Type: multipart/alternative; boundary="000e0cd299a8de6ed7049e116721"
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Masking only Payload/Extension Data
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Mar 2011 19:03:50 -0000

On Wed, Mar 9, 2011 at 1:41 PM, <Yutaka_Takeda@playstation.sony.com> wrote:

> Let me join in the voices for +1 on the use of reserved bit.
>
> I agree with your points of debate in the following messages:
>  - http://www.ietf.org/mail-archive/web/hybi/current/msg06631.html
>  - http://www.ietf.org/mail-archive/web/hybi/current/msg06633.html
>
> Reasons:
>
>  o Sniffers can choose whether to go ahead and parse masked payload
>    based on the bit without having to capture from the start.
>    (It greatly helps us in debugging or trouble shooting)
>

I agree this is useful, but I disagree that this is sufficient to warrant
the cost.


>  o Ability to turn off masking for debugging/trouble shooting.
>    (this should not be manipulable by user code, of course, just to be
> clear)
>

This is orthogonal to whether to use a bit in the frame, and from previous
discussions there is little support for being able to disable it.


>  o It is worthier allocating a bit for this than reserving it
>    for something we don't even know especially when we still have
>    at least a few bits left.
>

The problem is there are only a few reserved bits, and we don't know how
many it would be useful to have.  One thing that was discussed earlier that
would require allocation of a reserved bit would be per-frame compression,
so you can avoid compressing non-compressible data.  Another possibility is
that we generally allocate more opcodes for extensions, in which case we
would like to be able to allocate some of the reserved bits to the opcode
field.  We won't know we used too many until we need more than we have, at
which point it becomes expensive (50% additional overhead for small frames)
to get more.  When we came up with this framing, this was the compromise
between cost and leaving options open for the future that everybody could
live with.

Think about it from an efficiency point of view -- you are suggesting
allocating a bit in every frame that is going to be the same for every frame
in the same direction.  How can that possibly be good stewardship of limited
resources, rather than specifying it once in the header (or not at all if it
is known to be set or clear based on which side is initiating the
connection)?

 o Lacking the bit seems to be the source of sense of asymmetry -
>    as in the frame not being self-descriptive for what's in the
>    payload (not to be confused by 'understanding' the payload),
>    seems to be a bad protocol design choice.
>

The frame is already not self-descriptive -- if compression is negotiated,
you have to know that (plus the current compression state) in order to
interpret the frames.  Likewise, other extensions will likely modify
interpretation of the payload.

I still think it is not worth allocating a reserved bit to indicate masking
is present, but if most people want it I won't object too strenuously.

-- 
John A. Tamplin
Software Engineer (GWT), Google