
From jamie@shareable.org  Sun Jan  2 04:35:59 2011
Return-Path: <jamie@shareable.org>
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 F23F33A695C for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 04:35:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.796
X-Spam-Level: 
X-Spam-Status: No, score=-2.796 tagged_above=-999 required=5 tests=[AWL=-0.197, BAYES_00=-2.599]
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 mpEa-i46bQgM for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 04:35:59 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id D187F3A6957 for <hybi@ietf.org>; Sun,  2 Jan 2011 04:35:58 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PZNCF-0000iE-3R; Sun, 02 Jan 2011 12:38:03 +0000
Date: Sun, 2 Jan 2011 12:38:03 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Bruce Atherton <bruce@callenish.com>
Message-ID: <20110102123803.GE20751@shareable.org>
References: <4D154847.4040908@callenish.com> <AANLkTikTa+6+T-fahGMrVO7QGQfXb6e89=p4kLMamzbt@mail.gmail.com> <AANLkTinJi-sgXeqU=mw8=a4kbXt12mjSQhBesAiwfJQO@mail.gmail.com> <AANLkTinjiNCOuw7aKryQMAWznpJZH_NkV=FnzqMhKszw@mail.gmail.com> <AANLkTikWPyHG4OnwMukPnjYoeBJjwE25T1Q9SYHKKsv8@mail.gmail.com> <4D1A490C.80202@callenish.com> <443B426A-BC34-48E6-8525-F8E98667E82C@apple.com> <4D1A94C5.2040404@callenish.com> <95CC9C10-A790-46B5-AB3E-CF28AA04549E@apple.com> <4D1BF59E.2020400@callenish.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D1BF59E.2020400@callenish.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Mandatory vs Optional masking. was: Straw Poll: is Upgrade with client->sever XOR mask acceptable?
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: Sun, 02 Jan 2011 12:36:00 -0000

Bruce Atherton wrote:
> You are right, that is another cost to having the added security of 
> per-channel keys, beyond the few bytes. I see this as being the same as 
> removing the ability to provide a payload from the client in the initial 
> handshake when a connection is first created. Well worth the price for 
> the security provided.
> 
> To me, opening a communications channel should have the same level of 
> security whether it shares a socket or not.

It depends what you mean by a "channel".

Round-tripless setup means you can create and destroy channels so fast
that it's efficient to use unique channels for every HTTP-like
request/response pair (i.e. RPC) over the WebSocket.

It means there is no motivation for app designers to avoid using it
and roll their own.

Then the browser & server implementations are responsible for keeping
those channels semantically separate.  (Framing, etc.)

Arguably that would be *more* secure than the current plan, where we
expect sites to smoosh together independent WebSocket-using components
on the site into a single WebWorker-driven connection using
*application*-designed framing & muxing (overlaid), to the extent it's
technically feasible.  Possibly by replacing the browser's
window.WebSocket object site-wide with a Javascript version.
Precisely because of that round trip overhead (and other overheads).

Pushing framing & muxing towards application designers and
app-specific protocols is totally in keeping with the original
WebSocket philosophy, but it's not a great security recipe.

-- Jamie

From gregw@intalio.com  Sun Jan  2 07:07:48 2011
Return-Path: <gregw@intalio.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 435B93A698F for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 07:07:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.922
X-Spam-Level: 
X-Spam-Status: No, score=-2.922 tagged_above=-999 required=5 tests=[AWL=0.055,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 a+CVi5CyCwtW for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 07:07:47 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 765C33A6979 for <hybi@ietf.org>; Sun,  2 Jan 2011 07:07:47 -0800 (PST)
Received: by vws7 with SMTP id 7so5359697vws.31 for <hybi@ietf.org>; Sun, 02 Jan 2011 07:09:53 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.195.10 with SMTP id ea10mr2402456vcb.1.1293980993672; Sun, 02 Jan 2011 07:09:53 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 2 Jan 2011 07:09:53 -0800 (PST)
In-Reply-To: <AANLkTikNJxPhhrtfxK7mTQHxLnDFAhyc5xOxTr8mvoJu@mail.gmail.com>
References: <4D12AD9C.7090503@callenish.com> <AANLkTikn7w6X_2863BCPYDHRn_FNCAij3GB1nFp3bSbx@mail.gmail.com> <4D14121E.7020601@callenish.com> <AANLkTikcs8Fb5mDnypUg_H4g=U=gc__f1b2JPp-P3MXD@mail.gmail.com> <AANLkTikac-PXEk5uWMHxOo6uRbu-ncqqQNJ+fLSE1=iD@mail.gmail.com> <4D191026.9030303@ducksong.com> <AANLkTik6-2rDtt_EG3X1SrZ8zGrEtTAqqJXf-Ad69TCS@mail.gmail.com> <AANLkTikNJxPhhrtfxK7mTQHxLnDFAhyc5xOxTr8mvoJu@mail.gmail.com>
Date: Sun, 2 Jan 2011 16:09:53 +0100
X-Google-Sender-Auth: UyT5bnHY8bPDENj7wyWcbm2G_p4
Message-ID: <AANLkTi=t5hHxr97+Jo=rsCb3_qAAz-FujfPfieF=SFyJ@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Flexibility should be a design consideration
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: Sun, 02 Jan 2011 15:07:48 -0000

On 28 December 2010 12:33, Eric Rescorla <ekr@rtfm.com> wrote:
>
> On Tue, Dec 28, 2010 at 12:47 AM, Greg Wilkins <gregw@webtide.com> wrote:
>>
>> Nobody has given a technical reason to not just mask the payloads?
>> why not? =A0 =A0Is the only objection that this gives us the flexibility
>> to have optional or alternate masking? =A0 that is a pretty poor reason.
>
> Really? I thought at least one person mentioned that they were worried ab=
out
> the attacker controlling extensions. Regardless, I think that's clearly a
> technical
> reason.

I don't understand why attackers controlling extensions is a technical
reason to mask the framing?

From gregw@intalio.com  Sun Jan  2 07:12:57 2011
Return-Path: <gregw@intalio.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 3E24D3A6994 for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 07:12:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.922
X-Spam-Level: 
X-Spam-Status: No, score=-2.922 tagged_above=-999 required=5 tests=[AWL=0.055,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 ifPx2zuZkPGr for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 07:12:56 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 495A43A698F for <hybi@ietf.org>; Sun,  2 Jan 2011 07:12:56 -0800 (PST)
Received: by qyj19 with SMTP id 19so13690681qyj.10 for <hybi@ietf.org>; Sun, 02 Jan 2011 07:15:02 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.214.71 with SMTP id gz7mr4759393qab.349.1293981302813; Sun, 02 Jan 2011 07:15:02 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 2 Jan 2011 07:15:02 -0800 (PST)
In-Reply-To: <AANLkTik+Y4Tu1=Z-TaaFHKyPzmoYteK=Kp=Rg36j-EeE@mail.gmail.com>
References: <AANLkTikj8TXWyoN6FcW91GnHcbENNVo1nz99N=X3tUi0@mail.gmail.com> <A59C619B-925B-4FCF-AD9B-C248AAD1E263@apple.com> <AANLkTim+_SgHbiUNnRTBVprcYMERCzegiKFw6F6-D1UK@mail.gmail.com> <AANLkTik+Y4Tu1=Z-TaaFHKyPzmoYteK=Kp=Rg36j-EeE@mail.gmail.com>
Date: Sun, 2 Jan 2011 16:15:02 +0100
X-Google-Sender-Auth: V8KZf-qA0DnQs-L5XSvlxWJ2Y8o
Message-ID: <AANLkTi=remyNmt1Cowwm_fi74Lhy1RDXXAHr7UUWFHo9@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] Mandatory vs Optional masking. was: Straw Poll: is Upgrade with client->sever XOR mask acceptable?
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: Sun, 02 Jan 2011 15:12:57 -0000

On 28 December 2010 05:25, John Tamplin <jat@google.com> wrote:
> We could certainly define one, but unless it goes into the base frame
> (I would object to that) or there is some flag to indicate that
> extension data is present and therefore the length is the first thing
> in the extension data, then I don't see how it helps.


John,

but the proposal to send the key and then mask the framing makes the
key part of the base framing.
It will be impossible to interpret the framing without handling
masking and effectively we have defined a new framing field before the
existing ones that  is the masking key.

So whatever reasons you have for objecting to a masking key in the
base framing, surely they apply to sending
key+masked-frame-header+masked-payload.

From ekr@rtfm.com  Sun Jan  2 07:16:54 2011
Return-Path: <ekr@rtfm.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 45D763A6994 for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 07:16:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.59
X-Spam-Level: 
X-Spam-Status: No, score=-102.59 tagged_above=-999 required=5 tests=[AWL=0.386, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 L0Ijt11E76z8 for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 07:16:53 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 669E23A6998 for <hybi@ietf.org>; Sun,  2 Jan 2011 07:16:53 -0800 (PST)
Received: by yxt33 with SMTP id 33so5717012yxt.31 for <hybi@ietf.org>; Sun, 02 Jan 2011 07:19:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.114.5 with SMTP id m5mr11112906agc.25.1293981539897; Sun, 02 Jan 2011 07:18:59 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sun, 2 Jan 2011 07:18:59 -0800 (PST)
In-Reply-To: <AANLkTi=t5hHxr97+Jo=rsCb3_qAAz-FujfPfieF=SFyJ@mail.gmail.com>
References: <4D12AD9C.7090503@callenish.com> <AANLkTikn7w6X_2863BCPYDHRn_FNCAij3GB1nFp3bSbx@mail.gmail.com> <4D14121E.7020601@callenish.com> <AANLkTikcs8Fb5mDnypUg_H4g=U=gc__f1b2JPp-P3MXD@mail.gmail.com> <AANLkTikac-PXEk5uWMHxOo6uRbu-ncqqQNJ+fLSE1=iD@mail.gmail.com> <4D191026.9030303@ducksong.com> <AANLkTik6-2rDtt_EG3X1SrZ8zGrEtTAqqJXf-Ad69TCS@mail.gmail.com> <AANLkTikNJxPhhrtfxK7mTQHxLnDFAhyc5xOxTr8mvoJu@mail.gmail.com> <AANLkTi=t5hHxr97+Jo=rsCb3_qAAz-FujfPfieF=SFyJ@mail.gmail.com>
Date: Sun, 2 Jan 2011 07:18:59 -0800
Message-ID: <AANLkTik2or4r5xYVZn4j=hFh2PqzGumKV5gkVUCL8OmC@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: multipart/alternative; boundary=0016361e84fc08156e0498de8ebf
Cc: hybi@ietf.org
Subject: Re: [hybi] Flexibility should be a design consideration
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: Sun, 02 Jan 2011 15:16:54 -0000

--0016361e84fc08156e0498de8ebf
Content-Type: text/plain; charset=ISO-8859-1

It's a reason to mask the extensions.

-Ekr


On Sun, Jan 2, 2011 at 7:09 AM, Greg Wilkins <gregw@webtide.com> wrote:

> On 28 December 2010 12:33, Eric Rescorla <ekr@rtfm.com> wrote:
> >
> > On Tue, Dec 28, 2010 at 12:47 AM, Greg Wilkins <gregw@webtide.com>
> wrote:
> >>
> >> Nobody has given a technical reason to not just mask the payloads?
> >> why not?    Is the only objection that this gives us the flexibility
> >> to have optional or alternate masking?   that is a pretty poor reason.
> >
> > Really? I thought at least one person mentioned that they were worried
> about
> > the attacker controlling extensions. Regardless, I think that's clearly a
> > technical
> > reason.
>
> I don't understand why attackers controlling extensions is a technical
> reason to mask the framing?
>

--0016361e84fc08156e0498de8ebf
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

It&#39;s a reason to mask the extensions.<div><br></div><div>-Ekr</div><div=
><br><br><div class=3D"gmail_quote">On Sun, Jan 2, 2011 at 7:09 AM, Greg Wi=
lkins <span dir=3D"ltr">&lt;<a href=3D"mailto:gregw@webtide.com">gregw@webt=
ide.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div class=3D"im">On 28 December 2010 12:33=
, Eric Rescorla &lt;<a href=3D"mailto:ekr@rtfm.com">ekr@rtfm.com</a>&gt; wr=
ote:<br>

&gt;<br>
&gt; On Tue, Dec 28, 2010 at 12:47 AM, Greg Wilkins &lt;<a href=3D"mailto:g=
regw@webtide.com">gregw@webtide.com</a>&gt; wrote:<br>
&gt;&gt;<br>
</div><div class=3D"im">&gt;&gt; Nobody has given a technical reason to not=
 just mask the payloads?<br>
&gt;&gt; why not? =A0 =A0Is the only objection that this gives us the flexi=
bility<br>
&gt;&gt; to have optional or alternate masking? =A0 that is a pretty poor r=
eason.<br>
&gt;<br>
&gt; Really? I thought at least one person mentioned that they were worried=
 about<br>
&gt; the attacker controlling extensions. Regardless, I think that&#39;s cl=
early a<br>
&gt; technical<br>
&gt; reason.<br>
<br>
</div>I don&#39;t understand why attackers controlling extensions is a tech=
nical<br>
reason to mask the framing?<br>
</blockquote></div><br></div>

--0016361e84fc08156e0498de8ebf--

From gregw@intalio.com  Sun Jan  2 08:17:26 2011
Return-Path: <gregw@intalio.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 20B503A6979 for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 08:17:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.923
X-Spam-Level: 
X-Spam-Status: No, score=-2.923 tagged_above=-999 required=5 tests=[AWL=0.054,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 kLluynd+J5CJ for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 08:17:25 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 4B5653A696A for <hybi@ietf.org>; Sun,  2 Jan 2011 08:17:25 -0800 (PST)
Received: by vws7 with SMTP id 7so5373004vws.31 for <hybi@ietf.org>; Sun, 02 Jan 2011 08:19:31 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.194.69 with SMTP id dx5mr6548005vcb.60.1293985171506; Sun, 02 Jan 2011 08:19:31 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 2 Jan 2011 08:19:31 -0800 (PST)
In-Reply-To: <AANLkTik2or4r5xYVZn4j=hFh2PqzGumKV5gkVUCL8OmC@mail.gmail.com>
References: <4D12AD9C.7090503@callenish.com> <AANLkTikn7w6X_2863BCPYDHRn_FNCAij3GB1nFp3bSbx@mail.gmail.com> <4D14121E.7020601@callenish.com> <AANLkTikcs8Fb5mDnypUg_H4g=U=gc__f1b2JPp-P3MXD@mail.gmail.com> <AANLkTikac-PXEk5uWMHxOo6uRbu-ncqqQNJ+fLSE1=iD@mail.gmail.com> <4D191026.9030303@ducksong.com> <AANLkTik6-2rDtt_EG3X1SrZ8zGrEtTAqqJXf-Ad69TCS@mail.gmail.com> <AANLkTikNJxPhhrtfxK7mTQHxLnDFAhyc5xOxTr8mvoJu@mail.gmail.com> <AANLkTi=t5hHxr97+Jo=rsCb3_qAAz-FujfPfieF=SFyJ@mail.gmail.com> <AANLkTik2or4r5xYVZn4j=hFh2PqzGumKV5gkVUCL8OmC@mail.gmail.com>
Date: Sun, 2 Jan 2011 17:19:31 +0100
X-Google-Sender-Auth: MLZLqys6gQpaS0vdfrWSCi5yxBY
Message-ID: <AANLkTinL3LmXkC1+JWD-ttTG-FCeSyxgf=3OLSAo7-Mk@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi@ietf.org
Subject: Re: [hybi] Flexibility should be a design consideration
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: Sun, 02 Jan 2011 16:17:26 -0000

On 2 January 2011 16:18, Eric Rescorla <ekr@rtfm.com> wrote:
> It's a reason to mask the extensions.

Sure, and I'm not opposed to that.  If the masking key is placed in
the extension data space, then it can can apply to all extensions data
after the key.  If the key is in the framing header, then it can apply
to all extension data.

I still have not seen any reason to mask the actual framing and I've
given several good reasons why not to mask the framing - which are
independent of the questions about optional or not, extension or not.

regards

From bruce@callenish.com  Sun Jan  2 11:05:58 2011
Return-Path: <bruce@callenish.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 599D43A68C8 for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 11:05:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  BAYES_00=-2.599]
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 zROe5xCP6XAR for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 11:05:57 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 5E3D53A6869 for <hybi@ietf.org>; Sun,  2 Jan 2011 11:05:57 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PZTHf-0007Nb-EP for hybi@ietf.org; Sun, 02 Jan 2011 11:08:03 -0800
Message-ID: <4D20CD19.8030408@callenish.com>
Date: Sun, 02 Jan 2011 11:08:09 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <4D154847.4040908@callenish.com> <AANLkTikTa+6+T-fahGMrVO7QGQfXb6e89=p4kLMamzbt@mail.gmail.com> <AANLkTinJi-sgXeqU=mw8=a4kbXt12mjSQhBesAiwfJQO@mail.gmail.com> <AANLkTinjiNCOuw7aKryQMAWznpJZH_NkV=FnzqMhKszw@mail.gmail.com> <AANLkTikWPyHG4OnwMukPnjYoeBJjwE25T1Q9SYHKKsv8@mail.gmail.com> <4D1A490C.80202@callenish.com> <443B426A-BC34-48E6-8525-F8E98667E82C@apple.com> <4D1A94C5.2040404@callenish.com> <95CC9C10-A790-46B5-AB3E-CF28AA04549E@apple.com> <4D1BF59E.2020400@callenish.com> <20110102123803.GE20751@shareable.org>
In-Reply-To: <20110102123803.GE20751@shareable.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Mandatory vs Optional masking. was: Straw Poll: is Upgrade with client->sever XOR mask acceptable?
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: Sun, 02 Jan 2011 19:05:58 -0000

On 02/01/2011 4:38 AM, Jamie Lokier wrote:
> Round-tripless setup means you can create and destroy channels so fast
> that it's efficient to use unique channels for every HTTP-like
> request/response pair (i.e. RPC) over the WebSocket.

That describes Websocket messages. There is no need to introduce muxable 
channels in that scenario. I think we are talking about different things.

> It means there is no motivation for app designers to avoid using it
> and roll their own.
>
> Then the browser&  server implementations are responsible for keeping
> those channels semantically separate.  (Framing, etc.)
>
> Arguably that would be *more* secure than the current plan, where we
> expect sites to smoosh together independent WebSocket-using components
> on the site into a single WebWorker-driven connection using
> *application*-designed framing&  muxing (overlaid), to the extent it's
> technically feasible.  Possibly by replacing the browser's
> window.WebSocket object site-wide with a Javascript version.
> Precisely because of that round trip overhead (and other overheads).
>
> Pushing framing&  muxing towards application designers and
> app-specific protocols is totally in keeping with the original
> WebSocket philosophy, but it's not a great security recipe.

It sounds to me like you are arguing against client-side muxing. Note 
that that is a different argument. Maciej was saying that there didn't 
seem to be a point to introducing some overhead to client-side muxing 
(assuming that it exists), and I was disagreeing that the overhead 
wasn't worthwhile.

I have to admit I really don't get what you are saying about why you 
wouldn't want the ability to separate channels. One can imagine a web 
page with a channel for a chat client for CRM and another for 
server-side form validation. If the CRM app is supplied by a third 
party, the server for it may well run in a sandboxed environment with 
the primary Websocket server distributing Websocket messages to it. You 
really don't want the chat app to be able to start mucking around with 
the form data. You may be able to protect against this in other ways, 
but why not allow the people deploying these apps to treat them as 
completely separate "virtual sockets" without all the socket overhead 
and without having to reinvent the wheel?

That's my perspective, anyway. But this thread was really about whether 
or not framing should be masked, and this portion focused specifically 
on whether there was an example of an appliance that didn't need to 
unmask and remask. I think it is clear that there well could be, but we 
seem to have strayed a long way from that topic.


From gregw@intalio.com  Sun Jan  2 14:14:43 2011
Return-Path: <gregw@intalio.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 7F2DE28C0EB for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 14:14:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.923
X-Spam-Level: 
X-Spam-Status: No, score=-2.923 tagged_above=-999 required=5 tests=[AWL=0.054,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 xRb5zfyH9R7L for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 14:14:42 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id A8D5E3A6927 for <hybi@ietf.org>; Sun,  2 Jan 2011 14:14:42 -0800 (PST)
Received: by vws7 with SMTP id 7so5451223vws.31 for <hybi@ietf.org>; Sun, 02 Jan 2011 14:16:49 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.187.132 with SMTP id cw4mr3073930vcb.25.1294006608859; Sun, 02 Jan 2011 14:16:48 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 2 Jan 2011 14:16:48 -0800 (PST)
In-Reply-To: <443B426A-BC34-48E6-8525-F8E98667E82C@apple.com>
References: <AANLkTikj8TXWyoN6FcW91GnHcbENNVo1nz99N=X3tUi0@mail.gmail.com> <A59C619B-925B-4FCF-AD9B-C248AAD1E263@apple.com> <4D154847.4040908@callenish.com> <AANLkTikTa+6+T-fahGMrVO7QGQfXb6e89=p4kLMamzbt@mail.gmail.com> <AANLkTinJi-sgXeqU=mw8=a4kbXt12mjSQhBesAiwfJQO@mail.gmail.com> <AANLkTinjiNCOuw7aKryQMAWznpJZH_NkV=FnzqMhKszw@mail.gmail.com> <AANLkTikWPyHG4OnwMukPnjYoeBJjwE25T1Q9SYHKKsv8@mail.gmail.com> <4D1A490C.80202@callenish.com> <443B426A-BC34-48E6-8525-F8E98667E82C@apple.com>
Date: Sun, 2 Jan 2011 23:16:48 +0100
X-Google-Sender-Auth: Fc-m9Uw5nPxr12icvrGcz7spyNE
Message-ID: <AANLkTinVJ8edc=gMD0uLAemL6Dp8Cg-C0aHvjqs6i0BY@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Mandatory vs Optional masking. was: Straw Poll: is Upgrade with client->sever XOR mask acceptable?
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: Sun, 02 Jan 2011 22:14:43 -0000

On 29 December 2010 00:31, Maciej Stachowiak <mjs@apple.com> wrote:
> Yes. In masking as currently proposed, the actual mask applied is based on a combination of the per-frame
> key and a per-connection key, derived from the server and client nonces.

I think that having a per-connection key has cons that greatly
outweigh any pros.

A per-frame key is sufficient to prevent clear text and a
per-connection key will make frames non-self describing. This will
make it more difficult to create tools such as wireshark plugins to
analyse ws streams.

I understand that the concern is that a pre-recorded frame might be
able to be used in an attack, but such an attack relies on the ability
to send arbitrary bytes, and we already know from Adam's/Erics
experiment that if you can send arbitrary bytes, you can attack
vulnerable intermediaries.

regards

From ekr@rtfm.com  Sun Jan  2 14:18:07 2011
Return-Path: <ekr@rtfm.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 3683228C0EB for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 14:18:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.095
X-Spam-Level: 
X-Spam-Status: No, score=-102.095 tagged_above=-999 required=5 tests=[AWL=-0.119, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, 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 qq2FBUqoS+St for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 14:18:06 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id 4EEB63A6927 for <hybi@ietf.org>; Sun,  2 Jan 2011 14:18:06 -0800 (PST)
Received: by yie19 with SMTP id 19so3533259yie.31 for <hybi@ietf.org>; Sun, 02 Jan 2011 14:20:12 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.2.23 with SMTP id 23mr11696602agb.106.1294006812832; Sun, 02 Jan 2011 14:20:12 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sun, 2 Jan 2011 14:20:12 -0800 (PST)
In-Reply-To: <AANLkTinVJ8edc=gMD0uLAemL6Dp8Cg-C0aHvjqs6i0BY@mail.gmail.com>
References: <AANLkTikj8TXWyoN6FcW91GnHcbENNVo1nz99N=X3tUi0@mail.gmail.com> <A59C619B-925B-4FCF-AD9B-C248AAD1E263@apple.com> <4D154847.4040908@callenish.com> <AANLkTikTa+6+T-fahGMrVO7QGQfXb6e89=p4kLMamzbt@mail.gmail.com> <AANLkTinJi-sgXeqU=mw8=a4kbXt12mjSQhBesAiwfJQO@mail.gmail.com> <AANLkTinjiNCOuw7aKryQMAWznpJZH_NkV=FnzqMhKszw@mail.gmail.com> <AANLkTikWPyHG4OnwMukPnjYoeBJjwE25T1Q9SYHKKsv8@mail.gmail.com> <4D1A490C.80202@callenish.com> <443B426A-BC34-48E6-8525-F8E98667E82C@apple.com> <AANLkTinVJ8edc=gMD0uLAemL6Dp8Cg-C0aHvjqs6i0BY@mail.gmail.com>
Date: Sun, 2 Jan 2011 14:20:12 -0800
Message-ID: <AANLkTi=T1J_ZWM0RKnXdYK2S=oCNteey4nu0V_U2mT8S@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: multipart/alternative; boundary=00163631086b6a74c20498e470b4
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Mandatory vs Optional masking. was: Straw Poll: is Upgrade with client->sever XOR mask acceptable?
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: Sun, 02 Jan 2011 22:18:07 -0000

--00163631086b6a74c20498e470b4
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Jan 2, 2011 at 2:16 PM, Greg Wilkins <gregw@webtide.com> wrote:

> On 29 December 2010 00:31, Maciej Stachowiak <mjs@apple.com> wrote:
> > Yes. In masking as currently proposed, the actual mask applied is based
> on a combination of the per-frame
> > key and a per-connection key, derived from the server and client nonces.
>
> I think that having a per-connection key has cons that greatly
> outweigh any pros.
>
> A per-frame key is sufficient to prevent clear text and a
> per-connection key will make frames non-self describing. This will
> make it more difficult to create tools such as wireshark plugins to
> analyse ws streams.


I've built several passive analysis systems of this type and in my
experience this
just isn't correct.

You already need to maintain a fair amount of per-connection state to deal
with
the fact that the TCP segment boundaries don't line up with the frame
boundaries.
Maintaining a per-connection key is much easier.

-Ekr

--00163631086b6a74c20498e470b4
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Sun, Jan 2, 2011 at 2:16 PM, Greg Wil=
kins <span dir=3D"ltr">&lt;<a href=3D"mailto:gregw@webtide.com">gregw@webti=
de.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On 29 December 2010 00:31, Maciej Stachowiak &lt;<a href=
=3D"mailto:mjs@apple.com">mjs@apple.com</a>&gt; wrote:<br>
&gt; Yes. In masking as currently proposed, the actual mask applied is base=
d on a combination of the per-frame<br>
&gt; key and a per-connection key, derived from the server and client nonce=
s.<br>
<br>
</div>I think that having a per-connection key has cons that greatly<br>
outweigh any pros.<br>
<br>
A per-frame key is sufficient to prevent clear text and a<br>
per-connection key will make frames non-self describing. This will<br>
make it more difficult to create tools such as wireshark plugins to<br>
analyse ws streams.</blockquote><div><br></div><div>I&#39;ve built several =
passive analysis systems of this type and in my experience this=A0</div><di=
v>just isn&#39;t correct.</div><div><br></div><div>You already need to main=
tain a fair amount of per-connection state to deal with</div>
<div>the fact that the TCP segment boundaries don&#39;t line up with the fr=
ame boundaries.</div><div>Maintaining a per-connection key is much easier.<=
/div><div><br></div><div>-Ekr</div><div><br></div></div><br>

--00163631086b6a74c20498e470b4--

From theturtle32@gmail.com  Sun Jan  2 14:47:41 2011
Return-Path: <theturtle32@gmail.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 479AD28C0EB for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 14:47:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.403
X-Spam-Level: 
X-Spam-Status: No, score=-1.403 tagged_above=-999 required=5 tests=[AWL=-0.201, BAYES_00=-2.599, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=1.396]
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 lHLhIEAJSBkR for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 14:47:39 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by core3.amsl.com (Postfix) with ESMTP id 19D343A6927 for <hybi@ietf.org>; Sun,  2 Jan 2011 14:47:39 -0800 (PST)
Received: by iyi42 with SMTP id 42so12740720iyi.31 for <hybi@ietf.org>; Sun, 02 Jan 2011 14:49:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:in-reply-to :mime-version:content-transfer-encoding:content-type:message-id:cc :x-mailer:from:subject:date:to; bh=quLRbauWYwfGWAGT+1yNTEotX5m+swDIgooEkKEAqXI=; b=F6o9MB8uLFlRQURVHbXI5lN7SLppsYVesG2BcVyICOkYuGiX8v0Y6GuQ2lutjm2EX2 TzVOzWL+Qd3ZxxGlPlHwKIkJd6XCP/eHdOKgRl9JVnXl7lfxpMvAnUZzNOEZzY4avb/s 2KxVYJmyWqXs1ucq4+xUP7c114C/NWIoJ6sgA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; b=ncaj9J7ezihv1vMa0chRJek+OVtVwKleR0iNpMctupzq6njC2794VVH8GEDWdQjLzJ iWzyRE0ex28KETO0fBYlO+SC1aNlsSont6o2ecsVMrAihL3+L9YLYAkS7+9J/B8CzmSv +mP8NkEG1dGmLyCjF963VsVHME0STeIVCdP70=
Received: by 10.42.223.4 with SMTP id ii4mr20439636icb.4.1294008585603; Sun, 02 Jan 2011 14:49:45 -0800 (PST)
Received: from [192.168.0.22] (cpe-76-167-26-250.socal.res.rr.com [76.167.26.250]) by mx.google.com with ESMTPS id gy41sm18134313ibb.11.2011.01.02.14.49.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 02 Jan 2011 14:49:44 -0800 (PST)
References: <AANLkTikj8TXWyoN6FcW91GnHcbENNVo1nz99N=X3tUi0@mail.gmail.com> <A59C619B-925B-4FCF-AD9B-C248AAD1E263@apple.com> <4D154847.4040908@callenish.com> <AANLkTikTa+6+T-fahGMrVO7QGQfXb6e89=p4kLMamzbt@mail.gmail.com> <AANLkTinJi-sgXeqU=mw8=a4kbXt12mjSQhBesAiwfJQO@mail.gmail.com> <AANLkTinjiNCOuw7aKryQMAWznpJZH_NkV=FnzqMhKszw@mail.gmail.com> <AANLkTikWPyHG4OnwMukPnjYoeBJjwE25T1Q9SYHKKsv8@mail.gmail.com> <4D1A490C.80202@callenish.com> <443B426A-BC34-48E6-8525-F8E98667E82C@apple.com> <AANLkTinVJ8edc=gMD0uLAemL6Dp8Cg-C0aHvjqs6i0BY@mail.gmail.com> <AANLkTi=T1J_ZWM0RKnXdYK2S=oCNteey4nu0V_U2mT8S@mail.gmail.com>
In-Reply-To: <AANLkTi=T1J_ZWM0RKnXdYK2S=oCNteey4nu0V_U2mT8S@mail.gmail.com>
Mime-Version: 1.0 (iPhone Mail 8C148)
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary=Apple-Mail-1-21286833
Message-Id: <05DC93DB-C707-47D3-BD82-071C552B8EAC@gmail.com>
X-Mailer: iPhone Mail (8C148)
From: Brian McKelvey <theturtle32@gmail.com>
Date: Sun, 2 Jan 2011 14:49:40 -0800
To: Eric Rescorla <ekr@rtfm.com>
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Mandatory vs Optional masking. was: Straw Poll: is Upgrade with client->sever XOR mask acceptable?
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: Sun, 02 Jan 2011 22:47:41 -0000

--Apple-Mail-1-21286833
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

It also means that you wouldn't be able to analyze the transmission at all i=
f you started listening on the wire after the connection had already been es=
tablished..  I'd be happy to live with that though.

Brian

Sent from my iPhone

On Jan 2, 2011, at 2:20 PM, Eric Rescorla <ekr@rtfm.com> wrote:

>=20
>=20
> On Sun, Jan 2, 2011 at 2:16 PM, Greg Wilkins <gregw@webtide.com> wrote:
> On 29 December 2010 00:31, Maciej Stachowiak <mjs@apple.com> wrote:
> > Yes. In masking as currently proposed, the actual mask applied is based o=
n a combination of the per-frame
> > key and a per-connection key, derived from the server and client nonces.=

>=20
> I think that having a per-connection key has cons that greatly
> outweigh any pros.
>=20
> A per-frame key is sufficient to prevent clear text and a
> per-connection key will make frames non-self describing. This will
> make it more difficult to create tools such as wireshark plugins to
> analyse ws streams.
>=20
> I've built several passive analysis systems of this type and in my experie=
nce this=20
> just isn't correct.
>=20
> You already need to maintain a fair amount of per-connection state to deal=
 with
> the fact that the TCP segment boundaries don't line up with the frame boun=
daries.
> Maintaining a per-connection key is much easier.
>=20
> -Ekr
>=20
>=20
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi

--Apple-Mail-1-21286833
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=utf-8

<html><body bgcolor="#FFFFFF"><div>It also means that you wouldn't be able to analyze the transmission at all if you started listening on the wire after the connection had already been established.. &nbsp;I'd be happy to live with that though.</div><div><br></div><div>Brian<br><br>Sent from my iPhone</div><div><br>On Jan 2, 2011, at 2:20 PM, Eric Rescorla &lt;<a href="mailto:ekr@rtfm.com">ekr@rtfm.com</a>&gt; wrote:<br><br></div><div><span></span></div><blockquote type="cite"><div><br><br><div class="gmail_quote">On Sun, Jan 2, 2011 at 2:16 PM, Greg Wilkins <span dir="ltr">&lt;<a href="mailto:gregw@webtide.com"><a href="mailto:gregw@webtide.com">gregw@webtide.com</a></a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 29 December 2010 00:31, Maciej Stachowiak &lt;<a href="mailto:mjs@apple.com"><a href="mailto:mjs@apple.com">mjs@apple.com</a></a>&gt; wrote:<br>
&gt; Yes. In masking as currently proposed, the actual mask applied is based on a combination of the per-frame<br>
&gt; key and a per-connection key, derived from the server and client nonces.<br>
<br>
</div>I think that having a per-connection key has cons that greatly<br>
outweigh any pros.<br>
<br>
A per-frame key is sufficient to prevent clear text and a<br>
per-connection key will make frames non-self describing. This will<br>
make it more difficult to create tools such as wireshark plugins to<br>
analyse ws streams.</blockquote><div><br></div><div>I've built several passive analysis systems of this type and in my experience this&nbsp;</div><div>just isn't correct.</div><div><br></div><div>You already need to maintain a fair amount of per-connection state to deal with</div>
<div>the fact that the TCP segment boundaries don't line up with the frame boundaries.</div><div>Maintaining a per-connection key is much easier.</div><div><br></div><div>-Ekr</div><div><br></div></div><br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>hybi mailing list</span><br><span><a href="mailto:hybi@ietf.org">hybi@ietf.org</a></span><br><span><a href="https://www.ietf.org/mailman/listinfo/hybi">https://www.ietf.org/mailman/listinfo/hybi</a></span><br></div></blockquote></body></html>
--Apple-Mail-1-21286833--

From jat@google.com  Sun Jan  2 15:11:22 2011
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 AF2D728C0EB for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 15:11:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.964
X-Spam-Level: 
X-Spam-Status: No, score=-103.964 tagged_above=-999 required=5 tests=[AWL=-0.987, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 ezVO4D6aF0Wu for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 15:11:20 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id A84C53A6932 for <hybi@ietf.org>; Sun,  2 Jan 2011 15:11:20 -0800 (PST)
Received: from hpaq11.eem.corp.google.com (hpaq11.eem.corp.google.com [172.25.149.11]) by smtp-out.google.com with ESMTP id p02NDQkE030725 for <hybi@ietf.org>; Sun, 2 Jan 2011 15:13:27 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294010007; bh=OvmfLPsqA5hAKtyfW/xs5EQObsE=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=McOlRw7fdBe4O5TQ0thP3rselvhL34pEhfwh4rnQI6XYJ/tUjPXYN3J3xO0sFyF0F 5TERvFh0LD4S+G4VZ+29A==
Received: from gyb11 (gyb11.prod.google.com [10.243.49.75]) by hpaq11.eem.corp.google.com with ESMTP id p02NDO0v005946 for <hybi@ietf.org>; Sun, 2 Jan 2011 15:13:25 -0800
Received: by gyb11 with SMTP id 11so5025569gyb.19 for <hybi@ietf.org>; Sun, 02 Jan 2011 15:13:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=2yAmytSoZiawNTdbFQmm83uYDoXOL6W0sO3wtoYQLdU=; b=SCEiM2oLS7oaa0e2G+9jsTtWsjWUY/eTkVKDf418Na0kM7GcU1RKYBqnP6G9HQs9od vO081C1bfVWIImnmV/Fg==
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:content-transfer-encoding; b=dm/MyOywVKOmvw5INl1qsdFZmqUOct5qrOFKDoalNMFhx7UC+XKp8uUb+Feo6h3iGt dinKYBaPL+G8YeCURdew==
Received: by 10.101.208.21 with SMTP id k21mr11571000anq.240.1294010004582; Sun, 02 Jan 2011 15:13:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Sun, 2 Jan 2011 15:13:04 -0800 (PST)
In-Reply-To: <AANLkTi=remyNmt1Cowwm_fi74Lhy1RDXXAHr7UUWFHo9@mail.gmail.com>
References: <AANLkTikj8TXWyoN6FcW91GnHcbENNVo1nz99N=X3tUi0@mail.gmail.com> <A59C619B-925B-4FCF-AD9B-C248AAD1E263@apple.com> <AANLkTim+_SgHbiUNnRTBVprcYMERCzegiKFw6F6-D1UK@mail.gmail.com> <AANLkTik+Y4Tu1=Z-TaaFHKyPzmoYteK=Kp=Rg36j-EeE@mail.gmail.com> <AANLkTi=remyNmt1Cowwm_fi74Lhy1RDXXAHr7UUWFHo9@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Sun, 2 Jan 2011 18:13:04 -0500
Message-ID: <AANLkTim5CqviFgdZeefZ=X2KFNbmPZe8qaMqoZJjUXax@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] Mandatory vs Optional masking. was: Straw Poll: is Upgrade with client->sever XOR mask acceptable?
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: Sun, 02 Jan 2011 23:11:22 -0000

On Sun, Jan 2, 2011 at 10:15 AM, Greg Wilkins <gregw@webtide.com> wrote:
> but the proposal to send the key and then mask the framing makes the
> key part of the base framing.
> It will be impossible to interpret the framing without handling
> masking and effectively we have defined a new framing field before the
> existing ones that =C2=A0is the masking key.
>
> So whatever reasons you have for objecting to a masking key in the
> base framing, surely they apply to sending
> key+masked-frame-header+masked-payload.

My objection is trying to renegotiate the existing framing mechanism,
rather than simply adding a layer above it where it remains the same
in both directions, with the only difference being adding an outer
layer on client->server.

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

From gregw@intalio.com  Sun Jan  2 16:01:41 2011
Return-Path: <gregw@intalio.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 CEA2F28C0ED for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 16:01:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.924
X-Spam-Level: 
X-Spam-Status: No, score=-2.924 tagged_above=-999 required=5 tests=[AWL=0.053,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 V3kEUF5fE0OJ for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 16:01:41 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id EEB5728C0EC for <hybi@ietf.org>; Sun,  2 Jan 2011 16:01:40 -0800 (PST)
Received: by qwg5 with SMTP id 5so13659119qwg.31 for <hybi@ietf.org>; Sun, 02 Jan 2011 16:03:47 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.53.213 with SMTP id n21mr18687636qag.399.1294013027517; Sun, 02 Jan 2011 16:03:47 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 2 Jan 2011 16:03:47 -0800 (PST)
In-Reply-To: <AANLkTim5CqviFgdZeefZ=X2KFNbmPZe8qaMqoZJjUXax@mail.gmail.com>
References: <AANLkTikj8TXWyoN6FcW91GnHcbENNVo1nz99N=X3tUi0@mail.gmail.com> <A59C619B-925B-4FCF-AD9B-C248AAD1E263@apple.com> <AANLkTim+_SgHbiUNnRTBVprcYMERCzegiKFw6F6-D1UK@mail.gmail.com> <AANLkTik+Y4Tu1=Z-TaaFHKyPzmoYteK=Kp=Rg36j-EeE@mail.gmail.com> <AANLkTi=remyNmt1Cowwm_fi74Lhy1RDXXAHr7UUWFHo9@mail.gmail.com> <AANLkTim5CqviFgdZeefZ=X2KFNbmPZe8qaMqoZJjUXax@mail.gmail.com>
Date: Mon, 3 Jan 2011 01:03:47 +0100
X-Google-Sender-Auth: D2m1-6yUO8YraupspohVgr3wpps
Message-ID: <AANLkTimZeqx8D73axwpsia+dXk4tyWh8G6rzYQYhU4Bd@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Subject: Re: [hybi] Mandatory vs Optional masking. was: Straw Poll: is Upgrade with client->sever XOR mask acceptable?
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: Mon, 03 Jan 2011 00:01:41 -0000

On 3 January 2011 00:13, John Tamplin <jat@google.com> wrote:
> My objection is trying to renegotiate the existing framing mechanism,
> rather than simply adding a layer above it where it remains the same
> in both directions, with the only difference being adding an outer
> layer on client->server.

John,

Wrapping the existing framing in a new masking frame is renegotiating
the framing and that is why am strongly opposed to it.

We can avoid renegotiating the current framing by  putting the key
either in the already negotiated extension data or in the payload
itself.

regards

From jat@google.com  Sun Jan  2 19:47:12 2011
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 0001E3A697B for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 19:47:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.625
X-Spam-Level: 
X-Spam-Status: No, score=-104.625 tagged_above=-999 required=5 tests=[AWL=-2.649, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, 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 vLzprfdkg9pJ for <hybi@core3.amsl.com>; Sun,  2 Jan 2011 19:47:11 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 878C13A6936 for <hybi@ietf.org>; Sun,  2 Jan 2011 19:47:10 -0800 (PST)
Received: from hpaq1.eem.corp.google.com (hpaq1.eem.corp.google.com [172.25.149.1]) by smtp-out.google.com with ESMTP id p033nG2e028379 for <hybi@ietf.org>; Sun, 2 Jan 2011 19:49:16 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294026556; bh=+tO54+f6krxXpFKTjFRXm5QwCsw=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=HYhcEKPjbCXa40tBnou94r0QWOEPsT3vqAAQXoInEpkELaGkyY9PEyP0urJ3ldpWy 5lqmDPUl9pqbqFOqIX4bw==
Received: from ywa6 (ywa6.prod.google.com [10.192.1.6]) by hpaq1.eem.corp.google.com with ESMTP id p033nEmc009399 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Sun, 2 Jan 2011 19:49:15 -0800
Received: by ywa6 with SMTP id 6so6845893ywa.26 for <hybi@ietf.org>; Sun, 02 Jan 2011 19:49:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=lktpTovWlWE7KACp5ZP2jNxxPtQhqa0DnGF9ggAfPpc=; b=d4yrocPgIUrLyLIafVN8d9tHu7RTEswZcBzyGl5VJm7Hn5kfC5NS5hkBQR8tAZTB89 FUH0Oti1MTklvPj0MSaQ==
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=VB3esEOsoaklvRsUHW1tz7yTb9g5X9RRIM1hYHTyqLJbeZ0AJD+JdNnmlxAe6Z2wAB mUdCe4CPNWqefNnr1ChQ==
Received: by 10.90.69.15 with SMTP id r15mr11869610aga.155.1294026554559; Sun, 02 Jan 2011 19:49:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Sun, 2 Jan 2011 19:48:54 -0800 (PST)
In-Reply-To: <AANLkTimZeqx8D73axwpsia+dXk4tyWh8G6rzYQYhU4Bd@mail.gmail.com>
References: <AANLkTikj8TXWyoN6FcW91GnHcbENNVo1nz99N=X3tUi0@mail.gmail.com> <A59C619B-925B-4FCF-AD9B-C248AAD1E263@apple.com> <AANLkTim+_SgHbiUNnRTBVprcYMERCzegiKFw6F6-D1UK@mail.gmail.com> <AANLkTik+Y4Tu1=Z-TaaFHKyPzmoYteK=Kp=Rg36j-EeE@mail.gmail.com> <AANLkTi=remyNmt1Cowwm_fi74Lhy1RDXXAHr7UUWFHo9@mail.gmail.com> <AANLkTim5CqviFgdZeefZ=X2KFNbmPZe8qaMqoZJjUXax@mail.gmail.com> <AANLkTimZeqx8D73axwpsia+dXk4tyWh8G6rzYQYhU4Bd@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Sun, 2 Jan 2011 22:48:54 -0500
Message-ID: <AANLkTi=VBKNL+QsocvVPS9quGCaz=FUAvr_9U+c7gu9n@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: multipart/alternative; boundary=0016364ee1e41d4d9c0498e90983
X-System-Of-Record: true
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] Mandatory vs Optional masking. was: Straw Poll: is Upgrade with client->sever XOR mask acceptable?
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: Mon, 03 Jan 2011 03:47:12 -0000

--0016364ee1e41d4d9c0498e90983
Content-Type: text/plain; charset=UTF-8

On Sun, Jan 2, 2011 at 7:03 PM, Greg Wilkins <gregw@webtide.com> wrote:

> On 3 January 2011 00:13, John Tamplin <jat@google.com> wrote:
> > My objection is trying to renegotiate the existing framing mechanism,
> > rather than simply adding a layer above it where it remains the same
> > in both directions, with the only difference being adding an outer
> > layer on client->server.
>
> Wrapping the existing framing in a new masking frame is renegotiating
> the framing and that is why am strongly opposed to it.
>

I disagree -- is carrying the defined WebSocket frames inside an SSL session
redefining the WebSocket framing?  In the same way, adding an extra framing
outside of the existing WebSocket framing, which does nothing but add
masking, seems exactly analogous to SSL.

We can avoid renegotiating the current framing by  putting the key
> either in the already negotiated extension data or in the payload
> itself.


The problem is that the framing as specified now, says that the reserved
bits will be zero and the extension data area will be empty.  We could
certainly change that, but again that is going back into defining the
framing that we have already agreed upon at a significant cost.

I previously wrote up what I thought it would take to make the masking an
extension that would fit into what we already defined.  However, there is a
lot of things that we deferred that would have to be defined in order to do
that, and there were significant objections to making it optional.  I
suppose we could define all that and then define that all implementations,
barring connections that never transit outside a trusted network, must
request the extension and fail the connection if it isn't accepted.
 However, that seems to me to really be raising the minimum bar for simple
implementations, compared to just adding a masking layer around all of
WebSockets (not to mention it seems like it will be a lot harder to get
agreement on all those details).

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

--0016364ee1e41d4d9c0498e90983
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sun, Jan 2, 2011 at 7:03 PM, Greg Wilkins <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:gregw@webtide.com">gregw@webtide.com</=
a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">On 3 January 2011 00:13, John Tamplin &lt;<a href=3D"mail=
to:jat@google.com">jat@google.com</a>&gt; wrote:<br>
&gt; My objection is trying to renegotiate the existing framing mechanism,<=
br>
&gt; rather than simply adding a layer above it where it remains the same<b=
r>
&gt; in both directions, with the only difference being adding an outer<br>
&gt; layer on client-&gt;server.<br>
<br>
</div>Wrapping the existing framing in a new masking frame is renegotiating=
<br>
the framing and that is why am strongly opposed to it.<br></blockquote><div=
><br></div><div>I disagree -- is carrying the defined WebSocket frames insi=
de an SSL session redefining the WebSocket framing? =C2=A0In the same way, =
adding an extra framing outside of the existing WebSocket framing, which do=
es nothing but add masking, seems exactly analogous to SSL.=C2=A0</div>

<div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex;">
We can avoid renegotiating the current framing by =C2=A0putting the key<br>
either in the already negotiated extension data or in the payload<br>
itself.</blockquote><div><br></div><div>The problem is that the framing as =
specified now, says that the reserved bits will be zero and the extension d=
ata area will be empty. =C2=A0We could certainly change that, but again tha=
t is going back into defining the framing that we have already agreed upon =
at a significant cost.</div>

<div><br></div><div>I previously wrote up what I thought it would take to m=
ake the masking an extension that would fit into what we already defined. =
=C2=A0However, there is a lot of things that we deferred that would have to=
 be defined in order to do that, and there were significant objections to m=
aking it optional. =C2=A0I suppose we could define all that and then define=
 that all implementations, barring connections that never transit outside a=
 trusted network, must request the extension and fail the connection if it =
isn&#39;t accepted. =C2=A0However, that seems to me to really be raising th=
e minimum bar for simple implementations, compared to just adding a masking=
 layer around all of WebSockets (not to mention it seems like it will be a =
lot harder to get agreement on all those details).</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--0016364ee1e41d4d9c0498e90983--

From gregw@intalio.com  Mon Jan  3 00:40:09 2011
Return-Path: <gregw@intalio.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 1874B3A69C2 for <hybi@core3.amsl.com>; Mon,  3 Jan 2011 00:40:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.924
X-Spam-Level: 
X-Spam-Status: No, score=-2.924 tagged_above=-999 required=5 tests=[AWL=0.053,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 lZF+-7VfmbD4 for <hybi@core3.amsl.com>; Mon,  3 Jan 2011 00:40:08 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 244B73A6989 for <hybi@ietf.org>; Mon,  3 Jan 2011 00:40:08 -0800 (PST)
Received: by qyj19 with SMTP id 19so14119854qyj.10 for <hybi@ietf.org>; Mon, 03 Jan 2011 00:42:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.87.13 with SMTP id u13mr17266031qcl.55.1294044134790; Mon, 03 Jan 2011 00:42:14 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Mon, 3 Jan 2011 00:42:14 -0800 (PST)
In-Reply-To: <AANLkTi=VBKNL+QsocvVPS9quGCaz=FUAvr_9U+c7gu9n@mail.gmail.com>
References: <AANLkTikj8TXWyoN6FcW91GnHcbENNVo1nz99N=X3tUi0@mail.gmail.com> <A59C619B-925B-4FCF-AD9B-C248AAD1E263@apple.com> <AANLkTim+_SgHbiUNnRTBVprcYMERCzegiKFw6F6-D1UK@mail.gmail.com> <AANLkTik+Y4Tu1=Z-TaaFHKyPzmoYteK=Kp=Rg36j-EeE@mail.gmail.com> <AANLkTi=remyNmt1Cowwm_fi74Lhy1RDXXAHr7UUWFHo9@mail.gmail.com> <AANLkTim5CqviFgdZeefZ=X2KFNbmPZe8qaMqoZJjUXax@mail.gmail.com> <AANLkTimZeqx8D73axwpsia+dXk4tyWh8G6rzYQYhU4Bd@mail.gmail.com> <AANLkTi=VBKNL+QsocvVPS9quGCaz=FUAvr_9U+c7gu9n@mail.gmail.com>
Date: Mon, 3 Jan 2011 09:42:14 +0100
X-Google-Sender-Auth: _UbFXj6hTPapHlMgti18iqYkIgM
Message-ID: <AANLkTimRbTEQvKdWYPzjt_teYOsBJq=krNMM737vFcPd@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Subject: Re: [hybi] Mandatory vs Optional masking. was: Straw Poll: is Upgrade with client->sever XOR mask acceptable?
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: Mon, 03 Jan 2011 08:40:09 -0000

On 3 January 2011 04:48, John Tamplin <jat@google.com> wrote:


> I disagree -- is carrying the defined WebSocket frames inside an SSL session redefining the WebSocket
> framing?  In the same way, adding an extra framing outside of the existing WebSocket framing, which does > nothing but add masking, seems exactly analogous to SSL.

John,
It is one thing to propose wrapping WS framing in an existing standard
and an entirely different thing to propose a new masking mechanism to
wrap WS framing.

Besides, looking at SSL as an example, it has well defined framing
that is sent in the clear, so that intermediaries can analyse and
correctly handle SSL, without actually having to decrypt the payload.


> The problem is that the framing as specified now, says that the reserved
> bits will be zero and the extension data area will be empty. ...
> lot of things that we deferred that would have to be defined in order to do
> that,

If the extension mechanism as defined can't cope with something as
simple as masking, then we have further work to do.  If we deferr
consideration of working extensions, then we will just end up with an
unusable extension mechanism.

But is there really a lot of things to change?  we could use a
reserved bit to indicate masking and that would stay within the
current draft.   Or we could change one section in the draft to allow
extensions to use extension data without using reserve bits (which I
think is sensible else we limit the number of extensions possible).


> and there were significant objections to making it optional.

This is not about making it optional, it is about making it agile so
that there is the option of making it optional and/or replaceable
either now or in the distant future.

From w@1wt.eu  Wed Jan  5 01:55:29 2011
Return-Path: <w@1wt.eu>
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 109583A6B6E for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 01:55:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.144
X-Spam-Level: 
X-Spam-Status: No, score=-2.144 tagged_above=-999 required=5 tests=[AWL=-0.101, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 VpVR8nxtAtrE for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 01:55:28 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id D49383A6949 for <hybi@ietf.org>; Wed,  5 Jan 2011 01:55:27 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p059vRuv016263 for hybi@ietf.org; Wed, 5 Jan 2011 10:57:27 +0100
Date: Wed, 5 Jan 2011 10:57:27 +0100
From: Willy Tarreau <w@1wt.eu>
To: hybi <hybi@ietf.org>
Message-ID: <20110105095727.GE15851@1wt.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.3i
Subject: [hybi] A bit of pragmatism
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, 05 Jan 2011 09:55:29 -0000

Hi,

considering the amount of complexity we're trying to add to the protocol
to solve just a small part of hypothetical cases, I'm wondering why we
could not go with a pragmatic approach :

  - use the hello frames and swap the more/fin bits as suggested by
    Greg & Gabriel
  - add the "close" statement to the Connection header in the requests

With all that, for an intermediary to fail, it will be required that :
  - it does not understand status code 101 (around 1/50000 in Adam's tests
    if my memory serves me right)

  - it supports HTTP keep-alive

  - is able to find an HTTP request starting with a method composed of
    invalid chars (no such intermediary has been identified so far)

  - is able to accept a second request despite the "Connection: close"
    in the request (no such intermediary identified so far, though Greg
    admitted that this had been the case for an older server of his).

This might probably leave us with something between 0 and 1 in one million
possibly vulnerable intermediaries. Those if they even exist would be
particularly buggy considering that they have to fail on #3 above. Please
also note that #2 is already quite difficult to implement, which contradicts
the sloppiness of #3.

My question is : why should we bother for those ? We're making a mess with
the WebSocket protocol just because we suspect that there might exist some
stupid developers who probably quickly wrote something they called a proxy
in just an afternoon for their own use. If such products exist they surely
are not waiting for WebSocket to be exploited (eg: chunked encoding or
multiple content-lengths are even harder to get right than content-length).

So couldn't we focus on more-or-less HTTP-compliant implementations only,
cover a few implementation bugs and stop bothering about the most unlikely
scenarii involving deliberate bugs ? At one point, we should not try to
fix what people deliberately broke for their own use.

Best regards,
Willy


From salvatore.loreto@ericsson.com  Wed Jan  5 02:46:42 2011
Return-Path: <salvatore.loreto@ericsson.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 667EA3A6B76 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 02:46:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.544
X-Spam-Level: 
X-Spam-Status: No, score=-106.544 tagged_above=-999 required=5 tests=[AWL=0.055, BAYES_00=-2.599, 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 jEn2oooIFUvN for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 02:46:41 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id CE41A3A6AFA for <hybi@ietf.org>; Wed,  5 Jan 2011 02:46:40 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-18-4d244c8ed78f
Received: from esessmw0237.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id F2.AA.23694.E8C442D4; Wed,  5 Jan 2011 11:48:46 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0237.eemea.ericsson.se (153.88.115.91) with Microsoft SMTP Server id 8.2.234.1; Wed, 5 Jan 2011 11:48:46 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 1E9E4232D	for <hybi@ietf.org>; Wed,  5 Jan 2011 12:48:46 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id D7B5F5052A	for <hybi@ietf.org>; Wed,  5 Jan 2011 12:48:45 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 67424503CF	for <hybi@ietf.org>; Wed,  5 Jan 2011 12:48:45 +0200 (EET)
Message-ID: <4D244C8C.7050601@ericsson.com>
Date: Wed, 5 Jan 2011 11:48:44 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <20110105095727.GE15851@1wt.eu>
In-Reply-To: <20110105095727.GE15851@1wt.eu>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: [hybi] Reminder: Straw Poll on GET+Upgrade+Masking ends on January 7th (was Re: A bit of pragmatism)
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, 05 Jan 2011 10:46:42 -0000

Hi Willy,

thanks for your proposal,
but I would like folks to focus the discussion on the poll we are 
running at moment on Get+Upgrade+Masking
(btw the poll will over in two days: on January Friday 7th).

We are seeing a good consensus support for at least accepting (if not 
advocating) it:
of course there are still technical details that need to be defined and 
people are still discussing,
but the wheels are spinning.
For the chairs it is a great relief to see this much agreement.

Masking adds complexity to the protocol, that is true,
but the cost of masking is a reasonable price that we have to pay to 
security,
and a lot of people seem to be happy to compromise with it.

cheers
/Sal

-- 
Salvatore Loreto
www.sloreto.com



On 1/5/11 10:57 AM, Willy Tarreau wrote:
> Hi,
>
> considering the amount of complexity we're trying to add to the protocol
> to solve just a small part of hypothetical cases, I'm wondering why we
> could not go with a pragmatic approach :
>
>    - use the hello frames and swap the more/fin bits as suggested by
>      Greg&  Gabriel
>    - add the "close" statement to the Connection header in the requests
>
> With all that, for an intermediary to fail, it will be required that :
>    - it does not understand status code 101 (around 1/50000 in Adam's tests
>      if my memory serves me right)
>
>    - it supports HTTP keep-alive
>
>    - is able to find an HTTP request starting with a method composed of
>      invalid chars (no such intermediary has been identified so far)
>
>    - is able to accept a second request despite the "Connection: close"
>      in the request (no such intermediary identified so far, though Greg
>      admitted that this had been the case for an older server of his).
>
> This might probably leave us with something between 0 and 1 in one million
> possibly vulnerable intermediaries. Those if they even exist would be
> particularly buggy considering that they have to fail on #3 above. Please
> also note that #2 is already quite difficult to implement, which contradicts
> the sloppiness of #3.
>
> My question is : why should we bother for those ? We're making a mess with
> the WebSocket protocol just because we suspect that there might exist some
> stupid developers who probably quickly wrote something they called a proxy
> in just an afternoon for their own use. If such products exist they surely
> are not waiting for WebSocket to be exploited (eg: chunked encoding or
> multiple content-lengths are even harder to get right than content-length).
>
> So couldn't we focus on more-or-less HTTP-compliant implementations only,
> cover a few implementation bugs and stop bothering about the most unlikely
> scenarii involving deliberate bugs ? At one point, we should not try to
> fix what people deliberately broke for their own use.
>
> Best regards,
> Willy
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi



From andy.warmcat.com@googlemail.com  Wed Jan  5 03:41:36 2011
Return-Path: <andy.warmcat.com@googlemail.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 3F38B3A6B74 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 03:41:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 wysjs-zCLSsC for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 03:41:34 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id BE4603A6E15 for <hybi@ietf.org>; Wed,  5 Jan 2011 03:41:33 -0800 (PST)
Received: by wyf23 with SMTP id 23so15896691wyf.31 for <hybi@ietf.org>; Wed, 05 Jan 2011 03:43:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=cu4StG3svf3uRbH/JynCqyQ/4KFeTVMR8Pt607dNmoM=; b=MNeYuD9WxKE2f8TsvD/uPK/M3Dz1x0wIjVOOmMgNpYOrsKxHWbRmgcSh8fDKJmKLEc 7CE0UAfMcaoGWFlzQEQ86Pv5XYscWnTJ6wUpRP8o2ZMzEB76oTZ3fuDN3KzWX1/kAi+o YnN7noykyZVoKuOxZmCWrQoxqCzVSJjHo2lOg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=UBpu1Yi8yuPWVIBtSE+Keo0SMwG7oh3oL1JhFtsfuxZr6az8GWKs45TB8Mm4ESRHRE pGipveSROl0fEGGnh91eiC7qt9ALfO/aN/12+STXC7rh2ezb+PcMukkG2jtF+K9fXmpT fb71q91uKXNK5tDJNaBFsUFyHk8duPJgfKHCM=
Received: by 10.227.154.7 with SMTP id m7mr13132618wbw.2.1294227820257; Wed, 05 Jan 2011 03:43:40 -0800 (PST)
Received: from [192.168.1.68] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id f35sm15864630wbf.14.2011.01.05.03.43.38 (version=SSLv3 cipher=RC4-MD5); Wed, 05 Jan 2011 03:43:39 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D245963.5030104@warmcat.com>
Date: Wed, 05 Jan 2011 11:43:31 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <20110105095727.GE15851@1wt.eu>
In-Reply-To: <20110105095727.GE15851@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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, 05 Jan 2011 11:42:53 -0000

On 01/05/11 09:57, Somebody in the thread at some point said:

Hi -

> My question is : why should we bother for those ? We're making a mess with
> the WebSocket protocol just because we suspect that there might exist some
> stupid developers who probably quickly wrote something they called a proxy
> in just an afternoon for their own use. If such products exist they surely
> are not waiting for WebSocket to be exploited (eg: chunked encoding or
> multiple content-lengths are even harder to get right than content-length).
>
> So couldn't we focus on more-or-less HTTP-compliant implementations only,
> cover a few implementation bugs and stop bothering about the most unlikely
> scenarii involving deliberate bugs ? At one point, we should not try to
> fix what people deliberately broke for their own use.

Couldn't agree more.

Security of these alleged intermediaries is out of scope for websockets 
because they remain as exploitable as they ever were for packets on both 
sides of them no matter what needless evasive action websockets takes.

Over-engineering websockets to death over a non-reproducible problem 
that websockets can't fix is crazy.

What's needed is to rule trying to solve the unsolveable out of scope 
and finish up any problems from the real world left with -03.

-Andy

From bruce@callenish.com  Wed Jan  5 10:29:06 2011
Return-Path: <bruce@callenish.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 5E5F33A6CDB for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 10:29:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.299
X-Spam-Level: 
X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5 tests=[AWL=-0.300, BAYES_00=-2.599, J_CHICKENPOX_37=0.6]
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 WYR7yEZAyDuE for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 10:29:05 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 7EAF23A6C17 for <hybi@ietf.org>; Wed,  5 Jan 2011 10:29:05 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PaY8d-0005tk-O6 for hybi@ietf.org; Wed, 05 Jan 2011 10:31:11 -0800
Message-ID: <4D24B8F0.9090404@callenish.com>
Date: Wed, 05 Jan 2011 10:31:12 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <1293038752.2369.155.camel@ds9.ducksong.com>
In-Reply-To: <1293038752.2369.155.camel@ds9.ducksong.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 05 Jan 2011 18:29:06 -0000

On 22/12/2010 9:25 AM, Pat McManus @Mozilla wrote:
> With that in mind I want to ask everyone if they think an approach based
> on Get+Upgrade containing mandatory client->server XOR masking meets the
> bar of an acceptable and good web sockets protocol.

I've never understood the asymmetry of this poll. I'm not seeking to 
block forward progress here, but perhaps someone could explain it to me.

The reason I'm confused is that, as a bidirectional protocol, it seems 
perfectly reasonable to use Websockets for peer to peer communications. 
If I have two nodes in a cluster and they are communicating with 
Websockets, which is the client and which is the server? If the one that 
opens the connection is the client, does that mean that if, in the 
future, applications are developed where servers initiate Websocket 
connections to browsers, then they will be the client and the browser 
will be the server? What does that do to the security guarantees you are 
looking for?

Perhaps the intention is that Websockets are never used for peer to peer 
connections, or that we fake a client in that situation. But it seems a 
lot of complication, and what is the gain? That servers have their load 
reduced? They still have to unmask all those incoming messages, and as I 
showed in the web portal usecase, the server may be a Websocket client 
for far more connections than it is a server. Yes, you get sendfile() 
from server to client as a result. But if, instead, the server had a way 
of optionally turning off masking in a frame when needed (there I go 
again) then you could get that in cases where it mattered.

Again, I'm not looking to hold anything up here. I think that the 
language of the straw poll should be adopted and put into the draft (so 
if it matters, here is a +1). There is far too much resistance here to 
letting things into the spec IMHO. It should be much easier to get 
changes in, even if they are later reversed. But at the same time, I 
hope that this poll does not rule out further discussion on what 
"mandatory" and "client->server" means.

> * It accomplishes this at reasonable cost
>    + masking is unidirectional and favors the server end. I've worked on
> servers in the past and right now I'm working on a browser and I really
> do believe that is the right trade off. A browser is much more
> interested in latency than in overall load scaling, while a server has
> real concerns about the latter. making sendfile() useless to the browser
> is no big deal - it doesn't help with latency when compared to IP time
> scales and the client is less likely to have the kind of data that would
> be zero copied anyhow.


From jat@google.com  Wed Jan  5 10:33:43 2011
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 276903A6C69 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 10:33:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.578
X-Spam-Level: 
X-Spam-Status: No, score=-104.578 tagged_above=-999 required=5 tests=[AWL=-2.602, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, 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 QZGJaYjeblM7 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 10:33:42 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 7720F3A6BE9 for <hybi@ietf.org>; Wed,  5 Jan 2011 10:33:41 -0800 (PST)
Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id p05IZlEK024087 for <hybi@ietf.org>; Wed, 5 Jan 2011 10:35:47 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294252547; bh=NagYGcYYlmkPl2QYBa10YGrPfCE=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=LDeJxs8RgYATwUfOD59CnlTls14ntC1V3xXzpJ9SGh3I0yiY/7hqoHAfGcMMylV5q 7UoW1JiXihWroY4/m0eBw==
Received: from gwaa12 (gwaa12.prod.google.com [10.200.27.12]) by wpaz5.hot.corp.google.com with ESMTP id p05IZP4j008229 for <hybi@ietf.org>; Wed, 5 Jan 2011 10:35:46 -0800
Received: by gwaa12 with SMTP id a12so3903110gwa.6 for <hybi@ietf.org>; Wed, 05 Jan 2011 10:35:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=173YhMQcfgBgiBOHRuFyTfQFSBDcU5y7vQQdVn8xy5Q=; b=BibRr+YkdL2Rwjb5IeFw9HpZBYqdDI7SWK/XZZIU0n4w3gbsB4xKIfRJH08y9hgjdS NeQSlMcSwoejh//4vOBA==
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=E/Vq0QC30271FDhg0H/EziX1G2azT3DlzR3lXwfkiMvMdHvBiNgU+ZL+McVBUbLHTJ xk/zRvp+LjhnrZwOjKgA==
Received: by 10.150.192.12 with SMTP id p12mr22706591ybf.263.1294252545668; Wed, 05 Jan 2011 10:35:45 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 5 Jan 2011 10:35:25 -0800 (PST)
In-Reply-To: <4D24B8F0.9090404@callenish.com>
References: <1293038752.2369.155.camel@ds9.ducksong.com> <4D24B8F0.9090404@callenish.com>
From: John Tamplin <jat@google.com>
Date: Wed, 5 Jan 2011 13:35:25 -0500
Message-ID: <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: multipart/alternative; boundary=000e0cd6b11c3bf8b204991da72f
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 05 Jan 2011 18:33:43 -0000

--000e0cd6b11c3bf8b204991da72f
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 5, 2011 at 1:31 PM, Bruce Atherton <bruce@callenish.com> wrote:

> The reason I'm confused is that, as a bidirectional protocol, it seems
> perfectly reasonable to use Websockets for peer to peer communications. If I
> have two nodes in a cluster and they are communicating with Websockets,
> which is the client and which is the server? If the one that opens the
> connection is the client, does that mean that if, in the future,
> applications are developed where servers initiate Websocket connections to
> browsers, then they will be the client and the browser will be the server?
> What does that do to the security guarantees you are looking for?



Perhaps the intention is that Websockets are never used for peer to peer
> connections, or that we fake a client in that situation. But it seems a lot
> of complication, and what is the gain? That servers have their load reduced?
> They still have to unmask all those incoming messages, and as I showed in
> the web portal usecase, the server may be a Websocket client for far more
> connections than it is a server. Yes, you get sendfile() from server to
> client as a result. But if, instead, the server had a way of optionally
> turning off masking in a frame when needed (there I go again) then you could
> get that in cases where it mattered.
>
> Again, I'm not looking to hold anything up here. I think that the language
> of the straw poll should be adopted and put into the draft (so if it
> matters, here is a +1). There is far too much resistance here to letting
> things into the spec IMHO. It should be much easier to get changes in, even
> if they are later reversed. But at the same time, I hope that this poll does
> not rule out further discussion on what "mandatory" and "client->server"
> means.
>

AFAIK, there has been no discussion of allowing a server to initiate a
connection to the client.  In many cases, it isn't even possible to do so,
and it isn't clear security administrators would want every browser on their
network essentially becoming a server.  If you control both ends, then why
do you need WebSocket at all, rather than just using TCP directly?

In any case, it seems allowing such usage is beyond the current scope.

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

--000e0cd6b11c3bf8b204991da72f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 5, 2011 at 1:31 PM, Bruce Atherton <=
span dir=3D"ltr">&lt;<a href=3D"mailto:bruce@callenish.com">bruce@callenish=
.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

The reason I&#39;m confused is that, as a bidirectional protocol, it seems =
perfectly reasonable to use Websockets for peer to peer communications. If =
I have two nodes in a cluster and they are communicating with Websockets, w=
hich is the client and which is the server? If the one that opens the conne=
ction is the client, does that mean that if, in the future, applications ar=
e developed where servers initiate Websocket connections to browsers, then =
they will be the client and the browser will be the server? What does that =
do to the security guarantees you are looking for?=C2=A0</blockquote>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">=C2=A0</blockquote><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex;">

Perhaps the intention is that Websockets are never used for peer to peer co=
nnections, or that we fake a client in that situation. But it seems a lot o=
f complication, and what is the gain? That servers have their load reduced?=
 They still have to unmask all those incoming messages, and as I showed in =
the web portal usecase, the server may be a Websocket client for far more c=
onnections than it is a server. Yes, you get sendfile() from server to clie=
nt as a result. But if, instead, the server had a way of optionally turning=
 off masking in a frame when needed (there I go again) then you could get t=
hat in cases where it mattered.<br>


<br>
Again, I&#39;m not looking to hold anything up here. I think that the langu=
age of the straw poll should be adopted and put into the draft (so if it ma=
tters, here is a +1). There is far too much resistance here to letting thin=
gs into the spec IMHO. It should be much easier to get changes in, even if =
they are later reversed. But at the same time, I hope that this poll does n=
ot rule out further discussion on what &quot;mandatory&quot; and &quot;clie=
nt-&gt;server&quot; means.<br>

</blockquote><div><br></div><meta http-equiv=3D"content-type" content=3D"te=
xt/html; charset=3Dutf-8"><div>AFAIK, there has been no discussion of allow=
ing a server to initiate a connection to the client. =C2=A0In many cases, i=
t isn&#39;t even possible to do so, and it isn&#39;t clear security adminis=
trators would want every browser on their network essentially becoming a se=
rver. =C2=A0If you control both ends, then why do you need WebSocket at all=
, rather than just using TCP directly?</div>

<div><br></div><div>In any case, it seems allowing such usage is beyond the=
 current scope.</div></div><br>-- <br>John A. Tamplin<br>Software Engineer =
(GWT), Google<br>

--000e0cd6b11c3bf8b204991da72f--

From jerod.venema@frozenmountain.com  Wed Jan  5 10:46:56 2011
Return-Path: <jerod.venema@frozenmountain.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 65DA23A6C39 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 10:46:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level: 
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 Ny7uafU8ZiWa for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 10:46:54 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 30C6F3A6BE9 for <hybi@ietf.org>; Wed,  5 Jan 2011 10:46:54 -0800 (PST)
Received: by qyj19 with SMTP id 19so16929336qyj.10 for <hybi@ietf.org>; Wed, 05 Jan 2011 10:49:01 -0800 (PST)
Received: by 10.229.249.17 with SMTP id mi17mr20452596qcb.123.1294253340843; Wed, 05 Jan 2011 10:49:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.8.2 with HTTP; Wed, 5 Jan 2011 10:48:40 -0800 (PST)
In-Reply-To: <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com>
References: <1293038752.2369.155.camel@ds9.ducksong.com> <4D24B8F0.9090404@callenish.com> <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com>
From: Jerod Venema <jerod.venema@frozenmountain.com>
Date: Wed, 5 Jan 2011 13:48:40 -0500
Message-ID: <AANLkTinzAoiGyv+Dq6_Jbd1DXXBc1sNVNpc==o_JGzyT@mail.gmail.com>
To: John Tamplin <jat@google.com>
Content-Type: multipart/alternative; boundary=0016e64cc918a15f1904991dd614
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 05 Jan 2011 18:46:56 -0000

--0016e64cc918a15f1904991dd614
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Jan 5, 2011 at 1:35 PM, John Tamplin <jat@google.com> wrote:

> On Wed, Jan 5, 2011 at 1:31 PM, Bruce Atherton <bruce@callenish.com>wrote:
>
>> The reason I'm confused is that, as a bidirectional protocol, it seems
>> perfectly reasonable to use Websockets for peer to peer communications. If I
>> have two nodes in a cluster and they are communicating with Websockets,
>> which is the client and which is the server? If the one that opens the
>> connection is the client, does that mean that if, in the future,
>> applications are developed where servers initiate Websocket connections to
>> browsers, then they will be the client and the browser will be the server?
>> What does that do to the security guarantees you are looking for?
>
>
>
> Perhaps the intention is that Websockets are never used for peer to peer
>> connections, or that we fake a client in that situation. But it seems a lot
>> of complication, and what is the gain? That servers have their load reduced?
>> They still have to unmask all those incoming messages, and as I showed in
>> the web portal usecase, the server may be a Websocket client for far more
>> connections than it is a server. Yes, you get sendfile() from server to
>> client as a result. But if, instead, the server had a way of optionally
>> turning off masking in a frame when needed (there I go again) then you could
>> get that in cases where it mattered.
>>
>> Again, I'm not looking to hold anything up here. I think that the language
>> of the straw poll should be adopted and put into the draft (so if it
>> matters, here is a +1). There is far too much resistance here to letting
>> things into the spec IMHO. It should be much easier to get changes in, even
>> if they are later reversed. But at the same time, I hope that this poll does
>> not rule out further discussion on what "mandatory" and "client->server"
>> means.
>>
>
> AFAIK, there has been no discussion of allowing a server to initiate a
> connection to the client.  In many cases, it isn't even possible to do so,
> and it isn't clear security administrators would want every browser on their
> network essentially becoming a server.  If you control both ends, then why
> do you need WebSocket at all, rather than just using TCP directly?
>

Long time reader, first time posting...hi everyone :)

I can see plenty of valid use cases for peer-to-peer WebSockets. One in
particular that's come up for me recently is video streaming (for, say, live
video conferencing) directly in a browser. It'd be great to be able to use
peer-to-peer communication under this scenario - reduce lag, overhead, etc.


>
> In any case, it seems allowing such usage is beyond the current scope.
>

Whether or not it's in scope is a different question, but there are clearly
use-cases for it.


>
> --
> John A. Tamplin
> Software Engineer (GWT), Google
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>


-- 
Jerod Venema
Frozen Mountain Software
http://www.frozenmountain.com/
(w) 919-300-5141
(c) 919-368-5105

--0016e64cc918a15f1904991dd614
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 5, 2011 at 1:35 PM, John Tamplin <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:jat@google.com">jat@google.com</a>&gt;=
</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"gmail_quote"><div class=3D"im">On Wed, Jan 5, 2011 at 1:31 PM=
, Bruce Atherton <span dir=3D"ltr">&lt;<a href=3D"mailto:bruce@callenish.co=
m" target=3D"_blank">bruce@callenish.com</a>&gt;</span> wrote:<br><blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
lid;padding-left:1ex">



The reason I&#39;m confused is that, as a bidirectional protocol, it seems =
perfectly reasonable to use Websockets for peer to peer communications. If =
I have two nodes in a cluster and they are communicating with Websockets, w=
hich is the client and which is the server? If the one that opens the conne=
ction is the client, does that mean that if, in the future, applications ar=
e developed where servers initiate Websocket connections to browsers, then =
they will be the client and the browser will be the server? What does that =
do to the security guarantees you are looking for?=A0</blockquote>



<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">=A0</blockquote><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x">

Perhaps the intention is that Websockets are never used for peer to peer co=
nnections, or that we fake a client in that situation. But it seems a lot o=
f complication, and what is the gain? That servers have their load reduced?=
 They still have to unmask all those incoming messages, and as I showed in =
the web portal usecase, the server may be a Websocket client for far more c=
onnections than it is a server. Yes, you get sendfile() from server to clie=
nt as a result. But if, instead, the server had a way of optionally turning=
 off masking in a frame when needed (there I go again) then you could get t=
hat in cases where it mattered.<br>




<br>
Again, I&#39;m not looking to hold anything up here. I think that the langu=
age of the straw poll should be adopted and put into the draft (so if it ma=
tters, here is a +1). There is far too much resistance here to letting thin=
gs into the spec IMHO. It should be much easier to get changes in, even if =
they are later reversed. But at the same time, I hope that this poll does n=
ot rule out further discussion on what &quot;mandatory&quot; and &quot;clie=
nt-&gt;server&quot; means.<br>



</blockquote><div><br></div></div><div>AFAIK, there has been no discussion =
of allowing a server to initiate a connection to the client. =A0In many cas=
es, it isn&#39;t even possible to do so, and it isn&#39;t clear security ad=
ministrators would want every browser on their network essentially becoming=
 a server. =A0If you control both ends, then why do you need WebSocket at a=
ll, rather than just using TCP directly?</div>

</div></blockquote><div><br></div><div>Long time reader, first time posting=
...hi everyone :)</div><div><br></div><div>I can see plenty of valid use ca=
ses for peer-to-peer WebSockets. One in particular that&#39;s come up for m=
e recently is video streaming (for, say, live video conferencing) directly =
in a browser. It&#39;d be great to be able to use peer-to-peer communicatio=
n under this scenario - reduce lag, overhead, etc.</div>

<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;"><div class=3D"gmail_quote">

<div><br></div><div>In any case, it seems allowing such usage is beyond the=
 current scope.</div></div></blockquote><div><br></div><div>Whether or not =
it&#39;s in scope is a different question, but there are clearly use-cases =
for it.</div>

<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;"><br><font color=3D"#888888">-=
- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>
</font><br>_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
<br></blockquote></div><br><br clear=3D"all"><br>-- <br>Jerod Venema<br>Fro=
zen Mountain Software<br><a href=3D"http://www.frozenmountain.com/">http://=
www.frozenmountain.com/</a><br>(w) 919-300-5141<br>(c) 919-368-5105<br>

--0016e64cc918a15f1904991dd614--

From ekr@rtfm.com  Wed Jan  5 10:52:29 2011
Return-Path: <ekr@rtfm.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 4E6513A6BE9 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 10:52:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.594
X-Spam-Level: 
X-Spam-Status: No, score=-102.594 tagged_above=-999 required=5 tests=[AWL=0.382, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 AwDz6HrgXV-0 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 10:52:26 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 99B2E3A6C74 for <hybi@ietf.org>; Wed,  5 Jan 2011 10:52:25 -0800 (PST)
Received: by yxt33 with SMTP id 33so6895778yxt.31 for <hybi@ietf.org>; Wed, 05 Jan 2011 10:54:32 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.64.2 with SMTP id r2mr1039532agk.133.1294253670591; Wed, 05 Jan 2011 10:54:30 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Wed, 5 Jan 2011 10:54:30 -0800 (PST)
In-Reply-To: <AANLkTinzAoiGyv+Dq6_Jbd1DXXBc1sNVNpc==o_JGzyT@mail.gmail.com>
References: <1293038752.2369.155.camel@ds9.ducksong.com> <4D24B8F0.9090404@callenish.com> <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com> <AANLkTinzAoiGyv+Dq6_Jbd1DXXBc1sNVNpc==o_JGzyT@mail.gmail.com>
Date: Wed, 5 Jan 2011 10:54:30 -0800
Message-ID: <AANLkTimOepbRV8xf+UFBWxTBbaH9HKao=a_762Z7riEe@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Jerod Venema <jerod.venema@frozenmountain.com>
Content-Type: multipart/alternative; boundary=001485f6ca5c48eccc04991dead6
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 05 Jan 2011 18:52:29 -0000

--001485f6ca5c48eccc04991dead6
Content-Type: text/plain; charset=ISO-8859-1

This is a related, but different problem. See:
http://tools.ietf.org/html/draft-alvestrand-dispatch-rtcweb-protocols-00

-Ekr


On Wed, Jan 5, 2011 at 10:48 AM, Jerod Venema <
jerod.venema@frozenmountain.com> wrote:

> On Wed, Jan 5, 2011 at 1:35 PM, John Tamplin <jat@google.com> wrote:
>
>> On Wed, Jan 5, 2011 at 1:31 PM, Bruce Atherton <bruce@callenish.com>wrote:
>>
>>> The reason I'm confused is that, as a bidirectional protocol, it seems
>>> perfectly reasonable to use Websockets for peer to peer communications. If I
>>> have two nodes in a cluster and they are communicating with Websockets,
>>> which is the client and which is the server? If the one that opens the
>>> connection is the client, does that mean that if, in the future,
>>> applications are developed where servers initiate Websocket connections to
>>> browsers, then they will be the client and the browser will be the server?
>>> What does that do to the security guarantees you are looking for?
>>
>>
>>
>> Perhaps the intention is that Websockets are never used for peer to peer
>>> connections, or that we fake a client in that situation. But it seems a lot
>>> of complication, and what is the gain? That servers have their load reduced?
>>> They still have to unmask all those incoming messages, and as I showed in
>>> the web portal usecase, the server may be a Websocket client for far more
>>> connections than it is a server. Yes, you get sendfile() from server to
>>> client as a result. But if, instead, the server had a way of optionally
>>> turning off masking in a frame when needed (there I go again) then you could
>>> get that in cases where it mattered.
>>>
>>> Again, I'm not looking to hold anything up here. I think that the
>>> language of the straw poll should be adopted and put into the draft (so if
>>> it matters, here is a +1). There is far too much resistance here to letting
>>> things into the spec IMHO. It should be much easier to get changes in, even
>>> if they are later reversed. But at the same time, I hope that this poll does
>>> not rule out further discussion on what "mandatory" and "client->server"
>>> means.
>>>
>>
>> AFAIK, there has been no discussion of allowing a server to initiate a
>> connection to the client.  In many cases, it isn't even possible to do so,
>> and it isn't clear security administrators would want every browser on their
>> network essentially becoming a server.  If you control both ends, then why
>> do you need WebSocket at all, rather than just using TCP directly?
>>
>
> Long time reader, first time posting...hi everyone :)
>
> I can see plenty of valid use cases for peer-to-peer WebSockets. One in
> particular that's come up for me recently is video streaming (for, say, live
> video conferencing) directly in a browser. It'd be great to be able to use
> peer-to-peer communication under this scenario - reduce lag, overhead, etc.
>
>
>>
>> In any case, it seems allowing such usage is beyond the current scope.
>>
>
> Whether or not it's in scope is a different question, but there are clearly
> use-cases for it.
>
>
>>
>> --
>> John A. Tamplin
>> Software Engineer (GWT), Google
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>>
>>
>
>
> --
> Jerod Venema
> Frozen Mountain Software
> http://www.frozenmountain.com/
> (w) 919-300-5141
> (c) 919-368-5105
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>

--001485f6ca5c48eccc04991dead6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

This is a related, but different problem. See:=A0<div><a href=3D"http://too=
ls.ietf.org/html/draft-alvestrand-dispatch-rtcweb-protocols-00">http://tool=
s.ietf.org/html/draft-alvestrand-dispatch-rtcweb-protocols-00</a></div><div=
>
<br></div><div>-Ekr</div><div><br><br><div class=3D"gmail_quote">On Wed, Ja=
n 5, 2011 at 10:48 AM, Jerod Venema <span dir=3D"ltr">&lt;<a href=3D"mailto=
:jerod.venema@frozenmountain.com">jerod.venema@frozenmountain.com</a>&gt;</=
span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div class=3D"gmail_quote"><div><div></div>=
<div class=3D"h5">On Wed, Jan 5, 2011 at 1:35 PM, John Tamplin <span dir=3D=
"ltr">&lt;<a href=3D"mailto:jat@google.com" target=3D"_blank">jat@google.co=
m</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">

<div class=3D"gmail_quote"><div>On Wed, Jan 5, 2011 at 1:31 PM, Bruce Ather=
ton <span dir=3D"ltr">&lt;<a href=3D"mailto:bruce@callenish.com" target=3D"=
_blank">bruce@callenish.com</a>&gt;</span> wrote:<br><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex">




The reason I&#39;m confused is that, as a bidirectional protocol, it seems =
perfectly reasonable to use Websockets for peer to peer communications. If =
I have two nodes in a cluster and they are communicating with Websockets, w=
hich is the client and which is the server? If the one that opens the conne=
ction is the client, does that mean that if, in the future, applications ar=
e developed where servers initiate Websocket connections to browsers, then =
they will be the client and the browser will be the server? What does that =
do to the security guarantees you are looking for?=A0</blockquote>




<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">=A0</blockquote><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x">

Perhaps the intention is that Websockets are never used for peer to peer co=
nnections, or that we fake a client in that situation. But it seems a lot o=
f complication, and what is the gain? That servers have their load reduced?=
 They still have to unmask all those incoming messages, and as I showed in =
the web portal usecase, the server may be a Websocket client for far more c=
onnections than it is a server. Yes, you get sendfile() from server to clie=
nt as a result. But if, instead, the server had a way of optionally turning=
 off masking in a frame when needed (there I go again) then you could get t=
hat in cases where it mattered.<br>





<br>
Again, I&#39;m not looking to hold anything up here. I think that the langu=
age of the straw poll should be adopted and put into the draft (so if it ma=
tters, here is a +1). There is far too much resistance here to letting thin=
gs into the spec IMHO. It should be much easier to get changes in, even if =
they are later reversed. But at the same time, I hope that this poll does n=
ot rule out further discussion on what &quot;mandatory&quot; and &quot;clie=
nt-&gt;server&quot; means.<br>




</blockquote><div><br></div></div><div>AFAIK, there has been no discussion =
of allowing a server to initiate a connection to the client. =A0In many cas=
es, it isn&#39;t even possible to do so, and it isn&#39;t clear security ad=
ministrators would want every browser on their network essentially becoming=
 a server. =A0If you control both ends, then why do you need WebSocket at a=
ll, rather than just using TCP directly?</div>


</div></blockquote><div><br></div></div></div><div>Long time reader, first =
time posting...hi everyone :)</div><div><br></div><div>I can see plenty of =
valid use cases for peer-to-peer WebSockets. One in particular that&#39;s c=
ome up for me recently is video streaming (for, say, live video conferencin=
g) directly in a browser. It&#39;d be great to be able to use peer-to-peer =
communication under this scenario - reduce lag, overhead, etc.</div>
<div class=3D"im">

<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><div class=3D"gmail_quote">

<div><br></div><div>In any case, it seems allowing such usage is beyond the=
 current scope.</div></div></blockquote><div><br></div></div><div>Whether o=
r not it&#39;s in scope is a different question, but there are clearly use-=
cases for it.</div>


<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><div class=3D"im"><br><font co=
lor=3D"#888888">-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<b=
r>
</font><br></div><div class=3D"im">________________________________________=
_______<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
<br></div></blockquote></div><font color=3D"#888888"><br><br clear=3D"all">=
<br>-- <br>Jerod Venema<br>Frozen Mountain Software<br><a href=3D"http://ww=
w.frozenmountain.com/" target=3D"_blank">http://www.frozenmountain.com/</a>=
<br>
(w) 919-300-5141<br>(c) 919-368-5105<br>
</font><br>_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
<br></blockquote></div><br></div>

--001485f6ca5c48eccc04991dead6--

From ferg@caucho.com  Wed Jan  5 11:01:47 2011
Return-Path: <ferg@caucho.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 ACC9C3A6C69 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 11:01:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.11
X-Spam-Level: 
X-Spam-Status: No, score=-2.11 tagged_above=-999 required=5 tests=[AWL=0.489,  BAYES_00=-2.599]
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 eZ2+ST1NOh5x for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 11:01:46 -0800 (PST)
Received: from nm20.bullet.mail.ac4.yahoo.com (nm20.bullet.mail.ac4.yahoo.com [98.139.52.217]) by core3.amsl.com (Postfix) with SMTP id C3D2E3A6C39 for <hybi@ietf.org>; Wed,  5 Jan 2011 11:01:46 -0800 (PST)
Received: from [98.139.52.196] by nm20.bullet.mail.ac4.yahoo.com with NNFMP; 05 Jan 2011 19:03:51 -0000
Received: from [98.139.52.161] by tm9.bullet.mail.ac4.yahoo.com with NNFMP; 05 Jan 2011 19:03:51 -0000
Received: from [127.0.0.1] by omp1044.mail.ac4.yahoo.com with NNFMP; 05 Jan 2011 19:03:51 -0000
X-Yahoo-Newman-Id: 221148.46201.bm@omp1044.mail.ac4.yahoo.com
Received: (qmail 80342 invoked from network); 5 Jan 2011 19:03:51 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp113.biz.mail.re2.yahoo.com with SMTP; 05 Jan 2011 11:03:50 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: OqSCSk0VM1l6OSeNdlnlwzc1ijzDkN4L0eirnpUNjk4b1um C5dTz8NaUwAe4tgrTnWoZQAbdbjMIhE86qQWHh..EiVFyM92K_q9NaamO_bv KcsRTB_0k0hGbOJqS5jfIjBs..56wgFfZqnPNWd7EuQ29Iwxv2IV9t8fHX4m mdHyC0A8Xksnjmf7nHPzxnvWJ0BfTHqXkzjV.AEEae0jd2TKzxRUYnpeT.UY S.fN9nBjGZ3NkGjcGanCmodlaWnhryIoJtJ0ro2Y1Ee4gBcL6BmuUhpcKFOl pvoCxD9Ehra4EP47J1GANG8QdFg--
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D24C095.5070205@caucho.com>
Date: Wed, 05 Jan 2011 11:03:49 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: John Tamplin <jat@google.com>
References: <1293038752.2369.155.camel@ds9.ducksong.com>	<4D24B8F0.9090404@callenish.com> <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com>
In-Reply-To: <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 05 Jan 2011 19:01:47 -0000

John Tamplin wrote:
> On Wed, Jan 5, 2011 at 1:31 PM, Bruce Atherton <bruce@callenish.com 
> <mailto:bruce@callenish.com>> wrote:

> If you control both ends, then why do you need WebSocket at all, 
> rather than just using TCP directly?

Because many messaging protocols need a framing layer and a standard 
basic framing protocol is a useful thing. Instead of every application 
rolling its own framing protocol (and API and network layer), people 
writing their messaging protocol can concentrate on the messages and 
leave the network stuff and framing to a common library.

It's basic layered software design.

(Server to browser is a whole different issue that is well beyond the 
scope of WebSockets, besides being a security nightmare.)

-- Scott

>
> In any case, it seems allowing such usage is beyond the current scope.
>
> -- 
> John A. Tamplin
> Software Engineer (GWT), Google
> ------------------------------------------------------------------------
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>   


From ietf@adambarth.com  Wed Jan  5 11:24:53 2011
Return-Path: <ietf@adambarth.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 00B633A6C74 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 11:24:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.014
X-Spam-Level: 
X-Spam-Status: No, score=-4.014 tagged_above=-999 required=5 tests=[AWL=-1.037, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 mQPrV+pxQAmZ for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 11:24:52 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id F0FDC3A6C17 for <hybi@ietf.org>; Wed,  5 Jan 2011 11:24:51 -0800 (PST)
Received: by qwi2 with SMTP id 2so152480qwi.31 for <hybi@ietf.org>; Wed, 05 Jan 2011 11:26:58 -0800 (PST)
Received: by 10.224.10.210 with SMTP id q18mr22091259qaq.122.1294255618698; Wed, 05 Jan 2011 11:26:58 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id t7sm12623975qcs.16.2011.01.05.11.26.56 (version=SSLv3 cipher=RC4-MD5); Wed, 05 Jan 2011 11:26:56 -0800 (PST)
Received: by iwn40 with SMTP id 40so16602397iwn.31 for <hybi@ietf.org>; Wed, 05 Jan 2011 11:26:55 -0800 (PST)
Received: by 10.231.19.138 with SMTP id a10mr7221074ibb.127.1294255615474; Wed, 05 Jan 2011 11:26:55 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Wed, 5 Jan 2011 11:26:24 -0800 (PST)
In-Reply-To: <4D245963.5030104@warmcat.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com>
From: Adam Barth <ietf@adambarth.com>
Date: Wed, 5 Jan 2011 11:26:24 -0800
Message-ID: <AANLkTinmD3iZ3wLp+75LdUQNOmt6=uxomhPfbadmwyqB@mail.gmail.com>
To: andy@warmcat.com
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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, 05 Jan 2011 19:24:53 -0000

On Wed, Jan 5, 2011 at 3:43 AM, Andy Green <andy@warmcat.com> wrote:
> On 01/05/11 09:57, Somebody in the thread at some point said:
>> My question is : why should we bother for those ? We're making a mess with
>> the WebSocket protocol just because we suspect that there might exist some
>> stupid developers who probably quickly wrote something they called a proxy
>> in just an afternoon for their own use. If such products exist they surely
>> are not waiting for WebSocket to be exploited (eg: chunked encoding or
>> multiple content-lengths are even harder to get right than
>> content-length).
>>
>> So couldn't we focus on more-or-less HTTP-compliant implementations only,
>> cover a few implementation bugs and stop bothering about the most unlikely
>> scenarii involving deliberate bugs ? At one point, we should not try to
>> fix what people deliberately broke for their own use.
>
> Couldn't agree more.
>
> Security of these alleged intermediaries is out of scope for websockets
> because they remain as exploitable as they ever were for packets on both
> sides of them no matter what needless evasive action websockets takes.
>
> Over-engineering websockets to death over a non-reproducible problem that
> websockets can't fix is crazy.
>
> What's needed is to rule trying to solve the unsolveable out of scope and
> finish up any problems from the real world left with -03.

The security goals of browser vendors are higher than that.  As a
general rule, browser vendors do not kick the security can down the
road.  The buck stops here.

Adam

From andy.warmcat.com@googlemail.com  Wed Jan  5 11:46:04 2011
Return-Path: <andy.warmcat.com@googlemail.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 3C7843A6C78 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 11:46:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.399
X-Spam-Level: 
X-Spam-Status: No, score=-3.399 tagged_above=-999 required=5 tests=[AWL=0.200,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 u3AntD9ojp8H for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 11:46:03 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id C4A3E3A6C17 for <hybi@ietf.org>; Wed,  5 Jan 2011 11:46:02 -0800 (PST)
Received: by wwa36 with SMTP id 36so15718629wwa.13 for <hybi@ietf.org>; Wed, 05 Jan 2011 11:48:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ezTU7Gas36vMgoi0vaivPAMIm3VI77gePy1fDxqI92g=; b=sWycR97kw4mlO711TgaEUn2WfVbl555l833HqSwWYzJzkfGC5zHk+Z8YZUjzoubBBm qNU+uTlerg//ARegL/FJzTbEg0b8faLc89I6rvYUd+I8tQAwvFo7fL0gBU0dHBKD6KL2 kZn5GNnA4k7axIq0ZQQBGeKkp0k2AUT+tmWDU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=Ns2nZFfhCAaPUhP9uYygzct4iFB4QUwwpZHtMcvQaEg0/vftxoTguMOK1sQpK0lPc5 zb5nRCq6nwUd171fSm7qbhJNZ/7nwx995saWhos9Cc7tvgCsKaGXvFwfGrlREtEhsafb d5SeSLyax8ikdbdJXQL9NsWn0ijwAnQLtl2b0=
Received: by 10.227.183.203 with SMTP id ch11mr13504322wbb.214.1294256886811;  Wed, 05 Jan 2011 11:48:06 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id m10sm16204901wbc.22.2011.01.05.11.47.59 (version=SSLv3 cipher=RC4-MD5); Wed, 05 Jan 2011 11:48:00 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D24CAEE.6060002@warmcat.com>
Date: Wed, 05 Jan 2011 19:47:58 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Adam Barth <ietf@adambarth.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <AANLkTinmD3iZ3wLp+75LdUQNOmt6=uxomhPfbadmwyqB@mail.gmail.com>
In-Reply-To: <AANLkTinmD3iZ3wLp+75LdUQNOmt6=uxomhPfbadmwyqB@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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, 05 Jan 2011 19:46:04 -0000

On 01/05/11 19:26, Somebody in the thread at some point said:

>> Security of these alleged intermediaries is out of scope for websockets
>> because they remain as exploitable as they ever were for packets on both
>> sides of them no matter what needless evasive action websockets takes.
>>
>> Over-engineering websockets to death over a non-reproducible problem that
>> websockets can't fix is crazy.
>>
>> What's needed is to rule trying to solve the unsolveable out of scope and
>> finish up any problems from the real world left with -03.
>
> The security goals of browser vendors are higher than that.  As a
> general rule, browser vendors do not kick the security can down the
> road.  The buck stops here.

The last couple of months appear to me to have been wasted with 
navelgazing trying to secure undefined broken intermediaries from attack 
by websockets, when websockets is not required to attack them.  In the 
meanwhile websockets are gone from Firefox by default exactly because 
the browser vendors don't want to be on the wrong side of security 
professionals finding they should have done something better and blaming 
them.

Actual security can be quite slippery and requires it to be well defined 
what it is that is trying to be secured from which attacks at what cost. 
  In this case, there is so much FUD about what the supposed problem is 
and what is needed to 'solve' it (again the problem is with the 
intermediary and cannot be solved by websockets; there is no definitive 
restestable problem scenario even) that the list appears to be reduced 
to a 'security jelly' talked into agreeing with the most forceful and 
aggressive-sounding proposals like AES munging.

In fact if the problem is real and misunderstood, and 'fixed' in the 
wrong place, that can be worse than useless.

 From what I read I didn't see any real outstanding problem that is 
websocket business that -03 and maybe the HELLO thing, and for sure 
wss:// don't already solve.

If you think that's incorrect, it should surely be possible to explain 
concisely what the problem is -- I mean really concisely -- and how it 
can be reproduced with normal, maintained and non-broken software in 
real use that makes it a websocket problem.

-Andy

From bruce@callenish.com  Wed Jan  5 11:47:17 2011
Return-Path: <bruce@callenish.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 B536E3A6C17 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 11:47:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.585
X-Spam-Level: 
X-Spam-Status: No, score=-2.585 tagged_above=-999 required=5 tests=[AWL=0.013,  BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 sYeJwSLHm4Oi for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 11:47:16 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id CB6743A6A7F for <hybi@ietf.org>; Wed,  5 Jan 2011 11:47:16 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PaZMI-0007uw-Qi for hybi@ietf.org; Wed, 05 Jan 2011 11:49:23 -0800
Message-ID: <4D24CB44.4070709@callenish.com>
Date: Wed, 05 Jan 2011 11:49:24 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <1293038752.2369.155.camel@ds9.ducksong.com> <4D24B8F0.9090404@callenish.com> <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com>
In-Reply-To: <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------080309020008090706060909"
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 05 Jan 2011 19:47:17 -0000

This is a multi-part message in MIME format.
--------------080309020008090706060909
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 05/01/2011 10:35 AM, John Tamplin wrote:
> AFAIK, there has been no discussion of allowing a server to initiate a 
> connection to the client.

Ok, forget about server to browser. Sorry I mentioned it, since it 
complicates the question about peer to peer.

>
> In any case, it seems allowing such usage is beyond the current scope.

It is fine if people want to declare that Websockets is a client/server 
protocol only. Like Scott, I would prefer to be able to reuse a 
Websockets library in peer to peer applications and have it take care of 
a bunch of details so I don't have to reinvent the wheel. But if you 
guys want to declare that Websockets is client/server only, then  fine. 
I'll just have to find another bidirectional protocol to use.

But I think a decision should be made whether to allow for peer to peer 
in the design because it has an effect on how this asymmetrical 
communication should be done.


--------------080309020008090706060909
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 05/01/2011 10:35 AM, John Tamplin wrote:
    <blockquote
      cite="mid:AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <div>AFAIK, there has been no discussion of allowing a server to
          initiate a connection to the client.</div>
      </div>
    </blockquote>
    <br>
    Ok, forget about server to browser. Sorry I mentioned it, since it
    complicates the question about peer to peer.<br>
    <br>
    <blockquote
      cite="mid:AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com"
      type="cite">
      <div class="gmail_quote"><br>
        <div>In any case, it seems allowing such usage is beyond the
          current scope.</div>
      </div>
    </blockquote>
    <br>
    It is fine if people want to declare that Websockets is a
    client/server protocol only. Like Scott, I would prefer to be able
    to reuse a Websockets library in peer to peer applications and have
    it take care of a bunch of details so I don't have to reinvent the
    wheel. But if you guys want to declare that Websockets is
    client/server only, thenÂ  fine. I'll just have to find another
    bidirectional protocol to use.<br>
    <br>
    But I think a decision should be made whether to allow for peer to
    peer in the design because it has an effect on how this asymmetrical
    communication should be done.<br>
    <br>
  </body>
</html>

--------------080309020008090706060909--

From jmason@rim.com  Wed Jan  5 11:48:02 2011
Return-Path: <jmason@rim.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 9A7BE3A6A7F for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 11:48:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.43
X-Spam-Level: 
X-Spam-Status: No, score=-5.43 tagged_above=-999 required=5 tests=[AWL=-0.227,  BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_MED=-4]
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 syq2HuDxT3p4 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 11:48:01 -0800 (PST)
Received: from mhs03ykf.rim.net (mhs03ykf.rim.net [216.9.243.80]) by core3.amsl.com (Postfix) with ESMTP id 82F013A6C78 for <hybi@ietf.org>; Wed,  5 Jan 2011 11:48:01 -0800 (PST)
X-AuditID: 0a401fcb-b7b7eae0000009ee-e2-4d24cb6f11c1
Received: from XHT109CNC.rim.net ( [10.65.12.218]) by mhs03ykf.rim.net (RIM Mail) with SMTP id 78.B2.02542.F6BC42D4; Wed,  5 Jan 2011 14:50:07 -0500 (EST)
Received: from XCH117CNC.rim.net ([fe80::b8df:541f:9d85:9909]) by XHT109CNC.rim.net ([fe80::8412:4d9e:eb55:2c7b%11]) with mapi; Wed, 5 Jan 2011 14:50:07 -0500
From: Joe Mason <jmason@rim.com>
To: "hybi@ietf.org" <hybi@ietf.org>
Date: Wed, 5 Jan 2011 14:50:33 -0500
Thread-Topic: Unbounded buffers in -76 handshake
Thread-Index: AcutEdB90tdmNIPqRNiwzNPET5Awtg==
Message-ID: <BB31C4AB95A70042A256109D4619912605B878F1@XCH117CNC.rim.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-cr-hashedpuzzle: dFg= AMSD BdtU Dy8X E30p FUmh FW6j FnOW HbMv IUAG IYmJ IkSE InzF Iv04 JRNG Kbfp; 1; aAB5AGIAaQBAAGkAZQB0AGYALgBvAHIAZwA=; Sosha1_v1; 7; {3364C269-0CF0-4A76-806C-8813B3326C70}; agBtAGEAcwBvAG4AQAByAGkAbQAuAGMAbwBtAA==; Wed, 05 Jan 2011 19:50:33 GMT; VQBuAGIAbwB1AG4AZABlAGQAIABiAHUAZgBmAGUAcgBzACAAaQBuACAALQA3ADYAIABoAGEAbgBkAHMAaABhAGsAZQA=
x-cr-puzzleid: {3364C269-0CF0-4A76-806C-8813B3326C70}
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
content-transfer-encoding: quoted-printable
MIME-Version: 1.0
X-Brightmail-Tracker: AAAAAgAAAZEXFZ3E
Subject: [hybi] Unbounded buffers in -76 handshake
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, 05 Jan 2011 19:48:02 -0000

I know the -76 handshake is obsolete, but I'm trying to close off a simple b=
ug in the existing WebKit implementation.

According to http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76#=
section-4.1, step 28, the client must:

	Read bytes from the server until either the connection closes, or a 0x0A by=
te is read. Let /field/ be 
	these bytes, including the 0x0A byte.

This means a server can easily run a client out of memory by sending an unbo=
unded string of bytes with no 0x0A.  The client is, by a strict reading, req=
uired to buffer all bytes received.  (Actually it's simple to code an equiva=
lent algorithm that only starts buffering after receiving 0x20, and buffers=
 at most 3 bytes, but let's stick with the algorithm as stated.)

The easy fix is to suggest a max buffer length.  (The spec already says, "Us=
er agents may apply a timeout to this step, failing the WebSocket connection=
 if the server does not send back data in a suitable time period."  A maximu=
m number of bytes to read is a logical extension.)  What would be a good val=
ue for the max length?  Is this worth adding to the spec as a quick fix whil=
e we're still discussing the updated handshake?

Joe

---------------------------------------------------------------------=0A=
This transmission (including any attachments) may contain confidential infor=
mation, privileged material (including material protected by the solicitor-c=
lient or other applicable privileges), or constitute non-public information.=
 Any use of this information by anyone other than the intended recipient is=
 prohibited. If you have received this transmission in error, please immedia=
tely reply to the sender and delete this information from your system. Use,=
 dissemination, distribution, or reproduction of this transmission by uninte=
nded recipients is not authorized and may be unlawful.

From jat@google.com  Wed Jan  5 12:06:10 2011
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 84B2D3A6CEC for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 12:06:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.944
X-Spam-Level: 
X-Spam-Status: No, score=-103.944 tagged_above=-999 required=5 tests=[AWL=-0.968, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 EZnNmdSP+lRO for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 12:06:09 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 8F7BB3A6A94 for <hybi@ietf.org>; Wed,  5 Jan 2011 12:06:09 -0800 (PST)
Received: from kpbe13.cbf.corp.google.com (kpbe13.cbf.corp.google.com [172.25.105.77]) by smtp-out.google.com with ESMTP id p05K8GAF024198 for <hybi@ietf.org>; Wed, 5 Jan 2011 12:08:16 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294258096; bh=zM5EuAj982BdZi/8ktOyC5Zdnww=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=JKcPzUatqLI8gmJt160rqJ8afSjY8YHUxkL2I3jBQgYrL0ydeg4A23KZ4BIZBEgFC 8dTXvEsTbFlbgm5fu7hkA==
Received: from ywf9 (ywf9.prod.google.com [10.192.6.9]) by kpbe13.cbf.corp.google.com with ESMTP id p05K7okE010501 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Wed, 5 Jan 2011 12:08:15 -0800
Received: by ywf9 with SMTP id 9so6794044ywf.11 for <hybi@ietf.org>; Wed, 05 Jan 2011 12:08:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=oJxyTmjr2TZpN+i5TKtDUpzu0HWW4zy0Zq5LKjwy/eQ=; b=RPvuO5S/lePtCpW/jliOV3sy87Grbo6TY1BBXjM1wP2QtHfOFRL9WeGhvTi1G18zOM sMvbLL4QvaKfioJTrVrw==
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=p0mveFHV8jzU28lAIT0rolX73h9lcO2RK8nRbnb2S1PN60w/iBeRyxAuDPF/y4zW25 Nzr1EdX0KR2cGOBdg/0g==
Received: by 10.151.85.10 with SMTP id n10mr22022234ybl.206.1294258094413; Wed, 05 Jan 2011 12:08:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 5 Jan 2011 12:07:54 -0800 (PST)
In-Reply-To: <4D24CB44.4070709@callenish.com>
References: <1293038752.2369.155.camel@ds9.ducksong.com> <4D24B8F0.9090404@callenish.com> <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com> <4D24CB44.4070709@callenish.com>
From: John Tamplin <jat@google.com>
Date: Wed, 5 Jan 2011 15:07:54 -0500
Message-ID: <AANLkTi=JPo8+axtDNuDZ3ntQThnzvk-7FibTTXB_x5OV@mail.gmail.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: multipart/alternative; boundary=000e0cd56944f7168704991ef1af
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 05 Jan 2011 20:06:10 -0000

--000e0cd56944f7168704991ef1af
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 5, 2011 at 2:49 PM, Bruce Atherton <bruce@callenish.com> wrote:

> It is fine if people want to declare that Websockets is a client/server
> protocol only. Like Scott, I would prefer to be able to reuse a Websockets
> library in peer to peer applications and have it take care of a bunch of
> details so I don't have to reinvent the wheel. But if you guys want to
> declare that Websockets is client/server only, then  fine. I'll just have to
> find another bidirectional protocol to use.
>
> But I think a decision should be made whether to allow for peer to peer in
> the design because it has an effect on how this asymmetrical communication
> should be done.
>

Since much of the contentious things about WebSockets comes about precisely
because of its requirements of being used by browsers running untrusted code
and reusing existing HTTP infrastructure, it seems unlikely you would want
to use all of WebSockets for something that did not have those requirements.
 If you want to re-use the framing, that is fine, and you can simply say
that you use the unmasked framing for both sides of your application.

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

--000e0cd56944f7168704991ef1af
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 5, 2011 at 2:49 PM, Bruce Atherton <=
span dir=3D"ltr">&lt;<a href=3D"mailto:bruce@callenish.com">bruce@callenish=
.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



 =20
   =20
 =20
  <div bgcolor=3D"#ffffff" text=3D"#000000"><div class=3D"im">It is fine if=
 people want to declare that Websockets is a
    client/server protocol only. Like Scott, I would prefer to be able
    to reuse a Websockets library in peer to peer applications and have
    it take care of a bunch of details so I don&#39;t have to reinvent the
    wheel. But if you guys want to declare that Websockets is
    client/server only, then=C2=A0 fine. I&#39;ll just have to find another
    bidirectional protocol to use.</div>
    <br>
    But I think a decision should be made whether to allow for peer to
    peer in the design because it has an effect on how this asymmetrical
    communication should be done.<br></div></blockquote></div><div><br></di=
v>Since much of the contentious things about WebSockets comes about precise=
ly because of its requirements of being used by browsers running untrusted =
code and reusing existing HTTP infrastructure, it seems unlikely you would =
want to use all of WebSockets for something that did not have those require=
ments. =C2=A0If you want to re-use the framing, that is fine, and you can s=
imply say that you use the unmasked framing for both sides of your applicat=
ion.<br clear=3D"all">

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

--000e0cd56944f7168704991ef1af--

From salvatore.loreto@ericsson.com  Wed Jan  5 12:24:32 2011
Return-Path: <salvatore.loreto@ericsson.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 2F1043A6CF0 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 12:24:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.545
X-Spam-Level: 
X-Spam-Status: No, score=-106.545 tagged_above=-999 required=5 tests=[AWL=0.054, BAYES_00=-2.599, 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 v9h9f6M1iEia for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 12:24:31 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id AF9643A6CEC for <hybi@ietf.org>; Wed,  5 Jan 2011 12:24:30 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-61-4d24d3fc724f
Received: from esessmw0197.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id F0.6C.13987.CF3D42D4; Wed,  5 Jan 2011 21:26:36 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0197.eemea.ericsson.se (153.88.115.88) with Microsoft SMTP Server id 8.2.234.1; Wed, 5 Jan 2011 21:26:36 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 3F8E92975	for <hybi@ietf.org>; Wed,  5 Jan 2011 22:26:36 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id EDB6B500F8	for <hybi@ietf.org>; Wed,  5 Jan 2011 22:26:35 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 8127C4FBC1	for <hybi@ietf.org>; Wed,  5 Jan 2011 22:26:35 +0200 (EET)
Message-ID: <4D24D3FB.8040202@ericsson.com>
Date: Wed, 5 Jan 2011 21:26:35 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com>
In-Reply-To: <4D245963.5030104@warmcat.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] A bit of pragmatism
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, 05 Jan 2011 20:24:32 -0000

On 1/5/11 12:43 PM, Andy Green wrote:
> On 01/05/11 09:57, Somebody in the thread at some point said:
>
> Hi -
>
>> My question is : why should we bother for those ? We're making a mess with
>> the WebSocket protocol just because we suspect that there might exist some
>> stupid developers who probably quickly wrote something they called a proxy
>> in just an afternoon for their own use. If such products exist they surely
>> are not waiting for WebSocket to be exploited (eg: chunked encoding or
>> multiple content-lengths are even harder to get right than content-length).
>>
>> So couldn't we focus on more-or-less HTTP-compliant implementations only,
>> cover a few implementation bugs and stop bothering about the most unlikely
>> scenarii involving deliberate bugs ? At one point, we should not try to
>> fix what people deliberately broke for their own use.
> Couldn't agree more.
>
> Security of these alleged intermediaries is out of scope for websockets
> because they remain as exploitable as they ever were for packets on both
> sides of them no matter what needless evasive action websockets takes.
> Over-engineering websockets to death over a non-reproducible problem
> that websockets can't fix is crazy.

here we are not talking of use WebSocket to fix the problems in the 
intermediaries,
but to design the protocol in a way that can not be used to generate 
attacks against another resource.

IETF encourages people

  "to consider security in their designs and to inform the reader of relevant security issues"

( http://www.ietf.org/rfc/rfc3552.txt )

/Sal


-- 
Salvatore Loreto
www.sloreto.com


> What's needed is to rule trying to solve the unsolveable out of scope
> and finish up any problems from the real world left with -03.



> -Andy
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi



From andy.warmcat.com@googlemail.com  Wed Jan  5 12:32:54 2011
Return-Path: <andy.warmcat.com@googlemail.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 4F3E53A6CF0 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 12:32:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.432
X-Spam-Level: 
X-Spam-Status: No, score=-3.432 tagged_above=-999 required=5 tests=[AWL=0.167,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 XdK0zZ91MvSp for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 12:32:53 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id DC0243A6C78 for <hybi@ietf.org>; Wed,  5 Jan 2011 12:32:52 -0800 (PST)
Received: by wwa36 with SMTP id 36so15764014wwa.13 for <hybi@ietf.org>; Wed, 05 Jan 2011 12:34:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=F79oCaR7bXrBQCpdYWQDp3Jgi/5fIi+Pb18a7IUqM2Y=; b=P3nw0EYJGzjqBbWojEYBLVfRE9okBukv73VBIvBPwW6KwxtxjIQGIoapIP3kmU2hxi mhK8+v+shg/hma2LKMUYZyB0jA2DoKAbRV5rRT2KM+UeDV/kcWUPvN7EqXuvgKZR3b5m sOY+7pMHo3n3fwHuf4laoQRGC/suFjtSZh/Gs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=ZYXD/6Rby2tvYxAeGiefUoIYDmQn/P+2cn2FSH5hJnF82VM0eeDLVkbnctQ7Z4HNlM XPyzPm6KraFTLFXpdXoHGE37Vi28KqocOjq7FJVEYq7NYIrkPU4gBAl3VsZfQJW5F3Ac t9piyPvlkgtFnOf6GPUdyvWb69ZbH1G814K18=
Received: by 10.227.98.94 with SMTP id p30mr5485191wbn.152.1294259685194; Wed, 05 Jan 2011 12:34:45 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id q18sm16232258wbe.5.2011.01.05.12.34.42 (version=SSLv3 cipher=RC4-MD5); Wed, 05 Jan 2011 12:34:43 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D24D5E1.7070309@warmcat.com>
Date: Wed, 05 Jan 2011 20:34:41 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com>
In-Reply-To: <4D24D3FB.8040202@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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, 05 Jan 2011 20:32:54 -0000

On 01/05/11 20:26, Somebody in the thread at some point said:

> here we are not talking of use WebSocket to fix the problems in the
> intermediaries,
> but to design the protocol in a way that can not be used to generate
> attacks against another resource.

What exactly is the attack scenario that -03 is enabling?

What is being attacked, how can I reproduce it?  When I understood the 
mechanism, how can I satisfy myself that websockets was the right place 
to solve it when netcat and many other tools makes nice packets?

Because it seems to me we have been sat here doing the equivalent of 
fixing the PHP bug for them by disallowing the literal 
2.2250738585072011e-308 in websocket traffic, while inviting passers-by 
to "feel our security muscle".

-Andy

From jat@google.com  Wed Jan  5 12:58:36 2011
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 AE3853A6C78 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 12:58:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.626
X-Spam-Level: 
X-Spam-Status: No, score=-103.626 tagged_above=-999 required=5 tests=[AWL=-1.250, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_37=0.6, RCVD_IN_DNSWL_LOW=-1, 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 CBtaEgxQc+HO for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 12:58:35 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 6852E3A6C15 for <hybi@ietf.org>; Wed,  5 Jan 2011 12:58:35 -0800 (PST)
Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id p05L0fro020678 for <hybi@ietf.org>; Wed, 5 Jan 2011 13:00:41 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294261241; bh=Fq8cqV4UbGM7cYoBIgciWgDnqNY=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Z6f1gGc8lnNDnvP46k0OzVo0ZGUdnA13ynGmGnTEQhNUsrl4aYFp1jFC76bfwASbp t9Xrpi9JBRKudoutP+JdQ==
Received: from gxk28 (gxk28.prod.google.com [10.202.11.28]) by wpaz17.hot.corp.google.com with ESMTP id p05KxfRu023773 for <hybi@ietf.org>; Wed, 5 Jan 2011 13:00:40 -0800
Received: by gxk28 with SMTP id 28so7329583gxk.31 for <hybi@ietf.org>; Wed, 05 Jan 2011 13:00:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=ofBaSLkMFngOAHzBEQsGbm1Zoil2rrxqvy9qYf5LDxA=; b=IUkccDNT3kW7cICxi+wGESI2hjCslUA+yWI+rkM+ddludtEIguT91b97xlW7e50Rgx Nhvld0drD8ikaA5XodyQ==
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=geW88fumdOxt9XZrAIU3K1oHUHdW6M/94FVvh8xFuh3hcwnD9W0xsZPzM7KeRLbjlL HRZWP0MRgiSFMwsIBB1g==
Received: by 10.151.158.12 with SMTP id k12mr22238736ybo.377.1294261240312; Wed, 05 Jan 2011 13:00:40 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 5 Jan 2011 13:00:20 -0800 (PST)
In-Reply-To: <4D24D5E1.7070309@warmcat.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com>
From: John Tamplin <jat@google.com>
Date: Wed, 5 Jan 2011 16:00:20 -0500
Message-ID: <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com>
To: andy@warmcat.com
Content-Type: multipart/alternative; boundary=00151750dd4279b35f04991fad00
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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, 05 Jan 2011 20:58:36 -0000

--00151750dd4279b35f04991fad00
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 5, 2011 at 3:34 PM, Andy Green <andy@warmcat.com> wrote:

> On 01/05/11 20:26, Somebody in the thread at some point said:
>
>  here we are not talking of use WebSocket to fix the problems in the
>> intermediaries,
>> but to design the protocol in a way that can not be used to generate
>> attacks against another resource.
>>
>
> What exactly is the attack scenario that -03 is enabling?



What is being attacked, how can I reproduce it?  When I understood the
> mechanism, how can I satisfy myself that websockets was the right place to
> solve it when netcat and many other tools makes nice packets?



Because it seems to me we have been sat here doing the equivalent of fixing
> the PHP bug for them by disallowing the literal 2.2250738585072011e-308 in
> websocket traffic, while inviting passers-by to "feel our security muscle".


I'll try and summarize -- if in doubt, read the full paper Adam posted a
link to.

An attacker controls a server and JS code running in the client.  The JS
code establishes a WebSocket connection to that server that happens to pass
through a transparent HTTP proxy.  After establishing the connection, the
attacker sends WebSocket payload in each direction taking advantage of
proxies which do not understand WebSockets (or even GET+Upgrade) and think
the HTTP request is done when the server responds to the handshake, thus
interpreting further contents on the connection as HTTP requests/responses.
 The attacker can then make use of tricks to get the proxy to store
attacker-controlled data into its cache, which essentially creates an XSS
attack against every user behind that proxy (for example, consider getting
your contents returned for google.com/ga.js from the proxy).

The paper does not demonstrate an attack against the -03 protocol, but it
does raise enough questions about the possibility of such an attack that
Firefox and Opera deemed it prudent to disable WebSockets until this is
fixed.  It is difficult to give you exact reproduction mechanisms, since by
their nature transparent proxies are not directly visible and can not be
communicated with directly.  Since there are clearly some proxies which do
not understand GET+Upgrade to be changing the type of the connection, the
options are to not use it (CONNECT was suggested but there was substantial
objection), create roadblocks in the handshake or framing and hope they are
sufficient, or to prevent the attacker from controlling any payload bytes
from the client (no masking is needed on the server since the attacker is
already assumed to control it and can thus send anything it wants in
response, including non-WebSocket messages).  Option #1 seems unlikely to
gain consensus, #2 seems hard to reason about how safe it is (since for
example, such proxies might well skip garbage between HTTP messages), while
#3 seems provably secure at relatively low cost.  Hence, that is why we
appear to be close to achieving consensus on masking the client->server
frames.

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

--00151750dd4279b35f04991fad00
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 5, 2011 at 3:34 PM, Andy Green <span=
 dir=3D"ltr">&lt;<a href=3D"mailto:andy@warmcat.com">andy@warmcat.com</a>&g=
t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">On 01/05/11 20:26, Somebody in the thread at some point s=
aid:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
here we are not talking of use WebSocket to fix the problems in the<br>
intermediaries,<br>
but to design the protocol in a way that can not be used to generate<br>
attacks against another resource.<br>
</blockquote>
<br></div>
What exactly is the attack scenario that -03 is enabling?=C2=A0=C2=A0</bloc=
kquote><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-=
left:1px #ccc solid;padding-left:1ex;">=C2=A0</blockquote><blockquote class=
=3D"gmail_quote" style=3D"margin-top: 0px; margin-right: 0px; margin-bottom=
: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(2=
04, 204, 204); border-left-style: solid; padding-left: 1ex; ">

What is being attacked, how can I reproduce it? =C2=A0When I understood the=
 mechanism, how can I satisfy myself that websockets was the right place to=
 solve it when netcat and many other tools makes nice packets?=C2=A0</block=
quote>

<blockquote class=3D"gmail_quote" style=3D"margin-top: 0px; margin-right: 0=
px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-=
left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex=
; ">

=C2=A0</blockquote><blockquote class=3D"gmail_quote" style=3D"margin-top: 0=
px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-=
width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid=
; padding-left: 1ex; ">

Because it seems to me we have been sat here doing the equivalent of fixing=
 the PHP bug for them by disallowing the literal 2.2250738585072011e-308 in=
 websocket traffic, while inviting passers-by to &quot;feel our security mu=
scle&quot;.</blockquote>

<div><div></div></div><div>=C2=A0</div><div>I&#39;ll try and summarize -- i=
f in doubt, read the full paper Adam posted a link to.=C2=A0</div><div><br>=
</div><div>An attacker controls a server and JS code running in the client.=
 =C2=A0The JS code establishes a WebSocket connection to that server that h=
appens to pass through a transparent HTTP proxy. =C2=A0After establishing t=
he connection, the attacker sends WebSocket payload in each direction takin=
g advantage of proxies which do not understand WebSockets (or even GET+Upgr=
ade) and think the HTTP request is done when the server responds to the han=
dshake, thus interpreting further contents on the connection as HTTP reques=
ts/responses. =C2=A0The attacker can then make use of tricks to get the pro=
xy to store attacker-controlled data into its cache, which essentially crea=
tes an XSS attack against every user behind that proxy (for example, consid=
er getting your contents returned for <a href=3D"http://google.com/ga.js">g=
oogle.com/ga.js</a> from the proxy).</div>

<div><br></div><div>The paper does not demonstrate an attack against the -0=
3 protocol, but it does raise enough questions about the possibility of suc=
h an attack that Firefox and Opera deemed it prudent to disable WebSockets =
until this is fixed. =C2=A0It is difficult to give you exact reproduction m=
echanisms, since by their nature transparent proxies are not directly visib=
le and can not be communicated with directly. =C2=A0Since there are clearly=
 some proxies which do not understand GET+Upgrade to be changing the type o=
f the connection, the options are to not use it (CONNECT was suggested but =
there was substantial objection), create roadblocks in the handshake or fra=
ming and hope they are sufficient, or to prevent the attacker from controll=
ing any payload bytes from the client (no masking is needed on the server s=
ince the attacker is already assumed to control it and can thus send anythi=
ng it wants in response, including non-WebSocket messages). =C2=A0Option #1=
 seems unlikely to gain consensus, #2 seems hard to reason about how safe i=
t is (since for example, such proxies might well skip garbage between HTTP =
messages), while #3 seems provably secure at relatively low cost. =C2=A0Hen=
ce, that is why we appear to be close to achieving consensus on masking the=
 client-&gt;server frames.</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--00151750dd4279b35f04991fad00--

From andy.warmcat.com@googlemail.com  Wed Jan  5 13:10:32 2011
Return-Path: <andy.warmcat.com@googlemail.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 6C2833A6D0E for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 13:10:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.456
X-Spam-Level: 
X-Spam-Status: No, score=-3.456 tagged_above=-999 required=5 tests=[AWL=0.143,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 iAPGzRDvMeDU for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 13:10:31 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id CCF5A3A6D0D for <hybi@ietf.org>; Wed,  5 Jan 2011 13:10:30 -0800 (PST)
Received: by wyf23 with SMTP id 23so16452826wyf.31 for <hybi@ietf.org>; Wed, 05 Jan 2011 13:12:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=4fVDupK6IOuYUKrmGQYxaW/lC0OIb1Pmgz45nmCopcg=; b=sys0byRr26hT6eo0QXVp/4azhmbvUBd71KZZy+m39ErJrntaIFNWBpt1gGhvqBWGWJ WSPNh4qPzJh96nPeV21jUoxXxicTftqc2A5nbh44UlL7ZaIhxELo5mS+NuGvEEV7YSRc zEAv8rU9U497FX5LJyUC7fKPCAYw+zEtuAkR4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=CZqMIoG8djkyW8T+QvvrIOV5EQ8BhKMrDnBoXSJ+lNrMze7cTFZrhN/0aVutXWfNAs A5ADy7uhRctWF/GpwBYNdX2aSW4SMHMFGY/Z24s/MZq+sb7qnOiCGHQAc8qwkIXyh5k+ VkdWavcugje5baNXDUB3MTfv7TyuDur6A2l2c=
Received: by 10.227.177.15 with SMTP id bg15mr1971670wbb.150.1294261938226; Wed, 05 Jan 2011 13:12:18 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id 11sm16257440wbj.13.2011.01.05.13.12.15 (version=SSLv3 cipher=RC4-MD5); Wed, 05 Jan 2011 13:12:16 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D24DEAE.8070007@warmcat.com>
Date: Wed, 05 Jan 2011 21:12:14 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: John Tamplin <jat@google.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com>
In-Reply-To: <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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, 05 Jan 2011 21:10:32 -0000

On 01/05/11 21:00, Somebody in the thread at some point said:

>>     What exactly is the attack scenario that -03 is enabling?

> connection, the attacker sends WebSocket payload in each direction
> taking advantage of proxies which do not understand WebSockets (or even
> GET+Upgrade) and think the HTTP request is done when the server responds

Understood.  But just like the PHP bug, what is the point of 'solving' 
this in websocket protocol?  The proxy is still sat there allegedly open 
to poisoning from similar-looking non-websocket packets, just like the 
PHP server is still sitting there waiting for something else to send it 
the constant of death.  Nothing is made "more secure" by having 
websockets in particular escape the equivalent of the PHP floating point 
constant.

In short, why is it a websocket problem when the attacker who controls 
the server can have it send other kinds of scripts that can open sockets 
and do the same attack?  The only solution is to close the hole in the 
proxy and fix the thing that is broken because it will otherwise remain 
broken and open to abuse no matter what websockets did.

> provably secure at relatively low cost.  Hence, that is why we appear to
> be close to achieving consensus on masking the client->server frames.

No, nothing got made "provably secure".  The proxy is allegedly still 
sat there waiting to be poisoned because it is supposedly still as 
broken as it ever was awaiting exploitation.  You can say, "that's not 
our problem" and you'd be right, none of it is a websocket issue 
including the proposed pointless munging action.  It's an alleged 
'broken exploitable proxy' issue.

-Andy

From jat@google.com  Wed Jan  5 13:32:00 2011
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 E5BFD3A6E12 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 13:32:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.532
X-Spam-Level: 
X-Spam-Status: No, score=-104.532 tagged_above=-999 required=5 tests=[AWL=-2.556, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, 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 LtkbUBncBWx7 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 13:32:00 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 5CB733A6DDB for <hybi@ietf.org>; Wed,  5 Jan 2011 13:31:59 -0800 (PST)
Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id p05LY5nS029693 for <hybi@ietf.org>; Wed, 5 Jan 2011 13:34:05 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294263245; bh=ldAnDm5bjjVNZ80eEdvK8UQ02EE=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=t8R4xYYDZ+ztqpsyL4crmVUpgEiC2N22qmStnyPFGWA1SkepNsK8ErcjuTrA9Wow5 kWlNhMRWrvpJSsPXyrjng==
Received: from gwj20 (gwj20.prod.google.com [10.200.10.20]) by wpaz13.hot.corp.google.com with ESMTP id p05LXfnK023446 for <hybi@ietf.org>; Wed, 5 Jan 2011 13:34:04 -0800
Received: by gwj20 with SMTP id 20so6674568gwj.36 for <hybi@ietf.org>; Wed, 05 Jan 2011 13:34:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=XCZ3UnfOojjnKr03PB4zsEn9ekE9irCNUTx8dkUFtuM=; b=Q1WAv/CFgSDwxSVvX1rFU26hEXRasaefS9Q5ScaVOXRlN0G/u2yEa3zMuReYzhq9FA n5AncOfqDN2eC27wsHeg==
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=vVN/RLUT9iQ5lqjo9LteVRU1ORpM20C7Em25H7P+hAOFqQHL1/LLAmRu9fcYiuB/wo RlrSB8h01Qk+XcXvZLdA==
Received: by 10.150.192.12 with SMTP id p12mr22946374ybf.263.1294263243499; Wed, 05 Jan 2011 13:34:03 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 5 Jan 2011 13:33:42 -0800 (PST)
In-Reply-To: <4D24DEAE.8070007@warmcat.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com>
From: John Tamplin <jat@google.com>
Date: Wed, 5 Jan 2011 16:33:42 -0500
Message-ID: <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com>
To: andy@warmcat.com
Content-Type: multipart/alternative; boundary=000e0cd6b11cdfe96d0499202439
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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, 05 Jan 2011 21:32:01 -0000

--000e0cd6b11cdfe96d0499202439
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 5, 2011 at 4:12 PM, Andy Green <andy@warmcat.com> wrote:

> Understood.  But just like the PHP bug, what is the point of 'solving' this
> in websocket protocol?  The proxy is still sat there allegedly open to
> poisoning from similar-looking non-websocket packets, just like the PHP
> server is still sitting there waiting for something else to send it the
> constant of death.  Nothing is made "more secure" by having websockets in
> particular escape the equivalent of the PHP floating point constant.
>

The browser does not currently allow arbitrary traffic in a non-HTTP
framing, which WebSockets does.  Sure, if you can convince a client to
download your code that does that and run it locally (which is essentially
how Flash/Java were also exploitable for this exact problem and why there
was a delay in releasing the details), then you can perform this (and many
other) attacks.  However, you don't do that by just browsing to a web site.


> In short, why is it a websocket problem when the attacker who controls the
> server can have it send other kinds of scripts that can open sockets and do
> the same attack?  The only solution is to close the hole in the proxy and
> fix the thing that is broken because it will otherwise remain broken and
> open to abuse no matter what websockets did.


If WebSockets were using HTTP framing throughout (such as chunked encoding
in both directions), then yes that would be the case -- but it isn't, which
means that WebSockets as of -03 opens new attack vectors that are not there
by other current means.

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

--000e0cd6b11cdfe96d0499202439
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 5, 2011 at 4:12 PM, Andy Green <span=
 dir=3D"ltr">&lt;<a href=3D"mailto:andy@warmcat.com">andy@warmcat.com</a>&g=
t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">Understood. =C2=A0But just like the PHP bug, what is the =
point of &#39;solving&#39; this in websocket protocol? =C2=A0The proxy is s=
till sat there allegedly open to poisoning from similar-looking non-websock=
et packets, just like the PHP server is still sitting there waiting for som=
ething else to send it the constant of death. =C2=A0Nothing is made &quot;m=
ore secure&quot; by having websockets in particular escape the equivalent o=
f the PHP floating point constant.</div>

</blockquote><div><br></div><div>The browser does not currently allow arbit=
rary traffic in a non-HTTP framing, which WebSockets does. =C2=A0Sure, if y=
ou can convince a client to download your code that does that and run it lo=
cally (which is essentially how Flash/Java were also exploitable for this e=
xact problem and why there was a delay in releasing the details), then you =
can perform this (and many other) attacks. =C2=A0However, you don&#39;t do =
that by just browsing to a web site.</div>

<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex;">
In short, why is it a websocket problem when the attacker who controls the =
server can have it send other kinds of scripts that can open sockets and do=
 the same attack? =C2=A0The only solution is to close the hole in the proxy=
 and fix the thing that is broken because it will otherwise remain broken a=
nd open to abuse no matter what websockets did.</blockquote>

<div><br></div><div>If WebSockets were using HTTP framing throughout (such =
as chunked encoding in both directions), then yes that would be the case --=
 but it isn&#39;t, which means that WebSockets as of -03 opens new attack v=
ectors that are not there by other current means.</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--000e0cd6b11cdfe96d0499202439--

From jat@google.com  Wed Jan  5 13:33:30 2011
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 792713A6DDB for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 13:33:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.488
X-Spam-Level: 
X-Spam-Status: No, score=-104.488 tagged_above=-999 required=5 tests=[AWL=-2.512, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, 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 I7laVzqaQQdV for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 13:33:29 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 651853A6D28 for <hybi@ietf.org>; Wed,  5 Jan 2011 13:33:29 -0800 (PST)
Received: from hpaq13.eem.corp.google.com (hpaq13.eem.corp.google.com [172.25.149.13]) by smtp-out.google.com with ESMTP id p05LZZ1A017833 for <hybi@ietf.org>; Wed, 5 Jan 2011 13:35:35 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294263335; bh=jiD6KXuJwNALQ/4srC63bmvKEH4=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=eKmRHAmvhdp4AyhfyCj87y0GRJtNBfEluUHXzeNZ6MHjpfXhRskUXNFTyvZai8ozT d62+/vPp6ZevOAbDAmJZA==
Received: from gwb11 (gwb11.prod.google.com [10.200.2.11]) by hpaq13.eem.corp.google.com with ESMTP id p05LZY4k005798 for <hybi@ietf.org>; Wed, 5 Jan 2011 13:35:34 -0800
Received: by gwb11 with SMTP id 11so7365644gwb.11 for <hybi@ietf.org>; Wed, 05 Jan 2011 13:35:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=FPh4QJJb3prIcejxZf3xh57yeGcBFKa+w41aOd+k/M0=; b=uffFJs2CnZBVoVJ36aQspW1C4T+PYOWeWYUfcd7F+BfrHnEXo6IYJlyMF8J4vDETr8 8MEZEe7txpQ/FmSquGDw==
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=jqNYXCQIDbdTs8btO4/7kILWKIwd4uUutc/S3a3fK+4uyTtPd3qXr0Ms/F/oXBqGoI YpHJpjGLj1tG3hqlTYZA==
Received: by 10.151.85.10 with SMTP id n10mr22137949ybl.206.1294263333910; Wed, 05 Jan 2011 13:35:33 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 5 Jan 2011 13:35:13 -0800 (PST)
In-Reply-To: <4D24DEAE.8070007@warmcat.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com>
From: John Tamplin <jat@google.com>
Date: Wed, 5 Jan 2011 16:35:13 -0500
Message-ID: <AANLkTinWrSL5ON3c2W-6qUZQ7voS7tEzoUoVxB3PgbFN@mail.gmail.com>
To: andy@warmcat.com
Content-Type: multipart/alternative; boundary=000e0cd5694443779e0499202a43
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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, 05 Jan 2011 21:33:30 -0000

--000e0cd5694443779e0499202a43
Content-Type: text/plain; charset=UTF-8

[sent too soon]

On Wed, Jan 5, 2011 at 4:12 PM, Andy Green <andy@warmcat.com> wrote:

> No, nothing got made "provably secure".  The proxy is allegedly still sat
> there waiting to be poisoned because it is supposedly still as broken as it
> ever was awaiting exploitation.  You can say, "that's not our problem" and
> you'd be right, none of it is a websocket issue including the proposed
> pointless munging action.  It's an alleged 'broken exploitable proxy' issue.
>

If the attacker cannot control the bytes of the WebSocket payload, the
attacker cannot exploit it by including fake HTTP messages.

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

--000e0cd5694443779e0499202a43
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">[sent too soon]</div><div class=3D"gmail_quote">=
<br></div><div class=3D"gmail_quote">On Wed, Jan 5, 2011 at 4:12 PM, Andy G=
reen <span dir=3D"ltr">&lt;<a href=3D"mailto:andy@warmcat.com">andy@warmcat=
.com</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div class=3D"im">No, nothing got made &quo=
t;provably secure&quot;. =C2=A0The proxy is allegedly still sat there waiti=
ng to be poisoned because it is supposedly still as broken as it ever was a=
waiting exploitation. =C2=A0You can say, &quot;that&#39;s not our problem&q=
uot; and you&#39;d be right, none of it is a websocket issue including the =
proposed pointless munging action. =C2=A0It&#39;s an alleged &#39;broken ex=
ploitable proxy&#39; issue.</div>

</blockquote></div><br>If the attacker cannot control the bytes of the WebS=
ocket payload, the attacker cannot exploit it by including fake HTTP messag=
es.<br clear=3D"all"><br>-- <br>John A. Tamplin<br>Software Engineer (GWT),=
 Google<br>



--000e0cd5694443779e0499202a43--

From bruce@callenish.com  Wed Jan  5 16:24:23 2011
Return-Path: <bruce@callenish.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 A98663A6DC6 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 16:24:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.586
X-Spam-Level: 
X-Spam-Status: No, score=-2.586 tagged_above=-999 required=5 tests=[AWL=0.013,  BAYES_00=-2.599]
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 kETpZMwdovv4 for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 16:24:22 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id C52663A6D79 for <hybi@ietf.org>; Wed,  5 Jan 2011 16:24:22 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PadgS-0007Xk-Jg for hybi@ietf.org; Wed, 05 Jan 2011 16:26:28 -0800
Message-ID: <4D250C37.4040505@callenish.com>
Date: Wed, 05 Jan 2011 16:26:31 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <1293038752.2369.155.camel@ds9.ducksong.com> <4D24B8F0.9090404@callenish.com> <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com> <4D24CB44.4070709@callenish.com> <AANLkTi=JPo8+axtDNuDZ3ntQThnzvk-7FibTTXB_x5OV@mail.gmail.com>
In-Reply-To: <AANLkTi=JPo8+axtDNuDZ3ntQThnzvk-7FibTTXB_x5OV@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Thu, 06 Jan 2011 00:24:23 -0000

On 05/01/2011 12:07 PM, John Tamplin wrote:
>
> Since much of the contentious things about WebSockets comes about 
> precisely because of its requirements of being used by browsers 
> running untrusted code and reusing existing HTTP infrastructure, it 
> seems unlikely you would want to use all of WebSockets for something 
> that did not have those requirements.  If you want to re-use the 
> framing, that is fine, and you can simply say that you use the 
> unmasked framing for both sides of your application.

Unfortunately, as I said before, that is fine if you control your 
infrastructure. But not all of us are deploying in environments that are 
set up by design to allow the free exchange of protobufs. A bastardized 
version of Websockets will not pass through any intermediaries that 
unmask and remask, and will fill the error logs of any that peek into 
the frames to do things like analytics or logging or filtering.

It sounds like there is a laser focus of scope for the hybi working 
group on just the interactions between browser and server, and that any 
other usecase need not apply. If that is the case, I will stop bringing 
up considerations of other situations such as standalone clients, the 
server being the client to another server, or two peers communicating 
with Websockets, since they all appear to be out of scope for the WG.


From ietf@adambarth.com  Wed Jan  5 20:11:05 2011
Return-Path: <ietf@adambarth.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 C319D3A6EBC for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 20:11:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.499
X-Spam-Level: 
X-Spam-Status: No, score=-3.499 tagged_above=-999 required=5 tests=[AWL=-1.522, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 OZDOIyaVIrZZ for <hybi@core3.amsl.com>; Wed,  5 Jan 2011 20:11:04 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id CC07A3A6EBA for <hybi@ietf.org>; Wed,  5 Jan 2011 20:11:03 -0800 (PST)
Received: by yie19 with SMTP id 19so4802281yie.31 for <hybi@ietf.org>; Wed, 05 Jan 2011 20:13:10 -0800 (PST)
Received: by 10.150.50.6 with SMTP id x6mr22372926ybx.381.1294287190224; Wed, 05 Jan 2011 20:13:10 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id p32sm11934693ybk.8.2011.01.05.20.13.08 (version=SSLv3 cipher=RC4-MD5); Wed, 05 Jan 2011 20:13:09 -0800 (PST)
Received: by iyi42 with SMTP id 42so15833938iyi.31 for <hybi@ietf.org>; Wed, 05 Jan 2011 20:13:07 -0800 (PST)
Received: by 10.231.85.137 with SMTP id o9mr7839774ibl.27.1294287187923; Wed, 05 Jan 2011 20:13:07 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Wed, 5 Jan 2011 20:12:37 -0800 (PST)
In-Reply-To: <4D24CAEE.6060002@warmcat.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <AANLkTinmD3iZ3wLp+75LdUQNOmt6=uxomhPfbadmwyqB@mail.gmail.com> <4D24CAEE.6060002@warmcat.com>
From: Adam Barth <ietf@adambarth.com>
Date: Wed, 5 Jan 2011 20:12:37 -0800
Message-ID: <AANLkTimkAG1Sk1o6u+SPLkxSfT4zg3ruqruLBGoo_UxS@mail.gmail.com>
To: andy@warmcat.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Thu, 06 Jan 2011 04:11:05 -0000

On Wed, Jan 5, 2011 at 11:47 AM, Andy Green <andy@warmcat.com> wrote:
> On 01/05/11 19:26, Somebody in the thread at some point said:
>>> Security of these alleged intermediaries is out of scope for websockets
>>> because they remain as exploitable as they ever were for packets on bot=
h
>>> sides of them no matter what needless evasive action websockets takes.
>>>
>>> Over-engineering websockets to death over a non-reproducible problem th=
at
>>> websockets can't fix is crazy.
>>>
>>> What's needed is to rule trying to solve the unsolveable out of scope a=
nd
>>> finish up any problems from the real world left with -03.
>>
>> The security goals of browser vendors are higher than that. =A0As a
>> general rule, browser vendors do not kick the security can down the
>> road. =A0The buck stops here.
>
> The last couple of months appear to me to have been wasted with navelgazi=
ng
> trying to secure undefined broken intermediaries from attack by websocket=
s,
> when websockets is not required to attack them. =A0In the meanwhile webso=
ckets
> are gone from Firefox by default exactly because the browser vendors don'=
t
> want to be on the wrong side of security professionals finding they shoul=
d
> have done something better and blaming them.
>
> Actual security can be quite slippery and requires it to be well defined
> what it is that is trying to be secured from which attacks at what cost. =
=A0In
> this case, there is so much FUD about what the supposed problem is and wh=
at
> is needed to 'solve' it (again the problem is with the intermediary and
> cannot be solved by websockets; there is no definitive restestable proble=
m
> scenario even) that the list appears to be reduced to a 'security jelly'
> talked into agreeing with the most forceful and aggressive-sounding
> proposals like AES munging.

We know several approaches for fixing the problem.  The working group
has been discussing the trade-offs involved.  IMHO, the straw poll is
showing that there's generally broad support for Pat's proposal.

Adam


> In fact if the problem is real and misunderstood, and 'fixed' in the wron=
g
> place, that can be worse than useless.
>
> From what I read I didn't see any real outstanding problem that is websoc=
ket
> business that -03 and maybe the HELLO thing, and for sure wss:// don't
> already solve.
>
> If you think that's incorrect, it should surely be possible to explain
> concisely what the problem is -- I mean really concisely -- and how it ca=
n
> be reproduced with normal, maintained and non-broken software in real use
> that makes it a websocket problem.
>
> -Andy
>

From gregw@intalio.com  Thu Jan  6 01:41:37 2011
Return-Path: <gregw@intalio.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 28FB73A6ED4 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 01:41:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.925
X-Spam-Level: 
X-Spam-Status: No, score=-2.925 tagged_above=-999 required=5 tests=[AWL=0.052,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 i69jKkICeMig for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 01:41:34 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 95DE33A6C50 for <hybi@ietf.org>; Thu,  6 Jan 2011 01:41:33 -0800 (PST)
Received: by qyk34 with SMTP id 34so18379745qyk.10 for <hybi@ietf.org>; Thu, 06 Jan 2011 01:43:40 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.87.13 with SMTP id u13mr20450537qcl.55.1294307019860; Thu, 06 Jan 2011 01:43:39 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Thu, 6 Jan 2011 01:43:39 -0800 (PST)
In-Reply-To: <4D250C37.4040505@callenish.com>
References: <1293038752.2369.155.camel@ds9.ducksong.com> <4D24B8F0.9090404@callenish.com> <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com> <4D24CB44.4070709@callenish.com> <AANLkTi=JPo8+axtDNuDZ3ntQThnzvk-7FibTTXB_x5OV@mail.gmail.com> <4D250C37.4040505@callenish.com>
Date: Thu, 6 Jan 2011 10:43:39 +0100
X-Google-Sender-Auth: XV9F41Kpu8MpK4byb_i7EWYXWHE
Message-ID: <AANLkTikL0ELTnv986rjnpuggkGs6tRSvgn0s--1_HBm7@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Thu, 06 Jan 2011 09:41:38 -0000

On 6 January 2011 01:26, Bruce Atherton <bruce@callenish.com> wrote:
> It sounds like there is a laser focus of scope for the hybi working group on
> just the interactions between browser and server, and that any other usecase
> need not apply. If that is the case, I will stop bringing up considerations
> of other situations such as standalone clients, the server being the client
> to another server, or two peers communicating with Websockets, since they
> all appear to be out of scope for the WG.

Bruce,

a difficulty of this working group is that we were never able to even
agree on a requirement document as the various constituencies
suspected each other of steering the requirements towards their own
use-cases. Hence it is difficult to really say what is in scope or out
of scope.

But I for one certainly appreciate you raising cases that push the
boundaries of this WG's scope, as good design results from
consideration of edge cases.

My own work with cometd certainly already has peer to peer usage, we
have a sub-project called the Oort cloud that links up cometd servers
into a cluster.  Currently this uses our long polling transport, but
once we implement WS support in our java client, then WS would be a
much better choice.

We also have many examples in the cometd project of standalone (non
browser) clients being written - in phones and on desktop
applications.  Again most of these would benefit from a WS transport.

Neither of these use-cases run potentially hostile 3rd party code (as
browsers do), so are at much less risk from injection of HTTP-like
content.

While I dubious about the actual level of threat posed by vulnerable
intermediaries, I fully support the browser vendors interest in
avoiding the issue and believe that mandatory masking is a good
solution for the browsers.   I just don't understand why that means
that masking must be made mandatory for all other use cases.  If
browsers don't want the ability to switch it off - then don't write
your code so that it can be switched off.

regards

From andy.warmcat.com@googlemail.com  Thu Jan  6 03:14:33 2011
Return-Path: <andy.warmcat.com@googlemail.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 AC90A3A6D1F for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 03:14:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.474
X-Spam-Level: 
X-Spam-Status: No, score=-3.474 tagged_above=-999 required=5 tests=[AWL=0.125,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 hAw1EfeWYaNr for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 03:14:32 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 0D0223A6D17 for <hybi@ietf.org>; Thu,  6 Jan 2011 03:14:31 -0800 (PST)
Received: by wyf23 with SMTP id 23so17019572wyf.31 for <hybi@ietf.org>; Thu, 06 Jan 2011 03:16:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=STmMEu7YhlaF+wL9P5OriC+WQiphPEGOvVk3+vOy3kE=; b=lpMk+jdbXwc/HyaPsHQwIVM7ua0fY6xct9bCVVbmPBUO43+zDKFSe51I0SIMAdlOyF LtXd3EqTMyBlwRDuPnBZzZoEk0Ur5cuSE3G0zgI1DVtkFIGsEXY2FJ+T/auDnKQXvVA6 0eXBXkqkAyg49dH+7ALQAu1ctA2Sifc8PNAj8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=nlQqHJ+EoiMdQI/ZKJgSBXr1TCUHrmzyBGWqXrHZXEety9s9oHZj2RI8z00tiaYv18 c0Zz26c5fxyYztPEKegypvbVcc2rHAbMUJrP5LbusWyOJ79xF4MQtvPtQZWVSFKYOlzQ 5p96yefGZJEsRUHmXb8PJnlhJjasiLd8xbaQE=
Received: by 10.227.129.71 with SMTP id n7mr14164892wbs.7.1294312598348; Thu, 06 Jan 2011 03:16:38 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id m13sm16706817wbz.21.2011.01.06.03.16.35 (version=SSLv3 cipher=RC4-MD5); Thu, 06 Jan 2011 03:16:35 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D25A492.20701@warmcat.com>
Date: Thu, 06 Jan 2011 11:16:34 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: John Tamplin <jat@google.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com>
In-Reply-To: <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Thu, 06 Jan 2011 11:14:33 -0000

On 01/05/11 21:33, Somebody in the thread at some point said:
> On Wed, Jan 5, 2011 at 4:12 PM, Andy Green <andy@warmcat.com
> <mailto:andy@warmcat.com>> wrote:
>
>     Understood.  But just like the PHP bug, what is the point of
>     'solving' this in websocket protocol?  The proxy is still sat there
>     allegedly open to poisoning from similar-looking non-websocket
>     packets, just like the PHP server is still sitting there waiting for
>     something else to send it the constant of death.  Nothing is made
>     "more secure" by having websockets in particular escape the
>     equivalent of the PHP floating point constant.
>
>
> The browser does not currently allow arbitrary traffic in a non-HTTP
> framing, which WebSockets does.  Sure, if you can convince a client to

It is not a raw socket though, it has handshaking to get it into that 
mode which is compatible with HTTP using upgrade.  The handshaking takes 
care to confirm that it is talking to a partner that understands 
websocket framing and is willing to talk it using that.  It is not at 
all like websockets is the new LOIC.  There is a vanishingly narrow 
story for things that can be attacked, broken intermediaries that don't 
understand upgrade and stay in HTTP mode.  And if they exist, they can 
be fixed.

> download your code that does that and run it locally (which is
> essentially how Flash/Java were also exploitable for this exact problem

I take your point about the one-stop-shop if there are things that do 
bad things seeing websocket protocol.

But nobody has shown one of these supposed buggy intermediaries or 
describe how to reproduce a failure involving one.  AFAIK because the 
failure mode is just inferred, nobody has confirmed that whatever was 
done to Flash and Java in the name of "security" closed any actual holes.

Maybe some intermediaries are buggy and never saw a websocket handshake 
until now... that state of affairs won't continue if websockets is a 
success.

> If WebSockets were using HTTP framing throughout (such as chunked
> encoding in both directions), then yes that would be the case -- but it
> isn't, which means that WebSockets as of -03 opens new attack vectors
> that are not there by other current means.

It uses upgrade which should be enough if the intermediary is complaint. 
  And if it's not compliant and does bad things when sent upgrade and 
other packets, that is not going to be solved by eliminating one source 
of upgrade and other packets.

 From the other mail ->

 >> No, nothing got made "provably secure".  The proxy is allegedly
 >> still sat there waiting to be poisoned because it is supposedly still
 >> as broken as it ever was awaiting exploitation.  You can say, "that's
 >> not our problem" and you'd be right, none of it is a websocket issue
 >> including the proposed pointless munging action.  It's an alleged
 >> 'broken exploitable proxy' issue.

 > If the attacker cannot control the bytes of the WebSocket payload,
 > the attacker cannot exploit it by including fake HTTP messages.

What do you think got made "provably secure" and against what? 
Websockets protocol itself is made no more secure against eavesdropping 
by addition of AES munging that has the keys on the wire.  The handshake 
scheme seems secure enough already against accidentally talking to a 
partner that won't be able to talk websockets properly; payload munging 
won't add to that.

What you mean is that you think it will be 'proven' that an undefined 
intermediary that doesn't understand websockets will act securely when 
we spam gigabytes of /dev/random-ish 8-bit data with what you previously 
called "non HTTP framing" (despite Upgrade) at it.

Because we accept to shadow-box with supposedly broken-but-unknown and 
unfixable intermediaries that can have any response to anything and that 
is meant to be a websocket problem, in fact you can't prove anything 
about a system involving such an unknowable black box.  As soon as you 
accept the unknown broken-ness of the supposed intermediary being a 
websocket problem you are just reliant on agreement with the people 
playing 'broken intermediary devil's advocate' when they feel like it or 
tire of the game.  That's not proving anything.

 From what I can see, including the bad-tempered Opera thread, 
websockets is out by default now as much from exhaustion with tracking a 
spec that isn't converging as intermediary FUD: I don't know why else 
wss:// is pulled along with ws://.  Actually -03 is a really nice spec 
already if we stop trying to solve the unsolveable as well.

-Andy

From andy.warmcat.com@googlemail.com  Thu Jan  6 03:18:53 2011
Return-Path: <andy.warmcat.com@googlemail.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 0D2383A6D17 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 03:18:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.488
X-Spam-Level: 
X-Spam-Status: No, score=-3.488 tagged_above=-999 required=5 tests=[AWL=0.111,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 oZ1TwrKdiOmK for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 03:18:51 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 9AD4E3A6B72 for <hybi@ietf.org>; Thu,  6 Jan 2011 03:18:51 -0800 (PST)
Received: by wwa36 with SMTP id 36so16322138wwa.13 for <hybi@ietf.org>; Thu, 06 Jan 2011 03:20:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=o7G+BjbNWji6MbONGayKkOCQcvd4CdAUoPD5y9mpv1s=; b=WlrckcbhSKb6F/n+ecXmfm4eLvAm0fPkJ3oXy4xywPzReZc+VW2apxfIX5cYXP2lkK 1BC4RyOwujjbvMhwqMpU1026rQqpFkeefyFEbuKvMESuBzXUF4YJ0LP+YAEwDY30z5lT riAKre+cr39AvcXfZT+66V4cxbqsaNkKHic8I=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=kaKWKiJcLM1686Ev5WFW/uLg4QHkg8/jAhpJ/GJ7/Wv+Y5yvFBBI8TXfP0T87n79cQ gKddjRXrnEcQa1OIYPuVB4T7CYBO5Hx1n1BeknoHoFYRP2OZOLZwiwQyJuJS9Dv9NbP/ j5p6gAo9wzj4Qh9W9sO4F4k9CynUtrejbjmOY=
Received: by 10.227.159.68 with SMTP id i4mr7308488wbx.176.1294312857838; Thu, 06 Jan 2011 03:20:57 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id m13sm16709861wbz.21.2011.01.06.03.20.56 (version=SSLv3 cipher=RC4-MD5); Thu, 06 Jan 2011 03:20:57 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D25A598.8060406@warmcat.com>
Date: Thu, 06 Jan 2011 11:20:56 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Adam Barth <ietf@adambarth.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <AANLkTinmD3iZ3wLp+75LdUQNOmt6=uxomhPfbadmwyqB@mail.gmail.com> <4D24CAEE.6060002@warmcat.com> <AANLkTimkAG1Sk1o6u+SPLkxSfT4zg3ruqruLBGoo_UxS@mail.gmail.com>
In-Reply-To: <AANLkTimkAG1Sk1o6u+SPLkxSfT4zg3ruqruLBGoo_UxS@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Thu, 06 Jan 2011 11:18:53 -0000

On 01/06/11 04:12, Somebody in the thread at some point said:

>> Actual security can be quite slippery and requires it to be well defined
>> what it is that is trying to be secured from which attacks at what cost.  In
>> this case, there is so much FUD about what the supposed problem is and what
>> is needed to 'solve' it (again the problem is with the intermediary and
>> cannot be solved by websockets; there is no definitive restestable problem
>> scenario even) that the list appears to be reduced to a 'security jelly'
>> talked into agreeing with the most forceful and aggressive-sounding
>> proposals like AES munging.
>
> We know several approaches for fixing the problem.  The working group
> has been discussing the trade-offs involved.  IMHO, the straw poll is
> showing that there's generally broad support for Pat's proposal.

What exactly do you mean, "fix the problem"?  The "problem" is 
ultimately a supposedly broken intermediary, right?  NOTHING is going to 
FIX the supposed vulnerability that creates except fixing the 
intermediary itself.

Everything else, any amount of "working group discussion", is just 
leaving the thing wide open to attack from any other direction, but not 
websockets, no sir.

-Andy

From dave@cridland.net  Thu Jan  6 04:53:59 2011
Return-Path: <dave@cridland.net>
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 9F1963A6BB5 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 04:53:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.521
X-Spam-Level: 
X-Spam-Status: No, score=-2.521 tagged_above=-999 required=5 tests=[AWL=0.078,  BAYES_00=-2.599]
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 J1kVMIF4z6-A for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 04:53:58 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 2F4273A6EFE for <hybi@ietf.org>; Thu,  6 Jan 2011 04:53:58 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 140D71168117; Thu,  6 Jan 2011 12:56:03 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2F2skQxm97rb; Thu,  6 Jan 2011 12:55:55 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id BC17411680FB; Thu,  6 Jan 2011 12:55:55 +0000 (GMT)
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com> <4D25A492.20701@warmcat.com>
In-Reply-To: <4D25A492.20701@warmcat.com>
MIME-Version: 1.0
Message-Id: <10468.1294318555.770054@puncture>
Date: Thu, 06 Jan 2011 12:55:55 +0000
From: Dave Cridland <dave@cridland.net>
To: Andy Green <andy@warmcat.com>, Server-Initiated HTTP <hybi@ietf.org>, John Tamplin <jat@google.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] A bit of pragmatism
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: Thu, 06 Jan 2011 12:53:59 -0000

On Thu Jan  6 11:16:34 2011, Andy Green wrote:
> But nobody has shown one of these supposed buggy intermediaries or  
> describe how to reproduce a failure involving one.  AFAIK because  
> the failure mode is just inferred, nobody has confirmed that  
> whatever was done to Flash and Java in the name of "security"  
> closed any actual holes.

No, it was demonstrated that a strong potential exists, modulo the  
effects of framing (which are pretty unpredictable). It was also  
shown that all affected intermediaries ceased to be viable as an  
attack surface given a CONNECT.

The entire discussion on masking is a red herring, given the  
experimental data suggests that 50,000 random beds were looked under,  
and no monsters were found.

You statement above, in any case, simply implies that as long as  
WebSockets prevent the vast majority of attacks (easy - include  
something that looks like a CONNECT at some point in the flow), then  
any would-be attacker will move onto Java and Flash instead, and - if  
we want to make the obvious cynical observation - either drive  
websocket adoption or encourage intermediaries to be fixed.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From andy.warmcat.com@googlemail.com  Thu Jan  6 05:12:25 2011
Return-Path: <andy.warmcat.com@googlemail.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 4B7BF3A6F00 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 05:12:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.499
X-Spam-Level: 
X-Spam-Status: No, score=-3.499 tagged_above=-999 required=5 tests=[AWL=0.100,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 NRSvEITLMG9d for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 05:12:24 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id EC3993A6CAA for <hybi@ietf.org>; Thu,  6 Jan 2011 05:12:23 -0800 (PST)
Received: by wyf23 with SMTP id 23so17116859wyf.31 for <hybi@ietf.org>; Thu, 06 Jan 2011 05:14:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=h0q5T8D6tqg/Fa4IT3exvlA+hcS1IbJ4M4+HCfs5Sco=; b=m55gMNo0NQP1BSlkgnQHhl6Uxr/EZNGYrel6GlqKT+tR+SM7ndD7xE996Hfw2oLFEo j6Fyie+PvRvM/dj8VJRvX/HjInShFFXEmYwmKPT1JkSy4Tmujmza0qdpR6J1HlGUEst5 fUBr960wFTAUzOdihvtJCMtWzK4mYyEI4gm4k=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=t+pd1VrDNhVSjMwgD3p/D+6jhOPjpoSvmTb/erk6lAgAu5PltIaFBaYe06thuAp4ik C5co1c+KSL3eB5djMQNTbPoAegu6o1GZGr1fKR6bkQHAphoMz9Dp9SAEOcAGCYQ0uUxG EwQq5tIgq4zzgVTh9o4JfHH63N0GMbLrkxKQk=
Received: by 10.227.183.203 with SMTP id ch11mr14241563wbb.214.1294319670167;  Thu, 06 Jan 2011 05:14:30 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id m13sm16786918wbz.15.2011.01.06.05.14.28 (version=SSLv3 cipher=RC4-MD5); Thu, 06 Jan 2011 05:14:29 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D25C033.3010501@warmcat.com>
Date: Thu, 06 Jan 2011 13:14:27 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Dave Cridland <dave@cridland.net>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com> <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture>
In-Reply-To: <10468.1294318555.770054@puncture>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Thu, 06 Jan 2011 13:12:25 -0000

On 01/06/11 12:55, Somebody in the thread at some point said:
> On Thu Jan 6 11:16:34 2011, Andy Green wrote:
>> But nobody has shown one of these supposed buggy intermediaries or
>> describe how to reproduce a failure involving one. AFAIK because the
>> failure mode is just inferred, nobody has confirmed that whatever was
>> done to Flash and Java in the name of "security" closed any actual holes.
>
> No, it was demonstrated that a strong potential exists, modulo the
> effects of framing (which are pretty unpredictable). It was also shown
> that all affected intermediaries ceased to be viable as an attack
> surface given a CONNECT.

If I understood it, the presence of vulnerable intermediaries was 
inferred by a client script doing something or not.  Because it was done 
via advertising and not under repeatable conditions that are open to 
analysis, the reason the script may have appeared to stop doing 
something is open to interpretation since the whole stack between the 
client and attack sensor is unknown, uncontrolled and unrepeatable.

That's why I asked yesterday --> "If you think that's incorrect, it 
should surely be possible to explain concisely what the problem is -- I 
mean really concisely -- and how it can be reproduced with normal, 
maintained and non-broken software in real use that makes it a websocket 
problem."

> The entire discussion on masking is a red herring, given the
> experimental data suggests that 50,000 random beds were looked under,
> and no monsters were found.
>
> You statement above, in any case, simply implies that as long as
> WebSockets prevent the vast majority of attacks (easy - include
> something that looks like a CONNECT at some point in the flow), then any
> would-be attacker will move onto Java and Flash instead, and - if we
> want to make the obvious cynical observation - either drive websocket
> adoption or encourage intermediaries to be fixed.

To be clear websocket masking does nothing to fix the allegedly broken 
and vulnerable intermediary which remains listening on a socket and 
willing to do whatever it does if you feed it the right packets by any 
means.  The only way to fix that is identify and fix the broken 
intermediary that is alleged to exist, not bend every client out of 
shape just in case.

Completely agree that masking websockets is needless.  Even if an actual 
broken intermediary is identified with this behaviour, that just leads 
to the thing being fixed and masking is still doing nothing.

-Andy

From dave@cridland.net  Thu Jan  6 05:58:02 2011
Return-Path: <dave@cridland.net>
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 408B33A6F02 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 05:58:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.524
X-Spam-Level: 
X-Spam-Status: No, score=-2.524 tagged_above=-999 required=5 tests=[AWL=0.075,  BAYES_00=-2.599]
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 9X2KzwY4huGc for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 05:58:00 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 1BBD43A6E28 for <hybi@ietf.org>; Thu,  6 Jan 2011 05:58:00 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 90AED116811D; Thu,  6 Jan 2011 14:00:05 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XVSIzxQO+72m; Thu,  6 Jan 2011 13:59:57 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id DD75E11680FB; Thu,  6 Jan 2011 13:59:56 +0000 (GMT)
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com> <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com>
In-Reply-To: <4D25C033.3010501@warmcat.com>
MIME-Version: 1.0
Message-Id: <10468.1294322396.906068@puncture>
Date: Thu, 06 Jan 2011 13:59:56 +0000
From: Dave Cridland <dave@cridland.net>
To: Andy Green <andy@warmcat.com>, Server-Initiated HTTP <hybi@ietf.org>, John Tamplin <jat@google.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] A bit of pragmatism
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: Thu, 06 Jan 2011 13:58:02 -0000

On Thu Jan  6 13:14:27 2011, Andy Green wrote:
> On 01/06/11 12:55, Somebody in the thread at some point said:
>> On Thu Jan 6 11:16:34 2011, Andy Green wrote:
>>> But nobody has shown one of these supposed buggy intermediaries or
>>> describe how to reproduce a failure involving one. AFAIK because  
>>> the
>>> failure mode is just inferred, nobody has confirmed that whatever  
>>> was
>>> done to Flash and Java in the name of "security" closed any  
>>> actual holes.
>> 
>> No, it was demonstrated that a strong potential exists, modulo the
>> effects of framing (which are pretty unpredictable). It was also  
>> shown
>> that all affected intermediaries ceased to be viable as an attack
>> surface given a CONNECT.
> 
> If I understood it, the presence of vulnerable intermediaries was  
> inferred by a client script doing something or not.  Because it was  
> done via advertising and not under repeatable conditions that are  
> open to analysis, the reason the script may have appeared to stop  
> doing something is open to interpretation since the whole stack  
> between the client and attack sensor is unknown, uncontrolled and  
> unrepeatable.
> 
> 
I think that's an unhelpful stance. The general description of the  
experiment conducted is sufficient to repeat it, but by its nature it  
selected a largely random set of intermediaries. That's enough to  
satisfy me that it's essentially valid.


> That's why I asked yesterday --> "If you think that's incorrect, it  
> should surely be possible to explain concisely what the problem is  
> -- I mean really concisely -- and how it can be reproduced with  
> normal, maintained and non-broken software in real use that makes  
> it a websocket problem."
> 
> 
Streams of data that *look* like HTTP requests sent *after* a  
supposedly successful Websocket handshake (of the Upgrade type) are  
known to be interpreted as HTTP requests on some intermediaries. This  
leads to one of three problems:

a) An attacker can access data within the firewall.

b) An attacker can poison the intermediary's cache for third-party  
URIs, leading to the potential case where the Google Analytics  
script, for example, is poisoned to include script code of the  
attacker's choice.

c) The intermediary fails to pass websocket data flows.

However, neither (a) nor (b) was found when CONNECT was used as the  
sole handshake. (CONNECT has other problems, such as removing  
semantic transparency of intermediaries, but that's why I suggested  
using it following an Upgrade). Even occurances of (c) were found to  
be miniscule.

> Completely agree that masking websockets is needless.  Even if an  
> actual broken intermediary is identified with this behaviour, that  
> just leads to the thing being fixed and masking is still doing  
> nothing.

Right. And I should point out that the paper that first proposed  
masking also describes an experiment that found it to be worthless  
given certain precautions. Given the facts, I'm at a loss as to why  
this particular bandwagon has been so thoroughly jumped upon.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From brofield@gmail.com  Thu Jan  6 06:22:50 2011
Return-Path: <brofield@gmail.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 83E153A6E3C for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 06:22:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.477
X-Spam-Level: 
X-Spam-Status: No, score=-2.477 tagged_above=-999 required=5 tests=[AWL=0.500,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 MFml++OGNsOI for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 06:22:42 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id B4A7A3A6D3C for <hybi@ietf.org>; Thu,  6 Jan 2011 06:22:41 -0800 (PST)
Received: by qyj19 with SMTP id 19so17783306qyj.10 for <hybi@ietf.org>; Thu, 06 Jan 2011 06:24:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=1vEAxZgxAYS6I2yMzc+5Z4XAIVfQobb+WUUeydzX0qc=; b=qz8tjUbosfqHwETufxuJJE0Iy4kTxtQkVR3+oqO6JDS11Hvv2rYRH1xCj9olrbXmSG UPieL7jUFZNmYY2yEyWID/j0A6+bDF59m3tSg/lKHa8TZ/hL7MdmuaQh1dvYVAZYrX2J t8AC+5WUFNFwekjnIAs+0fVo1lzpASc/HZhI4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Iv37iL1TZmytKLUwIEXnpqLv9X0BTYVeStSB71sBySL+n779kS/TaRd/QFMMJSxwxu 9sNJW6KZxt3ZR9fKLkf6+5nhTPz2rsEzYxKg3vjxIOwAvCe3pkT978N2sz6BVIMpZMXe lKoOrloJ4iDOjKMkBpj/e85zFzaNqN7EAXffQ=
MIME-Version: 1.0
Received: by 10.229.229.200 with SMTP id jj8mr11349629qcb.74.1294323887504; Thu, 06 Jan 2011 06:24:47 -0800 (PST)
Sender: brofield@gmail.com
Received: by 10.229.84.66 with HTTP; Thu, 6 Jan 2011 06:24:47 -0800 (PST)
In-Reply-To: <AANLkTikL0ELTnv986rjnpuggkGs6tRSvgn0s--1_HBm7@mail.gmail.com>
References: <1293038752.2369.155.camel@ds9.ducksong.com> <4D24B8F0.9090404@callenish.com> <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com> <4D24CB44.4070709@callenish.com> <AANLkTi=JPo8+axtDNuDZ3ntQThnzvk-7FibTTXB_x5OV@mail.gmail.com> <4D250C37.4040505@callenish.com> <AANLkTikL0ELTnv986rjnpuggkGs6tRSvgn0s--1_HBm7@mail.gmail.com>
Date: Fri, 7 Jan 2011 00:24:47 +1000
X-Google-Sender-Auth: 4EQKlQ0rGFbNLVr9gR9vAD5ekTM
Message-ID: <AANLkTiku6T8qU9V5rEZC97QhKedQpvVa2Y0+zwR9w1zR@mail.gmail.com>
From: Brodie Thiesfield <brodie@jellycan.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Thu, 06 Jan 2011 14:22:50 -0000

Opera already support peer to peer HTTP (or peer-proxy-peer) via
Unite. I would think that it is a small logical step for them to
implement peer to peer websocket as well.
http://unite.opera.com/develop/faq/

Peer to peer websocket would enable a whole range of interesting
applications, and I don't think that it is that far fetched that it
cannot be imagined in the future.

Regards,
Brodie



On Thu, Jan 6, 2011 at 7:43 PM, Greg Wilkins <gregw@webtide.com> wrote:
> On 6 January 2011 01:26, Bruce Atherton <bruce@callenish.com> wrote:
>> It sounds like there is a laser focus of scope for the hybi working grou=
p on
>> just the interactions between browser and server, and that any other use=
case
>> need not apply. If that is the case, I will stop bringing up considerati=
ons
>> of other situations such as standalone clients, the server being the cli=
ent
>> to another server, or two peers communicating with Websockets, since the=
y
>> all appear to be out of scope for the WG.
>
> Bruce,
>
> a difficulty of this working group is that we were never able to even
> agree on a requirement document as the various constituencies
> suspected each other of steering the requirements towards their own
> use-cases. Hence it is difficult to really say what is in scope or out
> of scope.
>
> But I for one certainly appreciate you raising cases that push the
> boundaries of this WG's scope, as good design results from
> consideration of edge cases.
>
> My own work with cometd certainly already has peer to peer usage, we
> have a sub-project called the Oort cloud that links up cometd servers
> into a cluster. =A0Currently this uses our long polling transport, but
> once we implement WS support in our java client, then WS would be a
> much better choice.
>
> We also have many examples in the cometd project of standalone (non
> browser) clients being written - in phones and on desktop
> applications. =A0Again most of these would benefit from a WS transport.
>
> Neither of these use-cases run potentially hostile 3rd party code (as
> browsers do), so are at much less risk from injection of HTTP-like
> content.
>
> While I dubious about the actual level of threat posed by vulnerable
> intermediaries, I fully support the browser vendors interest in
> avoiding the issue and believe that mandatory masking is a good
> solution for the browsers. =A0 I just don't understand why that means
> that masking must be made mandatory for all other use cases. =A0If
> browsers don't want the ability to switch it off - then don't write
> your code so that it can be switched off.
>
> regards
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From w@1wt.eu  Thu Jan  6 06:39:58 2011
Return-Path: <w@1wt.eu>
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 489D03A6F17 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 06:39:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.142
X-Spam-Level: 
X-Spam-Status: No, score=-2.142 tagged_above=-999 required=5 tests=[AWL=-0.099, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 ayLy2DOMWXfL for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 06:39:57 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id C47783A6F16 for <hybi@ietf.org>; Thu,  6 Jan 2011 06:39:56 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p06EfpsF026114; Thu, 6 Jan 2011 15:41:51 +0100
Date: Thu, 6 Jan 2011 15:41:51 +0100
From: Willy Tarreau <w@1wt.eu>
To: Dave Cridland <dave@cridland.net>
Message-ID: <20110106144151.GZ15851@1wt.eu>
References: <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com> <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <10468.1294322396.906068@puncture>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Thu, 06 Jan 2011 14:39:58 -0000

On Thu, Jan 06, 2011 at 01:59:56PM +0000, Dave Cridland wrote:
> On Thu Jan  6 13:14:27 2011, Andy Green wrote:
> >On 01/06/11 12:55, Somebody in the thread at some point said:
> >>On Thu Jan 6 11:16:34 2011, Andy Green wrote:
> >>>But nobody has shown one of these supposed buggy intermediaries or
> >>>describe how to reproduce a failure involving one. AFAIK because  
> >>>the
> >>>failure mode is just inferred, nobody has confirmed that whatever  
> >>>was
> >>>done to Flash and Java in the name of "security" closed any  
> >>>actual holes.
> >>
> >>No, it was demonstrated that a strong potential exists, modulo the
> >>effects of framing (which are pretty unpredictable). It was also  
> >>shown
> >>that all affected intermediaries ceased to be viable as an attack
> >>surface given a CONNECT.
> >
> >If I understood it, the presence of vulnerable intermediaries was  
> >inferred by a client script doing something or not.  Because it was  
> >done via advertising and not under repeatable conditions that are  
> >open to analysis, the reason the script may have appeared to stop  
> >doing something is open to interpretation since the whole stack  
> >between the client and attack sensor is unknown, uncontrolled and  
> >unrepeatable.
> >
> >
> I think that's an unhelpful stance. The general description of the  
> experiment conducted is sufficient to repeat it, but by its nature it  
> selected a largely random set of intermediaries. That's enough to  
> satisfy me that it's essentially valid.
> 
> 
> >That's why I asked yesterday --> "If you think that's incorrect, it  
> >should surely be possible to explain concisely what the problem is  
> >-- I mean really concisely -- and how it can be reproduced with  
> >normal, maintained and non-broken software in real use that makes  
> >it a websocket problem."
> >
> >
> Streams of data that *look* like HTTP requests sent *after* a  
> supposedly successful Websocket handshake (of the Upgrade type) are  
> known to be interpreted as HTTP requests on some intermediaries.

We only know that in the case where the stream corresponds to a 100%
valid HTTP request. I don't believe a minute that such intermediaries
will skip all bytes and magically resync on the ones that look like a
known method to them. As Bjoern suggested it, we could think about the
laziest implementation. A lazy implementation would very possibly
consider the stream as the method till the next space. That will not
make this method eligible for caching though. Please note that I find
your method consisting in emitting a CONNECT efficient against this
type of failure.

Anyway, now we're going to have masking on by default. Once again, I
think it's not a big trouble for browser->server communications, but
as some people have raised it here, browsers are not the only HTTP
clients, so there is no reason they are the only WebSocket clients.

Look at the success of WebServices. They rely on HTTP just like us
and they're used between servers. I think that clean WebSocket
implementations could very well replace ICAP or simple transaction
based protocols which exchange very few data. In all of these
situations, masking has a cost and offers no benefit.

That's why I'm re-iterating that we should consider the option of
disabling masking, but not for browsers. The sole reason we proposed
masking is because we suspect that some broken and uncontrolled
intermediaries on the net might be vulnerable, and that browsers
could become a nice vector to attack them.

Within internal networks, there is no such issue and that's where
we'd like to save useful CPU cycles and bytes on the wire, so
disabling masking there would really make sense. That would also
satisfy the needs of those who want to implement border WS gateways
which will decode the stream and pass it unencoded to next servers
(think about smart load balancers for instance).

We're complying with a well-established protocol. We should use the
workarounds only when we fear the underlying protocol might not be
reliable. But if it is, we should not have to fall back to workarounds.

Regards,
Willy


From andy.warmcat.com@googlemail.com  Thu Jan  6 06:54:40 2011
Return-Path: <andy.warmcat.com@googlemail.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 C83B53A6BAF for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 06:54:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 ZhzH5uTnHVlo for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 06:54:39 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 21BBA3A6A0C for <hybi@ietf.org>; Thu,  6 Jan 2011 06:54:38 -0800 (PST)
Received: by wwa36 with SMTP id 36so16506249wwa.13 for <hybi@ietf.org>; Thu, 06 Jan 2011 06:56:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=KLhQgbmztUy+Sgbc8kzbF47xVRXl6agqIPIsEfiOjC0=; b=weuwAGvEzmZygJsltQuQ2Lni2A5HjzPaw3c4hY39cGdkNFpbImd2UsvnmI2mY9dYZY SDdc3i20DfFCY7G8wglbYMtfkjdNnecLmfisgjbKKsH+isHzDNi0LWGz/3X240YMsWUC ocpmGD//kdCyTMhef5BIHyQKdcsSVDmdXAsqc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=r1xb8VT7aQ+hvdKNmodaIM+J0XOP7ZN1AmQX7K64gDXjS9JnLXzq0Z/gES9WzL9Bm2 maI+t+rkIHJM4gVFPXXIoQtG56u8n/L3xQQXfLcQXfYJCjvoPfiLBxl172WvbRz2LTdZ cLcg1bmmOLmPTbvAYYIJdcQZYkWCcBd/pp214=
Received: by 10.227.155.145 with SMTP id s17mr14757584wbw.29.1294325804862; Thu, 06 Jan 2011 06:56:44 -0800 (PST)
Received: from [192.168.1.70] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id m13sm16861687wbz.3.2011.01.06.06.56.42 (version=SSLv3 cipher=RC4-MD5); Thu, 06 Jan 2011 06:56:43 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D25D82A.8070302@warmcat.com>
Date: Thu, 06 Jan 2011 14:56:42 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Dave Cridland <dave@cridland.net>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com> <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture>
In-Reply-To: <10468.1294322396.906068@puncture>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Thu, 06 Jan 2011 14:54:40 -0000

On 01/06/11 13:59, Somebody in the thread at some point said:
> On Thu Jan 6 13:14:27 2011, Andy Green wrote:
>> On 01/06/11 12:55, Somebody in the thread at some point said:
>>> On Thu Jan 6 11:16:34 2011, Andy Green wrote:
>>>> But nobody has shown one of these supposed buggy intermediaries or
>>>> describe how to reproduce a failure involving one. AFAIK because the
>>>> failure mode is just inferred, nobody has confirmed that whatever was
>>>> done to Flash and Java in the name of "security" closed any actual
>>>> holes.
>>>
>>> No, it was demonstrated that a strong potential exists, modulo the
>>> effects of framing (which are pretty unpredictable). It was also shown
>>> that all affected intermediaries ceased to be viable as an attack
>>> surface given a CONNECT.
>>
>> If I understood it, the presence of vulnerable intermediaries was
>> inferred by a client script doing something or not. Because it was
>> done via advertising and not under repeatable conditions that are open
>> to analysis, the reason the script may have appeared to stop doing
>> something is open to interpretation since the whole stack between the
>> client and attack sensor is unknown, uncontrolled and unrepeatable.
>>
> I think that's an unhelpful stance. The general description of the
> experiment conducted is sufficient to repeat it, but by its nature it
> selected a largely random set of intermediaries. That's enough to
> satisfy me that it's essentially valid.

There is no evidence at the end of the claims made, no proxy we can look 
at exhibiting the behaviour and confirm the mechanism, no way to verify 
that it is fixed or worked around.  No way to even zero in on the 
network or proxy that they claim showed the behaviour.  There's no way 
to close the circle between the observed results and the claimed 
interpretation of them considering the implementation and the 
uncontrolled test networks.

For example, we might expect to see a POC trashing a particular build of 
a particular proxy using -76 that is out there.  Such an issue can be 
reproduced, verified, understood, resolved (by updating that proxy), closed.

It seems to me that it is quite hard to distinguish the claims in the 
paper from pure FUD considering the above.

>> That's why I asked yesterday --> "If you think that's incorrect, it
>> should surely be possible to explain concisely what the problem is --
>> I mean really concisely -- and how it can be reproduced with normal,
>> maintained and non-broken software in real use that makes it a
>> websocket problem."
>>
> Streams of data that *look* like HTTP requests sent *after* a supposedly
> successful Websocket handshake (of the Upgrade type) are known to be
> interpreted as HTTP requests on some intermediaries. This leads to one
> of three problems:

Yeah I read the same.  I'm still waiting to hear how do I reproduce that 
"with normal, maintained and non-broken software in real use that makes 
it a websocket problem."  When I do hear the exact software that is 
broken, it becomes a "fix and update your broken proxy" problem with a 
specific vendor, nothing to do with websockets.  We only feel it may be 
a websocket problem because of this perfect lack of information about 
what this broken intermediary is and the details how it acts.

-Andy

From gregw@intalio.com  Thu Jan  6 08:34:42 2011
Return-Path: <gregw@intalio.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 001DA3A6D14 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 08:34:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.925
X-Spam-Level: 
X-Spam-Status: No, score=-2.925 tagged_above=-999 required=5 tests=[AWL=0.052,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 cQyhMjWuhyE4 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 08:34:41 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 0DC863A6C4F for <hybi@ietf.org>; Thu,  6 Jan 2011 08:34:40 -0800 (PST)
Received: by qyk34 with SMTP id 34so18760556qyk.10 for <hybi@ietf.org>; Thu, 06 Jan 2011 08:36:47 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.53.213 with SMTP id n21mr22904730qag.399.1294331807686; Thu, 06 Jan 2011 08:36:47 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Thu, 6 Jan 2011 08:36:47 -0800 (PST)
In-Reply-To: <4D25D82A.8070302@warmcat.com>
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com> <4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com> <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com>
Date: Thu, 6 Jan 2011 17:36:47 +0100
X-Google-Sender-Auth: 69Qk9TxSc-wSxfl9tKZmO1oGqBA
Message-ID: <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: hybi@ietf.org
Content-Type: text/plain; charset=ISO-8859-1
Subject: Re: [hybi] A bit of pragmatism
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: Thu, 06 Jan 2011 16:34:42 -0000

So we have one camp that strongly believes that vulnerable
intermediaries are our concern and that masking is a credible defence.
We have another camp that strongly believes that vulnerable
intermediaries, if they exist, are not our concerns and masking is a
waste of time. We have a smattering of opinions in between.

So we can keep going hammer and tong at each other trying to break
down the strongly held views of the other camp....  OR we can find a
compromise.

Both camps need to accept that the concerns of the other camp are at
least valid for them - even if they are dubious if they are real
technical concerns or just political/stylistic concerns.  Telling
somebody: "these are not the concerns you should be worried about" is
not very helpful (unless the concerns are about droids and you are
obe-wan kenobi).

So I think we all have to accept that some want masking and some
don't.   So surely given this divide, making masking an extension is
the reasonable and pragmatic way forward.   The browser vendors who
appear most concerned about this issue can make the extension
mandatory, those that don't want masking in their particular
deployment can opt out (so long as they are not using browser).

The arguments against masking as an extension are:

 + it could be turned off.  Well then don't implement it as an
optional extension! don't allow it to be turned off in vulnerable
deployments.
 + extension mechanism is not up to the task.  Well we'd better fix it
then, because masking is not that complex and if we can't handle that
we have problems.
 + There may be some attacks that apply to servers from non-WS clients
which can have masking turned off.  Well if that ever becomes a
problem, then those servers can also make the masking extension
mandatory.
 + Complexity of negotiating the extension.  Then make it a default
extension and you have to negotiate not to have it.

It was really great to see some progress towards consensus around
Upgrade+Masking.   It would be a great pity to see that stalled
because of either insistence on a specific style of masking or refusal
to accept that some really want to have masking.


regards

From toni.ruottu@gmail.com  Thu Jan  6 09:37:08 2011
Return-Path: <toni.ruottu@gmail.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 0E5FD3A6BC5 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 09:37:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.826
X-Spam-Level: 
X-Spam-Status: No, score=-1.826 tagged_above=-999 required=5 tests=[AWL=0.152,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 dg8iAyN++Im8 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 09:37:07 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id EF0393A68D5 for <hybi@ietf.org>; Thu,  6 Jan 2011 09:37:06 -0800 (PST)
Received: by yie19 with SMTP id 19so5040235yie.31 for <hybi@ietf.org>; Thu, 06 Jan 2011 09:39:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=XPgCVGterXujPiSqYWXGRC8DtwISrGzfzH3EgP7iBaU=; b=aP09obTu9Cx80W6geJOZaqObHN/h3S7gDJEepbOIRMrggs09UFb3gPiIBiBq8yYk/w pk58vsk9FPQQlygNDy17ol4BVhU7mLA+gbnLtRgvEJNpXze1vla07yUf7KbfY49i8931 pfdctH+hvJwxspjVmSL88gR7IgH7eiN4sDDiw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=j/0zs+b3W6nosMkvGiMwqBALejMlwrqhGb2+xYadl9LzbsHisWIs31ADijxzMY0RAA kCubdZB2AtmEuSLJO0HugCkJoLkuUvRztfRROQaTXuKnhHUr+cM5KAMa+/2D66CmbeNt 15nhYeEIACA5KJyNG9yFqvDOBON9O3w/CaBB0=
MIME-Version: 1.0
Received: by 10.90.92.5 with SMTP id p5mr1377105agb.123.1294335553614; Thu, 06 Jan 2011 09:39:13 -0800 (PST)
Sender: toni.ruottu@gmail.com
Received: by 10.90.25.7 with HTTP; Thu, 6 Jan 2011 09:39:13 -0800 (PST)
In-Reply-To: <AANLkTiku6T8qU9V5rEZC97QhKedQpvVa2Y0+zwR9w1zR@mail.gmail.com>
References: <1293038752.2369.155.camel@ds9.ducksong.com> <4D24B8F0.9090404@callenish.com> <AANLkTimzJbAzARfG-vi2FLek38XdPr_CPmVSj==sGY+Q@mail.gmail.com> <4D24CB44.4070709@callenish.com> <AANLkTi=JPo8+axtDNuDZ3ntQThnzvk-7FibTTXB_x5OV@mail.gmail.com> <4D250C37.4040505@callenish.com> <AANLkTikL0ELTnv986rjnpuggkGs6tRSvgn0s--1_HBm7@mail.gmail.com> <AANLkTiku6T8qU9V5rEZC97QhKedQpvVa2Y0+zwR9w1zR@mail.gmail.com>
Date: Thu, 6 Jan 2011 19:39:13 +0200
X-Google-Sender-Auth: DNECCYJTlbW9ia1ebElmrULUnxU
Message-ID: <AANLkTinCL7tMQgWL38S3MPv+v3GnExPcf3c0YTxNxb-F@mail.gmail.com>
From: Toni Ruottu <toni.ruottu@iki.fi>
To: Brodie Thiesfield <brodie@jellycan.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Thu, 06 Jan 2011 17:37:08 -0000

Greetings.

I work for the University of Helsinki. We have drafted an API for
embedding WebSocket servers in web pages, and implemented the draft in
a Firefox extension. See http://browsersocket.org/ for details.

  --Toni

On Thu, Jan 6, 2011 at 4:24 PM, Brodie Thiesfield <brodie@jellycan.com> wro=
te:
> Opera already support peer to peer HTTP (or peer-proxy-peer) via
> Unite. I would think that it is a small logical step for them to
> implement peer to peer websocket as well.
> http://unite.opera.com/develop/faq/
>
> Peer to peer websocket would enable a whole range of interesting
> applications, and I don't think that it is that far fetched that it
> cannot be imagined in the future.
>
> Regards,
> Brodie
>
>
>
> On Thu, Jan 6, 2011 at 7:43 PM, Greg Wilkins <gregw@webtide.com> wrote:
>> On 6 January 2011 01:26, Bruce Atherton <bruce@callenish.com> wrote:
>>> It sounds like there is a laser focus of scope for the hybi working gro=
up on
>>> just the interactions between browser and server, and that any other us=
ecase
>>> need not apply. If that is the case, I will stop bringing up considerat=
ions
>>> of other situations such as standalone clients, the server being the cl=
ient
>>> to another server, or two peers communicating with Websockets, since th=
ey
>>> all appear to be out of scope for the WG.
>>
>> Bruce,
>>
>> a difficulty of this working group is that we were never able to even
>> agree on a requirement document as the various constituencies
>> suspected each other of steering the requirements towards their own
>> use-cases. Hence it is difficult to really say what is in scope or out
>> of scope.
>>
>> But I for one certainly appreciate you raising cases that push the
>> boundaries of this WG's scope, as good design results from
>> consideration of edge cases.
>>
>> My own work with cometd certainly already has peer to peer usage, we
>> have a sub-project called the Oort cloud that links up cometd servers
>> into a cluster. =A0Currently this uses our long polling transport, but
>> once we implement WS support in our java client, then WS would be a
>> much better choice.
>>
>> We also have many examples in the cometd project of standalone (non
>> browser) clients being written - in phones and on desktop
>> applications. =A0Again most of these would benefit from a WS transport.
>>
>> Neither of these use-cases run potentially hostile 3rd party code (as
>> browsers do), so are at much less risk from injection of HTTP-like
>> content.
>>
>> While I dubious about the actual level of threat posed by vulnerable
>> intermediaries, I fully support the browser vendors interest in
>> avoiding the issue and believe that mandatory masking is a good
>> solution for the browsers. =A0 I just don't understand why that means
>> that masking must be made mandatory for all other use cases. =A0If
>> browsers don't want the ability to switch it off - then don't write
>> your code so that it can be switched off.
>>
>> regards
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From w@1wt.eu  Thu Jan  6 10:44:06 2011
Return-Path: <w@1wt.eu>
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 9479A3A6F46 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 10:44:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.141
X-Spam-Level: 
X-Spam-Status: No, score=-2.141 tagged_above=-999 required=5 tests=[AWL=-0.098, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 18PhDnvu6hiI for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 10:44:05 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 45E8A3A6F43 for <hybi@ietf.org>; Thu,  6 Jan 2011 10:44:04 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p06Ik7wO027218; Thu, 6 Jan 2011 19:46:07 +0100
Date: Thu, 6 Jan 2011 19:46:07 +0100
From: Willy Tarreau <w@1wt.eu>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20110106184607.GB27099@1wt.eu>
References: <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com> <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Thu, 06 Jan 2011 18:44:06 -0000

Hi Greg,

On Thu, Jan 06, 2011 at 05:36:47PM +0100, Greg Wilkins wrote:
> So I think we all have to accept that some want masking and some
> don't.   So surely given this divide, making masking an extension is
> the reasonable and pragmatic way forward.

That's pretty much the point I was making as my first response to Sal'
poll : have the masking mandatory for browsers but ensure that it's
easy to make the protocol work without it so that implementations that
don't need/want it can get rid of it.

> The browser vendors who
> appear most concerned about this issue can make the extension
> mandatory, those that don't want masking in their particular
> deployment can opt out (so long as they are not using browser).

In my opinion it should work this way :
  - client sends handshake to server
  - server may announce in the first hello frame its masking capabilities
    and its intent to work with/without masking
  - browsers just have to refuse the non-masking mode
  - other clients can safely adapt to the server's capabilities

That may even make it possible to support AES-CTR or anything else if some
users find it more suited for their task.

> The arguments against masking as an extension are:
> 
>  + it could be turned off.  Well then don't implement it as an
> optional extension! don't allow it to be turned off in vulnerable
> deployments.
>  + extension mechanism is not up to the task.  Well we'd better fix it
> then, because masking is not that complex and if we can't handle that
> we have problems.
>  + There may be some attacks that apply to servers from non-WS clients
> which can have masking turned off.  Well if that ever becomes a
> problem, then those servers can also make the masking extension
> mandatory.
>  + Complexity of negotiating the extension.  Then make it a default
> extension and you have to negotiate not to have it.

I agree with the points above.

> It was really great to see some progress towards consensus around
> Upgrade+Masking.   It would be a great pity to see that stalled
> because of either insistence on a specific style of masking or refusal
> to accept that some really want to have masking.

Once again, I agree with the principle of masking provided it's optional.
What annoys me is that every time some progress is made, some unneeded
complexity is added somewhere (eg: HMAC to get a random key for each
block). All this complexity piling up comes at a substantial cost for
those who are not subject at all to the risks it is meant to address.

And I'm still thinking about the ability to build WS accelerators,
which would simply decode the traffic on the entry point, and use
multiplexing to forward it to a bunch of servers. Those severs will
have no use of the encoding at all, all they'll want is a low number
of threads, file descriptors, and CPU usage. It would be a pity if
the front accelerator has to compute an HMAC for every few characters
forwarded from a client to a server...

Regards,
Willy


From ekr@rtfm.com  Thu Jan  6 10:50:12 2011
Return-Path: <ekr@rtfm.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 8B48C3A6F3C for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 10:50:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.099
X-Spam-Level: 
X-Spam-Status: No, score=-102.099 tagged_above=-999 required=5 tests=[AWL=-0.123, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, 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 xD1geeC6-1td for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 10:50:11 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id 02CAE3A6CC6 for <hybi@ietf.org>; Thu,  6 Jan 2011 10:50:10 -0800 (PST)
Received: by yie19 with SMTP id 19so5067826yie.31 for <hybi@ietf.org>; Thu, 06 Jan 2011 10:52:17 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.26.24 with SMTP id d24mr2347850agj.160.1294339937683; Thu, 06 Jan 2011 10:52:17 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Thu, 6 Jan 2011 10:52:17 -0800 (PST)
In-Reply-To: <20110106184607.GB27099@1wt.eu>
References: <4D24D5E1.7070309@warmcat.com> <AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com> <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com> <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu>
Date: Thu, 6 Jan 2011 10:52:17 -0800
Message-ID: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=001485f9a68c3448dd04993200fb
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Thu, 06 Jan 2011 18:50:12 -0000

--001485f9a68c3448dd04993200fb
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Jan 6, 2011 at 10:46 AM, Willy Tarreau <w@1wt.eu> wrote:

>
> Once again, I agree with the principle of masking provided it's optional.
> What annoys me is that every time some progress is made, some unneeded
> complexity is added somewhere (eg: HMAC to get a random key for each
> block).


I don't recall anyone suggesting that. Certainly, it's not necessary. What's
necessary
is that the CTR IV for each block be random. Can you point to the message
where
someone suggested that?

-Ekr

--001485f9a68c3448dd04993200fb
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><div class=3D"gmail_quote">On Thu, Jan 6, 2011 at 10:46 AM, Willy Tarre=
au <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span=
> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im"><br>
</div>Once again, I agree with the principle of masking provided it&#39;s o=
ptional.<br>
What annoys me is that every time some progress is made, some unneeded<br>
complexity is added somewhere (eg: HMAC to get a random key for each<br>
block). </blockquote><div><br></div><div>I don&#39;t recall anyone suggesti=
ng that. Certainly, it&#39;s not necessary. What&#39;s necessary</div><div>=
is that the CTR IV for each block be random. Can you point to the message w=
here</div>
<div>someone suggested that?</div><div><br></div><div>-Ekr</div><div><br></=
div><div><br></div><div>=A0</div></div><br>

--001485f9a68c3448dd04993200fb--

From w@1wt.eu  Thu Jan  6 14:12:24 2011
Return-Path: <w@1wt.eu>
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 78F5D3A6B9E for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 14:12:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.14
X-Spam-Level: 
X-Spam-Status: No, score=-2.14 tagged_above=-999 required=5 tests=[AWL=-0.097,  BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 k-DOiryHIovD for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 14:12:23 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 9FF793A6F48 for <hybi@ietf.org>; Thu,  6 Jan 2011 14:12:21 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p06MEQ9V028400; Thu, 6 Jan 2011 23:14:26 +0100
Date: Thu, 6 Jan 2011 23:14:26 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110106221426.GA28367@1wt.eu>
References: <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com> <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Thu, 06 Jan 2011 22:12:24 -0000

On Thu, Jan 06, 2011 at 10:52:17AM -0800, Eric Rescorla wrote:
> On Thu, Jan 6, 2011 at 10:46 AM, Willy Tarreau <w@1wt.eu> wrote:
> 
> >
> > Once again, I agree with the principle of masking provided it's optional.
> > What annoys me is that every time some progress is made, some unneeded
> > complexity is added somewhere (eg: HMAC to get a random key for each
> > block).
> 
> 
> I don't recall anyone suggesting that. Certainly, it's not necessary. What's
> necessary
> is that the CTR IV for each block be random. Can you point to the message
> where
> someone suggested that?

It was yourself as a response to John :-) right here :

   http://www.ietf.org/mail-archive/web/hybi/current/msg05425.html

He was suggesting :
   "...
    To send a frame, the client performs the following steps:
    - chooses a random per-frame-key (size TBD based on brute force
      attacks against the key, but likely 4-8 bytes)
    - computes the 20-byte SHA1 of the string "WebSocket", server-nonce,
      client-nonce, per-frame-key (in that order)
    - send the per-frame-key
    - XORs each byte in the frame, including headers and after compression
      if any, with successive bytes of the SHA1 hash and sends them
    ..."

and you replied :

   "A few comments as token crypto-oriented guy:
    (1) I'd prefer a UUID to the WebSocket string.
    (2) I'd prefer HMAC to SHA-1..."

Regards,
Willy


From ekr@rtfm.com  Thu Jan  6 15:35:21 2011
Return-Path: <ekr@rtfm.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 5AF3C3A6D23 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 15:35:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.097
X-Spam-Level: 
X-Spam-Status: No, score=-102.097 tagged_above=-999 required=5 tests=[AWL=-0.121, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, 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 uTF6FC7S5MaA for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 15:35:20 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id 211B93A6F7C for <hybi@ietf.org>; Thu,  6 Jan 2011 15:35:20 -0800 (PST)
Received: by yie19 with SMTP id 19so5162053yie.31 for <hybi@ietf.org>; Thu, 06 Jan 2011 15:37:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.232.6 with SMTP id e6mr27519330agh.52.1294357046714; Thu, 06 Jan 2011 15:37:26 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Thu, 6 Jan 2011 15:37:26 -0800 (PST)
In-Reply-To: <20110106221426.GA28367@1wt.eu>
References: <4D24DEAE.8070007@warmcat.com> <AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com> <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu>
Date: Thu, 6 Jan 2011 15:37:26 -0800
Message-ID: <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=001636284f60fb61b7049935fb4a
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Thu, 06 Jan 2011 23:35:21 -0000

--001636284f60fb61b7049935fb4a
Content-Type: text/plain; charset=ISO-8859-1

My bad, I misunderstood the context:

1. Yes, I think you should generate completely fresh keystream for each
record.
2. We had originally talked about using AES-CTR for this, but it's possible
that for
export reasons people might prefer HMAC-SHA1.

This isn't some piece of new complexity: it's been part of the proposed
masking
since the very beginning. The only difference is that HMAC-SHA1 is being
suggested as
an AES-CTR replacement. I realize that you don't think this is necessary,
and I guess
I might be willing to live with a simpler mechanism, but it's not, as you
suggest, something
that just appeared when we were starting to make progress.

-Ekr

On Thu, Jan 6, 2011 at 2:14 PM, Willy Tarreau <w@1wt.eu> wrote:

> On Thu, Jan 06, 2011 at 10:52:17AM -0800, Eric Rescorla wrote:
> > On Thu, Jan 6, 2011 at 10:46 AM, Willy Tarreau <w@1wt.eu> wrote:
> >
> > >
> > > Once again, I agree with the principle of masking provided it's
> optional.
> > > What annoys me is that every time some progress is made, some unneeded
> > > complexity is added somewhere (eg: HMAC to get a random key for each
> > > block).
> >
> >
> > I don't recall anyone suggesting that. Certainly, it's not necessary.
> What's
> > necessary
> > is that the CTR IV for each block be random. Can you point to the message
> > where
> > someone suggested that?
>
> It was yourself as a response to John :-) right here :
>
>   http://www.ietf.org/mail-archive/web/hybi/current/msg05425.html
>
> He was suggesting :
>   "...
>    To send a frame, the client performs the following steps:
>    - chooses a random per-frame-key (size TBD based on brute force
>      attacks against the key, but likely 4-8 bytes)
>    - computes the 20-byte SHA1 of the string "WebSocket", server-nonce,
>      client-nonce, per-frame-key (in that order)
>    - send the per-frame-key
>    - XORs each byte in the frame, including headers and after compression
>      if any, with successive bytes of the SHA1 hash and sends them
>    ..."
>
> and you replied :
>
>   "A few comments as token crypto-oriented guy:
>    (1) I'd prefer a UUID to the WebSocket string.
>    (2) I'd prefer HMAC to SHA-1..."
>
> Regards,
> Willy
>
>

--001636284f60fb61b7049935fb4a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

My bad, I misunderstood the context:<div><br></div><div>1. Yes, I think you=
 should generate completely fresh keystream for each record.</div><div>2. W=
e had originally talked about using AES-CTR for this, but it&#39;s possible=
 that for</div>
<div>export reasons people might prefer HMAC-SHA1.</div><div><br></div><div=
>This isn&#39;t some piece of new complexity: it&#39;s been part of the pro=
posed masking</div><div>since the very beginning. The only difference is th=
at HMAC-SHA1 is being suggested as</div>
<div>an AES-CTR replacement. I realize that you don&#39;t think this is nec=
essary, and I guess</div><div>I might be willing to live with a simpler mec=
hanism, but it&#39;s not, as you suggest, something</div><div>that just app=
eared when we were starting to make progress.</div>
<div><br></div><div>-Ekr</div><div><br><div><div><div><div><div><div class=
=3D"gmail_quote">On Thu, Jan 6, 2011 at 2:14 PM, Willy Tarreau <span dir=3D=
"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wrote:<br><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #=
ccc solid;padding-left:1ex;">
<div><div></div><div class=3D"h5">On Thu, Jan 06, 2011 at 10:52:17AM -0800,=
 Eric Rescorla wrote:<br>
&gt; On Thu, Jan 6, 2011 at 10:46 AM, Willy Tarreau &lt;<a href=3D"mailto:w=
@1wt.eu">w@1wt.eu</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; Once again, I agree with the principle of masking provided it&#39=
;s optional.<br>
&gt; &gt; What annoys me is that every time some progress is made, some unn=
eeded<br>
&gt; &gt; complexity is added somewhere (eg: HMAC to get a random key for e=
ach<br>
&gt; &gt; block).<br>
&gt;<br>
&gt;<br>
&gt; I don&#39;t recall anyone suggesting that. Certainly, it&#39;s not nec=
essary. What&#39;s<br>
&gt; necessary<br>
&gt; is that the CTR IV for each block be random. Can you point to the mess=
age<br>
&gt; where<br>
&gt; someone suggested that?<br>
<br>
</div></div>It was yourself as a response to John :-) right here :<br>
<br>
 =A0 <a href=3D"http://www.ietf.org/mail-archive/web/hybi/current/msg05425.=
html" target=3D"_blank">http://www.ietf.org/mail-archive/web/hybi/current/m=
sg05425.html</a><br>
<br>
He was suggesting :<br>
 =A0 &quot;...<br>
 =A0 =A0To send a frame, the client performs the following steps:<br>
 =A0 =A0- chooses a random per-frame-key (size TBD based on brute force<br>
 =A0 =A0 =A0attacks against the key, but likely 4-8 bytes)<br>
 =A0 =A0- computes the 20-byte SHA1 of the string &quot;WebSocket&quot;, se=
rver-nonce,<br>
 =A0 =A0 =A0client-nonce, per-frame-key (in that order)<br>
 =A0 =A0- send the per-frame-key<br>
 =A0 =A0- XORs each byte in the frame, including headers and after compress=
ion<br>
 =A0 =A0 =A0if any, with successive bytes of the SHA1 hash and sends them<b=
r>
 =A0 =A0...&quot;<br>
<br>
and you replied :<br>
<br>
 =A0 &quot;A few comments as token crypto-oriented guy:<br>
 =A0 =A0(1) I&#39;d prefer a UUID to the WebSocket string.<br>
 =A0 =A0(2) I&#39;d prefer HMAC to SHA-1...&quot;<br>
<br>
Regards,<br>
<font color=3D"#888888">Willy<br>
<br>
</font></blockquote></div><br></div></div></div></div></div></div>

--001636284f60fb61b7049935fb4a--

From bruce@callenish.com  Thu Jan  6 16:14:04 2011
Return-Path: <bruce@callenish.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 A91533A6F6B for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 16:14:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.286
X-Spam-Level: 
X-Spam-Status: No, score=-2.286 tagged_above=-999 required=5 tests=[AWL=-0.287, BAYES_00=-2.599, J_CHICKENPOX_37=0.6]
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 I7L3UbxcE7o2 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 16:14:04 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id F37603A6F3E for <hybi@ietf.org>; Thu,  6 Jan 2011 16:14:03 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pb001-0006jU-MF for hybi@ietf.org; Thu, 06 Jan 2011 16:16:09 -0800
Message-ID: <4D265B4F.2080007@callenish.com>
Date: Thu, 06 Jan 2011 16:16:15 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <20110105095727.GE15851@1wt.eu> <4D245963.5030104@warmcat.com>	<4D24D3FB.8040202@ericsson.com> <4D24D5E1.7070309@warmcat.com>	<AANLkTikMO5KmCFdOU-Rg_jDm4qpsWpfP0xEbesjWd20V@mail.gmail.com>	<4D24DEAE.8070007@warmcat.com>	<AANLkTikLsY4=+Jer28jJdq8j-B=DtDNAd_XOkDc18yRW@mail.gmail.com>	<4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture>	<4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture>	<4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>
In-Reply-To: <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 00:14:04 -0000

On 06/01/2011 8:36 AM, Greg Wilkins wrote:
> Both camps need to accept that the concerns of the other camp are at
> least valid for them - even if they are dubious if they are real
> technical concerns or just political/stylistic concerns.  Telling
> somebody: "these are not the concerns you should be worried about" is
> not very helpful (unless the concerns are about droids and you are
> obe-wan kenobi).

This is a really important point. The reality is that just because 
something is not your fault does not mean it is not your problem. I'm 
sure we have all experienced situations where that is true. For browser 
developers, just having the browser involved in an attack results in 
fingers being pointed at them. Masking gives them a simple story to tell 
about how to prevent a large number of potential attacks and will let 
them sleep better at night knowing it is less likely that they will have 
to pull all-nighters to work around some bizarre hack that isn't even 
their fault. Why not let them have it?

Besides, supporting mandatory masking in browsers will be beneficial 
even to those who don't see the need because it will make future 
decisions concerning the protocol much easier to make. By limiting 
attacker control of bits on the wire to just a URL, all kinds of debate 
about the impact of a change to the Websocket protocol becomes 
simplified. Just look at how it simplified the GET+Upgrade vs. CONNECT 
debate.

As I've said before, even if you don't personally understand why a group 
on this list wants something, you should trust them enough to allow that 
they probably have a good reason for wanting it.

>   + Complexity of negotiating the extension.  Then make it a default
> extension and you have to negotiate not to have it.

I think this point nicely deals with the asymmetric nature of the 
client/server behaviour I have an issue with. Imagine if the spec 
indicates that browsers will only send masked data but will accept 
either masked or unmasked data back from the server. Then simple servers 
that didn't fully implement extensions would just mask by default, and 
those that wanted to efficiently sendfile() or turn off masking in a 
trusted environment would have to deal with the added complexity of 
implementing the "nomask" extension, as would clients or peers that 
wanted no masking.


From bruce@callenish.com  Thu Jan  6 16:35:38 2011
Return-Path: <bruce@callenish.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 00C183A6F63 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 16:35:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.575
X-Spam-Level: 
X-Spam-Status: No, score=-2.575 tagged_above=-999 required=5 tests=[AWL=0.024,  BAYES_00=-2.599]
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 hFF+qvWzDHdd for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 16:35:35 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id E65C73A6D01 for <hybi@ietf.org>; Thu,  6 Jan 2011 16:35:35 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pb0Kr-0003vx-OZ for hybi@ietf.org; Thu, 06 Jan 2011 16:37:41 -0800
Message-ID: <4D26605B.1090409@callenish.com>
Date: Thu, 06 Jan 2011 16:37:47 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Fri, 07 Jan 2011 00:35:38 -0000

On 06/01/2011 1:43 AM, Greg Wilkins wrote:
>
> a difficulty of this working group is that we were never able to even
> agree on a requirement document as the various constituencies
> suspected each other of steering the requirements towards their own
> use-cases. Hence it is difficult to really say what is in scope or out
> of scope.

Thanks for the explanation, Greg. That explains a lot about why this 
group is so dysfunctional. If you haven't agreed on what your goal is, 
no wonder you are all pulling in different directions. A trade-off that 
seems obvious to someone with a specific goal in mind will seem 
insensible to another person with a different goal.

Should the design of Websockets consider uses of peer-to-peer? Should it 
give consideration to issues that are specific to Intranet use? Should 
designers of the spec worry about non-browser clients like custom 
written Websocket clients and Websocket servers that act as clients to 
other servers? Or is the only thing that really matters when designing 
Websockets the browser and server interactions, and any other use that 
happens to work is just gravy?

I think that agreeing on these basic questions will likely eliminate a 
lot of the conflict on this list. Also, as a potential customer of this 
specification it would be very useful to me to have a clear 
understanding of what the intended uses for Websockets are, so that I 
can better understand where I am supposed to be applying it in my future 
designs.

So far it appears that Greg, Brodie, Jerod, and I favour including 
peer-to-peer design considerations in the spec. I am not sure, but it 
sounds like John considers it out of scope and Scott considers it in 
scope. What about the rest of you?


From jat@google.com  Thu Jan  6 17:22:15 2011
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 5862C3A6BA8 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 17:22:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.903
X-Spam-Level: 
X-Spam-Status: No, score=-103.903 tagged_above=-999 required=5 tests=[AWL=-0.927, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 eF45Kizt5fzH for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 17:22:14 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 308D13A69C9 for <hybi@ietf.org>; Thu,  6 Jan 2011 17:22:14 -0800 (PST)
Received: from hpaq13.eem.corp.google.com (hpaq13.eem.corp.google.com [172.25.149.13]) by smtp-out.google.com with ESMTP id p071OKYX017616 for <hybi@ietf.org>; Thu, 6 Jan 2011 17:24:20 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294363460; bh=6IP7JNZtMc7HFWTjfJzSFokg8wI=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=jdhzTvASudAM13jtJDlWv8vgbjacuPtSBbJX9ufzbEbfnC2TEkhetvqtGfQfWza4X ig7ncuISRv3YgxTn0QfTw==
Received: from gxk20 (gxk20.prod.google.com [10.202.11.20]) by hpaq13.eem.corp.google.com with ESMTP id p071OIA8009785 for <hybi@ietf.org>; Thu, 6 Jan 2011 17:24:18 -0800
Received: by gxk20 with SMTP id 20so7210525gxk.6 for <hybi@ietf.org>; Thu, 06 Jan 2011 17:24:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=Ijp7S6MKXFWWK6S7JAhuwObqFIfbjQocbGcqnjn7jYU=; b=EZMqXGfuLjyYCq3F6mZmVPe05+QY/zUa1PJ2nTkxy7VPzFOTRRY1mz2IbjBZv7APqS mUi63qdXvjXjasqkX4lQ==
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=TaIfNQvShPIH95BlblNp0u7YUesElCYbiiPsSx/3LopPGrslH5wqRd6ChmnoQ6jli1 /oIDEmJtT6anoERrbA7Q==
Received: by 10.150.228.1 with SMTP id a1mr7554250ybh.434.1294363457491; Thu, 06 Jan 2011 17:24:17 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Thu, 6 Jan 2011 17:23:57 -0800 (PST)
In-Reply-To: <4D26605B.1090409@callenish.com>
References: <4D26605B.1090409@callenish.com>
From: John Tamplin <jat@google.com>
Date: Thu, 6 Jan 2011 20:23:57 -0500
Message-ID: <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: multipart/alternative; boundary=000e0cd4040e1811b00499377ab1
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Fri, 07 Jan 2011 01:22:15 -0000

--000e0cd4040e1811b00499377ab1
Content-Type: text/plain; charset=UTF-8

On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <bruce@callenish.com> wrote:

> So far it appears that Greg, Brodie, Jerod, and I favour including
> peer-to-peer design considerations in the spec. I am not sure, but it sounds
> like John considers it out of scope and Scott considers it in scope. What
> about the rest of you?
>

I am not opposed to it exactly, but given how long everything has taken I am
keen to keep the base protocol minimal so we can actually get something out
the door.

Just like when we were discussing compression, multiplexing, and metadata
during the design of the basic framing, we weren't getting anywhere until we
stripped it down to the minimum.  To overcome objections about stripping out
too much, I wrote up examples of how the base framing could be extended in a
compatible fashion to incorporate those use-cases and we were able to agree
on the base framing.

If you think peer-to-peer WebSockets is important, I suggest talking about
specific things that need to be represented in the base protocol in order to
allow that be added at a later time.  So far the suggestion has been that
masking is mandatory and an extension could be defined in the future to
remove it has been met with skepticism that people who build infrastructure
pieces will build in that extensibility (if I am mis-stating the objections,
please correct me).  I'm not sure this is any different than the
compression/mux/metadata cases we already dealt with, and my feeling is if
such equipment has to be upgraded later to support new things so be it.  I
personally am fine with adding language into the spec saying what things are
expected to be changed so implementors should be prepared to update the
handling if that helps address the concern.  However, I am really loathe to
try and define peer-to-peer operation in the base spec because I think it
will unreasonably extend the process of getting the base protocol out the
door.

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

--000e0cd4040e1811b00499377ab1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <=
span dir=3D"ltr">&lt;<a href=3D"mailto:bruce@callenish.com">bruce@callenish=
.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">So far it appears that Greg, Brodie, Jerod, and I favour =
including peer-to-peer design considerations in the spec. I am not sure, bu=
t it sounds like John considers it out of scope and Scott considers it in s=
cope. What about the rest of you?</div>

</blockquote><div><br></div><div>I am not opposed to it exactly, but given =
how long everything has taken I am keen to keep the base protocol minimal s=
o we can actually get something out the door.</div><div><br></div><div>

Just like when we were discussing compression, multiplexing, and metadata d=
uring the design of the basic framing, we weren&#39;t getting anywhere unti=
l we stripped it down to the minimum. =C2=A0To overcome objections about st=
ripping out too much, I wrote up examples of how the base framing could be =
extended in a compatible fashion to incorporate those use-cases and we were=
 able to agree on the base framing.</div>

<div><br></div><div>If you think peer-to-peer WebSockets is important, I su=
ggest talking about specific things that need to be represented in the base=
 protocol in order to allow that be added at a later time. =C2=A0So far the=
 suggestion has been that masking is mandatory and an extension could be de=
fined in the future to remove it has been met with=C2=A0skepticism=C2=A0tha=
t people who build infrastructure pieces will build in that extensibility (=
if I am mis-stating the objections, please correct me). =C2=A0I&#39;m not s=
ure this is any different than the compression/mux/metadata cases we alread=
y dealt with, and my feeling is if such equipment has to be upgraded later =
to support new things so be it. =C2=A0I personally am fine with adding lang=
uage into the spec saying what things are expected to be changed so impleme=
ntors should be prepared to update the handling if that helps address the c=
oncern. =C2=A0However, I am really loathe to try and define peer-to-peer op=
eration in the base spec because I think it will unreasonably extend the pr=
ocess of getting the base protocol out the door.</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--000e0cd4040e1811b00499377ab1--

From gmonte@microsoft.com  Thu Jan  6 17:41:58 2011
Return-Path: <gmonte@microsoft.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 7158E3A6C9E for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 17:41:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.472
X-Spam-Level: 
X-Spam-Status: No, score=-10.472 tagged_above=-999 required=5 tests=[AWL=0.126, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
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 KoZYzeAND0Kd for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 17:41:57 -0800 (PST)
Received: from smtp.microsoft.com (smtp.microsoft.com [131.107.115.215]) by core3.amsl.com (Postfix) with ESMTP id 57D193A6BA8 for <hybi@ietf.org>; Thu,  6 Jan 2011 17:41:57 -0800 (PST)
Received: from TK5EX14MLTC102.redmond.corp.microsoft.com (157.54.79.180) by TK5-EXGWY-E802.partners.extranet.microsoft.com (10.251.56.168) with Microsoft SMTP Server (TLS) id 8.2.176.0; Thu, 6 Jan 2011 17:43:57 -0800
Received: from TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com (157.54.71.68) by TK5EX14MLTC102.redmond.corp.microsoft.com (157.54.79.180) with Microsoft SMTP Server (TLS) id 14.1.255.3; Thu, 6 Jan 2011 17:43:57 -0800
Received: from TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com ([169.254.4.151]) by TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com ([157.54.71.68]) with mapi; Thu, 6 Jan 2011 17:43:57 -0800
From: Gabriel Montenegro <gmonte@microsoft.com>
To: John Tamplin <jat@google.com>, Bruce Atherton <bruce@callenish.com>
Thread-Topic: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
Thread-Index: AQHLrgmq/w4+Ld5wRUKExWVhu67oqJPEu34w
Date: Fri, 7 Jan 2011 01:44:30 +0000
Message-ID: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>
In-Reply-To: <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Content-Type: multipart/alternative; boundary="_000_CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82TK5EX14MBXW604w_"
MIME-Version: 1.0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is	Upgrade...?
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: Fri, 07 Jan 2011 01:41:58 -0000

--_000_CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82TK5EX14MBXW604w_
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64

DQpKb2huIFRhbXBsaW4gd3JvdGU6DQrigKYgIEhvd2V2ZXIsIEkgYW0gcmVhbGx5IGxvYXRoZSB0
byB0cnkgYW5kIGRlZmluZSBwZWVyLXRvLXBlZXIgb3BlcmF0aW9uIGluIHRoZSBiYXNlIHNwZWMg
YmVjYXVzZSBJIHRoaW5rIGl0IHdpbGwgdW5yZWFzb25hYmx5IGV4dGVuZCB0aGUgcHJvY2VzcyBv
ZiBnZXR0aW5nIHRoZSBiYXNlIHByb3RvY29sIG91dCB0aGUgZG9vci4NCg0KW2dhYl0gSSBhZ3Jl
ZS4gV0dzIGFyZSB0eXBpY2FsbHkgY2hhcnRlcmVkIHdpdGggYSBzcGVjaWZpYyBmb2N1cyBpbiBv
cmRlciB0byBlYXNlIHByb2dyZXNzLiBUaGUgY2hhcnRlciBhcyBhcHByb3ZlZCBieSB0aGUgSUVT
RyBpbmNsdWRlcyB0aGlzOg0KICBUaGUgSHlwZXJ0ZXh0LUJpZGlyZWN0aW9uYWwgKEh5QmkpIHdv
cmtpbmcgZ3JvdXAgd2lsbCBzZWVrDQogIHN0YW5kYXJkaXphdGlvbiBvZiBvbmUgYXBwcm9hY2gg
dG8gbWFpbnRhaW4gYmlkaXJlY3Rpb25hbA0KICBjb21tdW5pY2F0aW9ucyBiZXR3ZWVuIHRoZSBI
VFRQIGNsaWVudCwgc2VydmVyIGFuZCBpbnRlcm1lZGlhdGUNCiAgZW50aXRpZXMsIHdoaWNoIHdp
bGwgcHJvdmlkZSBtb3JlIGVmZmljaWVuY3kgY29tcGFyZWQgdG8gdGhlIGN1cnJlbnQNCiAgdXNl
IG9mIGhhbmdpbmcgcmVxdWVzdHMuDQoNCg0KVGhpcyBwcm9taW5lbnRseSB0YWxrcyBhYm91dCBj
bGllbnQtc2VydmVyIG5vdCBwZWVyLXRvLXBlZXIuICBXaGVuIHBlb3BsZSBoYXZlIGFza2VkIG1l
IGlmIHAycCBpcyBpbiBzY29wZSwgSeKAmXZlIGFsd2F5cyBhbnN3ZXJlZCDigJxubywgYnkgY2hh
cnRlcuKAnSBhcyB0aGF0IGlzIGhvdyBJ4oCZdmUgaW50ZXJwcmV0ZWQgdGhlIGFib3ZlLiBHaXZl
biB0aGUgZGlmZmljdWx0aWVzIGluIHRoaXMgZ3JvdXAsIEkgYWdyZWUgdGhhdCBpcyBiZXN0IGxl
ZnQgYWZ0ZXIgd2UgZGVsaXZlciBvbiB0aGUgY3VycmVudCBpdGVtcy4gV2UgY2FuIHRoZW4gdGFj
a2xlIGEgcmUtY2hhcnRlcmluZyBvcGVyYXRpb24gYW5kIG1vdmUgb24gdG8gb3RoZXIgZWZmb3J0
cywgYnV0IGZvciBub3cgSSB0aGluayB0aGF0IGlzIG5vdCBvbmx5IG91dCBvZiBzY29wZSwgYnV0
IHdvdWxkIGRlbGF5IHVzIGV2ZW4gZnVydGhlci4NCg==

--_000_CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82TK5EX14MBXW604w_
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: base64

PGh0bWwgeG1sbnM6dj0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp2bWwiIHhtbG5zOm89InVy
bjpzY2hlbWFzLW1pY3Jvc29mdC1jb206b2ZmaWNlOm9mZmljZSIgeG1sbnM6dz0idXJuOnNjaGVt
YXMtbWljcm9zb2Z0LWNvbTpvZmZpY2U6d29yZCIgeG1sbnM6bT0iaHR0cDovL3NjaGVtYXMubWlj
cm9zb2Z0LmNvbS9vZmZpY2UvMjAwNC8xMi9vbW1sIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
VFIvUkVDLWh0bWw0MCI+PGhlYWQ+PG1ldGEgaHR0cC1lcXVpdj1Db250ZW50LVR5cGUgY29udGVu
dD0idGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij48bWV0YSBuYW1lPUdlbmVyYXRvciBjb250ZW50
PSJNaWNyb3NvZnQgV29yZCAxNCAoZmlsdGVyZWQgbWVkaXVtKSI+PHN0eWxlPjwhLS0NCi8qIEZv
bnQgRGVmaW5pdGlvbnMgKi8NCkBmb250LWZhY2UNCgl7Zm9udC1mYW1pbHk6Ik1TIE1pbmNobyI7
DQoJcGFub3NlLTE6MiAyIDYgOSA0IDIgNSA4IDMgNDt9DQpAZm9udC1mYWNlDQoJe2ZvbnQtZmFt
aWx5OiJNUyBNaW5jaG8iOw0KCXBhbm9zZS0xOjIgMiA2IDkgNCAyIDUgOCAzIDQ7fQ0KQGZvbnQt
ZmFjZQ0KCXtmb250LWZhbWlseTpDYWxpYnJpOw0KCXBhbm9zZS0xOjIgMTUgNSAyIDIgMiA0IDMg
MiA0O30NCkBmb250LWZhY2UNCgl7Zm9udC1mYW1pbHk6VGFob21hOw0KCXBhbm9zZS0xOjIgMTEg
NiA0IDMgNSA0IDQgMiA0O30NCkBmb250LWZhY2UNCgl7Zm9udC1mYW1pbHk6IlxATVMgTWluY2hv
IjsNCglwYW5vc2UtMToyIDIgNiA5IDQgMiA1IDggMyA0O30NCi8qIFN0eWxlIERlZmluaXRpb25z
ICovDQpwLk1zb05vcm1hbCwgbGkuTXNvTm9ybWFsLCBkaXYuTXNvTm9ybWFsDQoJe21hcmdpbjow
aW47DQoJbWFyZ2luLWJvdHRvbTouMDAwMXB0Ow0KCWZvbnQtc2l6ZToxMi4wcHQ7DQoJZm9udC1m
YW1pbHk6IlRpbWVzIE5ldyBSb21hbiIsInNlcmlmIjt9DQphOmxpbmssIHNwYW4uTXNvSHlwZXJs
aW5rDQoJe21zby1zdHlsZS1wcmlvcml0eTo5OTsNCgljb2xvcjpibHVlOw0KCXRleHQtZGVjb3Jh
dGlvbjp1bmRlcmxpbmU7fQ0KYTp2aXNpdGVkLCBzcGFuLk1zb0h5cGVybGlua0ZvbGxvd2VkDQoJ
e21zby1zdHlsZS1wcmlvcml0eTo5OTsNCgljb2xvcjpwdXJwbGU7DQoJdGV4dC1kZWNvcmF0aW9u
OnVuZGVybGluZTt9DQpwcmUNCgl7bXNvLXN0eWxlLXByaW9yaXR5Ojk5Ow0KCW1zby1zdHlsZS1s
aW5rOiJIVE1MIFByZWZvcm1hdHRlZCBDaGFyIjsNCgltYXJnaW46MGluOw0KCW1hcmdpbi1ib3R0
b206LjAwMDFwdDsNCglmb250LXNpemU6MTAuMHB0Ow0KCWZvbnQtZmFtaWx5OiJDb3VyaWVyIE5l
dyI7fQ0Kc3Bhbi5FbWFpbFN0eWxlMTcNCgl7bXNvLXN0eWxlLXR5cGU6cGVyc29uYWwtcmVwbHk7
DQoJZm9udC1mYW1pbHk6IkNhbGlicmkiLCJzYW5zLXNlcmlmIjsNCgljb2xvcjojMUY0OTdEO30N
CnNwYW4uSFRNTFByZWZvcm1hdHRlZENoYXINCgl7bXNvLXN0eWxlLW5hbWU6IkhUTUwgUHJlZm9y
bWF0dGVkIENoYXIiOw0KCW1zby1zdHlsZS1wcmlvcml0eTo5OTsNCgltc28tc3R5bGUtbGluazoi
SFRNTCBQcmVmb3JtYXR0ZWQiOw0KCWZvbnQtZmFtaWx5OiJDb3VyaWVyIE5ldyI7fQ0KLk1zb0No
cERlZmF1bHQNCgl7bXNvLXN0eWxlLXR5cGU6ZXhwb3J0LW9ubHk7DQoJZm9udC1mYW1pbHk6IkNh
bGlicmkiLCJzYW5zLXNlcmlmIjt9DQpAcGFnZSBXb3JkU2VjdGlvbjENCgl7c2l6ZTo4LjVpbiAx
MS4waW47DQoJbWFyZ2luOjEuMGluIDEuMGluIDEuMGluIDEuMGluO30NCmRpdi5Xb3JkU2VjdGlv
bjENCgl7cGFnZTpXb3JkU2VjdGlvbjE7fQ0KLS0+PC9zdHlsZT48IS0tW2lmIGd0ZSBtc28gOV0+
PHhtbD4NCjxvOnNoYXBlZGVmYXVsdHMgdjpleHQ9ImVkaXQiIHNwaWRtYXg9IjEwMjYiIC8+DQo8
L3htbD48IVtlbmRpZl0tLT48IS0tW2lmIGd0ZSBtc28gOV0+PHhtbD4NCjxvOnNoYXBlbGF5b3V0
IHY6ZXh0PSJlZGl0Ij4NCjxvOmlkbWFwIHY6ZXh0PSJlZGl0IiBkYXRhPSIxIiAvPg0KPC9vOnNo
YXBlbGF5b3V0PjwveG1sPjwhW2VuZGlmXS0tPjwvaGVhZD48Ym9keSBsYW5nPUVOLVVTIGxpbms9
Ymx1ZSB2bGluaz1wdXJwbGU+PGRpdiBjbGFzcz1Xb3JkU2VjdGlvbjE+PHAgY2xhc3M9TXNvTm9y
bWFsPjxzcGFuIHN0eWxlPSdmb250LXNpemU6MTEuMHB0O2ZvbnQtZmFtaWx5OiJDYWxpYnJpIiwi
c2Fucy1zZXJpZiI7Y29sb3I6IzFGNDk3RCc+PG86cD4mbmJzcDs8L286cD48L3NwYW4+PC9wPjxk
aXYgc3R5bGU9J2JvcmRlcjpub25lO2JvcmRlci1sZWZ0OnNvbGlkIGJsdWUgMS41cHQ7cGFkZGlu
ZzowaW4gMGluIDBpbiA0LjBwdCc+PGRpdj48ZGl2IHN0eWxlPSdib3JkZXI6bm9uZTtib3JkZXIt
dG9wOnNvbGlkICNCNUM0REYgMS4wcHQ7cGFkZGluZzozLjBwdCAwaW4gMGluIDBpbic+PHAgY2xh
c3M9TXNvTm9ybWFsPjxzcGFuIHN0eWxlPSdmb250LXNpemU6MTAuMHB0O2ZvbnQtZmFtaWx5OiJU
YWhvbWEiLCJzYW5zLXNlcmlmIic+Sm9obiBUYW1wbGluIHdyb3RlOjxicj48Yj48c3BhbiBzdHls
ZT0nY29sb3I6IzFGNDk3RCc+4oCmPC9zcGFuPjwvYj48L3NwYW4+ICZuYnNwO0hvd2V2ZXIsIEkg
YW0gcmVhbGx5IGxvYXRoZSB0byB0cnkgYW5kIGRlZmluZSBwZWVyLXRvLXBlZXIgb3BlcmF0aW9u
IGluIHRoZSBiYXNlIHNwZWMgYmVjYXVzZSBJIHRoaW5rIGl0IHdpbGwgdW5yZWFzb25hYmx5IGV4
dGVuZCB0aGUgcHJvY2VzcyBvZiBnZXR0aW5nIHRoZSBiYXNlIHByb3RvY29sIG91dCB0aGUgZG9v
ci48bzpwPjwvbzpwPjwvcD48L2Rpdj48L2Rpdj48ZGl2PjxkaXY+PHAgY2xhc3M9TXNvTm9ybWFs
PjxzcGFuIHN0eWxlPSdmb250LXNpemU6MTEuMHB0O2ZvbnQtZmFtaWx5OiJDYWxpYnJpIiwic2Fu
cy1zZXJpZiI7Y29sb3I6IzFGNDk3RCc+PG86cD4mbmJzcDs8L286cD48L3NwYW4+PC9wPjxwIGNs
YXNzPU1zb05vcm1hbD48Yj48aT48c3BhbiBzdHlsZT0nZm9udC1zaXplOjExLjBwdDtmb250LWZh
bWlseToiQ2FsaWJyaSIsInNhbnMtc2VyaWYiO2NvbG9yOiMxRjQ5N0QnPltnYWJdIDwvc3Bhbj48
L2k+PC9iPjxzcGFuIHN0eWxlPSdmb250LXNpemU6MTEuMHB0O2ZvbnQtZmFtaWx5OiJDYWxpYnJp
Iiwic2Fucy1zZXJpZiI7Y29sb3I6IzFGNDk3RCc+SSBhZ3JlZS4gV0dzIGFyZSB0eXBpY2FsbHkg
Y2hhcnRlcmVkIHdpdGggYSBzcGVjaWZpYyBmb2N1cyBpbiBvcmRlciB0byBlYXNlIHByb2dyZXNz
LiBUaGUgY2hhcnRlciBhcyBhcHByb3ZlZCBieSB0aGUgSUVTRyBpbmNsdWRlcyB0aGlzOjxvOnA+
PC9vOnA+PC9zcGFuPjwvcD48cCBjbGFzcz1Nc29Ob3JtYWw+PHNwYW4gc3R5bGU9J2ZvbnQtc2l6
ZToxMC4wcHQ7Zm9udC1mYW1pbHk6IkNvdXJpZXIgTmV3Iic+wqAgVGhlIEh5cGVydGV4dC1CaWRp
cmVjdGlvbmFsIChIeUJpKSB3b3JraW5nIGdyb3VwIHdpbGwgc2VlazxvOnA+PC9vOnA+PC9zcGFu
PjwvcD48cCBjbGFzcz1Nc29Ob3JtYWw+PHNwYW4gc3R5bGU9J2ZvbnQtc2l6ZToxMC4wcHQ7Zm9u
dC1mYW1pbHk6IkNvdXJpZXIgTmV3Iic+wqAgc3RhbmRhcmRpemF0aW9uIG9mIG9uZSBhcHByb2Fj
aCB0byBtYWludGFpbiBiaWRpcmVjdGlvbmFsPG86cD48L286cD48L3NwYW4+PC9wPjxwIGNsYXNz
PU1zb05vcm1hbD48c3BhbiBzdHlsZT0nZm9udC1zaXplOjEwLjBwdDtmb250LWZhbWlseToiQ291
cmllciBOZXciJz7CoCBjb21tdW5pY2F0aW9ucyBiZXR3ZWVuIHRoZSBIVFRQIGNsaWVudCwgc2Vy
dmVyIGFuZCBpbnRlcm1lZGlhdGU8bzpwPjwvbzpwPjwvc3Bhbj48L3A+PHAgY2xhc3M9TXNvTm9y
bWFsPjxzcGFuIHN0eWxlPSdmb250LXNpemU6MTAuMHB0O2ZvbnQtZmFtaWx5OiJDb3VyaWVyIE5l
dyInPsKgIGVudGl0aWVzLCB3aGljaCB3aWxsIHByb3ZpZGUgbW9yZSBlZmZpY2llbmN5IGNvbXBh
cmVkIHRvIHRoZSBjdXJyZW50PG86cD48L286cD48L3NwYW4+PC9wPjxwIGNsYXNzPU1zb05vcm1h
bD48c3BhbiBzdHlsZT0nZm9udC1zaXplOjEwLjBwdDtmb250LWZhbWlseToiQ291cmllciBOZXci
Jz7CoCB1c2Ugb2YgaGFuZ2luZyByZXF1ZXN0cy48bzpwPjwvbzpwPjwvc3Bhbj48L3A+PHAgY2xh
c3M9TXNvTm9ybWFsPjxzcGFuIHN0eWxlPSdmb250LXNpemU6MTAuMHB0O2ZvbnQtZmFtaWx5OiJD
b3VyaWVyIE5ldyInPjxvOnA+Jm5ic3A7PC9vOnA+PC9zcGFuPjwvcD48cCBjbGFzcz1Nc29Ob3Jt
YWw+PHNwYW4gc3R5bGU9J2ZvbnQtc2l6ZToxMS4wcHQ7Zm9udC1mYW1pbHk6IkNhbGlicmkiLCJz
YW5zLXNlcmlmIjtjb2xvcjojMUY0OTdEJz48bzpwPiZuYnNwOzwvbzpwPjwvc3Bhbj48L3A+PHAg
Y2xhc3M9TXNvTm9ybWFsPjxzcGFuIHN0eWxlPSdmb250LXNpemU6MTEuMHB0O2ZvbnQtZmFtaWx5
OiJDYWxpYnJpIiwic2Fucy1zZXJpZiI7Y29sb3I6IzFGNDk3RCc+VGhpcyBwcm9taW5lbnRseSB0
YWxrcyBhYm91dCBjbGllbnQtc2VydmVyIG5vdCBwZWVyLXRvLXBlZXIuIMKgV2hlbiBwZW9wbGUg
aGF2ZSBhc2tlZCBtZSBpZiBwMnAgaXMgaW4gc2NvcGUsIEnigJl2ZSBhbHdheXMgYW5zd2VyZWQg
4oCcbm8sIGJ5IGNoYXJ0ZXLigJ0gYXMgdGhhdCBpcyBob3cgSeKAmXZlIGludGVycHJldGVkIHRo
ZSBhYm92ZS4gR2l2ZW4gdGhlIGRpZmZpY3VsdGllcyBpbiB0aGlzIGdyb3VwLCBJIGFncmVlIHRo
YXQgaXMgYmVzdCBsZWZ0IGFmdGVyIHdlIGRlbGl2ZXIgb24gdGhlIGN1cnJlbnQgaXRlbXMuIFdl
IGNhbiB0aGVuIHRhY2tsZSBhIHJlLWNoYXJ0ZXJpbmcgb3BlcmF0aW9uIGFuZCBtb3ZlIG9uIHRv
IG90aGVyIGVmZm9ydHMsIGJ1dCBmb3Igbm93IEkgdGhpbmsgdGhhdCBpcyBub3Qgb25seSBvdXQg
b2Ygc2NvcGUsIGJ1dCB3b3VsZCBkZWxheSB1cyBldmVuIGZ1cnRoZXIuPG86cD48L286cD48L3Nw
YW4+PC9wPjwvZGl2PjwvZGl2PjwvZGl2PjwvZGl2PjwvYm9keT48L2h0bWw+

--_000_CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82TK5EX14MBXW604w_--

From ferg@caucho.com  Thu Jan  6 17:57:58 2011
Return-Path: <ferg@caucho.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 D7F7C3A6E37 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 17:57:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.129
X-Spam-Level: 
X-Spam-Status: No, score=-2.129 tagged_above=-999 required=5 tests=[AWL=0.470,  BAYES_00=-2.599]
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 HHkDJXAqHjjH for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 17:57:57 -0800 (PST)
Received: from nm17-vm0.bullet.mail.ac4.yahoo.com (nm17-vm0.bullet.mail.ac4.yahoo.com [98.139.53.208]) by core3.amsl.com (Postfix) with SMTP id 898313A6D1C for <hybi@ietf.org>; Thu,  6 Jan 2011 17:57:57 -0800 (PST)
Received: from [98.139.52.193] by nm17.bullet.mail.ac4.yahoo.com with NNFMP; 07 Jan 2011 02:00:01 -0000
Received: from [98.139.52.156] by tm6.bullet.mail.ac4.yahoo.com with NNFMP; 07 Jan 2011 02:00:01 -0000
Received: from [127.0.0.1] by omp1039.mail.ac4.yahoo.com with NNFMP; 07 Jan 2011 02:00:01 -0000
X-Yahoo-Newman-Id: 677754.75467.bm@omp1039.mail.ac4.yahoo.com
Received: (qmail 909 invoked from network); 7 Jan 2011 02:00:01 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp113.biz.mail.mud.yahoo.com with SMTP; 06 Jan 2011 18:00:01 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: OyGkfYMVM1mT1ogWZM1N6NnzNDgfO7cch7IFIIL.mvtQUYy vTiALUOZCf9tnUKg8tRhoMzDYvjFPU19nidL4It40aduo6.GrBmX_b5hIS1C 6uZvBGonjwqy.iQ8WJZS_BDtVEW9AynF6ERF3G5YcO5BU8Fl.eNW.Tgro25l J51cPa7YBmuO7jea_LNkhoZ4Ng0cBxVeCnRDBWXwu8tnwxK4r92ukfB.or2P .FjzJn6wkKA51Aw1kIMIchZKuUQK.6Kls9cxtAFFuBD_RQCeT6rnDStemg7b s9UCO4G7B8O3ecjcQTXUv_KBhyducp0_Etc5AThv7PSSwDvL0uDcJhqN3.iW uflx39fMNGTTJSmuFTMTnAx1bui7aVpUu
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D2673A0.1080101@caucho.com>
Date: Thu, 06 Jan 2011 18:00:00 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: John Tamplin <jat@google.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>
In-Reply-To: <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Fri, 07 Jan 2011 01:57:59 -0000

John Tamplin wrote:
> On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <bruce@callenish.com 
> <mailto:bruce@callenish.com>> wrote:
>
>     So far it appears that Greg, Brodie, Jerod, and I favour including
>     peer-to-peer design considerations in the spec. I am not sure, but
>     it sounds like John considers it out of scope and Scott considers
>     it in scope. What about the rest of you?
>
>
> I am not opposed to it exactly, but given how long everything has 
> taken I am keen to keep the base protocol minimal so we can actually 
> get something out the door.

+1

> If you think peer-to-peer WebSockets is important, I suggest talking 
> about specific things that need to be represented in the base protocol 
> in order to allow that be added at a later time....   However, I am 
> really loathe to try and define peer-to-peer operation in the base 
> spec because I think it will unreasonably extend the process of 
> getting the base protocol out the door.

+1

As long as the unmasked framing can be used for a clean peer-to-peer 
protocol, the WebSocket handshake/client-masking can be focused on the 
browser case.

(It would be a problem if the client masking were to change the current 
framing significantly, but I don't think that kind of change has been 
proposed.)

-- Scott

>
> -- 
> John A. Tamplin
> Software Engineer (GWT), Google
> ------------------------------------------------------------------------
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>   


From ekr@rtfm.com  Thu Jan  6 18:07:15 2011
Return-Path: <ekr@rtfm.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 7C59B3A6E37 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 18:07:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.595
X-Spam-Level: 
X-Spam-Status: No, score=-102.595 tagged_above=-999 required=5 tests=[AWL=0.381, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 ZruApoqdy0DB for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 18:07:14 -0800 (PST)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by core3.amsl.com (Postfix) with ESMTP id 2F9D83A6DD2 for <hybi@ietf.org>; Thu,  6 Jan 2011 18:07:14 -0800 (PST)
Received: by ywk9 with SMTP id 9so7498000ywk.31 for <hybi@ietf.org>; Thu, 06 Jan 2011 18:09:20 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.83.18 with SMTP id k18mr2685428agl.79.1294366160680; Thu, 06 Jan 2011 18:09:20 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Thu, 6 Jan 2011 18:09:20 -0800 (PST)
In-Reply-To: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
Date: Thu, 6 Jan 2011 18:09:20 -0800
Message-ID: <AANLkTimXssjPt2Rs5dgubUAKbP3jnuok8wLzzNsEawxF@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Gabriel Montenegro <gmonte@microsoft.com>
Content-Type: multipart/alternative; boundary=0016e6407c64377fe50499381b3c
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Fri, 07 Jan 2011 02:07:15 -0000

--0016e6407c64377fe50499381b3c
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

I agree. This is clearly out of charter scope.

Even were it not out of scope, the P2P problem is clearly distinct, for a
number of reasons:

1. There is no expectation of being able to travel over an HTTP substrate,
even initially.
2. The issue of NAT traversal must be addressed and turns out to require a
confirmation handshake
    in any case.
3. Many of the most interesting cases involve UDP which raises another set
of issues.

As I said earlier, there is already an effort to address this, but it's not
appropriate for this WG.

-Ekr




On Thu, Jan 6, 2011 at 5:44 PM, Gabriel Montenegro <gmonte@microsoft.com>wr=
ote:

>
>
> John Tamplin wrote:
> *=85*  However, I am really loathe to try and define peer-to-peer operati=
on
> in the base spec because I think it will unreasonably extend the process =
of
> getting the base protocol out the door.
>
>
>
> *[gab] *I agree. WGs are typically chartered with a specific focus in
> order to ease progress. The charter as approved by the IESG includes this=
:
>
>   The Hypertext-Bidirectional (HyBi) working group will seek
>
>   standardization of one approach to maintain bidirectional
>
>   communications between the HTTP client, server and intermediate
>
>   entities, which will provide more efficiency compared to the current
>
>   use of hanging requests.
>
>
>
>
>
> This prominently talks about client-server not peer-to-peer.  When people
> have asked me if p2p is in scope, I=92ve always answered =93no, by charte=
r=94 as
> that is how I=92ve interpreted the above. Given the difficulties in this
> group, I agree that is best left after we deliver on the current items. W=
e
> can then tackle a re-chartering operation and move on to other efforts, b=
ut
> for now I think that is not only out of scope, but would delay us even
> further.
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>

--0016e6407c64377fe50499381b3c
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

I agree. This is clearly out of charter scope.<div><br></div><div>Even were=
 it not out of scope, the P2P problem is clearly distinct, for a number of =
reasons:</div><div><br></div><div>1. There is no expectation of being able =
to travel over an HTTP substrate, even initially.</div>
<div>2. The issue of NAT traversal must be addressed and turns out to requi=
re a confirmation handshake</div><div>=A0=A0 =A0in any case.</div><div>3. M=
any of the most interesting cases involve UDP which raises another set of i=
ssues.</div>
<div><br></div><div>As I said earlier, there is already an effort to addres=
s this, but it&#39;s not appropriate for this WG.</div><div><br></div><div>=
-Ekr</div><div><br></div><div><br></div><div><br><br><div class=3D"gmail_qu=
ote">
On Thu, Jan 6, 2011 at 5:44 PM, Gabriel Montenegro <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:gmonte@microsoft.com">gmonte@microsoft.com</a>&gt;</span> w=
rote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde=
r-left:1px #ccc solid;padding-left:1ex;">
<div lang=3D"EN-US" link=3D"blue" vlink=3D"purple"><div><p class=3D"MsoNorm=
al"><span style=3D"font-size:11.0pt;color:#1F497D">=A0</span></p><div style=
=3D"border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><di=
v class=3D"im">
<div><div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt=
 0in 0in 0in"><p class=3D"MsoNormal"><span style=3D"font-size:10.0pt">John =
Tamplin wrote:<br><b><span style=3D"color:#1F497D">=85</span></b></span> =
=A0However, I am really loathe to try and define peer-to-peer operation in =
the base spec because I think it will unreasonably extend the process of ge=
tting the base protocol out the door.</p>
</div></div></div><div><div><p class=3D"MsoNormal"><span style=3D"font-size=
:11.0pt;color:#1F497D">=A0</span></p><p class=3D"MsoNormal"><b><i><span sty=
le=3D"font-size:11.0pt;color:#1F497D">[gab] </span></i></b><span style=3D"f=
ont-size:11.0pt;color:#1F497D">I agree. WGs are typically chartered with a =
specific focus in order to ease progress. The charter as approved by the IE=
SG includes this:</span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:&quot;Co=
urier New&quot;">=A0 The Hypertext-Bidirectional (HyBi) working group will =
seek</span></p><p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-=
family:&quot;Courier New&quot;">=A0 standardization of one approach to main=
tain bidirectional</span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:&quot;Co=
urier New&quot;">=A0 communications between the HTTP client, server and int=
ermediate</span></p><p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;=
font-family:&quot;Courier New&quot;">=A0 entities, which will provide more =
efficiency compared to the current</span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:&quot;Co=
urier New&quot;">=A0 use of hanging requests.</span></p><p class=3D"MsoNorm=
al"><span style=3D"font-size:10.0pt;font-family:&quot;Courier New&quot;">=
=A0</span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;color:#1F497D">=A0</=
span></p><p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;color:#1F49=
7D">This prominently talks about client-server not peer-to-peer. =A0When pe=
ople have asked me if p2p is in scope, I=92ve always answered =93no, by cha=
rter=94 as that is how I=92ve interpreted the above. Given the difficulties=
 in this group, I agree that is best left after we deliver on the current i=
tems. We can then tackle a re-chartering operation and move on to other eff=
orts, but for now I think that is not only out of scope, but would delay us=
 even further.</span></p>
</div></div></div></div></div><br>_________________________________________=
______<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
<br></blockquote></div><br></div>

--0016e6407c64377fe50499381b3c--

From jat@google.com  Thu Jan  6 18:36:48 2011
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 119993A6E3B for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 18:36:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.887
X-Spam-Level: 
X-Spam-Status: No, score=-103.887 tagged_above=-999 required=5 tests=[AWL=-0.910, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 K6GbiMT9rzKb for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 18:36:47 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id CDEDC3A6E28 for <hybi@ietf.org>; Thu,  6 Jan 2011 18:36:46 -0800 (PST)
Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id p072crKD022521 for <hybi@ietf.org>; Thu, 6 Jan 2011 18:38:53 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294367933; bh=qWEQ1mTaYnfOhIfyEwC0aZ2GG48=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=mwKmqwW0qAGhOAyY0mVLm3rKvY/JhTTTT07/6qhNKoHElWDTPmEFEWnoXiICrSnAz IsyhsxPoBXPZXSqXZBCKQ==
Received: from yib2 (yib2.prod.google.com [10.243.65.66]) by wpaz5.hot.corp.google.com with ESMTP id p072cqfK015467 for <hybi@ietf.org>; Thu, 6 Jan 2011 18:38:52 -0800
Received: by yib2 with SMTP id 2so4431559yib.8 for <hybi@ietf.org>; Thu, 06 Jan 2011 18:38:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=7Gz+OLqazjhn64Q6eUURF3tTzOVpD24kQ7Tlr9bKmp8=; b=EyE9949b1ldvDYIvpe5FajDQ1zwu1DH09aFXw4qUDOcORuIB6rtOVn7vzWMGwRtQOo /0ADq+5nljzNYGhmhU4Q==
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:content-transfer-encoding; b=DeHrb6oLjRO17rK49nw5lrBQo7uL4a9F1cHyxLhHJCJWRLsfClEVdKbI8kNDt8kGDH kVeX3+l+nJc0VdsxDRGA==
Received: by 10.151.158.12 with SMTP id k12mr24089584ybo.377.1294367930911; Thu, 06 Jan 2011 18:38:50 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Thu, 6 Jan 2011 18:38:30 -0800 (PST)
In-Reply-To: <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Thu, 6 Jan 2011 21:38:30 -0500
Message-ID: <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 02:36:48 -0000

Ok, I understand your complaint about unlike SSL and other wrappers,
the proposed masking means an observer can't tell frame boundaries
without unmasking first.  I am still not sure that is such a big deal
considering the simplicity of the proposed masking relative to
interpreting the framing anyway, but here is another attempt to
satisfy all concerned:

Since I don't want to renogiate anything we have already agreed in the
base framing, that
means that Extension Data can only have a non-zero length if we
negotiate an extension, so that means we can't have masking be the
default and define a new extension later to remove it.

My proposal:
1) Define a new extension "clientmask" in the base spec, which
   specifies that client->server masking is present.  An optional
   parameter "type" specifies the type of masking, and if not
   present defaults to "hmac-sha1".
 (this leave open the option
  of defining new masking methods in the future).
2) Any clients which make WebSocket connections at the
   request of untrusted code or entities and do not know for
   certain that the entire path to the ultimate server is trusted
   MUST request the clientmask extension and MUST fail the
   connection if the server does not accept the extension.
3) Any servers (or intermediaries acting as servers to the client)
   accepting a connection from an untrusted source MUST NOT
   accept a connection which does not request the clientmask
   extension.  A server accepting a connection from a client that
   is known to transit only trusted networks MAY accept
   connections which do not request the clientmask extension.
   A server which allows connections without the clientmask
   extension SHOULD default to no trusted networks and be
   configurable as to which networks are allowed to connect
   without the clientmask extension.
4) If the clientmask extension is negotiated, the first n bytes of
   the extension data of client-server frames is a per-frame key
   defined by the masking type, and the remainder of the payload
   (including any further bytes of extension data and application
   data) are masked as defined by the masking type.
5) For clientmask type of "hmac-sha1", the per-frame key length
   shall be 4 bytes, and the remainder of the frame shall be masked
   according to the following algorithm:

     Let client-nonce and server-nonce be the respective nonces
     exchanged during the handshake. =C2=A0Let uid be a 20-byte constant
    defined in the standard, and per-frame-key be the masking key
    read from the extension data.

    // computed once during the handshake
    sessionKey =3D HMAC-SHA1(uid, client-nonce || server-nonce);

    for (int blockStart =3D 0; blockStart < remainingLength; blockStart +=
=3D 20) {
     =C2=A0mask =3D HMAC-SHA1(sessionKey, per-frame-key || blockStart);
     =C2=A0for (int i =3D 0; i < 20 && blockStart + i < remainingLength; ++=
i) {
    =C2=A0  =C2=A0 remainingPayload[blockStart + i] ^=3D mask[i];
    =C2=A0 }
    }

    The same operation is performed for masking and unmasking.


The intent of #1 is to conform to requirements established in the
current framing, in that Extension Data can only be used if an
extension is negotiated, as well as allowing the masking algorithm
to be refined in the future without defining a new extension.

The intent of #2 & #3 is to allow the use-cases that have been
brought up, where the safety provided by masking is not needed.

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

From Martin.Thomson@andrew.com  Thu Jan  6 19:11:06 2011
Return-Path: <Martin.Thomson@andrew.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 DB4E13A6E28 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 19:11:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.246
X-Spam-Level: 
X-Spam-Status: No, score=-2.246 tagged_above=-999 required=5 tests=[AWL=-0.247, BAYES_00=-2.599, J_CHICKENPOX_43=0.6]
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 yaae4OzoOxkN for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 19:11:05 -0800 (PST)
Received: from csmailgw2.commscope.com (csmailgw2.commscope.com [198.135.207.242]) by core3.amsl.com (Postfix) with ESMTP id 4DB313A6DF7 for <hybi@ietf.org>; Thu,  6 Jan 2011 19:11:01 -0800 (PST)
Received: from [10.86.20.103] ([10.86.20.103]:31864 "EHLO ACDCE7HC2.commscope.com") by csmailgw2.commscope.com with ESMTP id S485828Ab1AGDNH (ORCPT <rfc822;hybi@ietf.org>); Thu, 6 Jan 2011 21:13:07 -0600
Received: from SISPE7HC1.commscope.com (10.97.4.12) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.3.137.0; Thu, 6 Jan 2011 21:13:07 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC1.commscope.com ([fe80::8a9:4724:f6bb:3cdf%10]) with mapi; Fri, 7 Jan 2011 11:13:04 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: John Tamplin <jat@google.com>, Greg Wilkins <gregw@webtide.com>
Date: Fri, 7 Jan 2011 11:13:02 +0800
Thread-Topic: [hybi] proposed masking
Thread-Index: AcuuFDwRlkEUguIrQTyuEhtiTayDWwAAq8kw
Message-ID: <8B0A9FCBB9832F43971E38010638454F03F5258D4E@SISPE7MB1.commscope.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com>
In-Reply-To: <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw2.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 03:11:07 -0000

T24gMjAxMS0wMS0wNyBhdCAxMzozODozMCwgSm9obiBUYW1wbGluIHdyb3RlOg0KPiAgICAgLy8g
Y29tcHV0ZWQgb25jZSBkdXJpbmcgdGhlIGhhbmRzaGFrZQ0KPiAgICAgc2Vzc2lvbktleSA9IEhN
QUMtU0hBMSh1aWQsIGNsaWVudC1ub25jZSB8fCBzZXJ2ZXItbm9uY2UpOwkNCj4gDQo+ICAgICBm
b3IgKGludCBibG9ja1N0YXJ0ID0gMDsgYmxvY2tTdGFydCA8IHJlbWFpbmluZ0xlbmd0aDsgYmxv
Y2tTdGFydA0KPiArPSAyMCkgewkNCj4gICAgICDCoG1hc2sgPSBITUFDLVNIQTEoc2Vzc2lvbktl
eSwgcGVyLWZyYW1lLWtleSB8fCBibG9ja1N0YXJ0KTsNCj4gICAgICDCoGZvciAoaW50IGkgPSAw
OyBpIDwgMjAgJiYgYmxvY2tTdGFydCArIGkgPCByZW1haW5pbmdMZW5ndGg7ICsraSkgew0KPiAg
ICAgwqAgIMKgIHJlbWFpbmluZ1BheWxvYWRbYmxvY2tTdGFydCArIGldIF49IG1hc2tbaV07DQo+
ICAgICDCoCB9DQo+ICAgICB9DQo+IA0KPiAgICAgVGhlIHNhbWUgb3BlcmF0aW9uIGlzIHBlcmZv
cm1lZCBmb3IgbWFza2luZyBhbmQgdW5tYXNraW5nLg0KDQpDaGFuZ2luZyB0aGUgbWFzayBjb250
aW51b3VzbHkgaXMgb25seSBuZWNlc3NhcnkgaWYgdGhlIHJlY2lwaWVudCBjYW4gZ2V0IHRoZSBz
ZW5kZXIgdG8gYWx0ZXIgd2hhdCB0aGV5IHNlbmQgbWlkLW1lc3NhZ2UuICBXaGV0aGVyIHRoYXQg
aXMgZ29pbmcgdG8gYmUgbmVjZXNzYXJ5IGRlcGVuZHMgb24gdGhlIGludGVyZmFjZSBwcm92aWRl
ZCB0byB0aGUgc2VuZGVyLg0KDQpJZiBhIGJyb3dzZXIgb25seSBvZmZlcnMgYW4gQVBJIHRoYXQg
YWNjZXB0cyBlbnRpcmUgZnJhbWVzIGZvciBzZW5kaW5nLCB0aGUgc2VuZGVyIGRvZXNuJ3QgZ2V0
IGEgY2hhbmNlIHRvIG1vZGlmeSBmcmFtZSBjb250ZW50cyBvbiB0aGUgZmx5IGFuZCB0aGlzIGFs
Z29yaXRobSBpcyBnb2luZyB0byBiZSBvdmVya2lsbC4gIEkgZG9uJ3Qga25vdyB3aGF0IHRoZSBp
bXBhY3Qgd291bGQgYmUsIGJ1dCBpdCBkb2VzIHNlZW0gbGlrZSBhIHNhdmluZyB3b3J0aCBjb25z
aWRlcmluZy4gIE1heWJlIGl0J3Mgb25seSBhbiBvcHRpb24sIGJ1dCB0aGUgY2xpZW50IChicm93
c2VyKSBpcyBpbiB0aGUgYmVzdCBwb3NpdGlvbiB0byBtYWtlIHRoYXQgZGV0ZXJtaW5hdGlvbi4N
Cg0KVGhhdCBpczoNCg0KICAgICAgc2Vzc2lvbktleSA9IEhNQUModWlkLCBjbGllbnQtbm9uY2Ug
fHwgc2VydmVyLW5vbmNlKTsNCiAgICAgIG1hc2sgPSBITUFDKHNlc3Npb25LZXksIHBlci1mcmFt
ZS1rZXkpOw0KICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBsZW5ndGg7ICsraSkgew0KICAgICAg
ICAgcGF5bG9hZFtpJUhNQUNfTEVOXSBePSBtYXNrW2klSE1BQ19MRU5dOw0KICAgICAgfQ0KDQpJ
ZiB0aGUgcGVyLWZyYW1lLWtleSBpcyBjaGFuZ2VkIG9uIGVhY2ggZnJhbWUsIHRoZW4gc3RyZWFt
aW5nIGNhbiBzdGlsbCBiZSBkb25lIHdpdGggdGhpcyBtZWNoYW5pc20sIHlvdSBqdXN0IGhhdmUg
dG8gYnVmZmVyIGFuIGVudGlyZSBmcmFtZSBiZWZvcmUgc2VuZGluZyBpdCBhbmQgdXNlIGNvbnRp
bnVhdGlvbnMuDQoNCi0tTWFydGluDQo=

From bruce@callenish.com  Thu Jan  6 19:17:27 2011
Return-Path: <bruce@callenish.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 52B693A6C74 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 19:17:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.575
X-Spam-Level: 
X-Spam-Status: No, score=-2.575 tagged_above=-999 required=5 tests=[AWL=0.023,  BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 77kXZZ92iKLB for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 19:17:26 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id EC2583A677D for <hybi@ietf.org>; Thu,  6 Jan 2011 19:17:25 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pb2rP-0000VL-IE for hybi@ietf.org; Thu, 06 Jan 2011 19:19:29 -0800
Message-ID: <4D268644.9040800@callenish.com>
Date: Thu, 06 Jan 2011 19:19:32 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>
In-Reply-To: <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------070307040003060102050108"
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Fri, 07 Jan 2011 03:17:27 -0000

This is a multi-part message in MIME format.
--------------070307040003060102050108
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

I am not talking about designing the specifics of peer to peer into the 
protocol. I am talking about everybody being clear on what they are 
designing. The question about peer to peer is just one of several in 
that vein. Perhaps you think that everybody is in agreement in their 
vision of Websockets, but it sure doesn't look that way to me, and I 
think that is where some of the polarization is coming from.

If everyone agrees that design decisions should be based only on 
browser-server interaction, then there is no need to talk about optional 
masking. If peer to peer is out of scope, then there is no need to worry 
about the asymmetry of the client and server. Suddenly progress can be 
made much more easily because a lot of objections will simply disappear. 
When you introduce intermediaries it can get more complicated, depending 
on what you decide is in scope. Greg's muxer probably is. Willy's WS 
Accelerator and my usecases with servers acting as clients, perhaps or 
perhaps not. Which ones you include for consideration are going to have 
an impact on what issues should be given weight when designing the protocol.

Correct me if I am wrong, but my understanding from what you have 
written is that you are principally concerned with browser to server 
interactions, and other scenarios that happen to work out are fine with 
you but need not be designed for. So it makes sense that you don't see a 
particular need for optional masking or have much concern about clients 
masking their frames and servers not. This view of the protocol is going 
to inform many more of your decisions as they come up.

But it is clear from Greg's description that he has a very different 
vision of where he sees Websockets being used. You are designing a 
screwdriver and he is designing a drill that can hold screwdriver bits. 
Both are useful tools, but the trade-offs for each are going to be 
different.

So all I'm suggesting is that you all clarify among yourselves what is 
in scope and what is not. That way, there is no need to argue about 
design decisions that impact uses that are out of scope. As a result, I 
would hope that progress would be sped up.

On 06/01/2011 5:23 PM, John Tamplin wrote:
> On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <bruce@callenish.com 
> <mailto:bruce@callenish.com>> wrote:
>
>     So far it appears that Greg, Brodie, Jerod, and I favour including
>     peer-to-peer design considerations in the spec. I am not sure, but
>     it sounds like John considers it out of scope and Scott considers
>     it in scope. What about the rest of you?
>
>
> I am not opposed to it exactly, but given how long everything has 
> taken I am keen to keep the base protocol minimal so we can actually 
> get something out the door.
>
> Just like when we were discussing compression, multiplexing, and 
> metadata during the design of the basic framing, we weren't getting 
> anywhere until we stripped it down to the minimum.  To overcome 
> objections about stripping out too much, I wrote up examples of how 
> the base framing could be extended in a compatible fashion to 
> incorporate those use-cases and we were able to agree on the base framing.
>
> If you think peer-to-peer WebSockets is important, I suggest talking 
> about specific things that need to be represented in the base protocol 
> in order to allow that be added at a later time.  So far the 
> suggestion has been that masking is mandatory and an extension could 
> be defined in the future to remove it has been met 
> with skepticism that people who build infrastructure pieces will build 
> in that extensibility (if I am mis-stating the objections, please 
> correct me).  I'm not sure this is any different than the 
> compression/mux/metadata cases we already dealt with, and my feeling 
> is if such equipment has to be upgraded later to support new things so 
> be it.  I personally am fine with adding language into the spec saying 
> what things are expected to be changed so implementors should be 
> prepared to update the handling if that helps address the concern. 
>  However, I am really loathe to try and define peer-to-peer operation 
> in the base spec because I think it will unreasonably extend the 
> process of getting the base protocol out the door.
>
> -- 
> John A. Tamplin
> Software Engineer (GWT), Google


--------------070307040003060102050108
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    I am not talking about designing the specifics of peer to peer into
    the protocol. I am talking about everybody being clear on what they
    are designing. The question about peer to peer is just one of
    several in that vein. Perhaps you think that everybody is in
    agreement in their vision of Websockets, but it sure doesn't look
    that way to me, and I think that is where some of the polarization
    is coming from.<br>
    <br>
    If everyone agrees that design decisions should be based only on
    browser-server interaction, then there is no need to talk about
    optional masking. If peer to peer is out of scope, then there is no
    need to worry about the asymmetry of the client and server. Suddenly
    progress can be made much more easily because a lot of objections
    will simply disappear. When you introduce intermediaries it can get
    more complicated, depending on what you decide is in scope. Greg's
    muxer probably is. Willy's WS Accelerator and my usecases with
    servers acting as clients, perhaps or perhaps not. Which ones you
    include for consideration are going to have an impact on what issues
    should be given weight when designing the protocol.<br>
    <br>
    Correct me if I am wrong, but my understanding from what you have
    written is that you are principally concerned with browser to server
    interactions, and other scenarios that happen to work out are fine
    with you but need not be designed for. So it makes sense that you
    don't see a particular need for optional masking or have much
    concern about clients masking their frames and servers not. This
    view of the protocol is going to inform many more of your decisions
    as they come up.<br>
    <br>
    But it is clear from Greg's description that he has a very different
    vision of where he sees Websockets being used. You are designing a
    screwdriver and he is designing a drill that can hold screwdriver
    bits. Both are useful tools, but the trade-offs for each are going
    to be different.<br>
    <br>
    So all I'm suggesting is that you all clarify among yourselves what
    is in scope and what is not. That way, there is no need to argue
    about design decisions that impact uses that are out of scope. As a
    result, I would hope that progress would be sped up.<br>
    <br>
    On 06/01/2011 5:23 PM, John Tamplin wrote:
    <blockquote
      cite="mid:AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">On Thu, Jan 6, 2011 at 7:37 PM, Bruce
        Atherton <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:bruce@callenish.com">bruce@callenish.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div class="im">So far it appears that Greg, Brodie, Jerod,
            and I favour including peer-to-peer design considerations in
            the spec. I am not sure, but it sounds like John considers
            it out of scope and Scott considers it in scope. What about
            the rest of you?</div>
        </blockquote>
        <div><br>
        </div>
        <div>I am not opposed to it exactly, but given how long
          everything has taken I am keen to keep the base protocol
          minimal so we can actually get something out the door.</div>
        <div><br>
        </div>
        <div>
          Just like when we were discussing compression, multiplexing,
          and metadata during the design of the basic framing, we
          weren't getting anywhere until we stripped it down to the
          minimum. Â To overcome objections about stripping out too much,
          I wrote up examples of how the base framing could be extended
          in a compatible fashion to incorporate those use-cases and we
          were able to agree on the base framing.</div>
        <div><br>
        </div>
        <div>If you think peer-to-peer WebSockets is important, I
          suggest talking about specific things that need to be
          represented in the base protocol in order to allow that be
          added at a later time. Â So far the suggestion has been that
          masking is mandatory and an extension could be defined in the
          future to remove it has been met withÂ skepticismÂ that people
          who build infrastructure pieces will build in that
          extensibility (if I am mis-stating the objections, please
          correct me). Â I'm not sure this is any different than the
          compression/mux/metadata cases we already dealt with, and my
          feeling is if such equipment has to be upgraded later to
          support new things so be it. Â I personally am fine with adding
          language into the spec saying what things are expected to be
          changed so implementors should be prepared to update the
          handling if that helps address the concern. Â However, I am
          really loathe to try and define peer-to-peer operation in the
          base spec because I think it will unreasonably extend the
          process of getting the base protocol out the door.</div>
      </div>
      <br>
      -- <br>
      John A. Tamplin<br>
      Software Engineer (GWT), Google<br>
    </blockquote>
    <br>
  </body>
</html>

--------------070307040003060102050108--

From bruce@callenish.com  Thu Jan  6 19:20:58 2011
Return-Path: <bruce@callenish.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 BDB073A6C74 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 19:20:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.576
X-Spam-Level: 
X-Spam-Status: No, score=-2.576 tagged_above=-999 required=5 tests=[AWL=0.022,  BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 rSKqFbkm-U5B for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 19:20:56 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id C8EC33A677D for <hybi@ietf.org>; Thu,  6 Jan 2011 19:20:56 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pb2us-0004Zx-9m for hybi@ietf.org; Thu, 06 Jan 2011 19:23:02 -0800
Message-ID: <4D26871C.80000@callenish.com>
Date: Thu, 06 Jan 2011 19:23:08 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
In-Reply-To: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
Content-Type: multipart/alternative; boundary="------------070105050500090406040507"
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Fri, 07 Jan 2011 03:20:58 -0000

This is a multi-part message in MIME format.
--------------070105050500090406040507
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Thanks for the reference, Gabriel. That is very helpful. In that case, I 
won't raise any more issues about design that impacts peer to peer 
scenarios.

On 06/01/2011 5:44 PM, Gabriel Montenegro wrote:
>
> John Tamplin wrote:
> *â€¦*  However, I am really loathe to try and define peer-to-peer 
> operation in the base spec because I think it will unreasonably extend 
> the process of getting the base protocol out the door.
>
> */[gab] /*I agree. WGs are typically chartered with a specific focus 
> in order to ease progress. The charter as approved by the IESG 
> includes this:
>
>   The Hypertext-Bidirectional (HyBi) working group will seek
>
>   standardization of one approach to maintain bidirectional
>
>   communications between the HTTP client, server and intermediate
>
>   entities, which will provide more efficiency compared to the current
>
>   use of hanging requests.
>
> This prominently talks about client-server not peer-to-peer.  When 
> people have asked me if p2p is in scope, Iâ€™ve always answered â€œno, by 
> charterâ€ as that is how Iâ€™ve interpreted the above. Given the 
> difficulties in this group, I agree that is best left after we deliver 
> on the current items. We can then tackle a re-chartering operation and 
> move on to other efforts, but for now I think that is not only out of 
> scope, but would delay us even further.
>


--------------070105050500090406040507
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Thanks for the reference, Gabriel. That is very helpful. In that
    case, I won't raise any more issues about design that impacts peer
    to peer scenarios.<br>
    <br>
    On 06/01/2011 5:44 PM, Gabriel Montenegro wrote:
    <blockquote
cite="mid:CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
	{font-family:"MS Mincho";
	panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
	{font-family:"MS Mincho";
	panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:"\@MS Mincho";
	panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
span.EmailStyle17
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted";
	font-family:"Courier New";}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);"><o:p>Â </o:p></span></p>
        <div style="border-width: medium medium medium 1.5pt;
          border-style: none none none solid; border-color:
          -moz-use-text-color -moz-use-text-color -moz-use-text-color
          blue; padding: 0in 0in 0in 4pt;">
          <div>
            <div style="border-right: medium none; border-width: 1pt
              medium medium; border-style: solid none none;
              border-color: rgb(181, 196, 223) -moz-use-text-color
              -moz-use-text-color; padding: 3pt 0in 0in;">
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family:
                  &quot;Tahoma&quot;,&quot;sans-serif&quot;;">John
                  Tamplin wrote:<br>
                  <b><span style="color: rgb(31, 73, 125);">â€¦</span></b></span>
                Â However, I am really loathe to try and define
                peer-to-peer operation in the base spec because I think
                it will unreasonably extend the process of getting the
                base protocol out the door.<o:p></o:p></p>
            </div>
          </div>
          <div>
            <div>
              <p class="MsoNormal"><span style="font-size: 11pt;
                  font-family:
                  &quot;Calibri&quot;,&quot;sans-serif&quot;; color:
                  rgb(31, 73, 125);"><o:p>Â </o:p></span></p>
              <p class="MsoNormal"><b><i><span style="font-size: 11pt;
                      font-family:
                      &quot;Calibri&quot;,&quot;sans-serif&quot;; color:
                      rgb(31, 73, 125);">[gab] </span></i></b><span
                  style="font-size: 11pt; font-family:
                  &quot;Calibri&quot;,&quot;sans-serif&quot;; color:
                  rgb(31, 73, 125);">I agree. WGs are typically
                  chartered with a specific focus in order to ease
                  progress. The charter as approved by the IESG includes
                  this:<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Courier New&quot;;">Â  The
                  Hypertext-Bidirectional (HyBi) working group will seek<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Courier New&quot;;">Â 
                  standardization of one approach to maintain
                  bidirectional<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Courier New&quot;;">Â 
                  communications between the HTTP client, server and
                  intermediate<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Courier New&quot;;">Â  entities,
                  which will provide more efficiency compared to the
                  current<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Courier New&quot;;">Â  use of
                  hanging requests.<o:p></o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 10pt;
                  font-family: &quot;Courier New&quot;;"><o:p>Â </o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 11pt;
                  font-family:
                  &quot;Calibri&quot;,&quot;sans-serif&quot;; color:
                  rgb(31, 73, 125);"><o:p>Â </o:p></span></p>
              <p class="MsoNormal"><span style="font-size: 11pt;
                  font-family:
                  &quot;Calibri&quot;,&quot;sans-serif&quot;; color:
                  rgb(31, 73, 125);">This prominently talks about
                  client-server not peer-to-peer. Â When people have
                  asked me if p2p is in scope, Iâ€™ve always answered â€œno,
                  by charterâ€ as that is how Iâ€™ve interpreted the above.
                  Given the difficulties in this group, I agree that is
                  best left after we deliver on the current items. We
                  can then tackle a re-chartering operation and move on
                  to other efforts, but for now I think that is not only
                  out of scope, but would delay us even further.<o:p></o:p></span></p>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>

--------------070105050500090406040507--

From w@1wt.eu  Thu Jan  6 21:32:10 2011
Return-Path: <w@1wt.eu>
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 9F6603A6403 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:32:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.139
X-Spam-Level: 
X-Spam-Status: No, score=-2.139 tagged_above=-999 required=5 tests=[AWL=-0.096, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 7vRKLwxLkqby for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:32:08 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 0495C3A63D2 for <hybi@ietf.org>; Thu,  6 Jan 2011 21:32:07 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p075YACg030615; Fri, 7 Jan 2011 06:34:10 +0100
Date: Fri, 7 Jan 2011 06:34:10 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110107053410.GG28367@1wt.eu>
References: <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 05:32:11 -0000

On Thu, Jan 06, 2011 at 03:37:26PM -0800, Eric Rescorla wrote:
> My bad, I misunderstood the context:
> 
> 1. Yes, I think you should generate completely fresh keystream for each
> record.
> 2. We had originally talked about using AES-CTR for this, but it's possible
> that for export reasons people might prefer HMAC-SHA1.

OK, I get it now.

> This isn't some piece of new complexity: it's been part of the proposed
> masking
> since the very beginning. The only difference is that HMAC-SHA1 is being
> suggested as
> an AES-CTR replacement. I realize that you don't think this is necessary,
> and I guess
> I might be willing to live with a simpler mechanism, but it's not, as you
> suggest, something
> that just appeared when we were starting to make progress.

OK. My concern is that it comes with a cost. I know a large site who is
dealing with hundreds of thousands of concurrent chat connections. They're
dealing with very small messages, a few bytes of payload at a time at best.
You can certainly imagine the load on the servers if they have to compute
an HMAC every two-three character typed on the keyboard!

I understood your point with the random keys as a way to prevent the server
from making the client emit predictable data. In my opinion, if the client
generates the random key on its side without depending on anything and simply
announces it, we can achieve the same result. We can *suggest* methods to help
the client generate a random when it does not know how to do so, but I don't
see a reason why it should depend on multiple parameters.

Also the key does not need to be larger than the number of bytes to encode
a frame length (7, 16, 63 bits), because what's important is that a message
cannot span the entire keyspace. In theory, a simple 8-bit random could be
enough for a message with a payload shorter than 128 bytes. However, having
a variable length mask would only work if it's sent in the extension field,
but that's probably something to think about.

I would very well see something like this for the client :
  - generate a random of 8, 16 or 64 bits depending on the payload
    length. The larger ones should be strong enough and may involve
    hashing to avoid predictability.

  - announce the random in the extension data

  - XOR the application data with that random

We could even make use of the RSV4 bit to indicate that the frame is encoded.
It will result in all easily controllable bytes before the key to have the
high bit set and would make it easy for the other side to decode the frames,
because by design the key would be the same size as the payload length field.

Regards,
Willy


From jat@google.com  Thu Jan  6 21:39:33 2011
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 D1DD73A677C for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:39:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.446
X-Spam-Level: 
X-Spam-Status: No, score=-104.446 tagged_above=-999 required=5 tests=[AWL=-2.469, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, 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 ynzulToBKlKJ for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:39:33 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id CF6113A6405 for <hybi@ietf.org>; Thu,  6 Jan 2011 21:39:23 -0800 (PST)
Received: from kpbe12.cbf.corp.google.com (kpbe12.cbf.corp.google.com [172.25.105.76]) by smtp-out.google.com with ESMTP id p075fQbf006421 for <hybi@ietf.org>; Thu, 6 Jan 2011 21:41:27 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294378889; bh=wy7tJz+QyUBRywhHclc68Yqb4CA=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=NDts8gldrqspV5ZEq3TtHSyPDlmMCSx1wYe9ov2AdyvVBedgDC+eErOXQ/xTUU7+o pqfpTGL0OKa6Wa3Z0/HxQ==
Received: from gwaa18 (gwaa18.prod.google.com [10.200.27.18]) by kpbe12.cbf.corp.google.com with ESMTP id p075fPHY027932 for <hybi@ietf.org>; Thu, 6 Jan 2011 21:41:25 -0800
Received: by gwaa18 with SMTP id a18so8477921gwa.24 for <hybi@ietf.org>; Thu, 06 Jan 2011 21:41:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=U2hIgF4h1aZCp5M2o1NaqjQfm8yhZ+k4iIXJCa5pEcc=; b=mwE7nWSGG4nrOGPRLMNNeow2ZOeDMy1kCazM19JEtI7eR7GZ+V7LS3HZ0HXPgS/SkH fZ28o4IFAOevdRDDJ4nQ==
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=qeLX72/Myb9orn6BQKiCzU5OuetaOPgWsLXeTo/QUke9WTUQxmYTROqTflRCtx3Cdc czr0zQIdF6yd4crmJoKw==
Received: by 10.150.228.1 with SMTP id a1mr7754582ybh.434.1294378884969; Thu, 06 Jan 2011 21:41:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Thu, 6 Jan 2011 21:41:02 -0800 (PST)
In-Reply-To: <4D268644.9040800@callenish.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <4D268644.9040800@callenish.com>
From: John Tamplin <jat@google.com>
Date: Fri, 7 Jan 2011 00:41:02 -0500
Message-ID: <AANLkTi=qjXK11kpmsbuUgn62e-iYBDktqD2VzQG1fRho@mail.gmail.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Fri, 07 Jan 2011 05:39:34 -0000

On Thu, Jan 6, 2011 at 10:19 PM, Bruce Atherton <bruce@callenish.com> wrote:
> Correct me if I am wrong, but my understanding from what you have written is
> that you are principally concerned with browser to server interactions, and
> other scenarios that happen to work out are fine with you but need not be
> designed for. So it makes sense that you don't see a particular need for
> optional masking or have much concern about clients masking their frames and
> servers not. This view of the protocol is going to inform many more of your
> decisions as they come up.

Mostly what I care about are achieving consensus and getting
WebSockets deployed.  I am not opposed to leaving extension hooks for
other things if that helps us get consensus.

> But it is clear from Greg's description that he has a very different vision
> of where he sees Websockets being used. You are designing a screwdriver and
> he is designing a drill that can hold screwdriver bits. Both are useful
> tools, but the trade-offs for each are going to be different.

As mentioned, there are some particular "bits" I want to add to the
screwdriver later such as multiplexing and compression, and I made
sure that the base screwdriver could be extended for those bits later.
 However, I don't want to have to design and get consensus on all
those other bits now -- I just want to ship the screwdriver and one
bit, and then we can worry about designing the other bits for it.

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

From ekr@rtfm.com  Thu Jan  6 21:45:25 2011
Return-Path: <ekr@rtfm.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 C9A6B3A679C for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:45:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.6
X-Spam-Level: 
X-Spam-Status: No, score=-102.6 tagged_above=-999 required=5 tests=[AWL=0.376,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 Dh9wWhFebaQO for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:45:24 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 808AA3A6784 for <hybi@ietf.org>; Thu,  6 Jan 2011 21:45:24 -0800 (PST)
Received: by yxt33 with SMTP id 33so7533345yxt.31 for <hybi@ietf.org>; Thu, 06 Jan 2011 21:47:31 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.26.24 with SMTP id d24mr2881170agj.160.1294379250977; Thu, 06 Jan 2011 21:47:30 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Thu, 6 Jan 2011 21:47:30 -0800 (PST)
In-Reply-To: <20110107053410.GG28367@1wt.eu>
References: <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu>
Date: Thu, 6 Jan 2011 21:47:30 -0800
Message-ID: <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=001485f9a68c758c4b04993b2750
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 05:45:25 -0000

--001485f9a68c758c4b04993b2750
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Jan 6, 2011 at 9:34 PM, Willy Tarreau <w@1wt.eu> wrote:

> On Thu, Jan 06, 2011 at 03:37:26PM -0800, Eric Rescorla wrote:
> > This isn't some piece of new complexity: it's been part of the proposed
> > masking
> > since the very beginning. The only difference is that HMAC-SHA1 is being
> > suggested as
> > an AES-CTR replacement. I realize that you don't think this is necessary,
> > and I guess
> > I might be willing to live with a simpler mechanism, but it's not, as you
> > suggest, something
> > that just appeared when we were starting to make progress.
>
> OK. My concern is that it comes with a cost. I know a large site who is
> dealing with hundreds of thousands of concurrent chat connections. They're
> dealing with very small messages, a few bytes of payload at a time at best.
> You can certainly imagine the load on the servers if they have to compute
> an HMAC every two-three character typed on the keyboard!


Really? That's not the behavior I'm familar of with chat systems, where
things
are generally phrased in stanzas that are > 20 bytes longs. This is true of
XMPP, for instance. What systems are you thinking of?

That said, even if you have such a system, I'm not at particularly concerned
about the
load being prohibitive. Symmetric encryption is very fast (see Langley and
Modadugu's
velocity talk for reference on this).


>

Also the key does not need to be larger than the number of bytes to encode
> a frame length (7, 16, 63 bits), because what's important is that a message
> cannot span the entire keyspace.


I don't know where you're getting this analysis, but it doesn't sound
correct
to me. The probability of guessing a valid key is 2^{-key size}. The liit
you're talking about only applies if you want to be guaranteed you have
a valid plaintext within a single frame.

Even if you have a much larger mask, if you simply repeat it, there will be
correlations with the mark when it repeats. I'm not aware of any attack on
this,
but it's also not demonstrably safe, whereas the technique I described is.

-Ekr

--001485f9a68c758c4b04993b2750
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Thu, Jan 6, 2011 at 9:34 PM, Willy Ta=
rreau <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</s=
pan> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Thu, Jan 06, 2011 at 03:37:26PM -0800, Eric Rescorla w=
rote:<br></div><div class=3D"im">
&gt; This isn&#39;t some piece of new complexity: it&#39;s been part of the=
 proposed<br>
&gt; masking<br>
&gt; since the very beginning. The only difference is that HMAC-SHA1 is bei=
ng<br>
&gt; suggested as<br>
&gt; an AES-CTR replacement. I realize that you don&#39;t think this is nec=
essary,<br>
&gt; and I guess<br>
&gt; I might be willing to live with a simpler mechanism, but it&#39;s not,=
 as you<br>
&gt; suggest, something<br>
&gt; that just appeared when we were starting to make progress.<br>
<br>
</div>OK. My concern is that it comes with a cost. I know a large site who =
is<br>
dealing with hundreds of thousands of concurrent chat connections. They&#39=
;re<br>
dealing with very small messages, a few bytes of payload at a time at best.=
<br>
You can certainly imagine the load on the servers if they have to compute<b=
r>
an HMAC every two-three character typed on the keyboard!</blockquote><div><=
br></div><div>Really? That&#39;s not the behavior I&#39;m familar of with c=
hat systems, where things</div><div>are generally phrased in stanzas that a=
re &gt; 20 bytes longs. This is true of</div>
<div>XMPP, for instance. What systems are you thinking of?</div><div><br></=
div><div>That said, even if you have such a system, I&#39;m not at particul=
arly concerned about the</div><div>load being prohibitive. Symmetric encryp=
tion is very fast (see Langley and Modadugu&#39;s</div>
<div>velocity talk for reference on this).</div><div><br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid=
;padding-left:1ex;"><br></blockquote><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
=A0</blockquote><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex;">
Also the key does not need to be larger than the number of bytes to encode<=
br>
a frame length (7, 16, 63 bits), because what&#39;s important is that a mes=
sage<br>
cannot span the entire keyspace. </blockquote><div><br></div><div>I don&#39=
;t know where you&#39;re getting this analysis, but it doesn&#39;t sound co=
rrect</div><div>to me. The probability of guessing a valid key is 2^{-key s=
ize}. The liit</div>
<div>you&#39;re talking about only applies if you want to be guaranteed you=
 have</div><div>a valid plaintext within a single frame.</div><div><br></di=
v><div>Even if you have a much larger mask, if you simply repeat it, there =
will be</div>
<div>correlations with the mark when it repeats. I&#39;m not aware of any a=
ttack on this,</div><div>but it&#39;s also not demonstrably safe, whereas t=
he technique I described is.</div><div><br></div><div>-Ekr</div><div><br>
</div></div>

--001485f9a68c758c4b04993b2750--

From Martin.Thomson@andrew.com  Thu Jan  6 21:46:29 2011
Return-Path: <Martin.Thomson@andrew.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 2C5893A679C for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:46:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.542
X-Spam-Level: 
X-Spam-Status: No, score=-2.542 tagged_above=-999 required=5 tests=[AWL=0.057,  BAYES_00=-2.599]
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 5lXYzuhralzt for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:46:27 -0800 (PST)
Received: from csmailgw1.commscope.com (csmailgw1.commscope.com [198.135.207.244]) by core3.amsl.com (Postfix) with ESMTP id BBB7C3A6784 for <hybi@ietf.org>; Thu,  6 Jan 2011 21:46:27 -0800 (PST)
Received: from [10.86.20.103] ([10.86.20.103]:37238 "EHLO ACDCE7HC2.commscope.com") by csmailgw1.commscope.com with ESMTP id S41059068Ab1AGFse (ORCPT <rfc822;hybi@ietf.org>); Thu, 6 Jan 2011 23:48:34 -0600
Received: from SISPE7HC1.commscope.com (10.97.4.12) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.3.137.0; Thu, 6 Jan 2011 23:48:34 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC1.commscope.com ([fe80::8a9:4724:f6bb:3cdf%10]) with mapi; Fri, 7 Jan 2011 13:48:29 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Willy Tarreau <w@1wt.eu>, Eric Rescorla <ekr@rtfm.com>
Date: Fri, 7 Jan 2011 13:48:27 +0800
Thread-Topic: [hybi] A bit of pragmatism
Thread-Index: AcuuLIuHzVxkZlPMTt2J7Fui/SatmgAAO3NA
Message-ID: <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com>
References: <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu>
In-Reply-To: <20110107053410.GG28367@1wt.eu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw1.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 05:46:29 -0000

PiBBbHNvIHRoZSBrZXkgZG9lcyBub3QgbmVlZCB0byBiZSBsYXJnZXIgdGhhbiB0aGUgbnVtYmVy
IG9mIGJ5dGVzIHRvDQo+IGVuY29kZQ0KPiBhIGZyYW1lIGxlbmd0aCAoNywgMTYsIDYzIGJpdHMp
LCBiZWNhdXNlIHdoYXQncyBpbXBvcnRhbnQgaXMgdGhhdCBhDQo+IG1lc3NhZ2UNCj4gY2Fubm90
IHNwYW4gdGhlIGVudGlyZSBrZXlzcGFjZS4gSW4gdGhlb3J5LCBhIHNpbXBsZSA4LWJpdCByYW5k
b20gY291bGQNCj4gYmUNCj4gZW5vdWdoIGZvciBhIG1lc3NhZ2Ugd2l0aCBhIHBheWxvYWQgc2hv
cnRlciB0aGFuIDEyOCBieXRlcy4gSG93ZXZlciwNCj4gaGF2aW5nDQo+IGEgdmFyaWFibGUgbGVu
Z3RoIG1hc2sgd291bGQgb25seSB3b3JrIGlmIGl0J3Mgc2VudCBpbiB0aGUgZXh0ZW5zaW9uDQo+
IGZpZWxkLA0KPiBidXQgdGhhdCdzIHByb2JhYmx5IHNvbWV0aGluZyB0byB0aGluayBhYm91dC4N
Cj4gDQo+IEkgd291bGQgdmVyeSB3ZWxsIHNlZSBzb21ldGhpbmcgbGlrZSB0aGlzIGZvciB0aGUg
Y2xpZW50IDoNCj4gICAtIGdlbmVyYXRlIGEgcmFuZG9tIG9mIDgsIDE2IG9yIDY0IGJpdHMgZGVw
ZW5kaW5nIG9uIHRoZSBwYXlsb2FkDQo+ICAgICBsZW5ndGguIA0KDQpJIGRvbid0IHRoaW5rIHRo
YXQgdGhpcyBsb2dpYyB3b3Jrcy4gIFRoZSByZWFzb24gZm9yIGhhdmluZyBtb3JlIHJhbmRvbW5l
c3MgaXMgdG8gcmVkdWNlIHRoZSBwcm9iYWJpbGl0eSB0aGF0IHRoZSBzZXJ2ZXIgaXMgYWJsZSB0
byBndWVzcyB0aGUgcmFuZG9tIHZhbHVlLiAgWW91IGhhdmUgbGVzcyByYW5kb21uZXNzIGJlY2F1
c2UgeW91IHdhbnQgdG8gc2F2ZSBieXRlcy4gIA0KDQpUaGlzIGlzIG5vdCBhYm91dCByZWR1Y2lu
ZyB0aGUgcHJvYmFiaWxpdHkgb2YgdGhlIGNsaWVudCBlbWl0dGluZyBkYXRhIHRoYXQgY291bGQg
YmUgbWlzdW5kZXJzdG9vZCAtIHRoYXQgaXMgYSBmdW5jdGlvbiBvZiB0aGUgbGVuZ3RoIG9mIHRo
ZSBtZXNzYWdlLCBpbmRlcGVuZGVudCBvZiB0aGUgYW1vdW50IG9mIHJhbmRvbW5lc3MgeW91IGFy
ZSBwcm92aWRpbmcuICBBZGRpbmcgbW9yZSByYW5kb21uZXNzIGRvZXNuJ3QgcmVkdWNlIHRoZSBj
aGFuY2Ugb2YgYSBtZXNzYWdlIGNvbnRhaW5pbmcgIkdFVCAvIEhUVFAvMS4xIiBvciBhbnkgb3Ro
ZXIgc3VjaCBwb3RlbnRpYWxseSBkYW5nZXJvdXMgc3R1ZmYsIHlvdSBjYW4gb25seSBkbyB0aGF0
IGJ5IHNlbmRpbmcgbGVzcyBkYXRhLg0KDQo+ICAgICBUaGUgbGFyZ2VyIG9uZXMgc2hvdWxkIGJl
IHN0cm9uZyBlbm91Z2ggYW5kIG1heSBpbnZvbHZlDQo+ICAgICBoYXNoaW5nIHRvIGF2b2lkIHBy
ZWRpY3RhYmlsaXR5Lg0KDQpZb3Ugd2FudCBhIHNlY3VyZSByYW5kb20gbnVtYmVyIGdlbmVyYXRv
ciBpZiB5b3VyIGdvYWwgaXMgdG8gYXZvaWQgc29tZW9uZSBwcmVkaWN0aW5nIHRoZSBvdXRjb21l
IHNlZSBbUkZDNDA4Nl0uDQogDQo+ICAgLSBhbm5vdW5jZSB0aGUgcmFuZG9tIGluIHRoZSBleHRl
bnNpb24gZGF0YQ0KPiANCj4gICAtIFhPUiB0aGUgYXBwbGljYXRpb24gZGF0YSB3aXRoIHRoYXQg
cmFuZG9tDQoNClRoYXQgd291bGQgYmUgc3VmZmljaWVudCwganVzdCBkZWNpZGUgaG93IG11Y2gg
cmFuZG9tbmVzcyBpcyBzdWZmaWNpZW50LiAgQSBmaXhlZCB2YWx1ZSBzaG91bGQgYmUgc3VmZmlj
aWVudCwgYW5kIHdlIHNob3VsZCBiZSBhYmxlIHRvIGNvbWUgdXAgd2l0aCBhIHByb2JhYmlsaXR5
IHdlIGNhbiBhbGwgYWdyZWUgb24uDQoNCi0tTWFydGluDQo=

From w@1wt.eu  Thu Jan  6 21:50:42 2011
Return-Path: <w@1wt.eu>
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 7F2B13A6407 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:50:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.138
X-Spam-Level: 
X-Spam-Status: No, score=-2.138 tagged_above=-999 required=5 tests=[AWL=-0.095, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 3TCEmx6odFzL for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:50:41 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id EB0AC3A6403 for <hybi@ietf.org>; Thu,  6 Jan 2011 21:50:40 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p075qiEc030682; Fri, 7 Jan 2011 06:52:44 +0100
Date: Fri, 7 Jan 2011 06:52:44 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110107055244.GH28367@1wt.eu>
References: <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <4D17B5FF.5060209@callenish.com> <AANLkTik-m1VKAoaNEU-_P6in28+_CSk+rOHbidtjHa76@mail.gmail.com> <AANLkTi=cNXGsaeqwH_LUDXf_soAHcEfKD+Xd4nXaY+mN@mail.gmail.com> <41249E48-B17E-47C7-9340-6F95B85182CD@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <41249E48-B17E-47C7-9340-6F95B85182CD@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 05:50:42 -0000

On Mon, Dec 27, 2010 at 04:30:43PM -0800, Maciej Stachowiak wrote:
> > But I'm strongly against masking the framing itself.  Their is
> > absolutely no reason for it other than to prevent the possibility of
> > making it optional.
> 
> That's not right. One reason for masking the framing is to make it impossible for hostile browser-hosted hosted code to pre-generate valid-looking frames. If you don't mask framing, then it is trivial to create valid-looking frames, even if the contents are scrambled. Depending on circumstances, this could still be a dangerous attack on integrity.

No Maciej, it's not "trivial" to do that because if you look at the framing,
very little of it is directly controlled by the application. As I suggested
in another mail, if you use RSV4 to indicate masking is used and put the
random key in extension data, that leaves you with :
  - first byte with MORE|RSV1|RSV2|RSV3|OPCODE = 1|XXX|OPCODE
  - second byte with RSV4|LENGTH = 1|LENGTH
  - 3rd-4th bytes corresponding to the low part of the payload length,
    only if previous byte is 0xFE/0xFF
  - 5-10th bytes corresponding to the high part of the payload length
    only if 2nd byte is 0xFF
  - random key the size of the payload length
  - application data

The only controllable part here in which you might put an HTTP request is
the key length. But even in order to write an HTTP/0.9 "GET /\n", you have
to forge a message that is 0x54202F0A4745 bytes long, or 92 TeraBytes long.
And if you need to start it at the beginning of a line, it becomes
0x4554202F0A0A47 which is 19 PetaBytes. By the time we get browsers able to
construct that large messages, we won't bother anymore about the broken
intermediaries.

That's why I'm really considering masking the payload safe enough with
regards to the risk we're trying to cover.

Regards,
Willy


From Martin.Thomson@andrew.com  Thu Jan  6 21:53:31 2011
Return-Path: <Martin.Thomson@andrew.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 84DEA3A6407 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:53:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.543
X-Spam-Level: 
X-Spam-Status: No, score=-2.543 tagged_above=-999 required=5 tests=[AWL=0.056,  BAYES_00=-2.599]
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 crRFSPY0a5ul for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:53:30 -0800 (PST)
Received: from csmailgw1.commscope.com (csmailgw1.commscope.com [198.135.207.244]) by core3.amsl.com (Postfix) with ESMTP id 58FB83A679C for <hybi@ietf.org>; Thu,  6 Jan 2011 21:53:30 -0800 (PST)
Received: from [10.86.20.102] ([10.86.20.102]:31282 "EHLO ACDCE7HC1.commscope.com") by csmailgw1.commscope.com with ESMTP id S41059076Ab1AGFzh (ORCPT <rfc822;hybi@ietf.org>); Thu, 6 Jan 2011 23:55:37 -0600
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC1.commscope.com (10.86.20.102) with Microsoft SMTP Server (TLS) id 8.3.137.0; Thu, 6 Jan 2011 23:55:36 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Fri, 7 Jan 2011 13:55:32 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Eric Rescorla <ekr@rtfm.com>, Willy Tarreau <w@1wt.eu>
Date: Fri, 7 Jan 2011 13:55:29 +0800
Thread-Topic: [hybi] A bit of pragmatism
Thread-Index: AcuuLmqJVgrMk6q3Q5+x1cJVSRMmhAAAD4dg
Message-ID: <8B0A9FCBB9832F43971E38010638454F03F5258D8C@SISPE7MB1.commscope.com>
References: <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>
In-Reply-To: <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw1.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 05:53:31 -0000

T24gMjAxMS0wMS0wNyBhdCAxNjo0NzozMCwgRXJpYyBSZXNjb3JsYSB3cm90ZToNCj4gSSBkb24n
dCBrbm93IHdoZXJlIHlvdSdyZSBnZXR0aW5nIHRoaXMgYW5hbHlzaXMsIGJ1dCBpdCBkb2Vzbid0
IHNvdW5kDQo+IGNvcnJlY3QNCj4gdG8gbWUuIFRoZSBwcm9iYWJpbGl0eSBvZiBndWVzc2luZyBh
IHZhbGlkIGtleSBpcyAyXnsta2V5IHNpemV9LiBUaGUNCj4gbGlpdA0KPiB5b3UncmUgdGFsa2lu
ZyBhYm91dCBvbmx5IGFwcGxpZXMgaWYgeW91IHdhbnQgdG8gYmUgZ3VhcmFudGVlZCB5b3UgaGF2
ZQ0KPiBhIHZhbGlkIHBsYWludGV4dCB3aXRoaW4gYSBzaW5nbGUgZnJhbWUuDQo+IA0KPiBFdmVu
IGlmIHlvdSBoYXZlIGEgbXVjaCBsYXJnZXIgbWFzaywgaWYgeW91IHNpbXBseSByZXBlYXQgaXQs
IHRoZXJlDQo+IHdpbGwgYmUNCj4gY29ycmVsYXRpb25zIHdpdGggdGhlIG1hcmsgd2hlbiBpdCBy
ZXBlYXRzLiBJJ20gbm90IGF3YXJlIG9mIGFueSBhdHRhY2sNCj4gb24gdGhpcywNCj4gYnV0IGl0
J3MgYWxzbyBub3QgZGVtb25zdHJhYmx5IHNhZmUsIHdoZXJlYXMgdGhlIHRlY2huaXF1ZSBJIGRl
c2NyaWJlZA0KPiBpcy4NCg0KRGVwZW5kcyBvbiB3aGF0IHlvdSBhcmUgdHJ5aW5nIHRvIHByZXZl
bnQuICBBcyBJIHVuZGVyc3RhbmQgaXQsIHlvdSBhcmUgdHJ5aW5nIHRvIHByZXZlbnQgdW50cnVz
dGVkIGNvZGUgZnJvbSBiZWluZyBhYmxlIHRvIGRpcmVjdGx5IGNvbnRyb2wgd2hhdCBpcyBvbiB0
aGUgd2lyZS4gIFJlcGVhdGluZyB0aGUgbWFzayBpcyBzdGlsbCBzdWZmaWNpZW50OiAyXi1rIHBy
b2JhYmlsaXR5LiAgSXQncyBub3QgbGlrZSB0aGUgc2VydmVyIGlzbid0IGdvaW5nIHRvIGhhdmUg
dGhlIHZhbHVlLg0KDQpXZSBoYXZlIHRvIGFzc3VtZSB0aGF0IG9uY2UgdGhlIHNlcnZlciBzdGFy
dHMgcmVjZWl2aW5nIGEgZnJhbWUgaXQgY2FuIHRlbGwgdGhlIHVudHJ1c3RlZCBjb2RlIHdoYXQg
dGhlIG1hc2sgaXMuICBBRVMtQ1RSIGFuZCBITUFDIGJvdGggb25seSBpbmNyZWFzZSB0aGUgY29z
dCBvZiBwcmVkaWN0aW9uIGF0IHRoYXQgcG9pbnQuICBZb3UgaGF2ZSB0byBwcmV2ZW50IHRoZSBz
ZXJ2ZXIgZnJvbSBiZWluZyBhYmxlIHRvIGNsb3NlIHRoZSBsb29wIGJ5IG1ha2luZyBzdXJlIHRo
YXQgeW91IGhhdmUgYWxsIHRoZSBkYXRhIGZvciBhIGZyYW1lIGJlZm9yZSB5b3Ugc3RhcnQgc2Vu
ZGluZy4NCg0KLS1NYXJ0aW4NCg0KDQo=

From ekr@rtfm.com  Thu Jan  6 21:57:51 2011
Return-Path: <ekr@rtfm.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 EF57E3A67A6 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:57:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.305
X-Spam-Level: 
X-Spam-Status: No, score=-102.305 tagged_above=-999 required=5 tests=[AWL=0.071, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_17=0.6, RCVD_IN_DNSWL_LOW=-1, 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 kaqY4uLSG8n7 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:57:49 -0800 (PST)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by core3.amsl.com (Postfix) with ESMTP id B906D3A67A4 for <hybi@ietf.org>; Thu,  6 Jan 2011 21:57:49 -0800 (PST)
Received: by gxk28 with SMTP id 28so7920728gxk.31 for <hybi@ietf.org>; Thu, 06 Jan 2011 21:59:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.83.18 with SMTP id k18mr2829905agl.79.1294379996401; Thu, 06 Jan 2011 21:59:56 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Thu, 6 Jan 2011 21:59:56 -0800 (PST)
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03F5258D8C@SISPE7MB1.commscope.com>
References: <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <8B0A9FCBB9832F43971E38010638454F03F5258D8C@SISPE7MB1.commscope.com>
Date: Thu, 6 Jan 2011 21:59:56 -0800
Message-ID: <AANLkTikn4voDRWoWTSOduFTpVxRTRnK2mK1WhsChx7=y@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Content-Type: multipart/alternative; boundary=0016e6407c64e3d21404993b530b
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 05:57:51 -0000

--0016e6407c64e3d21404993b530b
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Jan 6, 2011 at 9:55 PM, Thomson, Martin
<Martin.Thomson@andrew.com>wrote:

> On 2011-01-07 at 16:47:30, Eric Rescorla wrote:
> > I don't know where you're getting this analysis, but it doesn't sound
> > correct
> > to me. The probability of guessing a valid key is 2^{-key size}. The
> > liit
> > you're talking about only applies if you want to be guaranteed you have
> > a valid plaintext within a single frame.
> >
> > Even if you have a much larger mask, if you simply repeat it, there
> > will be
> > correlations with the mark when it repeats. I'm not aware of any attack
> > on this,
> > but it's also not demonstrably safe, whereas the technique I described
> > is.
>
> Depends on what you are trying to prevent.  As I understand it, you are
> trying to prevent untrusted code from being able to directly control what is
> on the wire.  Repeating the mask is still sufficient: 2^-k probability.
>  It's not like the server isn't going to have the value.


With a repeating mask, the attacker can (for instance) ensure that byte i is
the same
as byte i+masklen, regardless of the mask value. As I said, I don't know how
to exploit
this, but I also have yet to see a demonstration that it's not exploitable.

 -Ekr

--0016e6407c64e3d21404993b530b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Thu, Jan 6, 2011 at 9:55 PM, Thomson,=
 Martin <span dir=3D"ltr">&lt;<a href=3D"mailto:Martin.Thomson@andrew.com">=
Martin.Thomson@andrew.com</a>&gt;</span> wrote:<br><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex;">
<div class=3D"im">On 2011-01-07 at 16:47:30, Eric Rescorla wrote:<br>
&gt; I don&#39;t know where you&#39;re getting this analysis, but it doesn&=
#39;t sound<br>
&gt; correct<br>
&gt; to me. The probability of guessing a valid key is 2^{-key size}. The<b=
r>
&gt; liit<br>
&gt; you&#39;re talking about only applies if you want to be guaranteed you=
 have<br>
&gt; a valid plaintext within a single frame.<br>
&gt;<br>
&gt; Even if you have a much larger mask, if you simply repeat it, there<br=
>
&gt; will be<br>
&gt; correlations with the mark when it repeats. I&#39;m not aware of any a=
ttack<br>
&gt; on this,<br>
&gt; but it&#39;s also not demonstrably safe, whereas the technique I descr=
ibed<br>
&gt; is.<br>
<br>
</div>Depends on what you are trying to prevent. =A0As I understand it, you=
 are trying to prevent untrusted code from being able to directly control w=
hat is on the wire. =A0Repeating the mask is still sufficient: 2^-k probabi=
lity. =A0It&#39;s not like the server isn&#39;t going to have the value.</b=
lockquote>
<div><br></div><div>With=A0a repeating mask, the attacker can (for instance=
) ensure=A0that byte i is the same</div><div>as byte i+masklen, regardless =
of the mask value. As I said, I don&#39;t know how to exploit</div><div>thi=
s, but I also have yet to see a demonstration that it&#39;s not exploitable=
.</div>
<div><br></div><div>=A0-Ekr</div><div><br></div></div><br>

--0016e6407c64e3d21404993b530b--

From w@1wt.eu  Thu Jan  6 21:59:24 2011
Return-Path: <w@1wt.eu>
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 A58A43A67B5 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:59:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.137
X-Spam-Level: 
X-Spam-Status: No, score=-2.137 tagged_above=-999 required=5 tests=[AWL=-0.094, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 VSpj4p1vJriZ for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 21:59:24 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 75B0F3A67B4 for <hybi@ietf.org>; Thu,  6 Jan 2011 21:59:23 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0761Smr030723; Fri, 7 Jan 2011 07:01:28 +0100
Date: Fri, 7 Jan 2011 07:01:28 +0100
From: Willy Tarreau <w@1wt.eu>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Message-ID: <20110107060128.GI28367@1wt.eu>
References: <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 05:59:24 -0000

On Fri, Jan 07, 2011 at 01:48:27PM +0800, Thomson, Martin wrote:
> > Also the key does not need to be larger than the number of bytes to
> > encode
> > a frame length (7, 16, 63 bits), because what's important is that a
> > message
> > cannot span the entire keyspace. In theory, a simple 8-bit random could
> > be
> > enough for a message with a payload shorter than 128 bytes. However,
> > having
> > a variable length mask would only work if it's sent in the extension
> > field,
> > but that's probably something to think about.
> > 
> > I would very well see something like this for the client :
> >   - generate a random of 8, 16 or 64 bits depending on the payload
> >     length. 
> 
> I don't think that this logic works.  The reason for having more randomness is to reduce the probability that the server is able to guess the random value.  You have less randomness because you want to save bytes.  

No, the randomness I'm talking about is to reduce the probability that the
server will guess the key and exploit it. If the key is changed for each
frame, the ability for the server to guess *and exploit* it depends on the
message length too. The server does not have more chance to forge a correct
message when it has 1/256 change to guess the key on a message that's 256
bytes long than when it has 1/65536 on a message that's 65536 bytes long.

That said, we could probably have the minimum random size something like
32 bits for small payloads, it's not a big deal if the masking is optional.

Regards,
Willy


From Martin.Thomson@andrew.com  Thu Jan  6 22:00:27 2011
Return-Path: <Martin.Thomson@andrew.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 F1AF93A67B0 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:00:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.544
X-Spam-Level: 
X-Spam-Status: No, score=-2.544 tagged_above=-999 required=5 tests=[AWL=0.055,  BAYES_00=-2.599]
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 N42vlzjUlZHk for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:00:23 -0800 (PST)
Received: from csmailgw1.commscope.com (csmailgw1.commscope.com [198.135.207.244]) by core3.amsl.com (Postfix) with ESMTP id 9DC143A67AE for <hybi@ietf.org>; Thu,  6 Jan 2011 22:00:22 -0800 (PST)
Received: from [10.86.20.103] ([10.86.20.103]:62326 "EHLO ACDCE7HC2.commscope.com") by csmailgw1.commscope.com with ESMTP id S41059205Ab1AGGC2 (ORCPT <rfc822;hybi@ietf.org>); Fri, 7 Jan 2011 00:02:28 -0600
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.3.137.0; Fri, 7 Jan 2011 00:02:28 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Fri, 7 Jan 2011 14:02:24 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Willy Tarreau <w@1wt.eu>, Maciej Stachowiak <mjs@apple.com>
Date: Fri, 7 Jan 2011 14:02:16 +0800
Thread-Topic: [hybi] proposed masking
Thread-Index: AcuuLyCC5Fg1kfcURLqObSUe7i/LjgAAPP9g
Message-ID: <8B0A9FCBB9832F43971E38010638454F03F5258D96@SISPE7MB1.commscope.com>
References: <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <4D17B5FF.5060209@callenish.com> <AANLkTik-m1VKAoaNEU-_P6in28+_CSk+rOHbidtjHa76@mail.gmail.com> <AANLkTi=cNXGsaeqwH_LUDXf_soAHcEfKD+Xd4nXaY+mN@mail.gmail.com> <41249E48-B17E-47C7-9340-6F95B85182CD@apple.com> <20110107055244.GH28367@1wt.eu>
In-Reply-To: <20110107055244.GH28367@1wt.eu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw1.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 06:00:27 -0000

T24gMjAxMS0wMS0wNyBhdCAxNjo1Mjo0NCwgV2lsbHkgVGFycmVhdSB3cm90ZToNCj4gVGhlIG9u
bHkgY29udHJvbGxhYmxlIHBhcnQgaGVyZSBpbiB3aGljaCB5b3UgbWlnaHQgcHV0IGFuIEhUVFAg
cmVxdWVzdA0KPiBpcw0KPiB0aGUga2V5IGxlbmd0aC4gQnV0IGV2ZW4gaW4gb3JkZXIgdG8gd3Jp
dGUgYW4gSFRUUC8wLjkgIkdFVCAvXG4iLCB5b3UNCj4gaGF2ZQ0KPiB0byBmb3JnZSBhIG1lc3Nh
Z2UgdGhhdCBpcyAweDU0MjAyRjBBNDc0NSBieXRlcyBsb25nLCBvciA5MiBUZXJhQnl0ZXMNCj4g
bG9uZy4NCj4gQW5kIGlmIHlvdSBuZWVkIHRvIHN0YXJ0IGl0IGF0IHRoZSBiZWdpbm5pbmcgb2Yg
YSBsaW5lLCBpdCBiZWNvbWVzDQo+IDB4NDU1NDIwMkYwQTBBNDcgd2hpY2ggaXMgMTkgUGV0YUJ5
dGVzLiBCeSB0aGUgdGltZSB3ZSBnZXQgYnJvd3NlcnMNCj4gYWJsZSB0bw0KPiBjb25zdHJ1Y3Qg
dGhhdCBsYXJnZSBtZXNzYWdlcywgd2Ugd29uJ3QgYm90aGVyIGFueW1vcmUgYWJvdXQgdGhlIGJy
b2tlbg0KPiBpbnRlcm1lZGlhcmllcy4NCg0KSWYgeW91IGRvbid0IGNhcmUgYWJvdXQgdGhlIG5v
aXNlIGluIHRoZSBoZWFkZXIsIHlvdSBjYW4gY29uc3RydWN0IGEgcmVxdWVzdCB0aGF0IGNvbnRh
aW5zIHRoYXQgNiBieXRlIG1lc3NhZ2UgaW4gdGhlIGJvZHkgYnkgc2VuZGluZyBhIG1lc3NhZ2Ug
b2YgNioyXmsgYnl0ZXMgKGZvciA4IGJpdHMgb2YgcmFuZG9tIGtleSwgdGhhdCdzIG9ubHkgMS41
ayksIG5vdCBhbGxvd2luZyBmb3Igb3ZlcmxhcHBpbmcuDQoNCkFmdGVyIGFsbCB5b3UgaGF2ZSB0
byBoYXZlIHRoZSBpbml0aWFsIG5vaXNlIGJ5dGVzIGlnbm9yZWQsIHdoYXQncyBhbm90aGVyIDEw
IG9yIHNvLi4uDQoNCjo6KQ0K

From Martin.Thomson@andrew.com  Thu Jan  6 22:02:39 2011
Return-Path: <Martin.Thomson@andrew.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 D32A73A67B6 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:02:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.245
X-Spam-Level: 
X-Spam-Status: No, score=-2.245 tagged_above=-999 required=5 tests=[AWL=-0.246, BAYES_00=-2.599, J_CHICKENPOX_17=0.6]
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 ifEjHtYfVLPW for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:02:39 -0800 (PST)
Received: from csmailgw2.commscope.com (csmailgw2.commscope.com [198.135.207.242]) by core3.amsl.com (Postfix) with ESMTP id 22B043A67AE for <hybi@ietf.org>; Thu,  6 Jan 2011 22:02:39 -0800 (PST)
Received: from [10.86.20.103] ([10.86.20.103]:15226 "EHLO ACDCE7HC2.commscope.com") by csmailgw2.commscope.com with ESMTP id S532154Ab1AGGEp (ORCPT <rfc822;hybi@ietf.org>); Fri, 7 Jan 2011 00:04:45 -0600
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.3.137.0; Fri, 7 Jan 2011 00:04:45 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Fri, 7 Jan 2011 14:04:31 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 7 Jan 2011 14:04:27 +0800
Thread-Topic: [hybi] A bit of pragmatism
Thread-Index: AcuuMDpASZwtTHz9RjKvud24HADRswAAET/w
Message-ID: <8B0A9FCBB9832F43971E38010638454F03F5258D97@SISPE7MB1.commscope.com>
References: <4D25A492.20701@warmcat.com>	<10468.1294318555.770054@puncture> <4D25C033.3010501@warmcat.com>	<10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <8B0A9FCBB9832F43971E38010638454F03F5258D8C@SISPE7MB1.commscope.com> <AANLkTikn4voDRWoWTSOduFTpVxRTRnK2mK1WhsChx7=y@mail.gmail.com>
In-Reply-To: <AANLkTikn4voDRWoWTSOduFTpVxRTRnK2mK1WhsChx7=y@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw2.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 06:02:40 -0000

T24gMjAxMS0wMS0wNyBhdCAxNjo1OTo1NiwgRXJpYyBSZXNjb3JsYSB3cm90ZToNCj4gV2l0aCBh
IHJlcGVhdGluZyBtYXNrLCB0aGUgYXR0YWNrZXIgY2FuIChmb3IgaW5zdGFuY2UpIGVuc3VyZSB0
aGF0IGJ5dGUNCj4gaSBpcyB0aGUgc2FtZQ0KPiBhcyBieXRlIGkrbWFza2xlbiwgcmVnYXJkbGVz
cyBvZiB0aGUgbWFzayB2YWx1ZS4gQXMgSSBzYWlkLCBJIGRvbid0DQo+IGtub3cNCj4gaG93IHRv
IGV4cGxvaXQNCj4gdGhpcywgYnV0IEkgYWxzbyBoYXZlIHlldCB0byBzZWUgYSBkZW1vbnN0cmF0
aW9uIHRoYXQgaXQncyBub3QNCj4gZXhwbG9pdGFibGUuDQoNCkknbGwgY29uY2VkZSB0aGF0LiAg
SSdtIG5vdCBhd2FyZSBvZiBhbnkgcHJvdG9jb2wgdGhhdCByZWxpZXMgb24gcmVsYXRpdmUgdmFs
dWVzIG9mIGJpdHMvYnl0ZXMgYXMgb3Bwb3NlZCB0byBhYnNvbHV0ZSB2YWx1ZXMsIGJ1dCB0aGVy
ZSdzIGFsd2F5cyByb29tIGZvciBzdXJwcmlzZXMuDQoNCg0K

From Martin.Thomson@andrew.com  Thu Jan  6 22:06:40 2011
Return-Path: <Martin.Thomson@andrew.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 2ECA23A67B4 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:06:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.541
X-Spam-Level: 
X-Spam-Status: No, score=-2.541 tagged_above=-999 required=5 tests=[AWL=0.058,  BAYES_00=-2.599]
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 WTlctCM5Z464 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:06:39 -0800 (PST)
Received: from csmailgw1.commscope.com (csmailgw1.commscope.com [198.135.207.244]) by core3.amsl.com (Postfix) with ESMTP id 3BB9C3A67B1 for <hybi@ietf.org>; Thu,  6 Jan 2011 22:06:39 -0800 (PST)
Received: from [10.86.20.103] ([10.86.20.103]:21626 "EHLO ACDCE7HC2.commscope.com") by csmailgw1.commscope.com with ESMTP id S41059250Ab1AGGIq (ORCPT <rfc822;hybi@ietf.org>); Fri, 7 Jan 2011 00:08:46 -0600
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.3.137.0; Fri, 7 Jan 2011 00:08:45 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Fri, 7 Jan 2011 14:08:44 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Willy Tarreau <w@1wt.eu>
Date: Fri, 7 Jan 2011 14:08:39 +0800
Thread-Topic: [hybi] A bit of pragmatism
Thread-Index: AcuuMFV1srih1eeiSdOdvWa/+70HqwAAH3Tw
Message-ID: <8B0A9FCBB9832F43971E38010638454F03F5258D9A@SISPE7MB1.commscope.com>
References: <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com> <20110107060128.GI28367@1wt.eu>
In-Reply-To: <20110107060128.GI28367@1wt.eu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw1.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 06:06:40 -0000

T24gMjAxMS0wMS0wNyBhdCAxNzowMToyOCwgV2lsbHkgVGFycmVhdSB3cm90ZToNCj4gTm8sIHRo
ZSByYW5kb21uZXNzIEknbSB0YWxraW5nIGFib3V0IGlzIHRvIHJlZHVjZSB0aGUgcHJvYmFiaWxp
dHkgdGhhdA0KPiB0aGUNCj4gc2VydmVyIHdpbGwgZ3Vlc3MgdGhlIGtleSBhbmQgZXhwbG9pdCBp
dC4gSWYgdGhlIGtleSBpcyBjaGFuZ2VkIGZvcg0KPiBlYWNoDQo+IGZyYW1lLCB0aGUgYWJpbGl0
eSBmb3IgdGhlIHNlcnZlciB0byBndWVzcyAqYW5kIGV4cGxvaXQqIGl0IGRlcGVuZHMgb24NCj4g
dGhlDQo+IG1lc3NhZ2UgbGVuZ3RoIHRvby4gVGhlIHNlcnZlciBkb2VzIG5vdCBoYXZlIG1vcmUg
Y2hhbmNlIHRvIGZvcmdlIGENCj4gY29ycmVjdA0KPiBtZXNzYWdlIHdoZW4gaXQgaGFzIDEvMjU2
IGNoYW5nZSB0byBndWVzcyB0aGUga2V5IG9uIGEgbWVzc2FnZSB0aGF0J3MNCj4gMjU2DQo+IGJ5
dGVzIGxvbmcgdGhhbiB3aGVuIGl0IGhhcyAxLzY1NTM2IG9uIGEgbWVzc2FnZSB0aGF0J3MgNjU1
MzYgYnl0ZXMNCj4gbG9uZy4NCg0KWW91IG5lZWQgbW9yZSBzcGFjZSB0byBleHBsb2l0IGl0LCBz
dXJlLg0KDQpCdXQgc2luY2Ugd2Ugd2VyZSB0YWxraW5nIGFib3V0IHByYWdtYXRpc20sIHdlIGhh
dmUgdG8gZXhwZWN0IHRoYXQgdGhlIHByb2JhYmlsaXR5IG9mIGFuIGludGVybWVkaWFyeSBpZ25v
cmluZyBub2lzZSBkZWNyZWFzZXMgYXMgdGhlIGFtb3VudCBvZiBub2lzZSBpbmNyZWFzZXMuICBZ
b3UgY291bGQgYWxtb3N0IHNheSB0aGF0IHRoZSBmaXJzdCBieXRlcyBhcmUgZ29pbmcgdG8gYmUg
dGhlIG1vc3QgY3J1Y2lhbC4gIEJ1dCB0aGF0IGRvZXNuJ3QgaGVscCBpZiB3ZSdyZSBoZWFkaW5n
IGZvciBhbiBpcm9uY2xhZCwgcHJvdmFibGUgcHJvYmFiaWxpdHkuDQoNCg0K

From w@1wt.eu  Thu Jan  6 22:08:39 2011
Return-Path: <w@1wt.eu>
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 814FE3A67B1 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:08:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.836
X-Spam-Level: 
X-Spam-Status: No, score=-1.836 tagged_above=-999 required=5 tests=[AWL=-0.393, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, J_CHICKENPOX_23=0.6]
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 AKIX88rSvCmZ for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:08:38 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 41E9B3A679F for <hybi@ietf.org>; Thu,  6 Jan 2011 22:08:38 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p076AhSp030771; Fri, 7 Jan 2011 07:10:43 +0100
Date: Fri, 7 Jan 2011 07:10:43 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110107061043.GJ28367@1wt.eu>
References: <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 06:08:39 -0000

On Thu, Jan 06, 2011 at 09:47:30PM -0800, Eric Rescorla wrote:
> On Thu, Jan 6, 2011 at 9:34 PM, Willy Tarreau <w@1wt.eu> wrote:
> 
> > On Thu, Jan 06, 2011 at 03:37:26PM -0800, Eric Rescorla wrote:
> > > This isn't some piece of new complexity: it's been part of the proposed
> > > masking
> > > since the very beginning. The only difference is that HMAC-SHA1 is being
> > > suggested as
> > > an AES-CTR replacement. I realize that you don't think this is necessary,
> > > and I guess
> > > I might be willing to live with a simpler mechanism, but it's not, as you
> > > suggest, something
> > > that just appeared when we were starting to make progress.
> >
> > OK. My concern is that it comes with a cost. I know a large site who is
> > dealing with hundreds of thousands of concurrent chat connections. They're
> > dealing with very small messages, a few bytes of payload at a time at best.
> > You can certainly imagine the load on the servers if they have to compute
> > an HMAC every two-three character typed on the keyboard!
> 
> 
> Really? That's not the behavior I'm familar of with chat systems, where
> things
> are generally phrased in stanzas that are > 20 bytes longs. This is true of
> XMPP, for instance. What systems are you thinking of?

I was thinking about the short messages typed on the keyboard such as "lol"
and smileys. But even if your stats indicate an average of 20 bytes, we're
still smaller than the average IP+TCP header and we have to deal with one
different message every few bytes of payload. That was my point.

> That said, even if you have such a system, I'm not at particularly concerned
> about the
> load being prohibitive. Symmetric encryption is very fast (see Langley and
> Modadugu's
> velocity talk for reference on this).

Well, at 1 million concurrent connections with a 5s think time, that's about
200k frames per second, it starts to be concerning even if it's cheap.

> > Also the key does not need to be larger than the number of bytes to encode
> > a frame length (7, 16, 63 bits), because what's important is that a message
> > cannot span the entire keyspace.
> 
> 
> I don't know where you're getting this analysis, but it doesn't sound
> correct
> to me. The probability of guessing a valid key is 2^{-key size}. The liit
> you're talking about only applies if you want to be guaranteed you have
> a valid plaintext within a single frame.

That's my point. Otherwise the server has to make the client send on average
2^{key size} random messages to get what it's looking for. I agree I was wrong
on one point, I assumed it meant that full-sized messages would have to be
sent while this is not the case. We could make the client send lots of short
messages get a valid one.

But even a 32-bit minimum key size for small frames would seem far enough,
don't you think ?

> Even if you have a much larger mask, if you simply repeat it, there will be
> correlations with the mark when it repeats.

That's why I wanted to use larger masks for larger frames, in order to avoid
those repetitions.

> I'm not aware of any attack on
> this,
> but it's also not demonstrably safe, whereas the technique I described is.

Regards,
Willy


From w@1wt.eu  Thu Jan  6 22:13:29 2011
Return-Path: <w@1wt.eu>
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 530693A67A8 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:13:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.132
X-Spam-Level: 
X-Spam-Status: No, score=-2.132 tagged_above=-999 required=5 tests=[AWL=-0.089, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 9LuwXT-Gwxp7 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:13:27 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id A19113A67A5 for <hybi@ietf.org>; Thu,  6 Jan 2011 22:13:22 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p076FQ1o030787; Fri, 7 Jan 2011 07:15:26 +0100
Date: Fri, 7 Jan 2011 07:15:26 +0100
From: Willy Tarreau <w@1wt.eu>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Message-ID: <20110107061525.GK28367@1wt.eu>
References: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <4D17B5FF.5060209@callenish.com> <AANLkTik-m1VKAoaNEU-_P6in28+_CSk+rOHbidtjHa76@mail.gmail.com> <AANLkTi=cNXGsaeqwH_LUDXf_soAHcEfKD+Xd4nXaY+mN@mail.gmail.com> <41249E48-B17E-47C7-9340-6F95B85182CD@apple.com> <20110107055244.GH28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D96@SISPE7MB1.commscope.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03F5258D96@SISPE7MB1.commscope.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 06:13:29 -0000

On Fri, Jan 07, 2011 at 02:02:16PM +0800, Thomson, Martin wrote:
> On 2011-01-07 at 16:52:44, Willy Tarreau wrote:
> > The only controllable part here in which you might put an HTTP request
> > is
> > the key length. But even in order to write an HTTP/0.9 "GET /\n", you
> > have
> > to forge a message that is 0x54202F0A4745 bytes long, or 92 TeraBytes
> > long.
> > And if you need to start it at the beginning of a line, it becomes
> > 0x4554202F0A0A47 which is 19 PetaBytes. By the time we get browsers
> > able to
> > construct that large messages, we won't bother anymore about the broken
> > intermediaries.
> 
> If you don't care about the noise in the header, you can construct a request that contains that 6 byte message in the body by sending a message of 6*2^k bytes (for 8 bits of random key, that's only 1.5k), not allowing for overlapping.

The 8 bit random key could not be used with 1.5k, it would be a 16 bit one,
resulting in 6*2^16 => too large for this key size too, need a 63-bit one,
resulting now in 6*2^63 bytes to forge the message. That was my point :-)

Willy


From ekr@rtfm.com  Thu Jan  6 22:14:51 2011
Return-Path: <ekr@rtfm.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 7E9663A67A4 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:14:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.299
X-Spam-Level: 
X-Spam-Status: No, score=-102.299 tagged_above=-999 required=5 tests=[AWL=0.077, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_23=0.6, RCVD_IN_DNSWL_LOW=-1, 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 z0XdPyqqUQHT for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:14:49 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 462313A679F for <hybi@ietf.org>; Thu,  6 Jan 2011 22:14:49 -0800 (PST)
Received: by gwj17 with SMTP id 17so9167049gwj.31 for <hybi@ietf.org>; Thu, 06 Jan 2011 22:16:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.114.5 with SMTP id m5mr2854808agc.25.1294381015795; Thu, 06 Jan 2011 22:16:55 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Thu, 6 Jan 2011 22:16:55 -0800 (PST)
In-Reply-To: <20110107061043.GJ28367@1wt.eu>
References: <4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture> <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu>
Date: Thu, 6 Jan 2011 22:16:55 -0800
Message-ID: <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=0016361e84fca6882204993b90bd
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 06:14:51 -0000

--0016361e84fca6882204993b90bd
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Jan 6, 2011 at 10:10 PM, Willy Tarreau <w@1wt.eu> wrote:

> On Thu, Jan 06, 2011 at 09:47:30PM -0800, Eric Rescorla wrote:
> > On Thu, Jan 6, 2011 at 9:34 PM, Willy Tarreau <w@1wt.eu> wrote:
> >
> > > On Thu, Jan 06, 2011 at 03:37:26PM -0800, Eric Rescorla wrote:
> > > > This isn't some piece of new complexity: it's been part of the
> proposed
> > > > masking
> > > > since the very beginning. The only difference is that HMAC-SHA1 is
> being
> > > > suggested as
> > > > an AES-CTR replacement. I realize that you don't think this is
> necessary,
> > > > and I guess
> > > > I might be willing to live with a simpler mechanism, but it's not, as
> you
> > > > suggest, something
> > > > that just appeared when we were starting to make progress.
> > >
> > > OK. My concern is that it comes with a cost. I know a large site who is
> > > dealing with hundreds of thousands of concurrent chat connections.
> They're
> > > dealing with very small messages, a few bytes of payload at a time at
> best.
> > > You can certainly imagine the load on the servers if they have to
> compute
> > > an HMAC every two-three character typed on the keyboard!
> >
> >
> > Really? That's not the behavior I'm familar of with chat systems, where
> > things
> > are generally phrased in stanzas that are > 20 bytes longs. This is true
> of
> > XMPP, for instance. What systems are you thinking of?
>
> I was thinking about the short messages typed on the keyboard such as "lol"
> and smileys. But even if your stats indicate an average of 20 bytes, we're
> still smaller than the average IP+TCP header and we have to deal with one
> different message every few bytes of payload. That was my point.


Yes, and the performance will be comparable to TLS.



> > That said, even if you have such a system, I'm not at particularly
> concerned
> > about the
> > load being prohibitive. Symmetric encryption is very fast (see Langley
> and
> > Modadugu's
> > velocity talk for reference on this).
>
> Well, at 1 million concurrent connections with a 5s think time, that's
> about
> 200k frames per second, it starts to be concerning even if it's cheap.


My dinky Macbook Air does one million SHA-1 ops/second on a single core.

Again, see the Modadugu and Langley talk for real performance numbers.



>
> > I don't know where you're getting this analysis, but it doesn't sound
> > correct
> > to me. The probability of guessing a valid key is 2^{-key size}. The liit
> > you're talking about only applies if you want to be guaranteed you have
> > a valid plaintext within a single frame.
>
> That's my point. Otherwise the server has to make the client send on
> average
> 2^{key size} random messages to get what it's looking for.


So? I have no idea why you think this is acceptable.



But even a 32-bit minimum key size for small frames would seem far enough,
> don't you think ?


No.


-Ekr

--0016361e84fca6882204993b90bd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Thu, Jan 6, 2011 at 10:10 PM, Willy T=
arreau <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Thu, Jan 06, 2011 at 09:47:30PM -0800, Eric Rescorla w=
rote:<br>
&gt; On Thu, Jan 6, 2011 at 9:34 PM, Willy Tarreau &lt;<a href=3D"mailto:w@=
1wt.eu">w@1wt.eu</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; On Thu, Jan 06, 2011 at 03:37:26PM -0800, Eric Rescorla wrote:<br=
>
&gt; &gt; &gt; This isn&#39;t some piece of new complexity: it&#39;s been p=
art of the proposed<br>
&gt; &gt; &gt; masking<br>
&gt; &gt; &gt; since the very beginning. The only difference is that HMAC-S=
HA1 is being<br>
&gt; &gt; &gt; suggested as<br>
&gt; &gt; &gt; an AES-CTR replacement. I realize that you don&#39;t think t=
his is necessary,<br>
&gt; &gt; &gt; and I guess<br>
&gt; &gt; &gt; I might be willing to live with a simpler mechanism, but it&=
#39;s not, as you<br>
&gt; &gt; &gt; suggest, something<br>
&gt; &gt; &gt; that just appeared when we were starting to make progress.<b=
r>
&gt; &gt;<br>
&gt; &gt; OK. My concern is that it comes with a cost. I know a large site =
who is<br>
&gt; &gt; dealing with hundreds of thousands of concurrent chat connections=
. They&#39;re<br>
&gt; &gt; dealing with very small messages, a few bytes of payload at a tim=
e at best.<br>
&gt; &gt; You can certainly imagine the load on the servers if they have to=
 compute<br>
&gt; &gt; an HMAC every two-three character typed on the keyboard!<br>
&gt;<br>
&gt;<br>
&gt; Really? That&#39;s not the behavior I&#39;m familar of with chat syste=
ms, where<br>
&gt; things<br>
&gt; are generally phrased in stanzas that are &gt; 20 bytes longs. This is=
 true of<br>
&gt; XMPP, for instance. What systems are you thinking of?<br>
<br>
</div>I was thinking about the short messages typed on the keyboard such as=
 &quot;lol&quot;<br>
and smileys. But even if your stats indicate an average of 20 bytes, we&#39=
;re<br>
still smaller than the average IP+TCP header and we have to deal with one<b=
r>
different message every few bytes of payload. That was my point.</blockquot=
e><div><br></div><div>Yes, and the performance will be comparable to TLS.</=
div><div><br></div><div>=A0</div><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">
&gt; That said, even if you have such a system, I&#39;m not at particularly=
 concerned<br>
&gt; about the<br>
&gt; load being prohibitive. Symmetric encryption is very fast (see Langley=
 and<br>
&gt; Modadugu&#39;s<br>
&gt; velocity talk for reference on this).<br>
<br>
</div>Well, at 1 million concurrent connections with a 5s think time, that&=
#39;s about<br>
200k frames per second, it starts to be concerning even if it&#39;s cheap.<=
/blockquote><div><br></div><div>My dinky Macbook Air does one million SHA-1=
 ops/second on a single core.</div><div><br></div><div>Again, see the Modad=
ugu and Langley talk for real performance numbers.</div>
<div><br></div><div>=A0</div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class=3D"=
im"><br>
&gt; I don&#39;t know where you&#39;re getting this analysis, but it doesn&=
#39;t sound<br>
&gt; correct<br>
&gt; to me. The probability of guessing a valid key is 2^{-key size}. The l=
iit<br>
&gt; you&#39;re talking about only applies if you want to be guaranteed you=
 have<br>
&gt; a valid plaintext within a single frame.<br>
<br>
</div>That&#39;s my point. Otherwise the server has to make the client send=
 on average<br>
2^{key size} random messages to get what it&#39;s looking for.</blockquote>=
<div><br></div><div>So? I have no idea why you think this is acceptable.</d=
iv><div><br></div><div><br></div><div><br></div><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1=
ex;">

But even a 32-bit minimum key size for small frames would seem far enough,<=
br>
don&#39;t you think ?</blockquote><div><br></div><div>No.=A0</div><div><br>=
</div><div><br></div><div>-Ekr</div><div>=A0</div></div><br>

--0016361e84fca6882204993b90bd--

From w@1wt.eu  Thu Jan  6 22:25:26 2011
Return-Path: <w@1wt.eu>
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 F25E93A67B3 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:25:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.131
X-Spam-Level: 
X-Spam-Status: No, score=-2.131 tagged_above=-999 required=5 tests=[AWL=-0.088, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 ChuZFAP59b9g for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:25:24 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id BAEC63A67B4 for <hybi@ietf.org>; Thu,  6 Jan 2011 22:25:19 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p076RJsb030830; Fri, 7 Jan 2011 07:27:19 +0100
Date: Fri, 7 Jan 2011 07:27:19 +0100
From: Willy Tarreau <w@1wt.eu>
To: Gabriel Montenegro <gmonte@microsoft.com>
Message-ID: <20110107062719.GM28367@1wt.eu>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is	Upgrade...?
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: Fri, 07 Jan 2011 06:25:26 -0000

On Fri, Jan 07, 2011 at 01:44:30AM +0000, Gabriel Montenegro wrote:
> 
> John Tamplin wrote:
> ???  However, I am really loathe to try and define peer-to-peer operation in the base spec because I think it will unreasonably extend the process of getting the base protocol out the door.
> 
> [gab] I agree. WGs are typically chartered with a specific focus in order to ease progress. The charter as approved by the IESG includes this:
>   The Hypertext-Bidirectional (HyBi) working group will seek
>   standardization of one approach to maintain bidirectional
>   communications between the HTTP client, server and intermediate
>   entities, which will provide more efficiency compared to the current
>   use of hanging requests.
> 
> 
> This prominently talks about client-server not peer-to-peer.
> When people have asked me if p2p is in scope, I???ve always answered ???no, by charter???
> as that is how I???ve interpreted the above.

I agree with that but the term "p2p" can be vague in some circumstances,
as it tends to be used in opposition with browser<->server. Some server
to server architectures (such as webservices) are sometimes seen as p2p
by some people because they don't understand that some of their servers
can also be a client of another one.

So I'd say no to the real p2p usage for now, but yes to the server-to-server
(eg: have a front HTTP server use WS messages over a pool of established
connections to validate auth tokens). This is indeed a client->server
relation where the client here is not a browser. Probably that this part
is not very clear in the current description as the work is mostly focused
on browsers.

Regards,
Willy


From w@1wt.eu  Thu Jan  6 22:36:53 2011
Return-Path: <w@1wt.eu>
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 B916D3A67C1 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:36:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.13
X-Spam-Level: 
X-Spam-Status: No, score=-2.13 tagged_above=-999 required=5 tests=[AWL=-0.087,  BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 LQYKrRqR50aL for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 22:36:49 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 16EB63A67B2 for <hybi@ietf.org>; Thu,  6 Jan 2011 22:36:48 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p076cspP030848; Fri, 7 Jan 2011 07:38:54 +0100
Date: Fri, 7 Jan 2011 07:38:54 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110107063854.GN28367@1wt.eu>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 06:36:53 -0000

On Thu, Jan 06, 2011 at 10:16:55PM -0800, Eric Rescorla wrote:
> > Well, at 1 million concurrent connections with a 5s think time, that's
> > about
> > 200k frames per second, it starts to be concerning even if it's cheap.
> 
> My dinky Macbook Air does one million SHA-1 ops/second on a single core.

That means a 20% CPU overhead imposed by masking then.

> Again, see the Modadugu and Langley talk for real performance numbers.

OK, will take a look.

> But even a 32-bit minimum key size for small frames would seem far enough,
> > don't you think ?
> 
> 
> No.

Then I don't follow you. If the server has to send on average 2^32
messages to have a chance to see "\nGET /\n", that's 28 GB of upstream
traffic, or 52 GB with the framing and key. The client needs to be able
to send it unnoticed by the user (52GB over ADSL...) and we must expect
the broken intermediary to parse all that random crap without blinking
an eye and suddenly spot our precious request. It will likely have
spotted other ones as well before it BTW.

That's why I was talking about pragmatism. We're trying to avoid
some broken intermediaries to spot a valid request in the stream
following the handshake and we consider that 52GB of random crap
after the handshake it still represents a risk, and that's where
I disagree :-/

Willy


From gmonte@microsoft.com  Thu Jan  6 23:16:30 2011
Return-Path: <gmonte@microsoft.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 EAF583A67D1 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 23:16:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.479
X-Spam-Level: 
X-Spam-Status: No, score=-10.479 tagged_above=-999 required=5 tests=[AWL=0.120, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
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 LnrfMa9KOTB2 for <hybi@core3.amsl.com>; Thu,  6 Jan 2011 23:16:30 -0800 (PST)
Received: from smtp.microsoft.com (mailb.microsoft.com [131.107.115.215]) by core3.amsl.com (Postfix) with ESMTP id 3EF133A67C2 for <hybi@ietf.org>; Thu,  6 Jan 2011 23:16:30 -0800 (PST)
Received: from TK5EX14MLTC104.redmond.corp.microsoft.com (157.54.79.159) by TK5-EXGWY-E802.partners.extranet.microsoft.com (10.251.56.168) with Microsoft SMTP Server (TLS) id 8.2.176.0; Thu, 6 Jan 2011 23:18:30 -0800
Received: from TK5EX14MLTW651.wingroup.windeploy.ntdev.microsoft.com (157.54.71.39) by TK5EX14MLTC104.redmond.corp.microsoft.com (157.54.79.159) with Microsoft SMTP Server (TLS) id 14.1.255.3; Thu, 6 Jan 2011 23:18:30 -0800
Received: from TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com ([169.254.4.151]) by TK5EX14MLTW651.wingroup.windeploy.ntdev.microsoft.com ([157.54.71.39]) with mapi; Thu, 6 Jan 2011 23:18:30 -0800
From: Gabriel Montenegro <gmonte@microsoft.com>
To: Willy Tarreau <w@1wt.eu>
Thread-Topic: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
Thread-Index: AQHLrgmq/w4+Ld5wRUKExWVhu67oqJPEu34wgADWaYD//4dBsA==
Date: Fri, 7 Jan 2011 07:18:57 +0000
Message-ID: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFFAD1@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <20110107062719.GM28367@1wt.eu>
In-Reply-To: <20110107062719.GM28367@1wt.eu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is	Upgrade...?
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: Fri, 07 Jan 2011 07:16:31 -0000

> So I'd say no to the real p2p usage for now, but yes to the server-to-ser=
ver
> (eg: have a front HTTP server use WS messages over a pool of established
> connections to validate auth tokens). This is indeed a client->server rel=
ation
> where the client here is not a browser. Probably that this part is not ve=
ry clear in
> the current description as the work is mostly focused on browsers.

The charter is clear about HyBi targeting "clients other than Web Browsers"=
, so this seems like a fine usage of client-server websockets.

From gregw@intalio.com  Fri Jan  7 00:40:16 2011
Return-Path: <gregw@intalio.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 732723A67ED for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 00:40:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.926
X-Spam-Level: 
X-Spam-Status: No, score=-2.926 tagged_above=-999 required=5 tests=[AWL=0.051,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 NGfHk81HOFvj for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 00:40:15 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 950733A67E5 for <hybi@ietf.org>; Fri,  7 Jan 2011 00:40:15 -0800 (PST)
Received: by qyk34 with SMTP id 34so218950qyk.10 for <hybi@ietf.org>; Fri, 07 Jan 2011 00:42:21 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.235.143 with SMTP id kg15mr21493940qcb.17.1294389741839; Fri, 07 Jan 2011 00:42:21 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Fri, 7 Jan 2011 00:42:21 -0800 (PST)
In-Reply-To: <20110107063854.GN28367@1wt.eu>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu>
Date: Fri, 7 Jan 2011 09:42:21 +0100
X-Google-Sender-Auth: YW3eUMGw19D9-v-5DFRBozWxKco
Message-ID: <AANLkTi=QtjBgu=4MiGYzFzrwwiRAVWJhVC_tWMhk7906@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: hybi@ietf.org
Content-Type: text/plain; charset=ISO-8859-1
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 08:40:16 -0000

I really don't understand why we need to specify the algorithm to
compute the masking key.

Can't we just say that when masking is on, every frame has a random 32
byte mask which is applied with XOR to the payload.  We can leave it
to the client to generate the random mask with whatever algorithm
using whatever salt that it likes. In fact, if we don't specify an
algorithm, then there will be more natural variation in algorithms
used and no systematic issues that will effect all clients.

From andy.warmcat.com@googlemail.com  Fri Jan  7 00:40:50 2011
Return-Path: <andy.warmcat.com@googlemail.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 B8BCF3A67E5 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 00:40:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.508
X-Spam-Level: 
X-Spam-Status: No, score=-3.508 tagged_above=-999 required=5 tests=[AWL=0.091,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 ZcVwk294o9A0 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 00:40:48 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 5159C3A67ED for <hybi@ietf.org>; Fri,  7 Jan 2011 00:40:48 -0800 (PST)
Received: by wwa36 with SMTP id 36so17273495wwa.13 for <hybi@ietf.org>; Fri, 07 Jan 2011 00:42:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=VbpGW5NGwgf4e3rDuJn1nVdYFjFPIOnxPGl4D2qbBFI=; b=nfIY1SuMABxi5ftvXH8tjxRq+Y7huDmdsOkN2z0Pwkp3E/RNObuxKnrwd9Mci2TX0X uSZmyvzvKkEWm+jHJixCqqCF4mn2Wxn3vLJYCTE8z5WBwSEiBp5sixkxVYab7m//AMq1 fgJ6/DrRzL1kURVADHRLTOkZ+a/+AoG8VRb/Q=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=NRcT5Y4Pixup44d+bhFZ3BhfQGEDNQIaJ+huKXux17NvxE/6FWkLLQj5JR7twxZ95U HVfTxoefwC+SxdrFMGTg/1849pHg8RqwhNbpEGkx6A1kCr0A4QIpzlbDKph95VWs1715 bl6bitLsMK2fFCRiqB+5B7N7UOUcGkodYUPjU=
Received: by 10.227.146.13 with SMTP id f13mr15134737wbv.133.1294389774685; Fri, 07 Jan 2011 00:42:54 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id 11sm17463664wbi.18.2011.01.07.00.42.53 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 00:42:53 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D26D20C.8030906@warmcat.com>
Date: Fri, 07 Jan 2011 08:42:52 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <4D25D82A.8070302@warmcat.com>	<AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>	<20110106184607.GB27099@1wt.eu>	<AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu>
In-Reply-To: <20110107063854.GN28367@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 07 Jan 2011 08:40:50 -0000

On 01/07/11 06:38, Somebody in the thread at some point said:

>> But even a 32-bit minimum key size for small frames would seem far enough,
>>> don't you think ?
>>
>> No.

> That's why I was talking about pragmatism. We're trying to avoid
> some broken intermediaries to spot a valid request in the stream

If it really is the goal of websocket protocol is to disable any 
possible undefined attack on any possible undefined broken intermediary, 
broken in any possible combination of undefined ways, sure 32 bit key 
isn't enough; nothing's gonna be enough.


How about some agreement first on what attacks it is that the crypto 
voodoo is trying to disable, and what it doesn't care about.

For example, some arbitrarily broken intermediary may blow up if you 
send it an 0xff, we can all agree that's too broken to care about saving.

There's some doubt that any real intermediary will sit through gigabytes 
of junk and then match on GET in the middle of it.  Maybe we can agree 
that also would be an intermediary that is not worth the effort to protect.

Are there any other cases we can agree are beyond saving and need not be 
considered?


How many cases are disabled from attack if the websocket framing began 
always with the constant "\x0d\x0a\x0d\x0a", so you could never 
subsequently send data that could be interpreted as http headers or request?

-Andy

From gregw@intalio.com  Fri Jan  7 00:55:32 2011
Return-Path: <gregw@intalio.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 4695F3A67E5 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 00:55:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.926
X-Spam-Level: 
X-Spam-Status: No, score=-2.926 tagged_above=-999 required=5 tests=[AWL=0.051,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 BtC1XWhezOKF for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 00:55:31 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 6DB053A67ED for <hybi@ietf.org>; Fri,  7 Jan 2011 00:55:31 -0800 (PST)
Received: by vws7 with SMTP id 7so6913401vws.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 00:57:37 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.187.132 with SMTP id cw4mr4866209vcb.25.1294390657748; Fri, 07 Jan 2011 00:57:37 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Fri, 7 Jan 2011 00:57:37 -0800 (PST)
In-Reply-To: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFFAD1@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <20110107062719.GM28367@1wt.eu> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCFFAD1@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
Date: Fri, 7 Jan 2011 09:57:37 +0100
X-Google-Sender-Auth: OCbmA0Oj8MoJG3hm6c3a_x7vUXM
Message-ID: <AANLkTimDbcgN192-GnVRmVM-nWn4Y7BG4a0Oz1iO3Dw-@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: hybi@ietf.org
Content-Type: text/plain; charset=ISO-8859-1
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Fri, 07 Jan 2011 08:55:32 -0000

I think the in-scope/out-of-scope issue comes back to the points made
recently about flexibility.

I think it is pretty clear that our charter is for a HTTP client (not
necessarily a browser) talking to a server via intermediaries.  But I
think it is also very clear that there is demand for all sorts of
different uses for a protocol like WS that can safely and standardly
penetrate firewalls with bidirectional connections.

So when we are faced with a choice between left or right, and there is
no clear "winner" between the choices, then I think it is entirely
valid to discuss potential out-of-scope use-cases like p2p to evaluate
the choices.   If left prohibits p2p use case, but right is useful for
p2p, then I don't see why we cannot consider that for the sake of
flexibility.

I certainly hate the dismissal of concerns simply because they are out
of scope.  It is one thing to propose a whole bunch of mechanisms for
p2p, and another thing entirely to note that some mechanisms being
proposed will hinder out of scope usage.


regards

From andy.warmcat.com@googlemail.com  Fri Jan  7 01:07:15 2011
Return-Path: <andy.warmcat.com@googlemail.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 4C57E3A67E3 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:07:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.516
X-Spam-Level: 
X-Spam-Status: No, score=-3.516 tagged_above=-999 required=5 tests=[AWL=0.083,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 PdDuqwOaaNN1 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:07:14 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id E35653A67EE for <hybi@ietf.org>; Fri,  7 Jan 2011 01:07:13 -0800 (PST)
Received: by wyf23 with SMTP id 23so18078753wyf.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 01:09:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=OsZLv5jPj+R3e5M4EFkAglkB1dFPODhZyseFgy9TQDA=; b=JOHlqJOotEEPQ72if5ps0oXnPjx8/5w/K3ZViCEd97URZAYbcPj2FnCuIlKxoEaAeQ IPDPluusF75o7kbh/wGg8+2ydP3InU4XZYJ/mLkJYYpj4E9wkZNoyjQY+vRcP5NgtVfI q7t8ViLqGYY0aAAWt2mFXxajDOxxBHLmm5cGQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=WCD0vQbNts6IsmIfxyq4KT1O1T4Gry0a6uQewUkK7KX/KHtdOV/igjREu17C6BAi1c WTd6AS0rldQ72G4kXKXnfRe97UyobLu2mNPkR3RFrPkZ8Xd4DoKHTwmqqN9ljzN1A/Z8 8J3PMBzF+iwRkPo25L0Ijh5o8UTvvZfGvvbE8=
Received: by 10.227.141.137 with SMTP id m9mr15627322wbu.58.1294391360027; Fri, 07 Jan 2011 01:09:20 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id m13sm17473060wbz.9.2011.01.07.01.09.17 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 01:09:18 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D26D83D.3010101@warmcat.com>
Date: Fri, 07 Jan 2011 09:09:17 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <4D26605B.1090409@callenish.com>	<AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>	<CA566BAEAD6B3F4E8B5C5C4F61710C110FCFEC82@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>	<20110107062719.GM28367@1wt.eu>	<CA566BAEAD6B3F4E8B5C5C4F61710C110FCFFAD1@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTimDbcgN192-GnVRmVM-nWn4Y7BG4a0Oz1iO3Dw-@mail.gmail.com>
In-Reply-To: <AANLkTimDbcgN192-GnVRmVM-nWn4Y7BG4a0Oz1iO3Dw-@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 07 Jan 2011 09:07:15 -0000

On 01/07/11 08:57, Somebody in the thread at some point said:

> I certainly hate the dismissal of concerns simply because they are out
> of scope.  It is one thing to propose a whole bunch of mechanisms for
> p2p, and another thing entirely to note that some mechanisms being
> proposed will hinder out of scope usage.

If there's a smart way to integrate everything cleanly in a way that 
doesn't invalidate growth that's great.

But otherwise you have to limit what is under consideration to get an 
actual result shipped.

Or you end up with 80+ versions and a bunch of live competing specs for 
the same thing and no convergence, and no end to the disruptive demands 
rewriting even the most basic stuff from scratch.

-Andy

From dave@cridland.net  Fri Jan  7 01:14:24 2011
Return-Path: <dave@cridland.net>
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 8AB4E3A67E3 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:14:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.527
X-Spam-Level: 
X-Spam-Status: No, score=-2.527 tagged_above=-999 required=5 tests=[AWL=0.072,  BAYES_00=-2.599]
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 013vWm8u8EmE for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:14:23 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id CDBCE3A67C1 for <hybi@ietf.org>; Fri,  7 Jan 2011 01:14:22 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 712101168117; Fri,  7 Jan 2011 09:16:28 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pqoDwJyRE4We; Fri,  7 Jan 2011 09:16:23 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id B8A5B11680FB; Fri,  7 Jan 2011 09:16:23 +0000 (GMT)
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com>
In-Reply-To: <4D26D20C.8030906@warmcat.com>
MIME-Version: 1.0
Message-Id: <10468.1294391783.740346@puncture>
Date: Fri, 07 Jan 2011 09:16:23 +0000
From: Dave Cridland <dave@cridland.net>
To: Andy Green <andy@warmcat.com>, Server-Initiated HTTP <hybi@ietf.org>, Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 09:14:24 -0000

On Fri Jan  7 08:42:52 2011, Andy Green wrote:
> How many cases are disabled from attack if the websocket framing  
> began always with the constant "\x0d\x0a\x0d\x0a", so you could  
> never subsequently send data that could be interpreted as http  
> headers or request?

We don't know, and can't tell without experiment.

We can, however, say that we know due to such an experiment that no  
intermediaries are known to exist which interpret data in a dangerous  
way subsequent to a CONNECT - although this has only been tested as  
the first method used in a stream, to be precise. This implies that  
either of the original CONNECT-based handshake proposed, and my  
subsequent standards-conformant adaptation that (apparently) nobody  
likes, would be sufficient to reduce attacks to a percentage of  
intermediaries sufficiently small that none have been found to date.  
One may as well say that these intermediaries don't exist, and claim  
that proof because the invisible pink unicorn told us so, because  
it'll be just as easy to prove the non-existence of the IPU as to  
prove the non-existence of the intermediaries, and frankly as valid,  
given that experimental data at least supports the unicorn's  
statement.

However, it seems that a very strong reality distortion field is in  
place in this working group - mere facts and experimental data are  
insufficient, and to be cast aside if they don't fit the theory, and  
we seem to have rechartered ourselves into a working group hell-bent  
on preventing any buggy third-party from being used as an attack  
surface in this or any possible parallel universe, past, present, or  
future. So we seem to be lumbering ourselves with some truly  
impressive baggage that future developers will either look upon  
aghast, or with amazement that we somehow predicted a sudden and  
uncharacteristic rise in vulnerable intermediaries - possibly even to  
measurable levels - despite all reasonable expectation to the  
contrary.

I'm personally expecting the former - masking will become less and  
less relevant (and this is taking the generous step of assuming it  
has any relevance today), and we will be hamstrung with a protocol  
forcing us to mask every byte on the network for no reason whatsoever.

Please, get off this bandwagon. The original paper which proposed  
masking as a side note also had an experimentally tested solution.  
Let's base our solution on that, and not go dashing off into  
theoretical weeds.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From salvatore.loreto@ericsson.com  Fri Jan  7 01:28:51 2011
Return-Path: <salvatore.loreto@ericsson.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 60BB73A67F4 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:28:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.548
X-Spam-Level: 
X-Spam-Status: No, score=-106.548 tagged_above=-999 required=5 tests=[AWL=0.051, BAYES_00=-2.599, 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 IpDnsirq9ocX for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:28:50 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 2FBD63A67EE for <hybi@ietf.org>; Fri,  7 Jan 2011 01:28:49 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-10-4d26dd4f53a3
Received: from esessmw0197.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id 02.91.13987.F4DD62D4; Fri,  7 Jan 2011 10:30:55 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0197.eemea.ericsson.se (153.88.115.88) with Microsoft SMTP Server id 8.2.234.1; Fri, 7 Jan 2011 10:30:55 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 40DC52980	for <hybi@ietf.org>; Fri,  7 Jan 2011 11:30:55 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 0A4CF4F9E0	for <hybi@ietf.org>; Fri,  7 Jan 2011 11:30:55 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 9379B4EE9D	for <hybi@ietf.org>; Fri,  7 Jan 2011 11:30:54 +0200 (EET)
Message-ID: <4D26DD4E.5070702@ericsson.com>
Date: Fri, 7 Jan 2011 10:30:54 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D26605B.1090409@callenish.com>
In-Reply-To: <4D26605B.1090409@callenish.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Fri, 07 Jan 2011 09:28:51 -0000

On 1/7/11 1:37 AM, Bruce Atherton wrote:
> On 06/01/2011 1:43 AM, Greg Wilkins wrote:
>> a difficulty of this working group is that we were never able to even
>> agree on a requirement document as the various constituencies
>> suspected each other of steering the requirements towards their own
>> use-cases. Hence it is difficult to really say what is in scope or out
>> of scope.
> Thanks for the explanation, Greg. That explains a lot about why this
> group is so dysfunctional. If you haven't agreed on what your goal is,
> no wonder you are all pulling in different directions. A trade-off that
> seems obvious to someone with a specific goal in mind will seem
> insensible to another person with a different goal.
>
> Should the design of Websockets consider uses of peer-to-peer? Should it
> give consideration to issues that are specific to Intranet use? Should
> designers of the spec worry about non-browser clients like custom
> written Websocket clients and Websocket servers that act as clients to
> other servers? Or is the only thing that really matters when designing
> Websockets the browser and server interactions, and any other use that
> happens to work is just gravy?
>
> I think that agreeing on these basic questions will likely eliminate a
> lot of the conflict on this list. Also, as a potential customer of this
> specification it would be very useful to me to have a clear
> understanding of what the intended uses for Websockets are, so that I
> can better understand where I am supposed to be applying it in my future
> designs.
>
> So far it appears that Greg, Brodie, Jerod, and I favour including
> peer-to-peer design considerations in the spec. I am not sure, but it
> sounds like John considers it out of scope and Scott considers it in
> scope. What about the rest of you?

as chair I have to say that at moment "peer to peer" is out of the scope
as drafted in the charter: http://tools.ietf.org/wg/hybi/charters

of course the charter is something that can be changed at anytime,
if there is working group consensus on doing it.

/Sal

From salvatore.loreto@ericsson.com  Fri Jan  7 01:32:36 2011
Return-Path: <salvatore.loreto@ericsson.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 281A53A67F9 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:32:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.548
X-Spam-Level: 
X-Spam-Status: No, score=-106.548 tagged_above=-999 required=5 tests=[AWL=0.050, BAYES_00=-2.599, 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 rVb+gZpb+fhU for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:32:34 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 5E0723A67EE for <hybi@ietf.org>; Fri,  7 Jan 2011 01:32:34 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-58-4d26de302107
Received: from esessmw0247.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id 21.12.13987.03ED62D4; Fri,  7 Jan 2011 10:34:40 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0247.eemea.ericsson.se (153.88.115.94) with Microsoft SMTP Server id 8.2.234.1; Fri, 7 Jan 2011 10:34:40 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id DC2C62980	for <hybi@ietf.org>; Fri,  7 Jan 2011 11:34:38 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id A5BAC4F9E0	for <hybi@ietf.org>; Fri,  7 Jan 2011 11:34:38 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 3CBDA4EE9D	for <hybi@ietf.org>; Fri,  7 Jan 2011 11:34:38 +0200 (EET)
Message-ID: <4D26DE2D.5040901@ericsson.com>
Date: Fri, 7 Jan 2011 10:34:37 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>
In-Reply-To: <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------030401060906050701090205"
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Fri, 07 Jan 2011 09:32:36 -0000

--------------030401060906050701090205
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit

On 1/7/11 2:23 AM, John Tamplin wrote:
> On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <bruce@callenish.com 
> <mailto:bruce@callenish.com>> wrote:
>
>     So far it appears that Greg, Brodie, Jerod, and I favour including
>     peer-to-peer design considerations in the spec. I am not sure, but
>     it sounds like John considers it out of scope and Scott considers
>     it in scope. What about the rest of you?
>
>
> I am not opposed to it exactly, but given how long everything has 
> taken I am keen to keep the base protocol minimal so we can actually 
> get something out the door.
I agree with John,
lets keep the base protocol minimal at moment.
Once we have reached consensus on the minimal base protocol we can
start to add other stuff on top of the minimal base.

If there is consensus in doing something in the future we can track it 
in the issue tracker
so we won't forget.


cheers
/Sal

-- 
Salvatore Loreto
www.sloreto.com


--------------030401060906050701090205
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 1/7/11 2:23 AM, John Tamplin wrote:
    <blockquote
      cite="mid:AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com"
      type="cite">On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <span
        dir="ltr">&lt;<a moz-do-not-send="true"
          href="mailto:bruce@callenish.com">bruce@callenish.com</a>&gt;</span>
      wrote:<br>
      <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex;
        border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
        <div class="im">So far it appears that Greg, Brodie, Jerod, and
          I favour including peer-to-peer design considerations in the
          spec. I am not sure, but it sounds like John considers it out
          of scope and Scott considers it in scope. What about the rest
          of you?</div>
      </blockquote>
      <div><br>
      </div>
      <div>I am not opposed to it exactly, but given how long everything
        has taken I am keen to keep the base protocol minimal so we can
        actually get something out the door.</div>
    </blockquote>
    I agree with John,<br>
    lets keep the base protocol minimal at moment.<br>
    Once we have reached consensus on the minimal base protocol we can <br>
    start to add other stuff on top of the minimal base.<br>
    <br>
    If there is consensus in doing something in the future we can track
    it in the issue tracker<br>
    so we won't forget.<br>
    <br>
    <br>
    cheers<br>
    /Sal<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Salvatore Loreto
<a class="moz-txt-link-abbreviated" href="http://www.sloreto.com">www.sloreto.com</a></pre>
  </body>
</html>

--------------030401060906050701090205--

From gregw@intalio.com  Fri Jan  7 01:33:35 2011
Return-Path: <gregw@intalio.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 57BFA3A67F6 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:33:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.927
X-Spam-Level: 
X-Spam-Status: No, score=-2.927 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 GtCI-TXM8Sjj for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:33:33 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id B6E7B3A67EE for <hybi@ietf.org>; Fri,  7 Jan 2011 01:33:32 -0800 (PST)
Received: by qyk34 with SMTP id 34so257416qyk.10 for <hybi@ietf.org>; Fri, 07 Jan 2011 01:35:39 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.53.213 with SMTP id n21mr23703198qag.399.1294392939084; Fri, 07 Jan 2011 01:35:39 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Fri, 7 Jan 2011 01:35:39 -0800 (PST)
In-Reply-To: <4D26D20C.8030906@warmcat.com>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com>
Date: Fri, 7 Jan 2011 10:35:39 +0100
X-Google-Sender-Auth: pyJQk7Bko10QQ5f13noY4j1uQ4A
Message-ID: <AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: hybi@ietf.org
Content-Type: text/plain; charset=ISO-8859-1
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 09:33:36 -0000

On 7 January 2011 09:42, Andy Green <andy@warmcat.com> wrote:
> How many cases are disabled from attack if the websocket framing began
> always with the constant "\x0d\x0a\x0d\x0a", so you could never subsequently
> send data that could be interpreted as http headers or request?

Andy,

I think masking has been proposed as a way to get around the
unprovables about the safety or otherwise of prefixes.

There appears to be some who think a prefix of "CONNECT something
HTTP/1.1\r\n\r\n" to a stream is sufficient protection. Yet there are
also counter opinions that having a Hello frame at the start of the
stream and every frame starting with a byte with the high bit set is
insufficient. We iterated for a month or so trying to nail down
exactly what was sufficient or insufficient and got no where.

Masking appears the most popular solution because it avoids the need
to decide what is sufficient or not - or so  I thought. But now we are
getting bogged arguing about if the masking algorithm is sufficiently
strong or not.   We are fighting over meta meta concerns!



I'd like to propose the following:

 + The specification is updated so that extensions can use extension
data with out using a reserved bit
 + A "masking" extension is defined that includes a 32bit masking key
in the extension data of each frame.   The key should be
unpredictable, but the specification will not define how it is
generated.
+ The masking key is applied with XOR to all extension data following the key.
+ The masking key is applied with XOR to all normal payload.
+ The masking extension is the default extension, so that if no
extensions are negotiated it will be used from client->server
+ If other extensions are negotiated, then "masking" will need to be
explicitly negotiated in the list of extensions.
+ We also define the "identity" extension, which is a do nothing
extension.  If both ends negotiate to use the "identity" extension
only, then only the do nothing extension is applied and masking is not
used.
+ Browsers or any client that executes 3rd party code, MUST NOT accept
connections with identity only extension.

While I'm sure you all have better proposals that this, the problem is
everybody has different better proposals.
So my question is would such a proposal be a show stopper for anybody?


regards

From andy.warmcat.com@googlemail.com  Fri Jan  7 01:40:36 2011
Return-Path: <andy.warmcat.com@googlemail.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 D6D093A67FD for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:40:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.522
X-Spam-Level: 
X-Spam-Status: No, score=-3.522 tagged_above=-999 required=5 tests=[AWL=0.077,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 oKKJ5RtjdVvy for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:40:35 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 20EE63A6803 for <hybi@ietf.org>; Fri,  7 Jan 2011 01:40:34 -0800 (PST)
Received: by wwa36 with SMTP id 36so17310893wwa.13 for <hybi@ietf.org>; Fri, 07 Jan 2011 01:42:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=VkZfU002S+WfSziTFlOE2NtmWhBFNE7jMiJrqnQI3Pc=; b=WWQXqC4mgciYWQNJvLPXdUyrWEjsHug9hktpD38CMfn5+Tgj9vkbwDX25c+OTPVGvN HcsQuytFyyWSiMvbpBL3kA4fJxFrlWT6dz8Z2tkP9p97J1NOyQ+IgoVBxTv3Kq1cxhL5 ptJgzSRbCC8Z8WPgkrY9zAvRF+fdWXlaznlG0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=fanCv6DJ0DI+n1H6IraGoJVQ4TxhIYabCjYvw/GpuokkNabH8eLw24jJgUQ3HgGj8w uxMXRiFgIhO4T5w7GtIbDV1kWRwG++UVmaf2OOtnESuTByWT+HZpOoOv6PKGO6TwSk2N grw1kE/G5XNHCMkc0rjJnbnIxhrof5Ea7MC+E=
Received: by 10.227.138.76 with SMTP id z12mr15406779wbt.27.1294393361344; Fri, 07 Jan 2011 01:42:41 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id q18sm17513526wbe.23.2011.01.07.01.42.39 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 01:42:39 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D26E00E.10106@warmcat.com>
Date: Fri, 07 Jan 2011 09:42:38 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Dave Cridland <dave@cridland.net>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture>
In-Reply-To: <10468.1294391783.740346@puncture>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 07 Jan 2011 09:40:37 -0000

On 01/07/11 09:16, Somebody in the thread at some point said:
> On Fri Jan 7 08:42:52 2011, Andy Green wrote:

>> How many cases are disabled from attack if the websocket framing began
>> always with the constant "\x0d\x0a\x0d\x0a", so you could never
>> subsequently send data that could be interpreted as http headers or
>> request?
>
> We don't know, and can't tell without experiment.

I take your point but actually if we first agreed exactly what possible 
vulnerabilities we cared about, and they were few in number and 
well-defined, it would be possible to determine that one workaround or 
another would definitively disable possibility of those attacks without 
experiment.

Experiment would tell us if any intermediaries could actually be found 
in the field with that vulnerability, but the corner we are backed into 
now with websockets disabled in two main browsers because of "security", 
reality is no longer the issue if it ever was.  The issue now is finding 
a way to save face for them so they can re-enable websockets in their 
browser consistent with having shut it off over claims that have not yet 
delivered a broken piece of intermediary software for us to poke at and fix.

> We can, however, say that we know due to such an experiment that no
> intermediaries are known to exist which interpret data in a dangerous
> way subsequent to a CONNECT - although this has only been tested as the

Did you identify what that intermediary is with that behaviour, or find 
a way to make the problem repeatable for others?  It's one thing to say 
n% of a random and unrepeatable test did this or that it's much more 
effective to announce "squid 3.1.9 in transparent breaks on websocket 
without CONNECT"... that will lead to reproduction, and squid getting 
fixed and solving it that way without websockets needing to do anything.

> However, it seems that a very strong reality distortion field is in
> place in this working group - mere facts and experimental data are
> insufficient, and to be cast aside if they don't fit the theory, and we
> seem to have rechartered ourselves into a working group hell-bent on
> preventing any buggy third-party from being used as an attack surface in
> this or any possible parallel universe, past, present, or future. So we

lol Completely agree

> Please, get off this bandwagon. The original paper which proposed
> masking as a side note also had an experimentally tested solution. Let's
> base our solution on that, and not go dashing off into theoretical weeds.

Munging payload makes no sense to me in case you got the idea I am on 
that bandwagon.

If CONNECT or some CRLFs in the framing allow the browsers to re-enable 
websockets without munging, so we can go on, that's a price worth paying 
IMO (even though I think all of it is pointless and a problem to be 
solved at the intermediary only).

-Andy

From gregw@intalio.com  Fri Jan  7 01:53:28 2011
Return-Path: <gregw@intalio.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 37DD93A6800 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:53:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.927
X-Spam-Level: 
X-Spam-Status: No, score=-2.927 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 yd4nEYENnSxs for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:53:27 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id EA64C3A6807 for <hybi@ietf.org>; Fri,  7 Jan 2011 01:53:26 -0800 (PST)
Received: by qwi2 with SMTP id 2so1840704qwi.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 01:55:33 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.214.71 with SMTP id gz7mr10161726qab.349.1294394133292; Fri, 07 Jan 2011 01:55:33 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Fri, 7 Jan 2011 01:55:33 -0800 (PST)
In-Reply-To: <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com>
Date: Fri, 7 Jan 2011 10:55:33 +0100
X-Google-Sender-Auth: bz7OykDpC62cRz-tMCcUFVDNaqs
Message-ID: <AANLkTinQ+2xebDQhtnqsRjEiR+PnBRDDkww-z=sdLUBf@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 09:53:28 -0000

On 7 January 2011 03:38, John Tamplin <jat@google.com> wrote:
> My proposal:
> 1) Define a new extension "clientmask" in the base spec, which
> =A0 specifies that client->server masking is present. =A0An optional
> =A0 parameter "type" specifies the type of masking, and if not
> =A0 present defaults to "hmac-sha1".
> =A0(this leave open the option
> =A0of defining new masking methods in the future).
> 2) Any clients which make WebSocket connections at the
> =A0 request of untrusted code or entities and do not know for
> =A0 certain that the entire path to the ultimate server is trusted
> =A0 MUST request the clientmask extension and MUST fail the
> =A0 connection if the server does not accept the extension.
> 3) Any servers (or intermediaries acting as servers to the client)
> =A0 accepting a connection from an untrusted source MUST NOT
> =A0 accept a connection which does not request the clientmask
> =A0 extension. =A0A server accepting a connection from a client that
> =A0 is known to transit only trusted networks MAY accept
> =A0 connections which do not request the clientmask extension.
> =A0 A server which allows connections without the clientmask
> =A0 extension SHOULD default to no trusted networks and be
> =A0 configurable as to which networks are allowed to connect
> =A0 without the clientmask extension.
> 4) If the clientmask extension is negotiated, the first n bytes of
> =A0 the extension data of client-server frames is a per-frame key
> =A0 defined by the masking type, and the remainder of the payload
> =A0 (including any further bytes of extension data and application
> =A0 data) are masked as defined by the masking type.
> 5) For clientmask type of "hmac-sha1", the per-frame key length
> =A0 shall be 4 bytes, and the remainder of the frame shall be masked
> =A0 according to the following algorithm:


John,

oops I missed this proposal before sending my own in another thread.

I think your proposal is substantially the same as mine.  A few notes:

1. I'm still dubious about the benefit of specifying a masking type
other than XORing of a random per frame key. Any algorithm chosen
appears vulnerable to accusations of "too expensive for
client/intermediary/server of type X".
2. I'm happy either to have a default extension (as per my proposal)
or to require browsers to use the clientmask extension.  Whatever the
browser folks think is simplest.
3. I think this one will be hard to implement/enforce.  But maybe some
verbiage recommending servers consider using clientmask if there is
doubt about the path.
4. Perfect!
5. I really do not see the need for mixing in the nonces, thus making
the masking non self describing and making it impossible to decode
frames from mid stream.  It strikes me as  overkill and with
significant consequences.

Other than the masking algorithm, I think we are in agreement.
Your masking algorithm is not a total show stopper for me, but I fear
that specifying any moderately complex masking algorithm is just going
the raise the hackles of those that are entirely unconvinced that
masking is needed in the first place.


To merge the two threads, my proposal was:

 + The specification is updated so that extensions can use extension
data with out using a reserved bit
 + A "masking" extension is defined that includes a 32bit masking key
in the extension data of each frame.   The key should be
unpredictable, but the specification will not define how it is
generated.
+ The masking key is applied with XOR to all extension data following the k=
ey.
+ The masking key is applied with XOR to all normal payload.
+ The masking extension is the default extension, so that if no
extensions are negotiated it will be used from client->server
+ If other extensions are negotiated, then "masking" will need to be
explicitly negotiated in the list of extensions.
+ We also define the "identity" extension, which is a do nothing
extension.  If both ends negotiate to use the "identity" extension
only, then only the do nothing extension is applied and masking is not
used.
+ Browsers or any client that executes 3rd party code, MUST NOT accept
connections with identity only extension.

cheers

From andy.warmcat.com@googlemail.com  Fri Jan  7 01:57:20 2011
Return-Path: <andy.warmcat.com@googlemail.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 E672D3A6808 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:57:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.528
X-Spam-Level: 
X-Spam-Status: No, score=-3.528 tagged_above=-999 required=5 tests=[AWL=0.071,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 QULdm1BGb5xq for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 01:57:19 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 958443A6807 for <hybi@ietf.org>; Fri,  7 Jan 2011 01:57:19 -0800 (PST)
Received: by wyf23 with SMTP id 23so18116440wyf.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 01:59:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=XGC3PtCBWFRgyeszLZZssFAK/QAPCxZTAnCzD/y6UWo=; b=NPqF3LHhDQN0BXmeL9Dp+R6BbOhtVaFNlScvyFkkCKHPnyy7EnI9AcN01yqCON6f5+ lhDUyGm/ZvXs/p9ln1Y5U16ZWVk++WBApOVPB5LC6wBmH6MlrRfO+eQw40CXnK+gJWC5 1vtpYLfPLDGb7zdYXiNFpC/djSgsWOyRolvSk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=Ufy9bcjBK+K9WbsT8FqG7mf8J43lRrciAB78CDu+axRbg3+RD5RmOBFIkuYh2cwpoP tERTkjdnyrjXY8L48MhIjHl/YzDconiE9LKqr5XnH1SMuPsropzKUd8DuX3cKYdK7vLp ++9BTLM5utp0Pb57wyjhjT0e7ezUZT+WxQyG8=
Received: by 10.227.138.21 with SMTP id y21mr15440421wbt.212.1294394365653; Fri, 07 Jan 2011 01:59:25 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id q18sm17513807wbe.17.2011.01.07.01.59.24 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 01:59:25 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D26E3FB.6050206@warmcat.com>
Date: Fri, 07 Jan 2011 09:59:23 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <4D25D82A.8070302@warmcat.com>	<AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>	<20110106184607.GB27099@1wt.eu>	<AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com>
In-Reply-To: <AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 07 Jan 2011 09:57:21 -0000

On 01/07/11 09:35, Somebody in the thread at some point said:

> I think masking has been proposed as a way to get around the
> unprovables about the safety or otherwise of prefixes.
>
> There appears to be some who think a prefix of "CONNECT something
> HTTP/1.1\r\n\r\n" to a stream is sufficient protection. Yet there are
> also counter opinions that having a Hello frame at the start of the
> stream and every frame starting with a byte with the high bit set is
> insufficient. We iterated for a month or so trying to nail down
> exactly what was sufficient or insufficient and got no where.

It's because there is no central definition of which intermediary 
attacks we are trying to disable.  Each person is making his case for a 
solution with his private ideas of what the goal is.

> Masking appears the most popular solution because it avoids the need
> to decide what is sufficient or not - or so  I thought. But now we are
> getting bogged arguing about if the masking algorithm is sufficiently
> strong or not.   We are fighting over meta meta concerns!

Yeah, masking seems to people to be the strongest possible medicine for 
disabling attacks, so in the vacuum of any definition of what they are 
trying to achieve with it, people who think something should be achieved 
gravitate towards that.  But like I said, actually with the goal of 
having masking undefined, unbounded, no medicine is actually going to be 
shown to be strong enough, not even if Eric gets tired fighting that 
corner and names some specific algorithm and key size as 'enough' (for 
what?).

So I don't think we can talk sense and arrive at a technically reasoned 
consensus about disabling attacks until we make a set of attacks that we 
accept need to be disabled by the solution, and all other attacks are 
not our problem.

> I'd like to propose the following:
>
>   + The specification is updated so that extensions can use extension
> data with out using a reserved bit

I see what you're trying to do there with squeezing out the detail that 
will be debated while establishing munging, but I ask you is it a good 
idea to add this into a specification when you cannot actually describe 
in all honesty exactly what it is trying to achieve and why it is 
sufficient to achieve it?

-Andy

From w@1wt.eu  Fri Jan  7 02:01:12 2011
Return-Path: <w@1wt.eu>
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 331E43A680F for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:01:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.129
X-Spam-Level: 
X-Spam-Status: No, score=-2.129 tagged_above=-999 required=5 tests=[AWL=-0.086, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 i5g2C8AKaSyn for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:01:11 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id ADDA13A6811 for <hybi@ietf.org>; Fri,  7 Jan 2011 02:01:10 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p07A3Dxr031676; Fri, 7 Jan 2011 11:03:13 +0100
Date: Fri, 7 Jan 2011 11:03:13 +0100
From: Willy Tarreau <w@1wt.eu>
To: Dave Cridland <dave@cridland.net>
Message-ID: <20110107100313.GO28367@1wt.eu>
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <10468.1294391783.740346@puncture>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 10:01:12 -0000

On Fri, Jan 07, 2011 at 09:16:23AM +0000, Dave Cridland wrote:
> On Fri Jan  7 08:42:52 2011, Andy Green wrote:
> >How many cases are disabled from attack if the websocket framing  
> >began always with the constant "\x0d\x0a\x0d\x0a", so you could  
> >never subsequently send data that could be interpreted as http  
> >headers or request?
> 
> We don't know, and can't tell without experiment.

In fact, starting with CRLF should not change anything because HTTP
recommends that implementations skip over CRLFs in request in order
to accomodate for broken clients that used to send CRLFs after POST
requests.

Also, I think the smallest request we could fear would be the HTTP/0.9
"GET /\n". It's 6 bytes long. Whatever crypto algorithm is used, it
will always be enough to send 6*256^6 bytes (about 1600 TB) to make
it appear in the stream, and some clever constructs might be able to
make it appear in only 256^6. That also means that any key larger than
6 bytes (48 bits) is pointless to protect against this request, whether
we use a simple XOR or a cryptographically strong algorithm.

In practice, it could happen a lot earlier because the key might just
itself contain the pattern we're trying to avoid.

> We can, however, say that we know due to such an experiment that no  
> intermediaries are known to exist which interpret data in a dangerous  
> way subsequent to a CONNECT - although this has only been tested as  
> the first method used in a stream, to be precise. This implies that  
> either of the original CONNECT-based handshake proposed, and my  
> subsequent standards-conformant adaptation that (apparently) nobody  
> likes,

I disagree with these last few words, because I said that I liked the
principle because eventhough it's dirty, it's a way to force some broken
intermediaries to act in a more or less deterministic way.

> would be sufficient to reduce attacks to a percentage of  
> intermediaries sufficiently small that none have been found to date.  

Please note that none intermediaries vulnerable to what we're trying
to fix have been found to date either.

> One may as well say that these intermediaries don't exist, and claim  
> that proof because the invisible pink unicorn told us so, because  
> it'll be just as easy to prove the non-existence of the IPU as to  
> prove the non-existence of the intermediaries, and frankly as valid,  
> given that experimental data at least supports the unicorn's  
> statement.

You got me lost there.

> However, it seems that a very strong reality distortion field is in  
> place in this working group - mere facts and experimental data are  
> insufficient, and to be cast aside if they don't fit the theory, and  
> we seem to have rechartered ourselves into a working group hell-bent  
> on preventing any buggy third-party from being used as an attack  
> surface in this or any possible parallel universe, past, present, or  
> future. So we seem to be lumbering ourselves with some truly  
> impressive baggage that future developers will either look upon  
> aghast, or with amazement that we somehow predicted a sudden and  
> uncharacteristic rise in vulnerable intermediaries - possibly even to  
> measurable levels - despite all reasonable expectation to the  
> contrary.

The rise of vulnerable intermediaries will probably happen, because
Adam and Eric's experiment showed that intermediaries vulnerable to
HTTP do exist. The same that have been abused by their experiment
might still be in the wild since nobody knows which ones were abused,
and we know it only requires a shared hosting service to exploit them.
The client may be anyone with an internet connection as it only requires
the ability to forge an HTTP request. (In fact, I even hope that those
crappy intermediaries will quickly be uncovered, that will make the net
a cleaner place).

But we've not got any evidence of an intermediary that is able to
spot something looking like a valid request after the framing and we're
several ones to have strong doubts about that.

I'm not saying we should avoid masking, having it mandatory for the
browsers will help us sleep in peace. But I sometimes would like to
remind what we're trying to protect against vs what it costs to do it.
When I'm saying that an attacker needs to send 52 GB of WS messages
with 32bit keys to have "GET /\n" sent over the wire, hoping for an
intermediary to pick it, while it would only have required a telnet
to port 80 to reliably send it, I think we have a strong enough balance
so that WS is not a usable attack vector anymore.

> I'm personally expecting the former - masking will become less and  
> less relevant (and this is taking the generous step of assuming it  
> has any relevance today), and we will be hamstrung with a protocol  
> forcing us to mask every byte on the network for no reason whatsoever.

I don't think that masking is that much relevant, it's just that it
saves us from verifying hypothesis. That's a choice that was proposed
to move forward, as all hypothesis of supposed vulnerabilities have
remained unverified and unverifiable.

> Please, get off this bandwagon. The original paper which proposed  
> masking as a side note also had an experimentally tested solution.  
> Let's base our solution on that, and not go dashing off into  
> theoretical weeds.

I think that payload masking can have other advantages for totally
unrelated reasons. For instance, if we design it as an extension,
it might be usable to safely transmit asymetrically encrypted
keys or passwords over the network with a key presented in the
hello frames. But that's assuming we accept to make masking optional
and negociable.

Willy


From gregw@intalio.com  Fri Jan  7 02:07:02 2011
Return-Path: <gregw@intalio.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 A1E673A6810 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:07:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.927
X-Spam-Level: 
X-Spam-Status: No, score=-2.927 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 AhdGx80sCOOj for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:07:01 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id C6C933A67F9 for <hybi@ietf.org>; Fri,  7 Jan 2011 02:07:01 -0800 (PST)
Received: by qyk34 with SMTP id 34so283854qyk.10 for <hybi@ietf.org>; Fri, 07 Jan 2011 02:09:08 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.235.143 with SMTP id kg15mr21558267qcb.17.1294394947817; Fri, 07 Jan 2011 02:09:07 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Fri, 7 Jan 2011 02:09:07 -0800 (PST)
In-Reply-To: <4D26E00E.10106@warmcat.com>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <4D26E00E.10106@warmcat.com>
Date: Fri, 7 Jan 2011 11:09:07 +0100
X-Google-Sender-Auth: KmXkhrnyFX1bRdMnLrMd_w0eM6w
Message-ID: <AANLkTik19d6cf=7ndxTdS116ycowXdHJHxLbOzzjmsS0@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: andy@warmcat.com
Content-Type: text/plain; charset=ISO-8859-1
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 10:07:02 -0000

On 7 January 2011 10:42, Andy Green <andy@warmcat.com> wrote:
> If CONNECT or some CRLFs in the framing allow the browsers to re-enable
> websockets without munging, so we can go on, that's a price worth paying IMO
> (even though I think all of it is pointless and a problem to be solved at
> the intermediary only).

Andy,

as much as I personally agree that sending some stream and/or frame
prefix should be sufficient to defend against poor intermediaries,
that line of argument has been made many many times and has uniformly
failed to convince the browser vendors that speak in this WG.

So unless they have a sudden change of heart/mind (???), then I really
think the only way forward is along the lines of the consensus  that
started forming around masking.    But for that to work, those that
don't think masking is needed must stop trying to convince others that
it is not needed, and those that think masking is cheap and simple
must stop trying to convince others that there is no cost in making it
mandatory in all deployments.

regards

From andy.warmcat.com@googlemail.com  Fri Jan  7 02:27:28 2011
Return-Path: <andy.warmcat.com@googlemail.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 6836A3A6803 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:27:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.532
X-Spam-Level: 
X-Spam-Status: No, score=-3.532 tagged_above=-999 required=5 tests=[AWL=0.067,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 MqSEV-PVWjCG for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:27:27 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id F20403A6817 for <hybi@ietf.org>; Fri,  7 Jan 2011 02:27:26 -0800 (PST)
Received: by wyf23 with SMTP id 23so18139798wyf.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 02:29:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=S45Mm6dDN/T9fDMEAnvIYzRuiyMjVdvUBvyGZqWgFso=; b=E49LJJNhBhk4+2+jXJkEeBhT1+Gpe+gs/ImSguhtc3QwlSlbMDb+l+iS33HeIlh887 oflWmv7/Y0+L6P9A0fkfNst3/cmkP92iBGlPsEIrN6vMiLO4QQvl2vrG+u4gqa3CccUo KG7ssG9KDUj1kMz3MpQ/ZXKpemaYPfUs0u1yE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=kcNYcTe4XFX6VistBbyJBJXig8ppiF6/D2Iy7t8iXxm6C1X2+X5Pub49iIucLGTcKA XFflvvPsSjuQaNtrS/vz4ENERSbDqblPwKnAS8rrFm+KdI4IyBsb5M4kwYdAIALMsKWP QfFgb24lm9Ix0xvcokiueVveagChsegpMSMh4=
Received: by 10.227.93.94 with SMTP id u30mr2600001wbm.153.1294396173057; Fri, 07 Jan 2011 02:29:33 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id q18sm17534290wbe.17.2011.01.07.02.29.30 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 02:29:31 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D26EB0A.9050203@warmcat.com>
Date: Fri, 07 Jan 2011 10:29:30 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <4D25D82A.8070302@warmcat.com>	<AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>	<20110106184607.GB27099@1wt.eu>	<AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<4D26D20C.8030906@warmcat.com>	<10468.1294391783.740346@puncture>	<4D26E00E.10106@warmcat.com> <AANLkTik19d6cf=7ndxTdS116ycowXdHJHxLbOzzjmsS0@mail.gmail.com>
In-Reply-To: <AANLkTik19d6cf=7ndxTdS116ycowXdHJHxLbOzzjmsS0@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 07 Jan 2011 10:27:28 -0000

On 01/07/11 10:09, Somebody in the thread at some point said:

> as much as I personally agree that sending some stream and/or frame
> prefix should be sufficient to defend against poor intermediaries,
> that line of argument has been made many many times and has uniformly
> failed to convince the browser vendors that speak in this WG.
>
> So unless they have a sudden change of heart/mind (???), then I really
> think the only way forward is along the lines of the consensus  that
> started forming around masking.    But for that to work, those that

I agree, as a political situation regardless of the technical reality 
the browsers need a reason to re-enable websockets after disabling it 
for 'security'.

> don't think masking is needed must stop trying to convince others that
> it is not needed, and those that think masking is cheap and simple
> must stop trying to convince others that there is no cost in making it
> mandatory in all deployments.

Since my use case for websockets involves a browser, like pretty much 
everybody else, when the browser makes munging mandatory by default it 
will be mandatory for me in fact.

There's no possibility to reach a reasoned, technical decision about 
defeating attacks without defining the attacks that need to be defeated.

If that isn't going to happen, then just making the spooked browser guys 
happy again by throwing crypto voodoo into the mix is as good as 
anything else, at the cost of stinking up this nice lightweight protocol 
for no perceptible benefit.

-Andy

From gregw@intalio.com  Fri Jan  7 02:29:35 2011
Return-Path: <gregw@intalio.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 EB1973A680F for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:29:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.928
X-Spam-Level: 
X-Spam-Status: No, score=-2.928 tagged_above=-999 required=5 tests=[AWL=0.049,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 YxHc6r8-xtRl for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:29:35 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id E5FE13A6803 for <hybi@ietf.org>; Fri,  7 Jan 2011 02:29:34 -0800 (PST)
Received: by qyk34 with SMTP id 34so301918qyk.10 for <hybi@ietf.org>; Fri, 07 Jan 2011 02:31:41 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.235.143 with SMTP id kg15mr21575849qcb.17.1294396301323; Fri, 07 Jan 2011 02:31:41 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Fri, 7 Jan 2011 02:31:41 -0800 (PST)
In-Reply-To: <4D26E3FB.6050206@warmcat.com>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com> <4D26E3FB.6050206@warmcat.com>
Date: Fri, 7 Jan 2011 11:31:41 +0100
X-Google-Sender-Auth: ZkFpEdO-8fefOeh104Wml4S1_hA
Message-ID: <AANLkTin7dCgPym-oq0jMvRfQ_5SzDjRQUWxXO8eSwDR7@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: andy@warmcat.com
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 10:29:36 -0000

On 7 January 2011 10:59, Andy Green <andy@warmcat.com> wrote:
> I ask you is it a good idea to
> add this into a specification when you cannot actually describe in all
> honesty exactly what it is trying to achieve and why it is sufficient to
> achieve it?

Andy,

I can in all honesty describe the vulnerability that masking is trying
to defend against.

WS, by it's nature is designed to penetrate HTTP infrastructure, some
of which is unaware of the ability of HTTP to be upgraded to a
non-HTTP protocol.

There is a demonstrated vulnerability in some intermediaries that they
can have their caches poisoned by seeing spoofed host headers in a
request sent to an attacker controlled server.   However, this
demonstration only  HTTP compliant framing.

There are other demonstrations of HTTP parsers that are very forgiving
of at least some type of rubbish data between requests such that
unknown methods and white space are skipped while the next request is
looked for.

There is a concern that there might exist intermediaries that suffer
from both cache poisoning vulnerability and overly forgiving HTTP
parsing.  If so, WS could be used to attack these intermediaries and
poison their caches.   While such intermediaries are already
vulnerable to flash and java plugins, these are optional extras in
browsers, so it is a different matter to expose the same vulnerability
in the protocol behind a non-optional part of the HTML-5 standard.

Now, I personally believe that the existence of intermediaries with
both vulnerabilities is vanishingly small and probably zero.  I also
believe that sending Hello frames and using framing with high bits set
should be sufficient to break even the most forgiving of HTTP parsers.
   But I can not prove either point, nor after months of debate have
the browser vendors been convinced of the validity of such arguments.

Thus in the spirit of compromise, as an implementer or servers and
non-browser clients, I'm prepared to accept a masking extension that
removes the ability of attackers to send any predictable clear text in
any frame and that this extension is mandatory for browsers.  All I
ask in return is when a connection is established by consenting
parties that do not share the concern about such intermediaries, that
there be a realistic option to turn off the masking (or replace it
with something else).  OK - I'm also asking that we don't go overboard
with an elaborate masking algorithm - surely XORing a random key is
sufficient?

Technically, I believe that it is very important that WS has a viable
extension mechanism. While I'm not entirely convinced of the need for
masking on the grounds of security, I think it's value as an exemplar
that will ensuring we have a viable extension mechanism is
significant.

regards

From andy.warmcat.com@googlemail.com  Fri Jan  7 02:40:20 2011
Return-Path: <andy.warmcat.com@googlemail.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 A2ABA3A681B for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:40:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.537
X-Spam-Level: 
X-Spam-Status: No, score=-3.537 tagged_above=-999 required=5 tests=[AWL=0.062,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 9Asv2nXUALKz for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:40:19 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id A2FEE3A681A for <hybi@ietf.org>; Fri,  7 Jan 2011 02:40:19 -0800 (PST)
Received: by wyf23 with SMTP id 23so18149704wyf.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 02:42:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=APdQp+GtcQ8dAdaeW4HuaA9hHg8n7nXNPNwpKk6ruY4=; b=WDTdcA3WOGsI72lsfkAEVPR8frCEGf6RLAU0lH2QCERbhvPN1so6dMFR/N9+Eej3dm EWY8t2xUO5xvdaNVf0RTQp+QZZ8saVBR4OfaYPg6IzxhYkoK7ChadKq24sgmx6wt4fgf JgiDWuNRLCyJ6bJ07i0aLk7ywL11FCquIMXHc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=CEkk5b+4o2slAz2plySJajydK2Jjde2GGxfrG43sOORobaRz/se8RPwBiUyQrPanBo JBTnzH2EojHvqaOsOOxuF/BVlj4mLbxPZCLTN0w5nvYlDL96V1MGGB9iVvlqyfPcvOzs D9PAjJ4kqT0dORlF+Nvqz7OCjw2dX+rLXzsdA=
Received: by 10.227.153.11 with SMTP id i11mr9853809wbw.4.1294396945779; Fri, 07 Jan 2011 02:42:25 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id f35sm17542128wbf.2.2011.01.07.02.42.24 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 02:42:25 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D26EE10.5020306@warmcat.com>
Date: Fri, 07 Jan 2011 10:42:24 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu>
In-Reply-To: <20110107100313.GO28367@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 07 Jan 2011 10:40:20 -0000

On 01/07/11 10:03, Somebody in the thread at some point said:
> On Fri, Jan 07, 2011 at 09:16:23AM +0000, Dave Cridland wrote:
>> On Fri Jan  7 08:42:52 2011, Andy Green wrote:
>>> How many cases are disabled from attack if the websocket framing
>>> began always with the constant "\x0d\x0a\x0d\x0a", so you could
>>> never subsequently send data that could be interpreted as http
>>> headers or request?
>>
>> We don't know, and can't tell without experiment.
>
> In fact, starting with CRLF should not change anything because HTTP
> recommends that implementations skip over CRLFs in request in order
> to accomodate for broken clients that used to send CRLFs after POST
> requests.

Thanks for the insight... "+\x0d\x0a\x0d\x0a" then?

-Andy

From w@1wt.eu  Fri Jan  7 02:44:14 2011
Return-Path: <w@1wt.eu>
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 4AEAB3A681A for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:44:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.128
X-Spam-Level: 
X-Spam-Status: No, score=-2.128 tagged_above=-999 required=5 tests=[AWL=-0.085, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 pE4WzmCPnZZ4 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:44:13 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id E76963A67F8 for <hybi@ietf.org>; Fri,  7 Jan 2011 02:44:12 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p07AkHGK031851; Fri, 7 Jan 2011 11:46:17 +0100
Date: Fri, 7 Jan 2011 11:46:17 +0100
From: Willy Tarreau <w@1wt.eu>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20110107104617.GP28367@1wt.eu>
References: <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com> <4D26E3FB.6050206@warmcat.com> <AANLkTin7dCgPym-oq0jMvRfQ_5SzDjRQUWxXO8eSwDR7@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTin7dCgPym-oq0jMvRfQ_5SzDjRQUWxXO8eSwDR7@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 10:44:14 -0000

On Fri, Jan 07, 2011 at 11:31:41AM +0100, Greg Wilkins wrote:
> There is a demonstrated vulnerability in some intermediaries that they
> can have their caches poisoned by seeing spoofed host headers in a
> request sent to an attacker controlled server.   However, this
> demonstration only  HTTP compliant framing.

Indeed and it can also be done without involving a browser at all, just
by sending a hand-crafted request to the faulty component.

> There are other demonstrations of HTTP parsers that are very forgiving
> of at least some type of rubbish data between requests such that
> unknown methods and white space are skipped while the next request is
> looked for.

Such components generally are the ones that don't use the method, for
instance, content switches that are just looking for host headers and
maybe URI. Since a cache must check the method (at least to differentiate
between HEAD/GET/POST), it could not blindly ignore it.

> There is a concern that there might exist intermediaries that suffer
> from both cache poisoning vulnerability and overly forgiving HTTP
> parsing.  If so, WS could be used to attack these intermediaries and
> poison their caches.   While such intermediaries are already
> vulnerable to flash and java plugins,

And to any incoming connection whatever the component which initiates
it, I find it important to remind it.

> these are optional extras in
> browsers, so it is a different matter to expose the same vulnerability
> in the protocol behind a non-optional part of the HTML-5 standard.
> 
> Now, I personally believe that the existence of intermediaries with
> both vulnerabilities is vanishingly small and probably zero.

Agreed.

> I also
> believe that sending Hello frames and using framing with high bits set
> should be sufficient to break even the most forgiving of HTTP parsers.

Agreed too.

>    But I can not prove either point, nor after months of debate have
> the browser vendors been convinced of the validity of such arguments.
> 
> Thus in the spirit of compromise, as an implementer or servers and
> non-browser clients, I'm prepared to accept a masking extension that
> removes the ability of attackers to send any predictable clear text in
> any frame and that this extension is mandatory for browsers.  All I
> ask in return is when a connection is established by consenting
> parties that do not share the concern about such intermediaries, that
> there be a realistic option to turn off the masking (or replace it
> with something else).  OK - I'm also asking that we don't go overboard
> with an elaborate masking algorithm - surely XORing a random key is
> sufficient?

I too would be happy with that. In my opinion it would be technically
useless, but technically cheap enough to justify having it, and it will
make browser vendors feel better after what we tried to make them swallow.

> Technically, I believe that it is very important that WS has a viable
> extension mechanism. While I'm not entirely convinced of the need for
> masking on the grounds of security, I think it's value as an exemplar
> that will ensuring we have a viable extension mechanism is
> significant.

That's a good point. Just like TCP was released with the MSS option as
the single one at the beginning.

Regards,
Willy


From w@1wt.eu  Fri Jan  7 02:51:24 2011
Return-Path: <w@1wt.eu>
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 25E813A67F8 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:51:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.127
X-Spam-Level: 
X-Spam-Status: No, score=-2.127 tagged_above=-999 required=5 tests=[AWL=-0.084, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 eGkNj70wchGW for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 02:51:23 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id EF0D23A67EC for <hybi@ietf.org>; Fri,  7 Jan 2011 02:51:22 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p07ArRw8031877; Fri, 7 Jan 2011 11:53:27 +0100
Date: Fri, 7 Jan 2011 11:53:27 +0100
From: Willy Tarreau <w@1wt.eu>
To: Andy Green <andy@warmcat.com>
Message-ID: <20110107105327.GQ28367@1wt.eu>
References: <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <4D26EE10.5020306@warmcat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D26EE10.5020306@warmcat.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 10:51:24 -0000

On Fri, Jan 07, 2011 at 10:42:24AM +0000, Andy Green wrote:
> On 01/07/11 10:03, Somebody in the thread at some point said:
> >On Fri, Jan 07, 2011 at 09:16:23AM +0000, Dave Cridland wrote:
> >>On Fri Jan  7 08:42:52 2011, Andy Green wrote:
> >>>How many cases are disabled from attack if the websocket framing
> >>>began always with the constant "\x0d\x0a\x0d\x0a", so you could
> >>>never subsequently send data that could be interpreted as http
> >>>headers or request?
> >>
> >>We don't know, and can't tell without experiment.
> >
> >In fact, starting with CRLF should not change anything because HTTP
> >recommends that implementations skip over CRLFs in request in order
> >to accomodate for broken clients that used to send CRLFs after POST
> >requests.
> 
> Thanks for the insight... "+\x0d\x0a\x0d\x0a" then?

We should avoid restarting this debate, it has already been suggested
to send strings supposed to make intermediaries abort on invalid requests,
but since the fears about the broken one sometimes rely on their supposed
ability to spot anything anywhere, such methods cannot be convincing for
these people.

If we want to send something that looks like a request, Dave is right, the
experiment has only shown that CONNECT was respected. And if we wanted to
go that route, we could only use what was proven by the experiment to reassure
the people that were worried by the interpretation of the same experiment.

Quite frankly, I'd prefer to be able to send a clear stream when possible,
which means that optional masking is a good solution. 10 years from now,
people will not say "why do we have to send a fake request after the
handshake ?", at best they'll say "pfff this stupid masking has been
unused for 5 years still we have to implement it", and that will mean
we'll have already succeeded.

Willy


From andy.warmcat.com@googlemail.com  Fri Jan  7 03:09:31 2011
Return-Path: <andy.warmcat.com@googlemail.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 DE4073A681E for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:09:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.54
X-Spam-Level: 
X-Spam-Status: No, score=-3.54 tagged_above=-999 required=5 tests=[AWL=0.059,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 U5L2PNSMLTcU for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:09:30 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 9CF173A681D for <hybi@ietf.org>; Fri,  7 Jan 2011 03:09:30 -0800 (PST)
Received: by wyf23 with SMTP id 23so18172704wyf.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 03:11:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=oFfdjayB7JF9vsyVzHNtJo++U983Qs+efsgj1CshHcs=; b=k1CHKViHEEpKM5I/gi071cKXz7ZAOfiyknKQFolJv0nQBrp2QUGB+agxmNDwPRMxMz UnZ4RZC47NvSabiWiwcDDjGIqQ8kzDoCkD5CIgn/Vl9JJb34NflIZdU6GilUoyhNgm/I mxIhJBT+oHEr1RGhR3wCPthB2nhQyOXvqgGZ8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=Ne+dTBIL2dwnAI3WZuw+sNTBj6+8fe7FOKPvhVUv9dl0Kh0wppX6+W1INB7BiHwLZt M/WNPsQX8cF6hl9SFaYCk7zhF4GsU4uNEj8+QfuvTX6ivVHIvZFkePn/G+tD0sQ04eI7 1fiyIeUgb+R13ZRMT9LO/5IHiNavSizNTqZzI=
Received: by 10.227.181.73 with SMTP id bx9mr15309145wbb.223.1294398696689; Fri, 07 Jan 2011 03:11:36 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id 11sm17562877wbj.13.2011.01.07.03.11.35 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 03:11:35 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D26F4E6.1010605@warmcat.com>
Date: Fri, 07 Jan 2011 11:11:34 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <4D26EE10.5020306@warmcat.com> <20110107105327.GQ28367@1wt.eu>
In-Reply-To: <20110107105327.GQ28367@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 07 Jan 2011 11:09:32 -0000

On 01/07/11 10:53, Somebody in the thread at some point said:

>> Thanks for the insight... "+\x0d\x0a\x0d\x0a" then?
>
> We should avoid restarting this debate, it has already been suggested
> to send strings supposed to make intermediaries abort on invalid requests,
> but since the fears about the broken one sometimes rely on their supposed
> ability to spot anything anywhere, such methods cannot be convincing for
> these people.

Yeah but this is the bind, if we accept it is websocket responsibility 
to defeat attacks on an intermediary that has the "supposed ability to 
spot anything anywhere" as you say, then they will eventually spot 
something even in a munged stream.  This troll intermediary is actually 
broken for use on a network at all, presumably it has a special get-out 
that it never spots crap on ssl.

That's why I say no obfuscation key length is enough to satisfy the 
demand to protect the "anything anywhere" case, the demand is 
unreasonable and we should reject it and require these broken 
intermediaries get fixed themselves.

> If we want to send something that looks like a request, Dave is right, the
> experiment has only shown that CONNECT was respected. And if we wanted to
> go that route, we could only use what was proven by the experiment to reassure
> the people that were worried by the interpretation of the same experiment.
>
> Quite frankly, I'd prefer to be able to send a clear stream when possible,
> which means that optional masking is a good solution. 10 years from now,
> people will not say "why do we have to send a fake request after the
> handshake ?", at best they'll say "pfff this stupid masking has been
> unused for 5 years still we have to implement it", and that will mean
> we'll have already succeeded.

Like I said for me if it only takes CONNECT in the handshake or a few 
extra bytes in the framing and the rest is in clear, that is hugely 
preferable to munging every byte.

-Andy

From dave@cridland.net  Fri Jan  7 03:13:29 2011
Return-Path: <dave@cridland.net>
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 23C2E3A681D for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:13:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.529
X-Spam-Level: 
X-Spam-Status: No, score=-2.529 tagged_above=-999 required=5 tests=[AWL=0.070,  BAYES_00=-2.599]
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 WPITJaSG0XNM for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:13:28 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 5D3783A681E for <hybi@ietf.org>; Fri,  7 Jan 2011 03:13:27 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 94D41116811E; Fri,  7 Jan 2011 11:15:32 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10nKOE9FYbTa; Fri,  7 Jan 2011 11:15:28 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 01E9311680FB; Fri,  7 Jan 2011 11:15:28 +0000 (GMT)
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu>
In-Reply-To: <20110107100313.GO28367@1wt.eu>
MIME-Version: 1.0
Message-Id: <10468.1294398928.011152@puncture>
Date: Fri, 07 Jan 2011 11:15:28 +0000
From: Dave Cridland <dave@cridland.net>
To: Willy Tarreau <w@1wt.eu>, Andy Green <andy@warmcat.com>, Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 11:13:29 -0000

On Fri Jan  7 10:03:13 2011, Willy Tarreau wrote:
> > would be sufficient to reduce attacks to a percentage of
> > intermediaries sufficiently small that none have been found to  
> date.
> 
> Please note that none intermediaries vulnerable to what we're trying
> to fix have been found to date either.
> 
> 
Not quite - the vulnerabilities have been found given a plain  
Upgrade-based handshake followed by syntactically correct HTTP  
requests and responses. There is some argument, much of it reasonable  
(if not absolutely convincing) that it follows that with a pure  
Upgrade-based handshake, intermediaries may "find" HTTP traffic  
within some framing.

> > One may as well say that these intermediaries don't exist, and  
> claim
> > that proof because the invisible pink unicorn told us so, because
> > it'll be just as easy to prove the non-existence of the IPU as to
> > prove the non-existence of the intermediaries, and frankly as  
> valid,
> > given that experimental data at least supports the unicorn's
> > statement.
> 
> You got me lost there.

Let's step into a parallel universe, for a moment. After all,  
everyone else is.

In this hypothetical world, Adam conducts his advertising experiment  
and discovers that actually, no intermediaries he can find are  
vulnerable. But if they were, he notes that cryptographic masking  
would be sufficient to disable the attack.

Would the working group consider masking in this parallel universe?  
Of course not, because that would be silly.

In our real universe, however, Adam conducted his experiemnt and  
found that by sending a CONNECT, he could no longer find any  
vulnerable intermediaries. He notes that if there were, cryptographic  
masking would be sufficient to disable the attack. One might think  
that the same logic applies, and that the working group would  
universally nod, use the provided solution, and move on, without  
considering the masking which Adam has clearly demonstrated is  
superfluous by experiment.

But no, the working group decides that yes, yes we will indeed do  
masking in spite of the evidence.

Now, if I assert that no such intermediaries exist, I'm supported by  
experimental data - an experiment which, in case it needs to be said,  
I had nothing to do with. I can't absolutely prove my assertion,  
because proof of non-existence would require an exhaustive survey.  
However, disproving my assertion would require a less than exhaustive  
survey - and a reasonably high survey has been carried out without  
success.

If I add, to my assertion, that I know so because an imaginary entity  
told me so, it remains equally valid, and to disprove the imaginary  
entity is again a proof of non-existence.

> The rise of vulnerable intermediaries will probably happen,

No - I think you simply misunderstood what I meant, rather than  
disagreeing with me. (I hope so, anyway).

It seems probable than one or two will be found, certainly, but it  
seems highly unlikely - given experimental data - that these  
represent a significant threat.

If we assume that the experimental sample was skewed by 50% - ie, the  
numbers of vulnerable intermediaries are 50% higher than it would  
suggest - then we have roughly 1 in every 25,000 intermediaries  
vulnerable.

Now, assuming that every single person on the whole internet has a  
proxy of some form, that would mean that 80,000 vulnerable proxies  
exist amongst the 2 billion internet users. I don't think this is a  
sufficient attack surface to worry about, especially given that these  
represent intermediaries that are already vulnerable to attacks of  
the form we're trying to protect against by using Flash or Java.  
(And, maybe, ActiveX?) One assumes that, therefore, these will be  
fixed, and not just due to websockets, but due to the far more widely  
used rich content technologies of today. That is, to be clear - even  
if we deploy masking, these intermediaries will be fixed.

So, my assertion is that this number will be the upper bound - ie,  
this number will drop (probably quite rapidly) - and will not rise.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From w@1wt.eu  Fri Jan  7 03:32:34 2011
Return-Path: <w@1wt.eu>
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 3EA253A6823 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:32:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.126
X-Spam-Level: 
X-Spam-Status: No, score=-2.126 tagged_above=-999 required=5 tests=[AWL=-0.083, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 lBHh3g5SPys3 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:32:33 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id DAE153A67CF for <hybi@ietf.org>; Fri,  7 Jan 2011 03:32:32 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p07BYauJ032084; Fri, 7 Jan 2011 12:34:36 +0100
Date: Fri, 7 Jan 2011 12:34:36 +0100
From: Willy Tarreau <w@1wt.eu>
To: Andy Green <andy@warmcat.com>
Message-ID: <20110107113436.GR28367@1wt.eu>
References: <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <4D26EE10.5020306@warmcat.com> <20110107105327.GQ28367@1wt.eu> <4D26F4E6.1010605@warmcat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D26F4E6.1010605@warmcat.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 11:32:34 -0000

On Fri, Jan 07, 2011 at 11:11:34AM +0000, Andy Green wrote:
> On 01/07/11 10:53, Somebody in the thread at some point said:
> 
> >>Thanks for the insight... "+\x0d\x0a\x0d\x0a" then?
> >
> >We should avoid restarting this debate, it has already been suggested
> >to send strings supposed to make intermediaries abort on invalid requests,
> >but since the fears about the broken one sometimes rely on their supposed
> >ability to spot anything anywhere, such methods cannot be convincing for
> >these people.
> 
> Yeah but this is the bind, if we accept it is websocket responsibility 
> to defeat attacks on an intermediary that has the "supposed ability to 
> spot anything anywhere" as you say, then they will eventually spot 
> something even in a munged stream.

Yes it will. But this will require much more data to be sent to make
the "anything" appear than if we can put the "anything" on the wire
as-is.

>  This troll intermediary is actually 
> broken for use on a network at all,

That's what I've been saying for some time too. And I really guess that
this intermediary is on no network at all anyway :-)

> presumably it has a special get-out that it never spots crap on ssl.

No, most likely it requires a specific header that we'll have to
define :-)

> Like I said for me if it only takes CONNECT in the handshake or a few 
> extra bytes in the framing and the rest is in clear, that is hugely 
> preferable to munging every byte.

It depends how it can be removed later and how we can prove it's enough.
The problem with a CONNECT request is that we have to ensure that either
it always fails or that it always works (harder). There will always remain
some doubts about "what if an intermediary silently ignores them and scans
the remaining stream to search for a cacheable GET request"...

In my opinion, neither the CONNECT nor masking are necessary. Technically
the CONNECT offers much more control and relies less on luck than the
masking. But as it requires better understanding of protocols, it does
not have the psychological effect of "look, now the requests are masked
so your browsers are safe again, isn't it beautiful ?". And clearly what
we're looking for now is something that will be easy to understand for
people who don't understand the basics of the underlying protocols. And
I'm convinced that payload masking has this magical effect we're looking
for with a low cost.

Regards,
Willy


From dave@cridland.net  Fri Jan  7 03:34:11 2011
Return-Path: <dave@cridland.net>
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 904503A67CF for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:34:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.532
X-Spam-Level: 
X-Spam-Status: No, score=-2.532 tagged_above=-999 required=5 tests=[AWL=0.067,  BAYES_00=-2.599]
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 wSPkFKejUAqP for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:34:10 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 2A4373A67E3 for <hybi@ietf.org>; Fri,  7 Jan 2011 03:34:10 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id D71E9116811E; Fri,  7 Jan 2011 11:36:15 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NBVP0zxXB9yT; Fri,  7 Jan 2011 11:36:12 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id CA82311680FB; Fri,  7 Jan 2011 11:36:11 +0000 (GMT)
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <4D26E00E.10106@warmcat.com> <AANLkTik19d6cf=7ndxTdS116ycowXdHJHxLbOzzjmsS0@mail.gmail.com> <4D26EB0A.9050203@warmcat.com>
In-Reply-To: <4D26EB0A.9050203@warmcat.com>
MIME-Version: 1.0
Message-Id: <10468.1294400171.841918@puncture>
Date: Fri, 07 Jan 2011 11:36:11 +0000
From: Dave Cridland <dave@cridland.net>
To: Andy Green <andy@warmcat.com>, Server-Initiated HTTP <hybi@ietf.org>, Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 11:34:11 -0000

On Fri Jan  7 10:29:30 2011, Andy Green wrote:
> I agree, as a political situation regardless of the technical  
> reality the browsers need a reason to re-enable websockets after  
> disabling it for 'security'.

Remember that whatever solution we propose for Websockets will also  
need to be proposed for Flash and Java, which are both considerably  
easier to exploit as an attck generator now, and also much more  
widely used - after all, it was using one of these technologies that  
the vulnerabilities were demonstrated.

Re-enabling these two technologies would seem, if anything, to be a  
greater priority, given the current reliance on them.

I'm assuming, of course, that the browser vendors actually disabled  
those, too, due to security, right? I'd hate to think they'd only  
disable the attack vector least likely to be useful, all in the name  
of "security", because that would be just laughable, right?

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From w@1wt.eu  Fri Jan  7 03:54:03 2011
Return-Path: <w@1wt.eu>
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 1E9B53A681A for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:54:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.826
X-Spam-Level: 
X-Spam-Status: No, score=-1.826 tagged_above=-999 required=5 tests=[AWL=-0.383, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, J_CHICKENPOX_37=0.6]
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 Vefser4lnKot for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:54:00 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 0E31B3A681D for <hybi@ietf.org>; Fri,  7 Jan 2011 03:53:59 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p07Bu4Zh032181; Fri, 7 Jan 2011 12:56:04 +0100
Date: Fri, 7 Jan 2011 12:56:04 +0100
From: Willy Tarreau <w@1wt.eu>
To: Dave Cridland <dave@cridland.net>
Message-ID: <20110107115604.GS28367@1wt.eu>
References: <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <10468.1294398928.011152@puncture>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <10468.1294398928.011152@puncture>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 11:54:03 -0000

On Fri, Jan 07, 2011 at 11:15:28AM +0000, Dave Cridland wrote:
> On Fri Jan  7 10:03:13 2011, Willy Tarreau wrote:
> >> would be sufficient to reduce attacks to a percentage of
> >> intermediaries sufficiently small that none have been found to  
> >date.
> >
> >Please note that none intermediaries vulnerable to what we're trying
> >to fix have been found to date either.
> >
> >
> Not quite - the vulnerabilities have been found given a plain  
> Upgrade-based handshake followed by syntactically correct HTTP  
> requests and responses.

Yes precisely. But the framing is all but syntactically correct
HTTP requests and responses.

> There is some argument, much of it reasonable  
> (if not absolutely convincing) that it follows that with a pure  
> Upgrade-based handshake, intermediaries may "find" HTTP traffic  
> within some framing.

I think that all the people who are thinking that should at some
point try to write some working code to implement a real caching
intermediary. They will see that they need to check the method
and that you cannot randomly skip over garbage to presume your
method will be here or there. Such a code would already have
trouble with requests such as "POST /path/GET HTTP/1.1" or even
with data looking like methods in headers or payload. Yes a
simple content switch can be lazy, failures will have limited
impact. But a cache cannot be that lazy.

> In this hypothetical world, Adam conducts his advertising experiment  
> and discovers that actually, no intermediaries he can find are  
> vulnerable. But if they were, he notes that cryptographic masking  
> would be sufficient to disable the attack.
> 
> Would the working group consider masking in this parallel universe?  
> Of course not, because that would be silly.
> 
> In our real universe, however, Adam conducted his experiemnt and  
> found that by sending a CONNECT, he could no longer find any  
> vulnerable intermediaries. He notes that if there were, cryptographic  
> masking would be sufficient to disable the attack. One might think  
> that the same logic applies, and that the working group would  
> universally nod, use the provided solution, and move on, without  
> considering the masking which Adam has clearly demonstrated is  
> superfluous by experiment.

Well, to be honnest, he did not exactly test what you are suggesting.
He compared the GET+Upgrade followed by valid HTTP requests with CONNECT
followed by valid HTTP requests and concluded that GET+Upgrade was
sometimes failing where CONNECT did not. That does not mean that
GET+Upgrade followed by a CONNECT is always OK. While our intuition
lets us guess so, it has not even been tested. And as I explained in
another mail, accepting that this complex design be more robust than
the initial one that was accused of failing will not be easy for those
who don't understand the basics of the underlying protocol.

> But no, the working group decides that yes, yes we will indeed do  
> masking in spite of the evidence.
> 
> Now, if I assert that no such intermediaries exist, I'm supported by  
> experimental data - an experiment which, in case it needs to be said,  
> I had nothing to do with. I can't absolutely prove my assertion,  
> because proof of non-existence would require an exhaustive survey.  
> However, disproving my assertion would require a less than exhaustive  
> survey - and a reasonably high survey has been carried out without  
> success.

You like to stack up negations in your assertions... It's hard to 
follow you. So you're saying that a survery did not succeed in disproving
your assertion that no broken intermediaries exist ?

> If I add, to my assertion, that I know so because an imaginary entity  
> told me so, it remains equally valid, and to disprove the imaginary  
> entity is again a proof of non-existence.

I'm lost again, sorry.

> >The rise of vulnerable intermediaries will probably happen,
> 
> No - I think you simply misunderstood what I meant, rather than  
> disagreeing with me. (I hope so, anyway).
> 
> It seems probable than one or two will be found, certainly, but it  
> seems highly unlikely - given experimental data - that these  
> represent a significant threat.
> 
> If we assume that the experimental sample was skewed by 50% - ie, the  
> numbers of vulnerable intermediaries are 50% higher than it would  
> suggest - then we have roughly 1 in every 25,000 intermediaries  
> vulnerable.

Vulnerable to valid HTTP requests, let me insist on that once again,
we've never found one vulnerable to WebSocket.

> Now, assuming that every single person on the whole internet has a  
> proxy of some form, that would mean that 80,000 vulnerable proxies  
> exist amongst the 2 billion internet users. I don't think this is a  
> sufficient attack surface to worry about, especially given that these  
> represent intermediaries that are already vulnerable to attacks of  
> the form we're trying to protect against by using Flash or Java.  

And telnet, netcat, etc... No need to look for plugins when everyone
has an internet connection which is enough to abuse them.

> (And, maybe, ActiveX?) One assumes that, therefore, these will be  
> fixed, and not just due to websockets, but due to the far more widely  
> used rich content technologies of today. That is, to be clear - even  
> if we deploy masking, these intermediaries will be fixed.

Exactly, that's why I'm advocating for strong protocol compliance.
We can't force intermediaries to implement new protocols, but we
can have them quickly fix their security issues.

> So, my assertion is that this number will be the upper bound - ie,  
> this number will drop (probably quite rapidly) - and will not rise.

I think the number of really vulnerable intermediaries (vulnerable to
HTTP requests) will indeed drop, but their knowledge will rise with the
interest around them that Adam's paper should suggest. Because basically
right now those intermediaries can be fooled by anyone behind them as
easily as :

  $ printf \
    "GET / HTTP/1.1\r\nHost: my.fake.site.com\r\nUpgrade: WebSocket\r\n\r\n" \
    "GET / HTTP/1.1\r\nHost: victim.com\r\n\r\n" > /dev/tcp/my.fake.site.com/80

So surely it will raise some interest ;-)

Cheers,
Willy


From w@1wt.eu  Fri Jan  7 03:57:38 2011
Return-Path: <w@1wt.eu>
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 5E5743A681A for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:57:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.122
X-Spam-Level: 
X-Spam-Status: No, score=-2.122 tagged_above=-999 required=5 tests=[AWL=-0.079, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 RqL+oWAAJ7Da for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 03:57:37 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id CFA9E3A6802 for <hybi@ietf.org>; Fri,  7 Jan 2011 03:57:36 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p07BxfXU032196; Fri, 7 Jan 2011 12:59:41 +0100
Date: Fri, 7 Jan 2011 12:59:41 +0100
From: Willy Tarreau <w@1wt.eu>
To: Dave Cridland <dave@cridland.net>
Message-ID: <20110107115941.GT28367@1wt.eu>
References: <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <4D26E00E.10106@warmcat.com> <AANLkTik19d6cf=7ndxTdS116ycowXdHJHxLbOzzjmsS0@mail.gmail.com> <4D26EB0A.9050203@warmcat.com> <10468.1294400171.841918@puncture>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <10468.1294400171.841918@puncture>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 11:57:38 -0000

On Fri, Jan 07, 2011 at 11:36:11AM +0000, Dave Cridland wrote:
> On Fri Jan  7 10:29:30 2011, Andy Green wrote:
> >I agree, as a political situation regardless of the technical  
> >reality the browsers need a reason to re-enable websockets after  
> >disabling it for 'security'.
> 
> Remember that whatever solution we propose for Websockets will also  
> need to be proposed for Flash and Java, which are both considerably  
> easier to exploit as an attck generator now, and also much more  
> widely used - after all, it was using one of these technologies that  
> the vulnerabilities were demonstrated.
> 
> Re-enabling these two technologies would seem, if anything, to be a  
> greater priority, given the current reliance on them.
> 
> I'm assuming, of course, that the browser vendors actually disabled  
> those, too, due to security, right? I'd hate to think they'd only  
> disable the attack vector least likely to be useful, all in the name  
> of "security", because that would be just laughable, right?

Why do you think that the situation suddenly must not be laughable anymore ?
We're trying to make 0.001% of the users avoid to deliberately attack known
vulnerable components which are exposed to larger parts of the net.

Granted we can make some efforts to avoid the simple cases but those efforts
should be reasonably limited once the cost becomes non-null.

Willy


From mjs@apple.com  Fri Jan  7 06:18:05 2011
Return-Path: <mjs@apple.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 8A73C3A68D7 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 06:18:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.556
X-Spam-Level: 
X-Spam-Status: No, score=-106.556 tagged_above=-999 required=5 tests=[AWL=0.043, BAYES_00=-2.599, 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 l3BKvoA3HxqJ for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 06:18:03 -0800 (PST)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 768463A68BE for <hybi@ietf.org>; Fri,  7 Jan 2011 06:18:03 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out4.apple.com (Postfix) with ESMTP id 73C20C9F25F7 for <hybi@ietf.org>; Fri,  7 Jan 2011 06:20:10 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-14-4d27211a34c3
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay11.apple.com (Apple SCV relay) with SMTP id 96.DF.04151.A11272D4; Fri,  7 Jan 2011 06:20:10 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [10.0.1.14] ([24.6.209.6]) by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEN00LZJP5LI300@et.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 06:20:10 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110107055244.GH28367@1wt.eu>
Date: Fri, 07 Jan 2011 06:20:09 -0800
Message-id: <D4CDEBAB-4A1C-4716-A630-FBC1BD8FE297@apple.com>
References: <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <4D17B5FF.5060209@callenish.com> <AANLkTik-m1VKAoaNEU-_P6in28+_CSk+rOHbidtjHa76@mail.gmail.com> <AANLkTi=cNXGsaeqwH_LUDXf_soAHcEfKD+Xd4nXaY+mN@mail.gmail.com> <41249E48-B17E-47C7-9340-6F95B85182CD@apple.com> <20110107055244.GH28367@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 14:18:06 -0000

On Jan 6, 2011, at 9:52 PM, Willy Tarreau wrote:

> On Mon, Dec 27, 2010 at 04:30:43PM -0800, Maciej Stachowiak wrote:
>>> But I'm strongly against masking the framing itself.  Their is
>>> absolutely no reason for it other than to prevent the possibility of
>>> making it optional.
>> 
>> That's not right. One reason for masking the framing is to make it impossible for hostile browser-hosted hosted code to pre-generate valid-looking frames. If you don't mask framing, then it is trivial to create valid-looking frames, even if the contents are scrambled. Depending on circumstances, this could still be a dangerous attack on integrity.
> 
> No Maciej, it's not "trivial" to do that because if you look at the framing,
> very little of it is directly controlled by the application. As I suggested
> in another mail, if you use RSV4 to indicate masking is used and put the
> random key in extension data, that leaves you with :
>  - first byte with MORE|RSV1|RSV2|RSV3|OPCODE = 1|XXX|OPCODE
>  - second byte with RSV4|LENGTH = 1|LENGTH
>  - 3rd-4th bytes corresponding to the low part of the payload length,
>    only if previous byte is 0xFE/0xFF
>  - 5-10th bytes corresponding to the high part of the payload length
>    only if 2nd byte is 0xFF
>  - random key the size of the payload length
>  - application data
> 
> The only controllable part here in which you might put an HTTP request is
> the key length. But even in order to write an HTTP/0.9 "GET /\n", you have
> to forge a message that is 0x54202F0A4745 bytes long, or 92 TeraBytes long.
> And if you need to start it at the beginning of a line, it becomes
> 0x4554202F0A0A47 which is 19 PetaBytes. By the time we get browsers able to
> construct that large messages, we won't bother anymore about the broken
> intermediaries.
> 
> That's why I'm really considering masking the payload safe enough with
> regards to the risk we're trying to cover.

Willy, I think we're talking past each other. The threat model I'm talking about involves using HTTP APIs to connect to WebSocket servers. HTTP APIs in the browser will effectively let you send any bytes you want as the payload. You seem to be talking about the opposite threat model, where WebSocket APIs in the browser, to attack HTTP.

These are completely separate threat models, and both are important to consider.

Regards,
Maciej


From mjs@apple.com  Fri Jan  7 06:26:03 2011
Return-Path: <mjs@apple.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 2AFE73A68D8 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 06:26:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.261
X-Spam-Level: 
X-Spam-Status: No, score=-106.261 tagged_above=-999 required=5 tests=[AWL=-0.262, BAYES_00=-2.599, J_CHICKENPOX_37=0.6, 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 byKvc2GEQ-oE for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 06:26:01 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id C95593A68D7 for <hybi@ietf.org>; Fri,  7 Jan 2011 06:26:01 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out3.apple.com (Postfix) with ESMTP id 8FB7AC556CD5 for <hybi@ietf.org>; Fri,  7 Jan 2011 06:28:08 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-e2-4d2722f84d89
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay11.apple.com (Apple SCV relay) with SMTP id B9.51.04151.8F2272D4; Fri,  7 Jan 2011 06:28:08 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [10.0.1.14] ([24.6.209.6]) by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEN00L5ZPIVI310@et.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 06:28:08 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com>
Date: Fri, 07 Jan 2011 06:28:07 -0800
Message-id: <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com>
To: John Tamplin <jat@google.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 14:26:03 -0000

I have several objections to this proposal:

1) The idea of an extension that is, in most circumstances, mandatory for both clients and servers seems silly. If the normal use case is that you always request it from the other endpoint, and refuse the connection if the other endpoint won't use it, then it's not an extension.

2) Designing things this way creates more risk of bugs leading to total security failure.

3) Some decent technical reasons have been given for why the framing should be masked as well, for example, when considering the threat model of using HTTP APIs in the browser to attack WebSocket services.

4) I still haven't seen evidence of a non-hypothetical use case for removing masking, so I don't think we should warp the design around the possibility. This proposal weakens the effectiveness of the masking (perhaps in minor or edge case ways) to make it easier to later address a totally unproven use case.

Combining masking with GET+Upgrade (instead of a potentially more robust initial handshake) was already a compromise. Now I feel that GET+Upgrade advocates are incrementally chipping away at the effectiveness of the masking. Meanwhile, CONNECT advocates have largely agreed to let go of the CONNECT handshake idea if we can at least have effective masking. I don't think this ratchet method is an effective or fair way to negotiate agreement.

Regards,
Maciej

On Jan 6, 2011, at 6:38 PM, John Tamplin wrote:

> Ok, I understand your complaint about unlike SSL and other wrappers,
> the proposed masking means an observer can't tell frame boundaries
> without unmasking first.  I am still not sure that is such a big deal
> considering the simplicity of the proposed masking relative to
> interpreting the framing anyway, but here is another attempt to
> satisfy all concerned:
> 
> Since I don't want to renogiate anything we have already agreed in the
> base framing, that
> means that Extension Data can only have a non-zero length if we
> negotiate an extension, so that means we can't have masking be the
> default and define a new extension later to remove it.
> 
> My proposal:
> 1) Define a new extension "clientmask" in the base spec, which
>   specifies that client->server masking is present.  An optional
>   parameter "type" specifies the type of masking, and if not
>   present defaults to "hmac-sha1".
> (this leave open the option
>  of defining new masking methods in the future).
> 2) Any clients which make WebSocket connections at the
>   request of untrusted code or entities and do not know for
>   certain that the entire path to the ultimate server is trusted
>   MUST request the clientmask extension and MUST fail the
>   connection if the server does not accept the extension.
> 3) Any servers (or intermediaries acting as servers to the client)
>   accepting a connection from an untrusted source MUST NOT
>   accept a connection which does not request the clientmask
>   extension.  A server accepting a connection from a client that
>   is known to transit only trusted networks MAY accept
>   connections which do not request the clientmask extension.
>   A server which allows connections without the clientmask
>   extension SHOULD default to no trusted networks and be
>   configurable as to which networks are allowed to connect
>   without the clientmask extension.
> 4) If the clientmask extension is negotiated, the first n bytes of
>   the extension data of client-server frames is a per-frame key
>   defined by the masking type, and the remainder of the payload
>   (including any further bytes of extension data and application
>   data) are masked as defined by the masking type.
> 5) For clientmask type of "hmac-sha1", the per-frame key length
>   shall be 4 bytes, and the remainder of the frame shall be masked
>   according to the following algorithm:
> 
>     Let client-nonce and server-nonce be the respective nonces
>     exchanged during the handshake.  Let uid be a 20-byte constant
>    defined in the standard, and per-frame-key be the masking key
>    read from the extension data.
> 
>    // computed once during the handshake
>    sessionKey = HMAC-SHA1(uid, client-nonce || server-nonce);
> 
>    for (int blockStart = 0; blockStart < remainingLength; blockStart += 20) {
>      mask = HMAC-SHA1(sessionKey, per-frame-key || blockStart);
>      for (int i = 0; i < 20 && blockStart + i < remainingLength; ++i) {
>         remainingPayload[blockStart + i] ^= mask[i];
>      }
>    }
> 
>    The same operation is performed for masking and unmasking.
> 
> 
> The intent of #1 is to conform to requirements established in the
> current framing, in that Extension Data can only be used if an
> extension is negotiated, as well as allowing the masking algorithm
> to be refined in the future without defining a new extension.
> 
> The intent of #2 & #3 is to allow the use-cases that have been
> brought up, where the safety provided by masking is not needed.
> 
> --
> John A. Tamplin
> Software Engineer (GWT), Google
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


From mjs@apple.com  Fri Jan  7 06:32:34 2011
Return-Path: <mjs@apple.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 469503A68DC for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 06:32:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.532
X-Spam-Level: 
X-Spam-Status: No, score=-106.532 tagged_above=-999 required=5 tests=[AWL=0.067, BAYES_00=-2.599, 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 BML9EETymLYF for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 06:32:33 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 4D81D3A68CD for <hybi@ietf.org>; Fri,  7 Jan 2011 06:32:33 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out3.apple.com (Postfix) with ESMTP id 5B7CFC5571BE for <hybi@ietf.org>; Fri,  7 Jan 2011 06:34:40 -0800 (PST)
X-AuditID: 11807136-b7bf8ae00000244a-78-4d27248057ad
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay15.apple.com (Apple SCV relay) with SMTP id C4.9B.09290.084272D4; Fri,  7 Jan 2011 06:34:40 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [10.0.1.14] ([24.6.209.6]) by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEN00LBMPTRI310@et.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 06:34:40 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110107063854.GN28367@1wt.eu>
Date: Fri, 07 Jan 2011 06:34:39 -0800
Message-id: <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 14:32:34 -0000

On Jan 6, 2011, at 10:38 PM, Willy Tarreau wrote:

> On Thu, Jan 06, 2011 at 10:16:55PM -0800, Eric Rescorla wrote:
>>> Well, at 1 million concurrent connections with a 5s think time, that's
>>> about
>>> 200k frames per second, it starts to be concerning even if it's cheap.
>> 
>> My dinky Macbook Air does one million SHA-1 ops/second on a single core.
> 
> That means a 20% CPU overhead imposed by masking then.

I would hope a server handling 1 million concurrent connections is considerably more powerful than a single core of a MacBook Air.

Regards,
Maciej


From dave@cridland.net  Fri Jan  7 06:39:49 2011
Return-Path: <dave@cridland.net>
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 CEA223A68E0 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 06:39:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.534
X-Spam-Level: 
X-Spam-Status: No, score=-2.534 tagged_above=-999 required=5 tests=[AWL=0.065,  BAYES_00=-2.599]
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 Mx-Qu-n-tkCs for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 06:39:48 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 4CA423A68DF for <hybi@ietf.org>; Fri,  7 Jan 2011 06:39:48 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id E8C031168117; Fri,  7 Jan 2011 14:41:52 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yVXryQu44zkq; Fri,  7 Jan 2011 14:41:48 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 97E7211680FB; Fri,  7 Jan 2011 14:41:48 +0000 (GMT)
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com>
In-Reply-To: <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com>
MIME-Version: 1.0
Message-Id: <10468.1294411308.608117@puncture>
Date: Fri, 07 Jan 2011 14:41:48 +0000
From: Dave Cridland <dave@cridland.net>
To: Maciej Stachowiak <mjs@apple.com>, Server-Initiated HTTP <hybi@ietf.org>, Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 14:39:49 -0000

On Fri Jan  7 14:34:39 2011, Maciej Stachowiak wrote:
> 
> On Jan 6, 2011, at 10:38 PM, Willy Tarreau wrote:
> 
> > On Thu, Jan 06, 2011 at 10:16:55PM -0800, Eric Rescorla wrote:
> >>> Well, at 1 million concurrent connections with a 5s think time,  
> that's
> >>> about
> >>> 200k frames per second, it starts to be concerning even if it's  
> cheap.
> >>
> >> My dinky Macbook Air does one million SHA-1 ops/second on a  
> single core.
> >
> > That means a 20% CPU overhead imposed by masking then.
> 
> I would hope a server handling 1 million concurrent connections is  
> considerably more powerful than a single core of a MacBook Air.

It'd have to be because of the masking.

The thing is, I can quite easily see cases where BOSH or some other  
long-poll is going to be more efficient for servers to handle just  
because of the masking overhead.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From dave@cridland.net  Fri Jan  7 06:56:05 2011
Return-Path: <dave@cridland.net>
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 5C7C03A68E9 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 06:56:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.236
X-Spam-Level: 
X-Spam-Status: No, score=-2.236 tagged_above=-999 required=5 tests=[AWL=-0.237, BAYES_00=-2.599, J_CHICKENPOX_37=0.6]
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 IIGZr6sHLZ3M for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 06:56:04 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 885D73A68D8 for <hybi@ietf.org>; Fri,  7 Jan 2011 06:56:03 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 0BFA71168117; Fri,  7 Jan 2011 14:58:09 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qcJe6IVFQ4Qq; Fri,  7 Jan 2011 14:58:00 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 1F1AB11680FB; Fri,  7 Jan 2011 14:58:00 +0000 (GMT)
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> =?US-ASCII?Q?<CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntd?= =?US-ASCII?Q?v.microsoft.com>?= <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>
In-Reply-To: <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>
MIME-Version: 1.0
Message-Id: <10468.1294412280.131214@puncture>
Date: Fri, 07 Jan 2011 14:58:00 +0000
From: Dave Cridland <dave@cridland.net>
To: Maciej Stachowiak <mjs@apple.com>, Server-Initiated HTTP <hybi@ietf.org>, John Tamplin <jat@google.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 14:56:05 -0000

On Fri Jan  7 14:28:07 2011, Maciej Stachowiak wrote:
> 3) Some decent technical reasons have been given for why the  
> framing should be masked as well, for example, when considering the  
> threat model of using HTTP APIs in the browser to attack WebSocket  
> services.

Hmmmph. If you can mimic any data as an HTTP client, then by  
inference you can mimic any masking, surely? The trick, then has to  
be to use restricted features like the Sec-* headers to defeat this  
attack at the handshake level, which we had way back when.

> 4) I still haven't seen evidence of a non-hypothetical use case for  
> removing masking, so I don't think we should warp the design around  
> the possibility. This proposal weakens the effectiveness of the  
> masking (perhaps in minor or edge case ways) to make it easier to  
> later address a totally unproven use case.

I still haven't seen evidence of a non-hypothetical case where  
masking is required.

> Combining masking with GET+Upgrade (instead of a potentially more  
> robust initial handshake) was already a compromise. Now I feel that  
> GET+Upgrade advocates are incrementally chipping away at the  
> effectiveness of the masking. Meanwhile, CONNECT advocates have  
> largely agreed to let go of the CONNECT handshake idea if we can at  
> least have effective masking. I don't think this ratchet method is  
> an effective or fair way to negotiate agreement.

CONNECT on its own fails because it is no longer correct HTTP.  
Pretending it is doesn't help - it breaks end-to-end transparency.

Upgrade on its own has hypothetical - but reasonable - security  
arguments against it. However, in its favour, technologies like CORS  
should "just work", for instance.

So, quite obviously, neither of those two options on their own work.

Would the browser folk be interested in running an experiment to see  
if an Upgrade+CONNECT would work as intended? Would Google be willing  
to use their advertising network for such an experiment? If so, we  
could actually run an experiment that tested each proposal, and then  
for any where no attacks where found, we could select based purely on  
efficiency and correctness.

Basing our decision making on hypothetical vulnerabilities which have  
been shown to be at least sufficiently rare as to not have been found  
seems like a poor course of action.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From gregw@intalio.com  Fri Jan  7 07:01:50 2011
Return-Path: <gregw@intalio.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 31D1F3A68F2 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 07:01:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.628
X-Spam-Level: 
X-Spam-Status: No, score=-2.628 tagged_above=-999 required=5 tests=[AWL=-0.251, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_37=0.6, RCVD_IN_DNSWL_LOW=-1]
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 WQBHQabqtNWX for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 07:01:49 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 18F273A68F0 for <hybi@ietf.org>; Fri,  7 Jan 2011 07:01:49 -0800 (PST)
Received: by qwi2 with SMTP id 2so2108924qwi.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 07:03:55 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.53.213 with SMTP id n21mr23993785qag.399.1294412635528; Fri, 07 Jan 2011 07:03:55 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Fri, 7 Jan 2011 07:03:55 -0800 (PST)
In-Reply-To: <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>
Date: Fri, 7 Jan 2011 16:03:55 +0100
X-Google-Sender-Auth: Ywl7p5MIf5pL_m21nLrB6lNzsv4
Message-ID: <AANLkTikReCUBnHFazA-fuxD+mnaAoZQweFLR9=P-zdwi@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 15:01:50 -0000

On 7 January 2011 15:28, Maciej Stachowiak <mjs@apple.com> wrote:
>
> I have several objections to this proposal:
>
> 1) The idea of an extension that is, in most circumstances, mandatory for=
 both clients and servers seems silly. If the normal use case is that you a=
lways request it from the other endpoint, and refuse the connection if the =
other endpoint won't use it, then it's not an extension.

I don't think you can say the normal use-case will always use masking.
 Sure it will for the browser, but it may be a very normal use-case
for the the connection to enter a data centre via a web-socket aware
aggregator that forwards the messages without masking to the
application server.     So from the server point of view, the normal
use-case could be without masking.


> 2) Designing things this way creates more risk of bugs leading to total s=
ecurity failure.

that's very subjective.  I think that masking framing will result in
more bugs, specially with partially received frames.



> 3) Some decent technical reasons have been given for why the framing shou=
ld be masked as well, for example, when considering the threat model of usi=
ng HTTP APIs in the browser to attack WebSocket services.

I do not think that threat has been well explained or accepted, nor is
it the primary target of masking.  Specifically I've not yet seen a
credible explanation of how a HTTP API could generate the required
headers to get past the websockets expectations of the initial upgrade
request.   I don't want to dismiss this vulnerability out of hand, but
I would like to see more detail about it and to consider if there are
other mitigations we could do that would not impede the progress we
were making on masking.



> 4) I still haven't seen evidence of a non-hypothetical use case for remov=
ing masking, so I don't think we should warp the design around the possibil=
ity. This proposal weakens the effectiveness of the masking (perhaps in min=
or or edge case ways) to make it easier to later address a totally unproven=
 use case.

Unfortunately there are some that see the hypothetical risk of these
intermediaries as warping the design with the introduction of masking.

Beside, there have been many use-case presented (eg the aggregator
above) that would benefit from no masking.  I know you think that
masking is cheap - and it may be in the client, but there are many
opinions on the intermediary/server side that are concerned about the
cost of masking and thus there is a drive to have it as simple and
cheap as possible, if not optional.


> Combining masking with GET+Upgrade (instead of a potentially more robust =
initial handshake) was already a compromise. Now I feel that GET+Upgrade ad=
vocates are incrementally chipping away at the effectiveness of the masking=
. Meanwhile, CONNECT advocates have largely agreed to let go of the CONNECT=
 handshake idea if we can at least have effective masking. I don't think th=
is ratchet method is an effective or fair way to negotiate agreement.

I don't think that is a fair or productive characterisation.    I
could equally say that masking advocates are incrementally increasing
the scope and complexity of masking from the simple prevention of
clear text originally proposed and adding new unproven hypothetical
vulnerabilities - which would also be neither fair or productive.

There is no benefit in having masking unless it is seen to be
effective, so it is in nobodies interests to chip away at the
effectiveness of masking.    I truly do not understand why having the
payload XOR's with a random per frame key will not be effective at
preventing attackers sending clear text.  Nor do I understand why
having masking as an extension reduces it's effectiveness in any way.


I get it that you'd greatly prefer masking to not be an extension, but
in the spirit of compromise, what aspect of masking as an extension is
a show stopper for you?


regards

From andy.warmcat.com@googlemail.com  Fri Jan  7 07:13:46 2011
Return-Path: <andy.warmcat.com@googlemail.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 1DDD23A68EE for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 07:13:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.543
X-Spam-Level: 
X-Spam-Status: No, score=-3.543 tagged_above=-999 required=5 tests=[AWL=0.056,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 xDc9FIGHvpRa for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 07:13:45 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id AB5833A67F0 for <hybi@ietf.org>; Fri,  7 Jan 2011 07:13:44 -0800 (PST)
Received: by wyf23 with SMTP id 23so18394926wyf.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 07:15:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=YQWUynfRM2B8If9W2Dad7NUElbTlQhXoT54/B6wvJ40=; b=NepG8mqsvYsisCF4ddAVjjoI9jKy1jBXfVQC7PajAB7PPMF0Ijne1ghZrZ1aJLP0A4 yTK+2RnNW2YVUWd1u5mBCGXVUXLsQDOL9hrXE6vqEEyB55sYyH1hvKnv5QpxYMLUVqgJ 0jJMJJgVumMDglMUgWWm7VA/T/lXlpXDY4sNs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=Al5MB46xKH1lpbSItDzZRU515p8Wvaixu80k8RosypGyKVUe6sEgNm2cACdF7utb43 nPuVDHaFDMltH6YVBeecKDCwG84607VYGArYp9+U0+cTt93wT+78RHHzRtpz4DZEV0IW EYqxAF2aiYG0I1iMDDiCwhutw1b7288WtPMQQ=
Received: by 10.227.132.206 with SMTP id c14mr15649295wbt.124.1294413350944; Fri, 07 Jan 2011 07:15:50 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id 11sm17738025wbi.12.2011.01.07.07.15.49 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 07:15:50 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D272E25.9050902@warmcat.com>
Date: Fri, 07 Jan 2011 15:15:49 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <4D25D82A.8070302@warmcat.com>	<AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>	<20110106184607.GB27099@1wt.eu>	<AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<4D26D20C.8030906@warmcat.com>	<AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com>	<4D26E3FB.6050206@warmcat.com> <AANLkTin7dCgPym-oq0jMvRfQ_5SzDjRQUWxXO8eSwDR7@mail.gmail.com>
In-Reply-To: <AANLkTin7dCgPym-oq0jMvRfQ_5SzDjRQUWxXO8eSwDR7@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism / building in troll proxy detection to the handshake
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 07 Jan 2011 15:13:46 -0000

On 01/07/11 10:31, Somebody in the thread at some point said:

> There is a concern that there might exist intermediaries that suffer
> from both cache poisoning vulnerability and overly forgiving HTTP
> parsing.  If so, WS could be used to attack these intermediaries and
> poison their caches.   While such intermediaries are already
> vulnerable to flash and java plugins, these are optional extras in
> browsers, so it is a different matter to expose the same vulnerability
> in the protocol behind a non-optional part of the HTML-5 standard.

Thanks, that is quite concise describing what "masking" aka munging is 
meant to solve, assuming it's generally held agreed.  At least nobody 
has poured scorn on it yet so let's assume that is the attack websockets 
is supposed to stop.

How about this alternative solution for people who think the above is 
realistic: extend the handshake to deliberately send a websocket frame 
which (accepting the intermediary has dumb HTTP parsing and ignores the 
framing) trying to poison the cache at a random and unlikely URL path, 
then connect to the server in http again and confirm the poisoned path 
is a 404 before allowing the connection.

So, it's

  1) normal -03 handshake
  2) send an initial  frame to be discarded by the server, containing a 
good-looking HTTP poisoning action for a URL like 
"/__websocketcheck/<random integer>" inside websocket framing
  3) try to GET "/__websocketcheck/<random integer>", die if it exists
  4) otherwise, enjoy a non-munged websocket life

Of course, after a while when the number of hits on the test URL remains 
at 0, or the troll proxies are identified and updated, this can be 
removed from the handshake.

-Andy

From alex@noemax.com  Fri Jan  7 07:59:46 2011
Return-Path: <alex@noemax.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 662FC3A691B for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 07:59:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  BAYES_00=-2.599]
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 w5QkBLV2ffUA for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 07:59:44 -0800 (PST)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by core3.amsl.com (Postfix) with ESMTP id 8FB803A6918 for <hybi@ietf.org>; Fri,  7 Jan 2011 07:59:42 -0800 (PST)
Received: from HPdv73190ev by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id QRI11145; Fri, 07 Jan 2011 18:01:45 +0200
From: "Alexander Philippou" <alex@noemax.com>
To: "'Maciej Stachowiak'" <mjs@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com>	<AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com>	<AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com>	<AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com>	<AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com>	<CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>	<AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com>	<AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com>	<AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com>	<AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>
In-Reply-To: <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>
Date: Fri, 7 Jan 2011 18:01:37 +0200
Message-ID: <00e101cbae84$2e0b7510$8a225f30$@com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Acuudx2IH0ymSU1PR8ukIIgzaodnkQAAHQEw
Content-Language: en-us
Cc: 'Hybi' <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 15:59:46 -0000

> 4) I still haven't seen evidence of a non-hypothetical use case for =
removing masking, so I don't think we should warp the design around the =
possibility. This proposal weakens the effectiveness of the masking =
(perhaps in minor or edge case ways) to make it easier to later address =
a totally unproven use case.

One large use case is non-browser client systems. I don't see how =
masking will be useful to them. Masking seems to be protecting against =
vulnerabilities that affect only browser client systems. Unless there is =
evidence that these protection mechanisms have a universal usefulness, I =
would strongly support a design that keeps them as an optional =
extension.

Alexander


From jat@google.com  Fri Jan  7 08:01:15 2011
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 338F73A691C for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:01:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.405
X-Spam-Level: 
X-Spam-Status: No, score=-104.405 tagged_above=-999 required=5 tests=[AWL=-2.428, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, 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 1tLCfzhkkH0u for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:01:14 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 1B6113A6937 for <hybi@ietf.org>; Fri,  7 Jan 2011 08:01:10 -0800 (PST)
Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id p07G3Gg2012379 for <hybi@ietf.org>; Fri, 7 Jan 2011 08:03:17 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294416197; bh=6oq9Az6lb9lIDrfEoVBxPAZ22Ec=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=LYgLETli+mx1giu8hfHjb5KTyB4IijOVvDYC1iUKqGabMlj3d0D2dafKwVF6g1BpM ouKzl8LPF5ttWdwsW1Rww==
Received: from qyk12 (qyk12.prod.google.com [10.241.83.140]) by wpaz17.hot.corp.google.com with ESMTP id p07G2TS9029401 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Fri, 7 Jan 2011 08:03:15 -0800
Received: by qyk12 with SMTP id 12so17925799qyk.12 for <hybi@ietf.org>; Fri, 07 Jan 2011 08:03:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=u6LTDAcYbuDQNx2WZG6HXU9xklzt0rlGgfx6P6Z9H0s=; b=xpk1q1p+ljb7UMWvRyPUYhqFI2dqEVJhNs32I2oIei5oRhzMt4+wZbk2kBH0q30xro LQGx1q5SzXzLAB+UXabg==
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:content-transfer-encoding; b=PsDZOEhcOwXQ0AxokLxvHB1+eK2qgwtE9iihpU3znUx3Rd3FxfV2tBAMzTwqOiwIRB zf2byA72sOdXF/ZpV8qQ==
Received: by 10.229.232.15 with SMTP id js15mr22430638qcb.136.1294416194621; Fri, 07 Jan 2011 08:03:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.106.38 with HTTP; Fri, 7 Jan 2011 08:02:53 -0800 (PST)
In-Reply-To: <4D272E25.9050902@warmcat.com>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com> <4D26E3FB.6050206@warmcat.com> <AANLkTin7dCgPym-oq0jMvRfQ_5SzDjRQUWxXO8eSwDR7@mail.gmail.com> <4D272E25.9050902@warmcat.com>
From: John Tamplin <jat@google.com>
Date: Fri, 7 Jan 2011 11:02:53 -0500
Message-ID: <AANLkTikYH4oXP2Yd9uwBgGEz7AztECDw+sxhs-HU4=3E@mail.gmail.com>
To: andy@warmcat.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism / building in troll proxy detection to the handshake
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: Fri, 07 Jan 2011 16:01:15 -0000

On Fri, Jan 7, 2011 at 10:15 AM, Andy Green <andy@warmcat.com> wrote:
> How about this alternative solution for people who think the above is
> realistic: extend the handshake to deliberately send a websocket frame wh=
ich
> (accepting the intermediary has dumb HTTP parsing and ignores the framing=
)
> trying to poison the cache at a random and unlikely URL path, then connec=
t
> to the server in http again and confirm the poisoned path is a 404 before
> allowing the connection.
>
> So, it's
>
> =C2=A01) normal -03 handshake
> =C2=A02) send an initial =C2=A0frame to be discarded by the server, conta=
ining a
> good-looking HTTP poisoning action for a URL like "/__websocketcheck/<ran=
dom
> integer>" inside websocket framing
> =C2=A03) try to GET "/__websocketcheck/<random integer>", die if it exist=
s
> =C2=A04) otherwise, enjoy a non-munged websocket life
>
> Of course, after a while when the number of hits on the test URL remains =
at
> 0, or the troll proxies are identified and updated, this can be removed f=
rom
> the handshake.

Personally, I find requiring extra round trips during the handshake
far more objectionable than a small amount of per-byte processing
overhead.

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

From jat@google.com  Fri Jan  7 08:04:38 2011
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 7B16E3A692E for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:04:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.365
X-Spam-Level: 
X-Spam-Status: No, score=-104.365 tagged_above=-999 required=5 tests=[AWL=-2.388, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, 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 Pdg2d-zJOL8W for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:04:37 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 86C403A68ED for <hybi@ietf.org>; Fri,  7 Jan 2011 08:04:37 -0800 (PST)
Received: from hpaq2.eem.corp.google.com (hpaq2.eem.corp.google.com [172.25.149.2]) by smtp-out.google.com with ESMTP id p07G6hCF019680 for <hybi@ietf.org>; Fri, 7 Jan 2011 08:06:43 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294416403; bh=Jd8cUjoDOoxOypeKu8+/YOtoGDo=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=VmGkBD4YpPhWRJosS6OEoqY1AgzCtejIP2jEGnI8S1rE0djYGnNtIN4xfyI/jrGKN T2D8N7RIEoaRpQ7pWlZvw==
Received: from qwj8 (qwj8.prod.google.com [10.241.195.72]) by hpaq2.eem.corp.google.com with ESMTP id p07G5jcp021956 for <hybi@ietf.org>; Fri, 7 Jan 2011 08:06:42 -0800
Received: by qwj8 with SMTP id 8so18462058qwj.10 for <hybi@ietf.org>; Fri, 07 Jan 2011 08:06:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=XXKtWmRJVos3PZ8Rnka2jYexHitT7dqqLh0yjkpOzR8=; b=SDkXjufYRPOlBtT6dLOOOcW5q+TV+I83q/C3QSLrgeEzU/tctZ/99dZiLMtnzKMHqJ iX5Jbv4tJofPcHtfgfyw==
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=xvk7ncQiR3msiJCMEXPRh3Bso/cx9FPN88K5GPjKFo8LqS3R8I2bgIp+r1Rwjkw/hb LBcChLRFGWEPqqePYJ0A==
Received: by 10.229.219.132 with SMTP id hu4mr22973501qcb.60.1294416402225; Fri, 07 Jan 2011 08:06:42 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.106.38 with HTTP; Fri, 7 Jan 2011 08:06:20 -0800 (PST)
In-Reply-To: <10468.1294412280.131214@puncture>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdv.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <10468.1294412280.131214@puncture>
From: John Tamplin <jat@google.com>
Date: Fri, 7 Jan 2011 11:06:20 -0500
Message-ID: <AANLkTi=MT9PmdomS4wZRyNDYW21NZNcCTyFESWv_+kCL@mail.gmail.com>
To: Dave Cridland <dave@cridland.net>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 16:04:38 -0000

On Fri, Jan 7, 2011 at 9:58 AM, Dave Cridland <dave@cridland.net> wrote:
> Would the browser folk be interested in running an experiment to see if an
> Upgrade+CONNECT would work as intended? Would Google be willing to use their
> advertising network for such an experiment? If so, we could actually run an
> experiment that tested each proposal, and then for any where no attacks
> where found, we could select based purely on efficiency and correctness.

The question about Google's participation is above my pay grade, but
assuming the answer to both of the above are yes, are we really
willing to put WebSockets on hold for 6 months or more while an
experiment is crafted, conducted, and analyzed?

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

From gregw@intalio.com  Fri Jan  7 08:06:13 2011
Return-Path: <gregw@intalio.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 6DE803A691A for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:06:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.926
X-Spam-Level: 
X-Spam-Status: No, score=-2.926 tagged_above=-999 required=5 tests=[AWL=0.051,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 5fs4fHNyQbDY for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:06:12 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 6EC783A692C for <hybi@ietf.org>; Fri,  7 Jan 2011 08:06:12 -0800 (PST)
Received: by qwi2 with SMTP id 2so2177021qwi.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 08:08:19 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.47.75 with SMTP id m11mr24022557qaf.249.1294416498633; Fri, 07 Jan 2011 08:08:18 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Fri, 7 Jan 2011 08:08:18 -0800 (PST)
In-Reply-To: <4D272E25.9050902@warmcat.com>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com> <4D26E3FB.6050206@warmcat.com> <AANLkTin7dCgPym-oq0jMvRfQ_5SzDjRQUWxXO8eSwDR7@mail.gmail.com> <4D272E25.9050902@warmcat.com>
Date: Fri, 7 Jan 2011 17:08:18 +0100
X-Google-Sender-Auth: MI3Xdtd6KphhSmq6LV6x1GKj9Rs
Message-ID: <AANLkTinZ-gC-R0wo3Rrkpaif+933DN4nkKPVFfrM2m1W@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: andy@warmcat.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism / building in troll proxy detection to the handshake
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: Fri, 07 Jan 2011 16:06:13 -0000

Andy,

the problem is that sending a single poisoning attack that fails does
not prove that all poisoning attacks will fail. Maybe the intermediary
needs special cache-control headers for it to work, or maybe the
particular injection was not found, but it is still scanning and might
see a subsequent phantom request.

The fundamental problem with this line of solution, is that you
inevitably have to ask the question: "is this good enough?"  But  we
have no definition or agreement what "enough" is!

It was hoped that masking would remove the possibility of clear text
and thus avoid the attempt to detect or trip up bad intermediaries.
Unfortunately we are now in the: "is this masking good enough?" game
:(


cheers




On 7 January 2011 16:15, Andy Green <andy@warmcat.com> wrote:
> On 01/07/11 10:31, Somebody in the thread at some point said:
>
>> There is a concern that there might exist intermediaries that suffer
>> from both cache poisoning vulnerability and overly forgiving HTTP
>> parsing. =A0If so, WS could be used to attack these intermediaries and
>> poison their caches. =A0 While such intermediaries are already
>> vulnerable to flash and java plugins, these are optional extras in
>> browsers, so it is a different matter to expose the same vulnerability
>> in the protocol behind a non-optional part of the HTML-5 standard.
>
> Thanks, that is quite concise describing what "masking" aka munging is me=
ant
> to solve, assuming it's generally held agreed. =A0At least nobody has pou=
red
> scorn on it yet so let's assume that is the attack websockets is supposed=
 to
> stop.
>
> How about this alternative solution for people who think the above is
> realistic: extend the handshake to deliberately send a websocket frame wh=
ich
> (accepting the intermediary has dumb HTTP parsing and ignores the framing=
)
> trying to poison the cache at a random and unlikely URL path, then connec=
t
> to the server in http again and confirm the poisoned path is a 404 before
> allowing the connection.
>
> So, it's
>
> =A01) normal -03 handshake
> =A02) send an initial =A0frame to be discarded by the server, containing =
a
> good-looking HTTP poisoning action for a URL like "/__websocketcheck/<ran=
dom
> integer>" inside websocket framing
> =A03) try to GET "/__websocketcheck/<random integer>", die if it exists
> =A04) otherwise, enjoy a non-munged websocket life
>
> Of course, after a while when the number of hits on the test URL remains =
at
> 0, or the troll proxies are identified and updated, this can be removed f=
rom
> the handshake.
>
> -Andy
>

From jat@google.com  Fri Jan  7 08:07:53 2011
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 EC3CB3A6918 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:07:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.87
X-Spam-Level: 
X-Spam-Status: No, score=-103.87 tagged_above=-999 required=5 tests=[AWL=-0.893, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 KybaqMqiQMjA for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:07:52 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id A531C3A691A for <hybi@ietf.org>; Fri,  7 Jan 2011 08:07:52 -0800 (PST)
Received: from hpaq14.eem.corp.google.com (hpaq14.eem.corp.google.com [172.25.149.14]) by smtp-out.google.com with ESMTP id p07G9wVM023193 for <hybi@ietf.org>; Fri, 7 Jan 2011 08:09:58 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294416599; bh=HpwOcH8It1b+XttFa6D5vss7f2o=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=EFM8Jy+W1wAf5LN20FcJaqVDCqr/ohTqJf9X2xY9V58h1BrDHw+B6y93LeG4h4+M+ Sko6Pw1PSy8H0PymV26dw==
Received: from qyj19 (qyj19.prod.google.com [10.241.83.83]) by hpaq14.eem.corp.google.com with ESMTP id p07G85GA023682 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Fri, 7 Jan 2011 08:09:57 -0800
Received: by qyj19 with SMTP id 19so570502qyj.12 for <hybi@ietf.org>; Fri, 07 Jan 2011 08:09:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Io9sCXJhCmF/VYe2ZsLV9AZ9Vs2WjrnYgfgAcMVUfs4=; b=iszqzZ0/Un2P86G4JxA7EBeYZPyjuaOfU9/0y3A++6lQ6fwpBzY1ZuiZcLkxHKj3Or cIeyuEneZ3UMJSlN2cxg==
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:content-transfer-encoding; b=l5XFaSufAGPJVKlOvNpb/kpDSlQ6CoubCNij5l8Aoax7D93soN08SUaFqW4eoA5uWX h2Aj66mU4EzTl6uYEicA==
Received: by 10.229.224.136 with SMTP id io8mr16701162qcb.250.1294416596545; Fri, 07 Jan 2011 08:09:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.106.38 with HTTP; Fri, 7 Jan 2011 08:09:35 -0800 (PST)
In-Reply-To: <20110107115604.GS28367@1wt.eu>
References: <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <10468.1294398928.011152@puncture> <20110107115604.GS28367@1wt.eu>
From: John Tamplin <jat@google.com>
Date: Fri, 7 Jan 2011 11:09:35 -0500
Message-ID: <AANLkTim-gX-Wg=rJsOwhUo+bn1CYZsukzbJzEM4X=jPP@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 16:07:54 -0000

On Fri, Jan 7, 2011 at 6:56 AM, Willy Tarreau <w@1wt.eu> wrote:
> I think the number of really vulnerable intermediaries (vulnerable to
> HTTP requests) will indeed drop, but their knowledge will rise with the
> interest around them that Adam's paper should suggest. Because basically
> right now those intermediaries can be fooled by anyone behind them as
> easily as :
>
> =C2=A0$ printf \
> =C2=A0 =C2=A0"GET / HTTP/1.1\r\nHost: my.fake.site.com\r\nUpgrade: WebSoc=
ket\r\n\r\n" \
> =C2=A0 =C2=A0"GET / HTTP/1.1\r\nHost: victim.com\r\n\r\n" > /dev/tcp/my.f=
ake.site.com/80
>
> So surely it will raise some interest ;-)

And if simply clicking on a link in a browser could cause that code to
be executed on their machine, then yes this would be equally
exploitable.

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

From andy.warmcat.com@googlemail.com  Fri Jan  7 08:17:19 2011
Return-Path: <andy.warmcat.com@googlemail.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 43BEC3A68C0 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:17:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.546
X-Spam-Level: 
X-Spam-Status: No, score=-3.546 tagged_above=-999 required=5 tests=[AWL=0.053,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 8Nu4X7hYdRLK for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:17:17 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 2ECC13A6842 for <hybi@ietf.org>; Fri,  7 Jan 2011 08:17:17 -0800 (PST)
Received: by wyf23 with SMTP id 23so18451503wyf.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 08:19:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Td8AIuu+uZu5ufhFfbHX9PkdRhmOJ9phgnBu4dLZ0Pk=; b=HhFHUI8/bRFRd3NpyVKPCm3iyBshIeTfggjc22BTWtTi2o2LoRm8LBFcLv2iN6A91K Qz4k7x5WOnR8S9TYE6k58UVoEpRr/VbyifRi6S6Cpo6tWTYqsLrVqYW45gddaVx2wQtu tj/JQvEt6lfVjrjtkp8WWHr52YipCUP1pEUQg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=c0ruj1xPfSpoaigSOYJhllHbRJq7Rsorgedl7xdk8ftIFjjh4Xtziywqc+yGcYWDXP XM/flLS+M8kFmpg81gdBRk1yNKZNFxjrXdWusjCfIIZsS2afViRQUglYrHTTfQ5mqyhB iPvgRLKhWcJ+OPde9v3Vsd45OKkQ1RW8XkMRk=
Received: by 10.227.146.196 with SMTP id i4mr15612387wbv.105.1294417087160; Fri, 07 Jan 2011 08:18:07 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id 11sm17783329wbj.13.2011.01.07.08.18.05 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 08:18:05 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D273CBC.7060801@warmcat.com>
Date: Fri, 07 Jan 2011 16:18:04 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: John Tamplin <jat@google.com>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com> <4D26E3FB.6050206@warmcat.com> <AANLkTin7dCgPym-oq0jMvRfQ_5SzDjRQUWxXO8eSwDR7@mail.gmail.com> <4D272E25.9050902@warmcat.com> <AANLkTikYH4oXP2Yd9uwBgGEz7AztECDw+sxhs-HU4=3E@mail.gmail.com>
In-Reply-To: <AANLkTikYH4oXP2Yd9uwBgGEz7AztECDw+sxhs-HU4=3E@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism / building in troll proxy detection to the handshake
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 07 Jan 2011 16:17:19 -0000

On 01/07/11 16:02, Somebody in the thread at some point said:
> On Fri, Jan 7, 2011 at 10:15 AM, Andy Green<andy@warmcat.com>  wrote:
>> How about this alternative solution for people who think the above is
>> realistic: extend the handshake to deliberately send a websocket frame which
>> (accepting the intermediary has dumb HTTP parsing and ignores the framing)

> Personally, I find requiring extra round trips during the handshake
> far more objectionable than a small amount of per-byte processing
> overhead.

There is a whole extra socket establishment and HTTP transfer both ways 
with this method, not a simple roundtrip, so it is pretty expensive for 
each websocket setup while it is used.

However, it will allow you to exactly perform the internet-wide probing 
for these alleged broken intermediaries, pretty much starting 
immediately.  Just mandate the probe in the protocol.

Whe.. I mean if it is shown these problem intermediaries don't exist, if 
you use a header line to warn the server you will be sending a probe 
packet that should be ignored, this extra connection and roundtrip can 
be turned off at any time compatibly.

-Andy

From dave@cridland.net  Fri Jan  7 08:37:01 2011
Return-Path: <dave@cridland.net>
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 CE4173A691E for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:37:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.529
X-Spam-Level: 
X-Spam-Status: No, score=-2.529 tagged_above=-999 required=5 tests=[AWL=0.070,  BAYES_00=-2.599]
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 65F7-KESr-7M for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:37:00 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 6FB2D3A6917 for <hybi@ietf.org>; Fri,  7 Jan 2011 08:37:00 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id D8482116811D; Fri,  7 Jan 2011 16:39:05 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gAWM+LqXa9al; Fri,  7 Jan 2011 16:39:01 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 7945D11680FB; Fri,  7 Jan 2011 16:39:01 +0000 (GMT)
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> =?US-ASCII?Q?<CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntd?= =?US-ASCII?Q?v.microsoft.com>?= <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <00e101cbae84$2e0b7510$8a225f30$@com>
In-Reply-To: <00e101cbae84$2e0b7510$8a225f30$@com>
MIME-Version: 1.0
Message-Id: <10468.1294418341.486794@puncture>
Date: Fri, 07 Jan 2011 16:39:01 +0000
From: Dave Cridland <dave@cridland.net>
To: Alexander Philippou <alex@noemax.com>, Server-Initiated HTTP <hybi@ietf.org>, Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 16:37:02 -0000

On Fri Jan  7 16:01:37 2011, Alexander Philippou wrote:
> One large use case is non-browser client systems. I don't see how  
> masking will be useful to them. Masking seems to be protecting  
> against vulnerabilities that affect only browser client systems.

No, not really. It's a vulnerability caused by the compound issue of  
vulnerable intermediaries hypothetically existing, plus downloadable  
code. So it's not "browser client systems" that are vulnerable, it's  
intermediaries in front of browsers which have Flash, Java, or  
WebSockets enabled.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From dave@cridland.net  Fri Jan  7 08:37:48 2011
Return-Path: <dave@cridland.net>
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 DDE423A6917 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:37:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.531
X-Spam-Level: 
X-Spam-Status: No, score=-2.531 tagged_above=-999 required=5 tests=[AWL=0.068,  BAYES_00=-2.599]
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 HXVofs-wyM50 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:37:48 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 9CEF43A68D2 for <hybi@ietf.org>; Fri,  7 Jan 2011 08:37:47 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 24442116811E; Fri,  7 Jan 2011 16:39:53 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GbFH4c3NrqFi; Fri,  7 Jan 2011 16:39:45 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 440E011680FB; Fri,  7 Jan 2011 16:39:45 +0000 (GMT)
References: <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <10468.1294398928.011152@puncture> <20110107115604.GS28367@1wt.eu> <AANLkTim-gX-Wg=rJsOwhUo+bn1CYZsukzbJzEM4X=jPP@mail.gmail.com>
In-Reply-To: <AANLkTim-gX-Wg=rJsOwhUo+bn1CYZsukzbJzEM4X=jPP@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <10468.1294418385.290351@puncture>
Date: Fri, 07 Jan 2011 16:39:45 +0000
From: Dave Cridland <dave@cridland.net>
To: John Tamplin <jat@google.com>, Server-Initiated HTTP <hybi@ietf.org>, Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; delsp="yes"; charset="iso-8859-1"; format="flowed"
Content-Transfer-Encoding: 8Bit
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 16:37:49 -0000

On Fri Jan  7 16:09:35 2011, John Tamplin wrote:
> On Fri, Jan 7, 2011 at 6:56 AM, Willy Tarreau <w@1wt.eu> wrote:
> >  $ printf \
> >    "GET / HTTP/1.1\r\nHost: my.fake.site.com\r\nUpgrade:  
> WebSocket\r\n\r\n" \
> >    "GET / HTTP/1.1\r\nHost: victim.com\r\n\r\n" >  
> /dev/tcp/my.fake.site.com/80
> >
> > So surely it will raise some interest ;-)
> 
> And if simply clicking on a link in a browser could cause that code  
> to
> be executed on their machine, then yes this would be equally
> exploitable.

But you *can* arrange for equivalent code to be executed on the  
machine by a click on a link - indeed, that's exactly what the  
experiment did. Just with Flash.

The fact is that even if we did nothing at all in WebSocket to  
mitigate against this attack, a wannabe attacker will *still* use  
Flash over WebSocket as a mechanism because it'll present a far  
higher success rate. Mostly because Flash has a vastly greater  
deployment, but also because while the effects of framing might be  
unknown, it can only decrease the effectiveness of the attack.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From jat@google.com  Fri Jan  7 08:41:12 2011
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 C2C7C3A691A for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:41:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.327
X-Spam-Level: 
X-Spam-Status: No, score=-104.327 tagged_above=-999 required=5 tests=[AWL=-2.350, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, 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 KFR7aB3m0cOn for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:41:12 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id B1A3D3A68D2 for <hybi@ietf.org>; Fri,  7 Jan 2011 08:41:11 -0800 (PST)
Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id p07GhHpD025763 for <hybi@ietf.org>; Fri, 7 Jan 2011 08:43:17 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294418597; bh=JLrdG23vsGJrR54ICjfluH7rZj8=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=DChbIyzV1cpDeHvE5v6guL3Ri9sfpgiqOngNKc0AhaQ2vyboT5xBONQhUM5CbcGns duwuu/98EQFO0sqbLexsA==
Received: from qyk36 (qyk36.prod.google.com [10.241.83.164]) by kpbe11.cbf.corp.google.com with ESMTP id p07GhFUM025551 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Fri, 7 Jan 2011 08:43:16 -0800
Received: by qyk36 with SMTP id 36so18793491qyk.20 for <hybi@ietf.org>; Fri, 07 Jan 2011 08:43:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=TPxrG5JKlCVvLpy9yZD9qDi8AN5QsJHJ9OWTb9QoYUU=; b=UWMvIqV5QD/p6/uSaPrBoU59t3Kbe63thZsLXvTCpT/+bwdI8Z6tnBVDjLgELNtwy4 2HmS9yAssl77jtd66WcQ==
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=q0oycxEu2XvKVBWifWIxQ5ujaVfIjixlLQALVbH9amau2rvtPE5bhAOU/FbwiTvVkm JXdO5mZfpsxtN1vHY3Tg==
Received: by 10.229.232.15 with SMTP id js15mr22463357qcb.136.1294418595303; Fri, 07 Jan 2011 08:43:15 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.106.38 with HTTP; Fri, 7 Jan 2011 08:42:55 -0800 (PST)
In-Reply-To: <10468.1294418385.290351@puncture>
References: <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <10468.1294398928.011152@puncture> <20110107115604.GS28367@1wt.eu> <AANLkTim-gX-Wg=rJsOwhUo+bn1CYZsukzbJzEM4X=jPP@mail.gmail.com> <10468.1294418385.290351@puncture>
From: John Tamplin <jat@google.com>
Date: Fri, 7 Jan 2011 11:42:55 -0500
Message-ID: <AANLkTim5bJBi6_KRrNy3sYD67a2G2vKW=x8-tgAcZybb@mail.gmail.com>
To: Dave Cridland <dave@cridland.net>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 16:41:12 -0000

On Fri, Jan 7, 2011 at 11:39 AM, Dave Cridland <dave@cridland.net> wrote:
> But you *can* arrange for equivalent code to be executed on the machine by a
> click on a link - indeed, that's exactly what the experiment did. Just with
> Flash.
>
> The fact is that even if we did nothing at all in WebSocket to mitigate
> against this attack, a wannabe attacker will *still* use Flash over
> WebSocket as a mechanism because it'll present a far higher success rate.
> Mostly because Flash has a vastly greater deployment, but also because while
> the effects of framing might be unknown, it can only decrease the
> effectiveness of the attack.

I don't know the current status of the vulnerability in Flash/Java,
but since publishing the experiment results was delayed by a couple of
months to give them time to react to it, hopefully it has been or will
soon be fixed.

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

From andy.warmcat.com@googlemail.com  Fri Jan  7 08:49:22 2011
Return-Path: <andy.warmcat.com@googlemail.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 7332A3A691B for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:49:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.549
X-Spam-Level: 
X-Spam-Status: No, score=-3.549 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 15n04i7G-Z2L for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:49:21 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 54E803A6909 for <hybi@ietf.org>; Fri,  7 Jan 2011 08:49:20 -0800 (PST)
Received: by wyf23 with SMTP id 23so18475721wyf.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 08:51:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=wF3eIw7fbfempQ++51DK2W/OJTRQxvsyMUNIIAuChHY=; b=QLl9AJUEciFfQ9U6h/wYB/j81LG5Dd6yrwy6y9Qe4rZXPnvJ9F6xSota09Hywyc49U OB+nHrC+Df7lCuj9fyRP4ne+qbpmkZwMrjUQFBUiZIw8TcEoPN8EPVKlpO+oQhTxvYw5 +lcaYz5jarIdDtIRro0+fM37y2+7EjggEvX6M=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=XW+rrWjk5nebS3XSWiJLDiZ1SKLtB7SiI7HhQ7GWDnhsqlVK50im2QRa1JnAuv2mwX kgarVYRHtoZrTzdBQO5A/lHzCrgmJ+jhRET1VGBtXLe0XuFqteLrroYfkp3g+6qA2UFf TUoHOoH9f3SsiTL+jgGl+6K4ilOTb12dWuJkA=
Received: by 10.227.147.209 with SMTP id m17mr15616709wbv.108.1294417212267; Fri, 07 Jan 2011 08:20:12 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id 11sm17784743wbj.13.2011.01.07.08.20.10 (version=SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 08:20:11 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D273D39.4040203@warmcat.com>
Date: Fri, 07 Jan 2011 16:20:09 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <4D25D82A.8070302@warmcat.com>	<AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>	<20110106184607.GB27099@1wt.eu>	<AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<4D26D20C.8030906@warmcat.com>	<AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com>	<4D26E3FB.6050206@warmcat.com>	<AANLkTin7dCgPym-oq0jMvRfQ_5SzDjRQUWxXO8eSwDR7@mail.gmail.com>	<4D272E25.9050902@warmcat.com> <AANLkTinZ-gC-R0wo3Rrkpaif+933DN4nkKPVFfrM2m1W@mail.gmail.com>
In-Reply-To: <AANLkTinZ-gC-R0wo3Rrkpaif+933DN4nkKPVFfrM2m1W@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism / building in troll proxy detection to the handshake
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 07 Jan 2011 16:49:22 -0000

On 01/07/11 16:08, Somebody in the thread at some point said:

> the problem is that sending a single poisoning attack that fails does
> not prove that all poisoning attacks will fail. Maybe the intermediary

Some dudes are claiming that they have been going around actually 
poisoning caches via websocket, let's get started with their magic 
packet contents and reproduce their test widely using the protocol itself.

-Andy

From ifette@google.com  Fri Jan  7 08:54:11 2011
Return-Path: <ifette@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 99A3B3A6920 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:54:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.65
X-Spam-Level: 
X-Spam-Status: No, score=-103.65 tagged_above=-999 required=5 tests=[AWL=-1.974, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, 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 pjpNbUzXDPSe for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 08:54:10 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 489AF3A68D0 for <hybi@ietf.org>; Fri,  7 Jan 2011 08:54:10 -0800 (PST)
Received: from kpbe12.cbf.corp.google.com (kpbe12.cbf.corp.google.com [172.25.105.76]) by smtp-out.google.com with ESMTP id p07GuF0I017626 for <hybi@ietf.org>; Fri, 7 Jan 2011 08:56:16 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294419376; bh=TTmtbvtPgLQAVmrP7Mfchy5XY8g=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=CBgM0t5nvbXt6fSVFaDX5HMBHUmhg6AE02BAp7zJROoa+bflQWduvWWeXUwCUMSLY p37NmW4Fc+B+yvnE4BZHg==
Received: from qyk10 (qyk10.prod.google.com [10.241.83.138]) by kpbe12.cbf.corp.google.com with ESMTP id p07Gtqdg002089 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Fri, 7 Jan 2011 08:56:14 -0800
Received: by qyk10 with SMTP id 10so644755qyk.1 for <hybi@ietf.org>; Fri, 07 Jan 2011 08:56:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=OwoVHwjMsFIfbk4kTjOm6y+Z8c8w5eZc6/6YfRNS/Jg=; b=hu+WKQ1jJ0xWenLCQXhWnYdJ3W3dB3nfRdUeQASN+23m80qaYtYg/w4em11nKEVf7z ABGHwfJNt7F8mGEdisZg==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=g23+jK468QPE5jkFUaCVQ8FalqwmKeqESChG4TFodhLnAXenSEiI9Mb/7nh+JBCLur kuy9twNdoqVXfPmAJGQg==
MIME-Version: 1.0
Received: by 10.229.81.11 with SMTP id v11mr2146961qck.152.1294419374258; Fri, 07 Jan 2011 08:56:14 -0800 (PST)
Received: by 10.229.0.137 with HTTP; Fri, 7 Jan 2011 08:56:14 -0800 (PST)
In-Reply-To: <4D273D39.4040203@warmcat.com>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <AANLkTi=knNzhjP4wa_nDWunHX8KqR3F6Nr8OkmZDEpzo@mail.gmail.com> <4D26E3FB.6050206@warmcat.com> <AANLkTin7dCgPym-oq0jMvRfQ_5SzDjRQUWxXO8eSwDR7@mail.gmail.com> <4D272E25.9050902@warmcat.com> <AANLkTinZ-gC-R0wo3Rrkpaif+933DN4nkKPVFfrM2m1W@mail.gmail.com> <4D273D39.4040203@warmcat.com>
Date: Fri, 7 Jan 2011 08:56:14 -0800
Message-ID: <AANLkTikOZBrONrRG3OOgj6-BQ-2MV3cFZE58VfXMhrn6@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: andy@warmcat.com
Content-Type: multipart/alternative; boundary=0016364274d9fe3b280499447e4a
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism / building in troll proxy detection to the handshake
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Fri, 07 Jan 2011 16:54:11 -0000

--0016364274d9fe3b280499447e4a
Content-Type: text/plain; charset=UTF-8

On Fri, Jan 7, 2011 at 8:20 AM, Andy Green <andy@warmcat.com> wrote:

> On 01/07/11 16:08, Somebody in the thread at some point said:
>
>  the problem is that sending a single poisoning attack that fails does
>> not prove that all poisoning attacks will fail. Maybe the intermediary
>>
>
> Some dudes are claiming that they have been going around actually poisoning
> caches via websocket, let's get started with their magic packet contents and
> reproduce their test widely using the protocol itself.
>
>
Andy, you are missing the point. The point is not to stop a single known
attack, the point is to come up with a solution that we can reason about and
feel comfortable that we understand why such attacks in general, not a
specific instance, are prevented. The general threat brought up is attackers
being able to send plain-text content that can confuse intermediaries,
masking is a solution that has been proposed to remove that capability from
attackers. With masking, we can actually reason about why an attacker cannot
do things, as opposed to just guessing at what black-box intermediaries may
or may not do.

-Ian


>
> -Andy
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--0016364274d9fe3b280499447e4a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Fri, Jan 7, 2011 at 8:20 AM, Andy Green <span=
 dir=3D"ltr">&lt;<a href=3D"mailto:andy@warmcat.com">andy@warmcat.com</a>&g=
t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On 01/07/11 16:08, Somebody in the thread at some point s=
aid:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
the problem is that sending a single poisoning attack that fails does<br>
not prove that all poisoning attacks will fail. Maybe the intermediary<br>
</blockquote>
<br></div>
Some dudes are claiming that they have been going around actually poisoning=
 caches via websocket, let&#39;s get started with their magic packet conten=
ts and reproduce their test widely using the protocol itself.<div><div>
</div><div class=3D"h5"><br></div></div></blockquote><div><br></div><div>An=
dy, you are missing the point. The point is not to stop a single known atta=
ck, the point is to come up with a solution that we can reason about and fe=
el comfortable that we understand why such attacks in general, not a specif=
ic instance, are prevented. The general threat brought up is attackers bein=
g able to send plain-text content that can confuse intermediaries, masking =
is a solution that has been proposed to remove that capability from attacke=
rs. With masking, we can actually reason about why an attacker cannot do th=
ings, as opposed to just guessing at what black-box intermediaries may or m=
ay not do.</div>
<div><br></div><div>-Ian</div><div>=C2=A0</div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x;"><div><div class=3D"h5">
<br>
-Andy<br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br>

--0016364274d9fe3b280499447e4a--

From salvatore.loreto@ericsson.com  Fri Jan  7 09:36:52 2011
Return-Path: <salvatore.loreto@ericsson.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 F1B683A68C5 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 09:36:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.25
X-Spam-Level: 
X-Spam-Status: No, score=-106.25 tagged_above=-999 required=5 tests=[AWL=-0.251, BAYES_00=-2.599, J_CHICKENPOX_37=0.6, 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 VHrS7nbh2FWZ for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 09:36:48 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id 465E13A6924 for <hybi@ietf.org>; Fri,  7 Jan 2011 09:36:47 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-d0-4d274faee4b1
Received: from esessmw0247.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id E8.DA.23694.EAF472D4; Fri,  7 Jan 2011 18:38:54 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0247.eemea.ericsson.se (153.88.115.94) with Microsoft SMTP Server id 8.2.234.1; Fri, 7 Jan 2011 18:38:54 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id B25D0297E	for <hybi@ietf.org>; Fri,  7 Jan 2011 19:38:53 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 761B65052B	for <hybi@ietf.org>; Fri,  7 Jan 2011 19:38:53 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 0534E50488	for <hybi@ietf.org>; Fri,  7 Jan 2011 19:38:52 +0200 (EET)
Message-ID: <4D274FAC.103@ericsson.com>
Date: Fri, 7 Jan 2011 18:38:52 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com>	<AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com>	<AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com>	<AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com>	<AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com>	<CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>	<AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com>	<AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com>	<AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com>	<AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>
In-Reply-To: <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 17:36:52 -0000

On 1/7/11 3:28 PM, Maciej Stachowiak wrote:
> I have several objections to this proposal:
>
> 1) The idea of an extension that is, in most circumstances, mandatory for both clients and servers seems silly. If the normal use case is that you always request it from the other endpoint, and refuse the connection if the other endpoint won't use it, then it's not an extension.
> 2) Designing things this way creates more risk of bugs leading to total security failure.
>
> 3) Some decent technical reasons have been given for why the framing should be masked as well, for example, when considering the threat model of using HTTP APIs in the browser to attack WebSocket services.
>
> 4) I still haven't seen evidence of a non-hypothetical use case for removing masking, so I don't think we should warp the design around the possibility. This proposal weakens the effectiveness of the masking (perhaps in minor or edge case ways) to make it easier to later address a totally unproven use case.
>
> Combining masking with GET+Upgrade (instead of a potentially more robust initial handshake) was already a compromise.
Indeed it is a compromise for both the sides.
But it is a compromise that has been largely accepted by people in the poll.
No other proposals so far has received so large consensus.

/Sal

-- 
Salvatore Loreto
www.sloreto.com


> Now I feel that GET+Upgrade advocates are incrementally chipping away at the effectiveness of the masking. Meanwhile, CONNECT advocates have largely agreed to let go of the CONNECT handshake idea if we can at least have effective masking. I don't think this ratchet method is an effective or fair way to negotiate agreement.
>
> Regards,
> Maciej
>



From ferg@caucho.com  Fri Jan  7 09:43:00 2011
Return-Path: <ferg@caucho.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 756763A68C5 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 09:43:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.847
X-Spam-Level: 
X-Spam-Status: No, score=-1.847 tagged_above=-999 required=5 tests=[AWL=0.152,  BAYES_00=-2.599, J_CHICKENPOX_37=0.6]
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 rkaQxbGj1AJZ for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 09:42:59 -0800 (PST)
Received: from nm27.bullet.mail.sp2.yahoo.com (nm27.bullet.mail.sp2.yahoo.com [98.139.91.97]) by core3.amsl.com (Postfix) with SMTP id B1A2C3A67D0 for <hybi@ietf.org>; Fri,  7 Jan 2011 09:42:59 -0800 (PST)
Received: from [98.139.91.69] by nm27.bullet.mail.sp2.yahoo.com with NNFMP; 07 Jan 2011 17:45:03 -0000
Received: from [98.139.91.48] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 07 Jan 2011 17:45:03 -0000
Received: from [127.0.0.1] by omp1048.mail.sp2.yahoo.com with NNFMP; 07 Jan 2011 17:45:03 -0000
X-Yahoo-Newman-Id: 861620.10571.bm@omp1048.mail.sp2.yahoo.com
Received: (qmail 89619 invoked from network); 7 Jan 2011 17:45:03 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp112.biz.mail.sp1.yahoo.com with SMTP; 07 Jan 2011 09:45:03 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: vTFVo9IVM1ldRX4mzHTCK.1EtZU2VP0_8Hgx5oQk_pkU3Zx 5ca3K6BgGcboSMNaiQ9L7Wb.xIaMSlEZ3SRnEjKTwuM5hDSTG6BTRcGhGggj Zu5QDOhSn9.DKJ9QHZjcYguhmAeUZ5uQ6Lv5_KHxxC0sRUhMhOJrUXkKtMsE YKq3E.dHTmB02pBP3CTiTXmWpJHrE8E7oerlk7898_hz.DnPZAlElPwifvrC pG1sPvyuKd89itbGCOJtN_zQG.jbbkl00cSdjVyMpfwaA2jjKwofsSA--
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D27511F.6080007@caucho.com>
Date: Fri, 07 Jan 2011 09:45:03 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com>	<10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu>	<10468.1294398928.011152@puncture> <20110107115604.GS28367@1wt.eu>
In-Reply-To: <20110107115604.GS28367@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Fri, 07 Jan 2011 17:43:00 -0000

Willy Tarreau wrote:
> On Fri, Jan 07, 2011 at 11:15:28AM +0000, Dave Cridland wrote:
>   
>
>> There is some argument, much of it reasonable  
>> (if not absolutely convincing) that it follows that with a pure  
>> Upgrade-based handshake, intermediaries may "find" HTTP traffic  
>> within some framing.
>>     
>
> I think that all the people who are thinking that should at some
> point try to write some working code to implement a real caching
> intermediary. They will see that they need to check the method
> and that you cannot randomly skip over garbage to presume your
> method will be here or there.

+1

Those arguments have been handwaving based on an ignorance of what a 
HTTP intermediary does. (And apparently ignorant of how framing works in 
general.)

If framing breaks, an intermediary (or server) cannot just skip bytes in 
some kind of error recovery system until it find something it likes. It 
has to terminate the connection. That's not a security requirement; it's 
basic protocol requirement to avoid parsing junk.
 
> Well, to be honnest, he did not exactly test what you are suggesting.
> He compared the GET+Upgrade followed by valid HTTP requests....

In other words, the test used valid HTTP framing followed by another 
HTTP request. There was no test where HTTP framing was deliberately 
broken as it is in WebSockets.
>  
>> Now, assuming that every single person on the whole internet has a  
>> proxy of some form, that would mean that 80,000 vulnerable proxies  
>> exist amongst the 2 billion internet users. I don't think this is a  
>> sufficient attack surface to worry about, especially given that these  
>> represent intermediaries that are already vulnerable to attacks of  
>> the form we're trying to protect against by using Flash or Java.  
>>     
>
> And telnet, netcat, etc... No need to look for plugins when everyone
> has an internet connection which is enough to abuse them.
>   

+1

-- Scott


From alex@noemax.com  Fri Jan  7 09:52:59 2011
Return-Path: <alex@noemax.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 8B05C3A68D5 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 09:52:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
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 3EoIxnX-37MH for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 09:52:58 -0800 (PST)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by core3.amsl.com (Postfix) with ESMTP id 8E5F83A67D0 for <hybi@ietf.org>; Fri,  7 Jan 2011 09:52:58 -0800 (PST)
Received: from HPdv73190ev by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id QSK92300; Fri, 07 Jan 2011 19:55:00 +0200
From: "Alexander Philippou" <alex@noemax.com>
To: "'Dave Cridland'" <dave@cridland.net>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdv.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <00e101cbae84$2e0b7510$8a225f30$@com> <10468.1294418341.486794@puncture>
In-Reply-To: <10468.1294418341.486794@puncture>
Date: Fri, 7 Jan 2011 19:54:53 +0200
Message-ID: <010401cbae94$00b16650$021432f0$@com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcuuiWgSPYZr7zmSSkq/FNNaFEefzwAAtLYA
Content-Language: en-us
Cc: 'Server-Initiated HTTP' <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 17:52:59 -0000

> No, not really. It's a vulnerability caused by the compound issue of =
vulnerable intermediaries hypothetically existing, plus downloadable =
code. So it's not "browser client systems" that are vulnerable, it's =
intermediaries in front of browsers which have Flash, Java, or =
WebSockets enabled.

Right. So I don't see what type of protection masking will offer to a =
"non-browser client system" that consists of non-browser clients, the =
servers hosting the services that these clients access, and their =
intermediaries. In this case both sides are tightly controlled and no =
arbitrary code can be downloaded or run. I understand the =
vulnerabilities when browsers are involved but don't see what is gained =
by masking when there are no browsers in the picture. If WebSockets is =
also to be for clients other than browsers (or more generally when =
downloadable code is involved) then my opinion is that masking should =
either be justified for them too or be made optional.

Alexander


From mjs@apple.com  Fri Jan  7 09:56:46 2011
Return-Path: <mjs@apple.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 514853A67A1 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 09:56:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.999
X-Spam-Level: 
X-Spam-Status: No, score=-105.999 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, J_CHICKENPOX_37=0.6, 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 Wrg6Vlp1JC42 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 09:56:45 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 577233A68D5 for <hybi@ietf.org>; Fri,  7 Jan 2011 09:56:45 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out4.apple.com (Postfix) with ESMTP id 156F4C9FDD0D for <hybi@ietf.org>; Fri,  7 Jan 2011 09:58:52 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-07-4d27545b12fb
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay11.apple.com (Apple SCV relay) with SMTP id 31.F3.04151.B54572D4; Fri,  7 Jan 2011 09:58:52 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.62.4] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEN001K7ZA3ZW50@gertie.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 09:58:51 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <10468.1294412280.131214@puncture>
Date: Fri, 07 Jan 2011 09:58:51 -0800
Message-id: <C54833C6-C323-49CA-8CD7-185F648F2F30@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> ?= <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <10468.1294412280.131214@puncture>
To: Dave Cridland <dave@cridland.net>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 17:56:46 -0000

On Jan 7, 2011, at 6:58 AM, Dave Cridland wrote:

> On Fri Jan  7 14:28:07 2011, Maciej Stachowiak wrote:
>> 3) Some decent technical reasons have been given for why the framing should be masked as well, for example, when considering the threat model of using HTTP APIs in the browser to attack WebSocket services.
> 
> Hmmmph. If you can mimic any data as an HTTP client, then by inference you can mimic any masking, surely?

No. If the correct mask includes an unpredictable string sent by the server, then it's not possible to mimic it because the client can't compute the correct mask.

This is actually better than Sec-* headers, because if the server does the check in a buggy way, it won't be able to read from clients at all in the normal case.

> The trick, then has to be to use restricted features like the Sec-* headers to defeat this attack at the handshake level, which we had way back when.
> 
>> 4) I still haven't seen evidence of a non-hypothetical use case for removing masking, so I don't think we should warp the design around the possibility. This proposal weakens the effectiveness of the masking (perhaps in minor or edge case ways) to make it easier to later address a totally unproven use case.
> 
> I still haven't seen evidence of a non-hypothetical case where masking is required.
> 
>> Combining masking with GET+Upgrade (instead of a potentially more robust initial handshake) was already a compromise. Now I feel that GET+Upgrade advocates are incrementally chipping away at the effectiveness of the masking. Meanwhile, CONNECT advocates have largely agreed to let go of the CONNECT handshake idea if we can at least have effective masking. I don't think this ratchet method is an effective or fair way to negotiate agreement.
> 
> CONNECT on its own fails because it is no longer correct HTTP. Pretending it is doesn't help - it breaks end-to-end transparency.
> 
> Upgrade on its own has hypothetical - but reasonable - security arguments against it. However, in its favour, technologies like CORS should "just work", for instance.
> 
> So, quite obviously, neither of those two options on their own work.
> 
> Would the browser folk be interested in running an experiment to see if an Upgrade+CONNECT would work as intended? Would Google be willing to use their advertising network for such an experiment? If so, we could actually run an experiment that tested each proposal, and then for any where no attacks where found, we could select based purely on efficiency and correctness.

I like your Upgrade+CONNECT proposal, and have explicitly supported it in the straw poll thread.

However, even with Upgrade+CONNECT, I would still be in favor of having masking.

> Basing our decision making on hypothetical vulnerabilities which have been shown to be at least sufficiently rare as to not have been found seems like a poor course of action.

>From the browser vendor point of view, if we widely deploy a technology in the browser, lots of websites adopt it, and then a serious security vulnerability is found, the cost is huge. It's extremely difficult to quickly deploy security updates to a lot of users, even more so when this will break their favorite websites. In the meantime, the tech press sows fear and panic.

Since we are designing a new protocol, we are not constrained by legacy yet, and can do better than the historical level of security on the Web. We can set a higher standard than "can't find a fully working exploit today through armchair reasoning" and produce a design that is likely to be robust against a wide variety of threat models.

Regards,
Maciej


From mjs@apple.com  Fri Jan  7 10:03:44 2011
Return-Path: <mjs@apple.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 E39D23A68D5 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:03:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.999
X-Spam-Level: 
X-Spam-Status: No, score=-105.999 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, J_CHICKENPOX_37=0.6, 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 aqXwkdm+ikqD for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:03:43 -0800 (PST)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id A4F433A67B7 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:03:43 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out4.apple.com (Postfix) with ESMTP id AEB82C9FE4E1 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:05:50 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-13-4d2755fefb94
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay11.apple.com (Apple SCV relay) with SMTP id 23.46.04151.EF5572D4; Fri,  7 Jan 2011 10:05:50 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.62.4] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEN001RZZLQZW50@gertie.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 10:05:50 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTikReCUBnHFazA-fuxD+mnaAoZQweFLR9=P-zdwi@mail.gmail.com>
Date: Fri, 07 Jan 2011 10:05:50 -0800
Message-id: <B26AC0E9-567D-497D-B14F-335E603814E6@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <AANLkTikReCUBnHFazA-fuxD+mnaAoZQweFLR9=P-zdwi@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 18:03:45 -0000

On Jan 7, 2011, at 7:03 AM, Greg Wilkins wrote:

> On 7 January 2011 15:28, Maciej Stachowiak <mjs@apple.com> wrote:
>> 
>> I have several objections to this proposal:
>> 
>> 1) The idea of an extension that is, in most circumstances, mandatory for both clients and servers seems silly. If the normal use case is that you always request it from the other endpoint, and refuse the connection if the other endpoint won't use it, then it's not an extension.
> 
> I don't think you can say the normal use-case will always use masking.
> Sure it will for the browser, but it may be a very normal use-case
> for the the connection to enter a data centre via a web-socket aware
> aggregator that forwards the messages without masking to the
> application server.     So from the server point of view, the normal
> use-case could be without masking.

I put much more priority on what happens on the public Internet than what happens inside the data center, on a private network. The security of the Internet can't be subordinated to convenience of communication on private networks where security is not as much an issue. Designing "low security mode" into protocols for such use cases creates more risk than benefit, in my opinion.

> 
> 
>> 2) Designing things this way creates more risk of bugs leading to total security failure.
> 
> that's very subjective.  I think that masking framing will result in
> more bugs, specially with partially received frames.

I'm less worried about bugs that cause a failure of functionality than security bugs.

> 
> 
> 
>> 3) Some decent technical reasons have been given for why the framing should be masked as well, for example, when considering the threat model of using HTTP APIs in the browser to attack WebSocket services.
> 
> I do not think that threat has been well explained or accepted, nor is
> it the primary target of masking.  Specifically I've not yet seen a
> credible explanation of how a HTTP API could generate the required
> headers to get past the websockets expectations of the initial upgrade
> request.   I don't want to dismiss this vulnerability out of hand, but
> I would like to see more detail about it and to consider if there are
> other mitigations we could do that would not impede the progress we
> were making on masking.

I've posted about it many times now, with varying levels of detail. I'll try to write something up about the various cross-protocol threat models on the wiki.

> 
> 
> 
>> 4) I still haven't seen evidence of a non-hypothetical use case for removing masking, so I don't think we should warp the design around the possibility. This proposal weakens the effectiveness of the masking (perhaps in minor or edge case ways) to make it easier to later address a totally unproven use case.
> 
> Unfortunately there are some that see the hypothetical risk of these
> intermediaries as warping the design with the introduction of masking.
> 
> Beside, there have been many use-case presented (eg the aggregator
> above) that would benefit from no masking.  I know you think that
> masking is cheap - and it may be in the client, but there are many
> opinions on the intermediary/server side that are concerned about the
> cost of masking and thus there is a drive to have it as simple and
> cheap as possible, if not optional.
> 
> 
>> Combining masking with GET+Upgrade (instead of a potentially more robust initial handshake) was already a compromise. Now I feel that GET+Upgrade advocates are incrementally chipping away at the effectiveness of the masking. Meanwhile, CONNECT advocates have largely agreed to let go of the CONNECT handshake idea if we can at least have effective masking. I don't think this ratchet method is an effective or fair way to negotiate agreement.
> 
> I don't think that is a fair or productive characterisation.    I
> could equally say that masking advocates are incrementally increasing
> the scope and complexity of masking from the simple prevention of
> clear text originally proposed and adding new unproven hypothetical
> vulnerabilities - which would also be neither fair or productive.

Nothing has been added to the masking proposal since it was originally proposed. It has only been simplified.

> 
> There is no benefit in having masking unless it is seen to be
> effective, so it is in nobodies interests to chip away at the
> effectiveness of masking.    I truly do not understand why having the
> payload XOR's with a random per frame key will not be effective at
> preventing attackers sending clear text.  Nor do I understand why
> having masking as an extension reduces it's effectiveness in any way.
> 
> 
> I get it that you'd greatly prefer masking to not be an extension, but
> in the spirit of compromise, what aspect of masking as an extension is
> a show stopper for you?

Security features should not be optional, they should be mandatory. Using extensions, a mechanism designed for optional features, and then layering requirements on top of that to make masking still be required in the normal case, is needlessly fragile and needlessly complex. I don't agree with adding that fragility without a corresponding benefit.

Regards,
Maciej


From mjs@apple.com  Fri Jan  7 10:05:55 2011
Return-Path: <mjs@apple.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 BE01D3A6924 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:05:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.299
X-Spam-Level: 
X-Spam-Status: No, score=-106.299 tagged_above=-999 required=5 tests=[AWL=0.300, BAYES_00=-2.599, 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 QNiN3boIa+vC for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:05:55 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id AA1703A6914 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:05:54 -0800 (PST)
Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out3.apple.com (Postfix) with ESMTP id 4D77AC562BD1 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:08:01 -0800 (PST)
X-AuditID: 11807134-b7cfdae000001831-50-4d2756813367
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay14.apple.com (Apple SCV relay) with SMTP id 68.6F.06193.186572D4; Fri,  7 Jan 2011 10:08:01 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.62.4] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEN00LV9ZPCI360@et.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 10:08:01 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <00e101cbae84$2e0b7510$8a225f30$@com>
Date: Fri, 07 Jan 2011 10:07:59 -0800
Message-id: <39D3C73F-3BB4-4EBD-B6D3-C3159C9A5B23@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <00e101cbae84$2e0b7510$8a225f30$@com>
To: Alexander Philippou <alex@noemax.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: 'Hybi' <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 18:05:55 -0000

On Jan 7, 2011, at 8:01 AM, Alexander Philippou wrote:

>> 4) I still haven't seen evidence of a non-hypothetical use case for removing masking, so I don't think we should warp the design around the possibility. This proposal weakens the effectiveness of the masking (perhaps in minor or edge case ways) to make it easier to later address a totally unproven use case.
> 
> One large use case is non-browser client systems. I don't see how masking will be useful to them. Masking seems to be protecting against vulnerabilities that affect only browser client systems. Unless there is evidence that these protection mechanisms have a universal usefulness, I would strongly support a design that keeps them as an optional extension.

Note that the proposal under discussion was to make masking a mandatory extension that is always on on both client and server side, and can only be turned off through explicit configuration of the server. I don't see how that helps your use case, unless you have a server that exists only for non-browser clients and can't be accessed at all through browsers. In which case, it's not obvious why you'd want to use WebSocket protocol instead of raw TCP.

Regards,
Maciej


From mjs@apple.com  Fri Jan  7 10:08:22 2011
Return-Path: <mjs@apple.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 73CFE3A6935 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:08:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.399
X-Spam-Level: 
X-Spam-Status: No, score=-106.399 tagged_above=-999 required=5 tests=[AWL=0.200, BAYES_00=-2.599, 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 TOe7Luy1IE9O for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:08:21 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id A6BF13A691A for <hybi@ietf.org>; Fri,  7 Jan 2011 10:08:21 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out3.apple.com (Postfix) with ESMTP id B2D91C562DD4 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:10:28 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-19-4d275714a1a9
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay11.apple.com (Apple SCV relay) with SMTP id 89.77.04151.417572D4; Fri,  7 Jan 2011 10:10:28 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.62.4] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEN00LY7ZTGI360@et.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 10:10:28 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <10468.1294411308.608117@puncture>
Date: Fri, 07 Jan 2011 10:10:28 -0800
Message-id: <B146456D-0EBB-4185-89FC-F5075CE7EB58@apple.com>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <10468.1294411308.608117@puncture>
To: Dave Cridland <dave@cridland.net>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 18:08:22 -0000

On Jan 7, 2011, at 6:41 AM, Dave Cridland wrote:

> On Fri Jan  7 14:34:39 2011, Maciej Stachowiak wrote:
>> On Jan 6, 2011, at 10:38 PM, Willy Tarreau wrote:
>> > On Thu, Jan 06, 2011 at 10:16:55PM -0800, Eric Rescorla wrote:
>> >>> Well, at 1 million concurrent connections with a 5s think time, that's
>> >>> about
>> >>> 200k frames per second, it starts to be concerning even if it's cheap.
>> >>
>> >> My dinky Macbook Air does one million SHA-1 ops/second on a single core.
>> >
>> > That means a 20% CPU overhead imposed by masking then.
>> I would hope a server handling 1 million concurrent connections is considerably more powerful than a single core of a MacBook Air.
> 
> It'd have to be because of the masking.
> 
> The thing is, I can quite easily see cases where BOSH or some other long-poll is going to be more efficient for servers to handle just because of the masking overhead.

A more plausible server configuration could probably do at least an order of magnitude better on SHA-1 ops/sec, which would lower the overhead to 2%, given these assumptions. Would you consider that unacceptable overhead?

Regards,
Maciej


From jat@google.com  Fri Jan  7 10:28:14 2011
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 C05CC3A67A1 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:28:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.289
X-Spam-Level: 
X-Spam-Status: No, score=-104.289 tagged_above=-999 required=5 tests=[AWL=-2.312, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, 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 H4pF-M7z9h60 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:28:14 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id C40933A6825 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:28:13 -0800 (PST)
Received: from hpaq1.eem.corp.google.com (hpaq1.eem.corp.google.com [172.25.149.1]) by smtp-out.google.com with ESMTP id p07IUJ9V011454 for <hybi@ietf.org>; Fri, 7 Jan 2011 10:30:19 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294425019; bh=gVbvVBUAjZW4q2c46KF43DvXxUY=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=V3KxXtJeMqthCACA8oHE3KAGDAMr2OfVCGu6SVvGa9OVHd58I2byXsH0Ytl21QGs+ BagEjlbGmVJGx6T5yw/EA==
Received: from yic24 (yic24.prod.google.com [10.243.65.152]) by hpaq1.eem.corp.google.com with ESMTP id p07ITlqG010903 for <hybi@ietf.org>; Fri, 7 Jan 2011 10:30:18 -0800
Received: by yic24 with SMTP id 24so4513687yic.39 for <hybi@ietf.org>; Fri, 07 Jan 2011 10:30:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=49f5W2+uu8yfuXkcgRs4kwvbsEUpSu1T+UQXMqhW80s=; b=xNCwWa5kBmrt5/jdTHOycE8SZez5Jw2SONdhPIe1FAmoX8GmARIvuO/8BKs3Nhz+BX hzoecpwkJL1mgCEXxvxg==
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=Ts2XOYTvFdLieBQcbn10ZU6S/tsdTcWlI4rwFAnPo/h/FiUFGf7nqRY53vERQfdNjJ OYBnngc/P7sjqJCwHqqQ==
Received: by 10.150.91.18 with SMTP id o18mr25999367ybb.92.1294425018256; Fri, 07 Jan 2011 10:30:18 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Fri, 7 Jan 2011 10:29:57 -0800 (PST)
In-Reply-To: <B26AC0E9-567D-497D-B14F-335E603814E6@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <AANLkTikReCUBnHFazA-fuxD+mnaAoZQweFLR9=P-zdwi@mail.gmail.com> <B26AC0E9-567D-497D-B14F-335E603814E6@apple.com>
From: John Tamplin <jat@google.com>
Date: Fri, 7 Jan 2011 13:29:57 -0500
Message-ID: <AANLkTi=-TSbeMPeY3H3aB_W8Mki0QJ86cu9Nc-LGu25Q@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 18:28:14 -0000

On Fri, Jan 7, 2011 at 1:05 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> Security features should not be optional, they should be mandatory. Using extensions,
> a mechanism designed for optional features, and then layering requirements on top of
> that to make masking still be required in the normal case, is needlessly fragile and
> needlessly complex. I don't agree with adding that fragility without a corresponding benefit.

The benefit would hopefully be that we can agree on it, ship it, and
move on to the next thing.

Given the entrenched positions, it isn't clear to me that we can
achieve consensus on masking
not implemented as a mandatory extension.

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

From gregw@intalio.com  Fri Jan  7 10:32:21 2011
Return-Path: <gregw@intalio.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 EBA103A691D for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:32:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.927
X-Spam-Level: 
X-Spam-Status: No, score=-2.927 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 5dwzBe0Tu8a9 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:32:20 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 1571E3A6906 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:32:19 -0800 (PST)
Received: by qwi2 with SMTP id 2so2318733qwi.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 10:34:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.214.71 with SMTP id gz7mr10604833qab.349.1294425266434; Fri, 07 Jan 2011 10:34:26 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Fri, 7 Jan 2011 10:34:26 -0800 (PST)
In-Reply-To: <B26AC0E9-567D-497D-B14F-335E603814E6@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <AANLkTikReCUBnHFazA-fuxD+mnaAoZQweFLR9=P-zdwi@mail.gmail.com> <B26AC0E9-567D-497D-B14F-335E603814E6@apple.com>
Date: Fri, 7 Jan 2011 19:34:26 +0100
X-Google-Sender-Auth: 3QE0Y11_0deLE1QeoImQHQoBo3Y
Message-ID: <AANLkTi=PMtZfB58bNUCdgyjGvS85sM2ZVhnjcigT23P6@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 18:32:21 -0000

Maciej,

nobody is saying that masking should not be mandatory for situations
where there is the possibility of this class of security
vulnerability.
Nobody is suggesting prioritising data centre convenience over security.

This is not a contest of opposites.

I believe that there must be a way that we can have mandatory masking
for browsers that is suitably robust without sacrificing the
flexibility of the intermediaries, servers and non client browsers.
Are there any actual security flaws in the proposal that I have made?

From mjs@apple.com  Fri Jan  7 10:45:39 2011
Return-Path: <mjs@apple.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 2944C3A6938 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:45:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.449
X-Spam-Level: 
X-Spam-Status: No, score=-106.449 tagged_above=-999 required=5 tests=[AWL=0.150, BAYES_00=-2.599, 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 UDUPokJNSonF for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:45:38 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 572D53A6935 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:45:38 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out3.apple.com (Postfix) with ESMTP id 48D54C564BC3 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:47:45 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-20-4d275fd1f905
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay11.apple.com (Apple SCV relay) with SMTP id 89.62.04151.1DF572D4; Fri,  7 Jan 2011 10:47:45 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.62.4] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEO00IEO1JKDG40@elliott.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 10:47:45 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTi=-TSbeMPeY3H3aB_W8Mki0QJ86cu9Nc-LGu25Q@mail.gmail.com>
Date: Fri, 07 Jan 2011 10:47:44 -0800
Message-id: <FA15A21D-E0BB-4920-9164-CE82373D15EA@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <AANLkTikReCUBnHFazA-fuxD+mnaAoZQweFLR9=P-zdwi@mail.gmail.com> <B26AC0E9-567D-497D-B14F-335E603814E6@apple.com> <AANLkTi=-TSbeMPeY3H3aB_W8Mki0QJ86cu9Nc-LGu25Q@mail.gmail.com>
To: John Tamplin <jat@google.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 18:45:39 -0000

On Jan 7, 2011, at 10:29 AM, John Tamplin wrote:

> On Fri, Jan 7, 2011 at 1:05 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>> Security features should not be optional, they should be mandatory. Using extensions,
>> a mechanism designed for optional features, and then layering requirements on top of
>> that to make masking still be required in the normal case, is needlessly fragile and
>> needlessly complex. I don't agree with adding that fragility without a corresponding benefit.
> 
> The benefit would hopefully be that we can agree on it, ship it, and
> move on to the next thing.
> 
> Given the entrenched positions, it isn't clear to me that we can
> achieve consensus on masking
> not implemented as a mandatory extension.

It doesn't seem like we have consensus on making it a mandatory extension either.

 - Maciej


From w@1wt.eu  Fri Jan  7 10:56:00 2011
Return-Path: <w@1wt.eu>
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 B28C63A6819 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:56:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.921
X-Spam-Level: 
X-Spam-Status: No, score=-0.921 tagged_above=-999 required=5 tests=[AWL=-1.278, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, J_CHICKENPOX_42=0.6, J_CHICKENPOX_53=0.6, J_CHICKENPOX_62=0.6, J_CHICKENPOX_63=0.6]
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 SAHbOxBHetuK for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:56:00 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 644563A67A1 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:55:59 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p07Iw1aO001682; Fri, 7 Jan 2011 19:58:01 +0100
Date: Fri, 7 Jan 2011 19:58:01 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110107185801.GB32612@1wt.eu>
References: <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 18:56:00 -0000

On Fri, Jan 07, 2011 at 06:34:39AM -0800, Maciej Stachowiak wrote:
> 
> On Jan 6, 2011, at 10:38 PM, Willy Tarreau wrote:
> 
> > On Thu, Jan 06, 2011 at 10:16:55PM -0800, Eric Rescorla wrote:
> >>> Well, at 1 million concurrent connections with a 5s think time, that's
> >>> about
> >>> 200k frames per second, it starts to be concerning even if it's cheap.
> >> 
> >> My dinky Macbook Air does one million SHA-1 ops/second on a single core.
> > 
> > That means a 20% CPU overhead imposed by masking then.
> 
> I would hope a server handling 1 million concurrent connections is considerably more powerful than a single core of a MacBook Air.

Handling connections is not a matter of having a big CPU bit just large
amounts of RAM. What's important is to consider the cost of doing things
that are sometimes not needed at all. Doing an HMAC-SHA1 will involve 2
SHA1 operations (40% CPU above, I forgot the factor of two). As Eric said,
the operation by itself can be relatively cheap, but still it's a lot more
expensive than the work that was supposed to be done. In short, instead of
doing this in a front proxy :

   read(in, buf, 10);
   length = parse_length(buf);
   write(out, buf, 10);
   splice(in, out, length - 10);

with parse_length() basically adding a few bytes with a few if that way :

   length = buf[1] & 0x7F;
   if (length == 0x7E)
      length = (buf[2] << 8) + buf[3];
   else if (length == 0x7F)
      length = (buf[2] << 56) + (buf[3] << 48) + ... buf[9];
   return length;

You'll have to run something like this :
 
   read(in, rnd, 6);  // assuming we'd use 6 bytes for the key
   key = compute_hmac_sha1(c_nonce, s_nonce, frame_num, rnd);
   read(in, buf, 10);
   decode(buf, tmp, key, 10);
   length = parse_length(tmp);
   write(out, rnd, 6);
   write(out, buf, 10);
   splice(in, out, length - 10);

The hmac computation above while not a big deal still represents a
substantial cost compared to the simple decoding and short read/writes.

Once again, I'm not saying it's a big blocking issue, I'm saying that
it's way overkill to protect the 6 bytes that reprenset the smallest
supposedly vulnerable request we can think of (having a key larger than
the data to hide brings nothing, and we don't want to prevent anybody
from deciphering the stream, we just want it to be non-deterministic
from the server's POV).

Regards,
Willy


From ekr@rtfm.com  Fri Jan  7 10:58:57 2011
Return-Path: <ekr@rtfm.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 719333A6921 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:58:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.405
X-Spam-Level: 
X-Spam-Status: No, score=-101.405 tagged_above=-999 required=5 tests=[AWL=-0.829, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_42=0.6, J_CHICKENPOX_53=0.6, J_CHICKENPOX_62=0.6, J_CHICKENPOX_63=0.6, RCVD_IN_DNSWL_LOW=-1, 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 FwsmvgiH6iY4 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 10:58:56 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 3B6F33A67A1 for <hybi@ietf.org>; Fri,  7 Jan 2011 10:58:56 -0800 (PST)
Received: by gwj17 with SMTP id 17so9438953gwj.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 11:01:02 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.83.18 with SMTP id k18mr3622250agl.79.1294426862595; Fri, 07 Jan 2011 11:01:02 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Fri, 7 Jan 2011 11:01:02 -0800 (PST)
In-Reply-To: <20110107185801.GB32612@1wt.eu>
References: <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu>
Date: Fri, 7 Jan 2011 11:01:02 -0800
Message-ID: <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=0016e6407c64552d770499463d49
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 18:58:57 -0000

--0016e6407c64552d770499463d49
Content-Type: text/plain; charset=ISO-8859-1

We're going around in circles.

It's your position that masking with a keystream as long as the message is
overkill. It's my position
that the alternative you're pushing isn't demonstrably secure. Obviously,
I'm not convincing you
and your arguments certainly haven't convinced me. I'm now going to stop
responding on this
point until something new is said. Please do not take that as agreement with
your position. It is
not.

-Ekr


On Fri, Jan 7, 2011 at 10:58 AM, Willy Tarreau <w@1wt.eu> wrote:

> On Fri, Jan 07, 2011 at 06:34:39AM -0800, Maciej Stachowiak wrote:
> >
> > On Jan 6, 2011, at 10:38 PM, Willy Tarreau wrote:
> >
> > > On Thu, Jan 06, 2011 at 10:16:55PM -0800, Eric Rescorla wrote:
> > >>> Well, at 1 million concurrent connections with a 5s think time,
> that's
> > >>> about
> > >>> 200k frames per second, it starts to be concerning even if it's
> cheap.
> > >>
> > >> My dinky Macbook Air does one million SHA-1 ops/second on a single
> core.
> > >
> > > That means a 20% CPU overhead imposed by masking then.
> >
> > I would hope a server handling 1 million concurrent connections is
> considerably more powerful than a single core of a MacBook Air.
>
> Handling connections is not a matter of having a big CPU bit just large
> amounts of RAM. What's important is to consider the cost of doing things
> that are sometimes not needed at all. Doing an HMAC-SHA1 will involve 2
> SHA1 operations (40% CPU above, I forgot the factor of two). As Eric said,
> the operation by itself can be relatively cheap, but still it's a lot more
> expensive than the work that was supposed to be done. In short, instead of
> doing this in a front proxy :
>
>   read(in, buf, 10);
>   length = parse_length(buf);
>   write(out, buf, 10);
>   splice(in, out, length - 10);
>
> with parse_length() basically adding a few bytes with a few if that way :
>
>   length = buf[1] & 0x7F;
>   if (length == 0x7E)
>      length = (buf[2] << 8) + buf[3];
>   else if (length == 0x7F)
>      length = (buf[2] << 56) + (buf[3] << 48) + ... buf[9];
>   return length;
>
> You'll have to run something like this :
>
>   read(in, rnd, 6);  // assuming we'd use 6 bytes for the key
>   key = compute_hmac_sha1(c_nonce, s_nonce, frame_num, rnd);
>   read(in, buf, 10);
>   decode(buf, tmp, key, 10);
>   length = parse_length(tmp);
>   write(out, rnd, 6);
>   write(out, buf, 10);
>   splice(in, out, length - 10);
>
> The hmac computation above while not a big deal still represents a
> substantial cost compared to the simple decoding and short read/writes.
>
> Once again, I'm not saying it's a big blocking issue, I'm saying that
> it's way overkill to protect the 6 bytes that reprenset the smallest
> supposedly vulnerable request we can think of (having a key larger than
> the data to hide brings nothing, and we don't want to prevent anybody
> from deciphering the stream, we just want it to be non-deterministic
> from the server's POV).
>
> Regards,
> Willy
>
>

--0016e6407c64552d770499463d49
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

We&#39;re going around in circles.<div><br></div><div>It&#39;s your positio=
n that masking with a keystream as long as the message is overkill. It&#39;=
s my position</div><div>that the alternative you&#39;re=A0pushing isn&#39;t=
 demonstrably secure. Obviously, I&#39;m not convincing you</div>
<div>and your arguments certainly haven&#39;t convinced me. I&#39;m now goi=
ng to stop responding on this</div><div>point until something new is said. =
Please do not take that as agreement with your position. It is</div><div>
not.</div><div><br></div><div>-Ekr</div><div><br></div><div><br><div class=
=3D"gmail_quote">On Fri, Jan 7, 2011 at 10:58 AM, Willy Tarreau <span dir=
=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wrote:<br>=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">
<div><div></div><div class=3D"h5">On Fri, Jan 07, 2011 at 06:34:39AM -0800,=
 Maciej Stachowiak wrote:<br>
&gt;<br>
&gt; On Jan 6, 2011, at 10:38 PM, Willy Tarreau wrote:<br>
&gt;<br>
&gt; &gt; On Thu, Jan 06, 2011 at 10:16:55PM -0800, Eric Rescorla wrote:<br=
>
&gt; &gt;&gt;&gt; Well, at 1 million concurrent connections with a 5s think=
 time, that&#39;s<br>
&gt; &gt;&gt;&gt; about<br>
&gt; &gt;&gt;&gt; 200k frames per second, it starts to be concerning even i=
f it&#39;s cheap.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; My dinky Macbook Air does one million SHA-1 ops/second on a s=
ingle core.<br>
&gt; &gt;<br>
&gt; &gt; That means a 20% CPU overhead imposed by masking then.<br>
&gt;<br>
&gt; I would hope a server handling 1 million concurrent connections is con=
siderably more powerful than a single core of a MacBook Air.<br>
<br>
</div></div>Handling connections is not a matter of having a big CPU bit ju=
st large<br>
amounts of RAM. What&#39;s important is to consider the cost of doing thing=
s<br>
that are sometimes not needed at all. Doing an HMAC-SHA1 will involve 2<br>
SHA1 operations (40% CPU above, I forgot the factor of two). As Eric said,<=
br>
the operation by itself can be relatively cheap, but still it&#39;s a lot m=
ore<br>
expensive than the work that was supposed to be done. In short, instead of<=
br>
doing this in a front proxy :<br>
<br>
 =A0 read(in, buf, 10);<br>
 =A0 length =3D parse_length(buf);<br>
 =A0 write(out, buf, 10);<br>
 =A0 splice(in, out, length - 10);<br>
<br>
with parse_length() basically adding a few bytes with a few if that way :<b=
r>
<br>
 =A0 length =3D buf[1] &amp; 0x7F;<br>
 =A0 if (length =3D=3D 0x7E)<br>
 =A0 =A0 =A0length =3D (buf[2] &lt;&lt; 8) + buf[3];<br>
 =A0 else if (length =3D=3D 0x7F)<br>
 =A0 =A0 =A0length =3D (buf[2] &lt;&lt; 56) + (buf[3] &lt;&lt; 48) + ... bu=
f[9];<br>
 =A0 return length;<br>
<br>
You&#39;ll have to run something like this :<br>
<br>
 =A0 read(in, rnd, 6); =A0// assuming we&#39;d use 6 bytes for the key<br>
 =A0 key =3D compute_hmac_sha1(c_nonce, s_nonce, frame_num, rnd);<br>
 =A0 read(in, buf, 10);<br>
 =A0 decode(buf, tmp, key, 10);<br>
 =A0 length =3D parse_length(tmp);<br>
 =A0 write(out, rnd, 6);<br>
 =A0 write(out, buf, 10);<br>
 =A0 splice(in, out, length - 10);<br>
<br>
The hmac computation above while not a big deal still represents a<br>
substantial cost compared to the simple decoding and short read/writes.<br>
<br>
Once again, I&#39;m not saying it&#39;s a big blocking issue, I&#39;m sayin=
g that<br>
it&#39;s way overkill to protect the 6 bytes that reprenset the smallest<br=
>
supposedly vulnerable request we can think of (having a key larger than<br>
the data to hide brings nothing, and we don&#39;t want to prevent anybody<b=
r>
from deciphering the stream, we just want it to be non-deterministic<br>
from the server&#39;s POV).<br>
<br>
Regards,<br>
<font color=3D"#888888">Willy<br>
<br>
</font></blockquote></div><br></div>

--0016e6407c64552d770499463d49--

From salvatore.loreto@ericsson.com  Fri Jan  7 12:33:57 2011
Return-Path: <salvatore.loreto@ericsson.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 20DCA3A6950 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 12:33:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.544
X-Spam-Level: 
X-Spam-Status: No, score=-106.544 tagged_above=-999 required=5 tests=[AWL=0.054, BAYES_00=-2.599, 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 dOFC4Q+LM-wK for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 12:33:55 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id 092313A67F4 for <hybi@ietf.org>; Fri,  7 Jan 2011 12:33:53 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-c0-4d27792f0a3b
Received: from esessmw0247.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id 79.E2.23694.F29772D4; Fri,  7 Jan 2011 21:35:59 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0247.eemea.ericsson.se (153.88.115.94) with Microsoft SMTP Server id 8.2.234.1; Fri, 7 Jan 2011 21:36:00 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 68CAF297E	for <hybi@ietf.org>; Fri,  7 Jan 2011 22:35:59 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 2906F5052B	for <hybi@ietf.org>; Fri,  7 Jan 2011 22:35:59 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 8B0E250488	for <hybi@ietf.org>; Fri,  7 Jan 2011 22:35:58 +0200 (EET)
Message-ID: <4D27792E.2070902@ericsson.com>
Date: Fri, 7 Jan 2011 21:35:58 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com>	<AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com>	<AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com>	<AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com>	<AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com>	<CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>	<AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com>	<AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com>	<AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com>	<AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com>	<7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>	<AANLkTikReCUBnHFazA-fuxD+mnaAoZQweFLR9=P-zdwi@mail.gmail.com>	<B26AC0E9-567D-497D-B14F-335E603814E6@apple.com>	<AANLkTi=-TSbeMPeY3H3aB_W8Mki0QJ86cu9Nc-LGu25Q@mail.gmail.com> <FA15A21D-E0BB-4920-9164-CE82373D15EA@apple.com>
In-Reply-To: <FA15A21D-E0BB-4920-9164-CE82373D15EA@apple.com>
Content-Type: multipart/alternative; boundary="------------010209040303090800020904"
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 20:33:57 -0000

--------------010209040303090800020904
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit

On 1/7/11 7:47 PM, Maciej Stachowiak wrote:
> On Jan 7, 2011, at 10:29 AM, John Tamplin wrote:
>
>> On Fri, Jan 7, 2011 at 1:05 PM, Maciej Stachowiak<mjs@apple.com>  wrote:
>>> Security features should not be optional, they should be mandatory. Using extensions,
>>> a mechanism designed for optional features, and then layering requirements on top of
>>> that to make masking still be required in the normal case, is needlessly fragile and
>>> needlessly complex. I don't agree with adding that fragility without a corresponding benefit.
a possible benefit from the John proposal is that one has *the freedom* 
to use the type of masking he want,
the one he think is the better or the stronger... if hmac-sha1 is not 
enough strong for him.

    1) Define a new extension "clientmask" in the base spec, which
        specifies that client->server masking is present.  An optional
        parameter "type" specifies the type of masking, and if not
        present defaults to "hmac-sha1".


/Sal

>> The benefit would hopefully be that we can agree on it, ship it, and
>> move on to the next thing.
>>
>> Given the entrenched positions, it isn't clear to me that we can
>> achieve consensus on masking
>> not implemented as a mandatory extension.
> It doesn't seem like we have consensus on making it a mandatory extension either.
>
>   - Maciej
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi



--------------010209040303090800020904
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 1/7/11 7:47 PM, Maciej Stachowiak wrote:
    <blockquote
      cite="mid:FA15A21D-E0BB-4920-9164-CE82373D15EA@apple.com"
      type="cite">
      <pre wrap="">
On Jan 7, 2011, at 10:29 AM, John Tamplin wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">On Fri, Jan 7, 2011 at 1:05 PM, Maciej Stachowiak <a class="moz-txt-link-rfc2396E" href="mailto:mjs@apple.com">&lt;mjs@apple.com&gt;</a> wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Security features should not be optional, they should be mandatory. Using extensions,
a mechanism designed for optional features, and then layering requirements on top of
that to make masking still be required in the normal case, is needlessly fragile and
needlessly complex. I don't agree with adding that fragility without a corresponding benefit.
</pre>
        </blockquote>
      </blockquote>
    </blockquote>
    a possible benefit from the John proposal is that one has *the
    freedom* to use the type of masking he want,<br>
    the one he think is the better or the stronger... if hmac-sha1 is
    not enough strong for him.<br>
    <br>
    <blockquote>
      <pre wrap="">1) Define a new extension "clientmask" in the base spec, which
   specifies that client-&gt;server masking is present.  An optional
   parameter "type" specifies the type of masking, and if not
   present defaults to "hmac-sha1".
</pre>
    </blockquote>
    <br>
    /Sal<br>
    <br>
    <blockquote
      cite="mid:FA15A21D-E0BB-4920-9164-CE82373D15EA@apple.com"
      type="cite">
      <blockquote type="cite">
        <pre wrap="">
The benefit would hopefully be that we can agree on it, ship it, and
move on to the next thing.

Given the entrenched positions, it isn't clear to me that we can
achieve consensus on masking
not implemented as a mandatory extension.
</pre>
      </blockquote>
      <pre wrap="">
It doesn't seem like we have consensus on making it a mandatory extension either.

 - Maciej

_______________________________________________
hybi mailing list
<a class="moz-txt-link-abbreviated" href="mailto:hybi@ietf.org">hybi@ietf.org</a>
<a class="moz-txt-link-freetext" href="https://www.ietf.org/mailman/listinfo/hybi">https://www.ietf.org/mailman/listinfo/hybi</a>
</pre>
    </blockquote>
    <br>
    <br>
  </body>
</html>

--------------010209040303090800020904--

From w@1wt.eu  Fri Jan  7 12:37:56 2011
Return-Path: <w@1wt.eu>
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 96ABE3A6945 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 12:37:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.109
X-Spam-Level: 
X-Spam-Status: No, score=-2.109 tagged_above=-999 required=5 tests=[AWL=-0.066, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 odLtr7sIyrG2 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 12:37:55 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 5BE523A6832 for <hybi@ietf.org>; Fri,  7 Jan 2011 12:37:55 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p07KdwVN002169; Fri, 7 Jan 2011 21:39:58 +0100
Date: Fri, 7 Jan 2011 21:39:58 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110107203958.GC32612@1wt.eu>
References: <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 20:37:56 -0000

On Fri, Jan 07, 2011 at 11:01:02AM -0800, Eric Rescorla wrote:
> We're going around in circles.
> 
> It's your position that masking with a keystream as long as the message is
> overkill. It's my position that the alternative you're pushing isn't
> demonstrably secure. Obviously, I'm not convincing you and your arguments
> certainly haven't convinced me. I'm now going to stop responding on this
> point until something new is said. Please do not take that as agreement with
> your position. It is not.

Eric, you're probably the one who knows all the theory around crypto better
than anyone else here, still you don't explain what elements you're using
for your choices, so it's very hard to understand some key points behind
that, and it's normal to challenge them especially when the proposals come
with a cost. If you have a reason to think that a long and complexly built
key is more efficient at preventing someone to make a 48-bit long text appear
in a stream than it is using a 48-bit key, then please explain to us why.

At my level of knowledge, we're sure to make that choosen text appear
if we send all possible 48-bit patterns, whatever the key length, key
value and crypto method used. That means that sending 6*2^48 = 1.6 PB
of payload *will* definitely make the choosen text appear.

For this reason I fail to understand the point of using larger keys.
I believe you said that 32-bit was not long enough for you, but I fail
to understand how you can reliably make the message appear without
exhausting the key space. Even if we assumed that clever constructs
might create sequences which can match under multiple forms, you'd still
have to send at least 4 GB of data to cover the entire key space (I
even suspect it's 4G+1 though I cannot demonstrate it). I even proposed
variable key lengths so that the size required to exhaust the key space
would always be larger than the largest possible message. This is
something which makes sense to me, but maybe I'm wrong.

You often ask for provably secure systems. I try to show with my little
knowledge that the risks are in line with the context, but you just keep
saying I'm wrong without even a piece of explanation. Right now we're
just with "I would be more comfortable with this or that". I know that
intuition from experience is something to be taken into account, but we
are talking about finite systems, so we should be able to talk about
quantities.

Finally I end up doing the maths myself while I'm not the one skilled to
that task. That's not a fair way of participating and making progress. So
please explain me why you think I'm wrong if you do, and if it convinces
me, it will at least stop me from defending a mechanism you don't agree
with and it might educate me as well as possibly other persons here.

Thank you,
Willy


From w@1wt.eu  Fri Jan  7 12:42:51 2011
Return-Path: <w@1wt.eu>
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 A66573A6940 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 12:42:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level: 
X-Spam-Status: No, score=-2.108 tagged_above=-999 required=5 tests=[AWL=-0.065, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 C9GOY6JJ79n1 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 12:42:50 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 725F63A6920 for <hybi@ietf.org>; Fri,  7 Jan 2011 12:42:50 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p07KissB002208; Fri, 7 Jan 2011 21:44:54 +0100
Date: Fri, 7 Jan 2011 21:44:54 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110107204454.GD32612@1wt.eu>
References: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <4D17B5FF.5060209@callenish.com> <AANLkTik-m1VKAoaNEU-_P6in28+_CSk+rOHbidtjHa76@mail.gmail.com> <AANLkTi=cNXGsaeqwH_LUDXf_soAHcEfKD+Xd4nXaY+mN@mail.gmail.com> <41249E48-B17E-47C7-9340-6F95B85182CD@apple.com> <20110107055244.GH28367@1wt.eu> <D4CDEBAB-4A1C-4716-A630-FBC1BD8FE297@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <D4CDEBAB-4A1C-4716-A630-FBC1BD8FE297@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 20:42:51 -0000

On Fri, Jan 07, 2011 at 06:20:09AM -0800, Maciej Stachowiak wrote:
> 
> On Jan 6, 2011, at 9:52 PM, Willy Tarreau wrote:
> 
> > On Mon, Dec 27, 2010 at 04:30:43PM -0800, Maciej Stachowiak wrote:
> >>> But I'm strongly against masking the framing itself.  Their is
> >>> absolutely no reason for it other than to prevent the possibility of
> >>> making it optional.
> >> 
> >> That's not right. One reason for masking the framing is to make it impossible for hostile browser-hosted hosted code to pre-generate valid-looking frames. If you don't mask framing, then it is trivial to create valid-looking frames, even if the contents are scrambled. Depending on circumstances, this could still be a dangerous attack on integrity.
> > 
> > No Maciej, it's not "trivial" to do that because if you look at the framing,
> > very little of it is directly controlled by the application. As I suggested
> > in another mail, if you use RSV4 to indicate masking is used and put the
> > random key in extension data, that leaves you with :
> >  - first byte with MORE|RSV1|RSV2|RSV3|OPCODE = 1|XXX|OPCODE
> >  - second byte with RSV4|LENGTH = 1|LENGTH
> >  - 3rd-4th bytes corresponding to the low part of the payload length,
> >    only if previous byte is 0xFE/0xFF
> >  - 5-10th bytes corresponding to the high part of the payload length
> >    only if 2nd byte is 0xFF
> >  - random key the size of the payload length
> >  - application data
> > 
> > The only controllable part here in which you might put an HTTP request is
> > the key length. But even in order to write an HTTP/0.9 "GET /\n", you have
> > to forge a message that is 0x54202F0A4745 bytes long, or 92 TeraBytes long.
> > And if you need to start it at the beginning of a line, it becomes
> > 0x4554202F0A0A47 which is 19 PetaBytes. By the time we get browsers able to
> > construct that large messages, we won't bother anymore about the broken
> > intermediaries.
> > 
> > That's why I'm really considering masking the payload safe enough with
> > regards to the risk we're trying to cover.
> 
> Willy, I think we're talking past each other. The threat model I'm talking about involves using HTTP APIs to connect to WebSocket servers. HTTP APIs in the browser will effectively let you send any bytes you want as the payload. You seem to be talking about the opposite threat model, where WebSocket APIs in the browser, to attack HTTP.

Yes, I am. That's why we're discussing about having masking on by default
on the WS client, so that it cannot decide what the bytes will look like
on the wire.

The HTTP API vs WS server was addressed a while ago with the Sec-* headers
that the HTTP API was supposed not to be able to send.

> These are completely separate threat models, and both are important to consider.

Yes, I agree and you're right to remind each one's goal to clarify the discussion.

Thanks,
Willy


From ekr@rtfm.com  Fri Jan  7 13:17:08 2011
Return-Path: <ekr@rtfm.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 D13FD3A6935 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 13:17:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.606
X-Spam-Level: 
X-Spam-Status: No, score=-102.606 tagged_above=-999 required=5 tests=[AWL=0.370, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 3cJHPMGnbJaA for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 13:17:07 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 7454F3A6832 for <hybi@ietf.org>; Fri,  7 Jan 2011 13:17:07 -0800 (PST)
Received: by yxt33 with SMTP id 33so7775172yxt.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 13:19:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.232.6 with SMTP id e6mr28700693agh.52.1294435153792; Fri, 07 Jan 2011 13:19:13 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Fri, 7 Jan 2011 13:19:13 -0800 (PST)
In-Reply-To: <20110107203958.GC32612@1wt.eu>
References: <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu>
Date: Fri, 7 Jan 2011 13:19:13 -0800
Message-ID: <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=001636284f6086d12b0499482bdb
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 21:17:08 -0000

--001636284f6086d12b0499482bdb
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Jan 7, 2011 at 12:39 PM, Willy Tarreau <w@1wt.eu> wrote:

> On Fri, Jan 07, 2011 at 11:01:02AM -0800, Eric Rescorla wrote:
> > We're going around in circles.
> >
> > It's your position that masking with a keystream as long as the message
> is
> > overkill. It's my position that the alternative you're pushing isn't
> > demonstrably secure. Obviously, I'm not convincing you and your arguments
> > certainly haven't convinced me. I'm now going to stop responding on this
> > point until something new is said. Please do not take that as agreement
> with
> > your position. It is not.
>
> Eric, you're probably the one who knows all the theory around crypto better
> than anyone else here, still you don't explain what elements you're using
> for your choices, so it's very hard to understand some key points behind
> that, and it's normal to challenge them especially when the proposals come
> with a cost. If you have a reason to think that a long and complexly built
> key is more efficient at preventing someone to make a 48-bit long text
> appear
> in a stream than it is using a 48-bit key, then please explain to us why.
>

I don't know what a "long and complexly built key" means, but I think I've
explained
myself several times.

My objective is to make the bits that appear on the wire indistinguishable
from random
from the attacker's perspective. I think it's clear that this is the
strongest form of masking
available, and the method I proposed does that. A sliding mask does not
produce this
result because it means that an attacker can have any relationship he wants
between
bits which appear at the same offset in the mask. As I've now said a number
of times,
I am unaware of an attack which exploits this property, but that does not
mean there
isn't one, and so I prefer to have a stronger mechanism.

It's important to recognize that this is a distinct question from the
*entropy* of the
mask. For instance. if you start with a 32-bit random seed and use that to
generate
an arbitrarily long mask, this provides more resistance to the above
property than
just using the key directly as a repeating mask. Which is precisely the
point of using
an expansion function for the mask (whether HMAC-SHA1, or AES-CTR).


> Finally I end up doing the maths myself while I'm not the one skilled to
> that task. That's not a fair way of participating and making progress.


I'm sorry, but this is simply nonsense. I've explained my position. If
you're not convinced,
that's fine, but there's nothing "unfair" about my refusal to engage in an
endless discussion
about it.

-Ekr

--001636284f6086d12b0499482bdb
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Fri, Jan 7, 2011 at 12:39 PM, Willy T=
arreau <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Fri, Jan 07, 2011 at 11:01:02AM -0800, Eric Rescorla w=
rote:<br>
&gt; We&#39;re going around in circles.<br>
&gt;<br>
&gt; It&#39;s your position that masking with a keystream as long as the me=
ssage is<br>
&gt; overkill. It&#39;s my position that the alternative you&#39;re pushing=
 isn&#39;t<br>
&gt; demonstrably secure. Obviously, I&#39;m not convincing you and your ar=
guments<br>
&gt; certainly haven&#39;t convinced me. I&#39;m now going to stop respondi=
ng on this<br>
&gt; point until something new is said. Please do not take that as agreemen=
t with<br>
&gt; your position. It is not.<br>
<br>
</div>Eric, you&#39;re probably the one who knows all the theory around cry=
pto better<br>
than anyone else here, still you don&#39;t explain what elements you&#39;re=
 using<br>
for your choices, so it&#39;s very hard to understand some key points behin=
d<br>
that, and it&#39;s normal to challenge them especially when the proposals c=
ome<br>
with a cost. If you have a reason to think that a long and complexly built<=
br>
key is more efficient at preventing someone to make a 48-bit long text appe=
ar<br>
in a stream than it is using a 48-bit key, then please explain to us why.<b=
r></blockquote><div><br></div><div>I don&#39;t know what a &quot;long and c=
omplexly built key&quot; means, but I think I&#39;ve explained</div><div>
myself several times.</div><div><br></div><div>My objective is to make the =
bits that appear on the wire indistinguishable from random</div><div>from t=
he attacker&#39;s perspective. I think it&#39;s clear that this is the stro=
ngest form of masking</div>
<div>available, and the method I proposed does that. A sliding mask does no=
t produce this</div><div>result because it means that an attacker can have =
any relationship he wants between</div><div>bits which appear at the same o=
ffset in the mask. As I&#39;ve now said a number of times,</div>
<div>I am unaware of an attack which exploits this property, but that does =
not mean there</div><div>isn&#39;t one, and so I prefer to have a stronger =
mechanism.</div><div><br></div><div>It&#39;s important to recognize that th=
is is a distinct question from the *entropy* of the=A0</div>
<div>mask. For instance. if you start with a 32-bit random seed and use tha=
t to generate</div><div>an arbitrarily long mask, this provides more resist=
ance to the above property than=A0</div><div>just using the key directly as=
 a repeating mask. Which is precisely the point of using</div>
<div>an expansion function for the mask (whether HMAC-SHA1, or AES-CTR).</d=
iv><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .=
8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Finally I end up doing the maths myself while I&#39;m not the one skilled t=
o<br>
that task. That&#39;s not a fair way of participating and making progress. =
</blockquote><div><br></div><div>I&#39;m sorry, but this is simply nonsense=
. I&#39;ve explained my position. If you&#39;re not convinced,</div><div>
that&#39;s fine, but there&#39;s nothing &quot;unfair&quot; about my refusa=
l to engage in an endless discussion</div><div>about it.</div><div><br></di=
v><div>-Ekr</div><div><br></div></div>

--001636284f6086d12b0499482bdb--

From ferg@caucho.com  Fri Jan  7 13:21:17 2011
Return-Path: <ferg@caucho.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 5248D3A68C5 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 13:21:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.153
X-Spam-Level: 
X-Spam-Status: No, score=-2.153 tagged_above=-999 required=5 tests=[AWL=0.446,  BAYES_00=-2.599]
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 c3rjw+GkTi+A for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 13:21:15 -0800 (PST)
Received: from nm17.bullet.mail.ac4.yahoo.com (nm17.bullet.mail.ac4.yahoo.com [98.139.52.214]) by core3.amsl.com (Postfix) with SMTP id 580423A6946 for <hybi@ietf.org>; Fri,  7 Jan 2011 13:21:04 -0800 (PST)
Received: from [98.139.52.190] by nm17.bullet.mail.ac4.yahoo.com with NNFMP; 07 Jan 2011 21:23:08 -0000
Received: from [98.139.52.128] by tm3.bullet.mail.ac4.yahoo.com with NNFMP; 07 Jan 2011 21:23:08 -0000
Received: from [127.0.0.1] by omp1011.mail.ac4.yahoo.com with NNFMP; 07 Jan 2011 21:23:08 -0000
X-Yahoo-Newman-Id: 446679.62649.bm@omp1011.mail.ac4.yahoo.com
Received: (qmail 29017 invoked from network); 7 Jan 2011 21:23:08 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp114.biz.mail.mud.yahoo.com with SMTP; 07 Jan 2011 13:23:07 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: TLtSlVsVM1mf7u7PE6YZTnayTxe3OqYCe300R.W4tRh523n YSeG4FR.AuLHq29J5BdfuS24KAl9PuPWZ56ukWgBaP23QCGXeFGk0cnQzJhu 1qk3BM2Wt6ihjGUR1qyNPoOJroM1P9wJa25G6O83bJ_e8..y0kxDownjAFuY 9hmTJIDvSRKHVTpTdhagffHjVf75yuai9H1DeD_X_7j_OBxS1JBsq4rp89tb rDcWSAoLvFJcgwfPQPT.O4PmjZQAf6h7UNwQo9.zfnZfJ0lstkmuDS4cov.q KuRsNbPaiBGyl1kBsEIlOLHIgM6iwE339dhlSsvB22L8y_w8WnZZWVGx0Whl PVVG4ZJCFsrJ7wYsMF3Ofte8pFdUmQp4esUwBROQ_
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D27843B.2090705@caucho.com>
Date: Fri, 07 Jan 2011 13:23:07 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Maciej Stachowiak <mjs@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com>	<AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com>	<AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com>	<AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com>	<AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> ?=	<AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com>	<AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com>	<AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com>	<AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com>	<7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com>	<10468.1294412280.131214@puncture> <C54833C6-C323-49CA-8CD7-185F648F2F30@apple.com>
In-Reply-To: <C54833C6-C323-49CA-8CD7-185F648F2F30@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 21:21:17 -0000

Maciej Stachowiak wrote:
> On Jan 7, 2011, at 6:58 AM, Dave Cridland wrote:
>
>   
>> On Fri Jan  7 14:28:07 2011, Maciej Stachowiak wrote:
>>     
>>> 3) Some decent technical reasons have been given for why the framing should be masked as well, for example, when considering the threat model of using HTTP APIs in the browser to attack WebSocket services.
>>>       
>> Hmmmph. If you can mimic any data as an HTTP client, then by inference you can mimic any masking, surely?
>>     
>
> No. If the correct mask includes an unpredictable string sent by the server, then it's not possible to mimic it because the client can't compute the correct mask.
>
> This is actually better than Sec-* headers, because if the server does the check in a buggy way, it won't be able to read from clients at all in the normal case.
>   

To clarify, you're suggesting that the following is a threat:

  frame-header <garbage>
  frame-header <garbage>
  frame-header <garbage>

where

  1. the hijacker cannot predict how the <garbage> bytes will be 
interpreted by the server
  2. the hijacker somehow produces Sec-* headers in the POST request
  3. the server allows a POST to be processed as a websocket request

-- Scott


From w@1wt.eu  Fri Jan  7 14:21:17 2011
Return-Path: <w@1wt.eu>
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 0C30D28C124 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:21:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level: 
X-Spam-Status: No, score=-2.108 tagged_above=-999 required=5 tests=[AWL=-0.065, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 8sLs6hPyhaLu for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:21:16 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 4CC7B28C0D0 for <hybi@ietf.org>; Fri,  7 Jan 2011 14:21:11 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p07MNC2l002519; Fri, 7 Jan 2011 23:23:12 +0100
Date: Fri, 7 Jan 2011 23:23:12 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110107222312.GA2479@1wt.eu>
References: <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 22:21:17 -0000

On Fri, Jan 07, 2011 at 01:19:13PM -0800, Eric Rescorla wrote:
> My objective is to make the bits that appear on the wire indistinguishable
> from random
> from the attacker's perspective. I think it's clear that this is the
> strongest form of masking
> available, and the method I proposed does that. A sliding mask does not
> produce this
> result because it means that an attacker can have any relationship he wants
> between
> bits which appear at the same offset in the mask. As I've now said a number
> of times,
> I am unaware of an attack which exploits this property, but that does not
> mean there
> isn't one, and so I prefer to have a stronger mechanism.
> 
> It's important to recognize that this is a distinct question from the
> *entropy* of the
> mask. For instance. if you start with a 32-bit random seed and use that to
> generate
> an arbitrarily long mask, this provides more resistance to the above
> property than
> just using the key directly as a repeating mask. Which is precisely the
> point of using
> an expansion function for the mask (whether HMAC-SHA1, or AES-CTR).

Thank you for this explanation. Now I understand better what you're trying
to achieve. Yes I agree that the repeating mask is a lot weaker than a
sliding mask, because in order to send a predefined message, the server
would just have to establish the relation between the multiple bytes and
send it as many times as the key space permits. But still that *a lot*.
Sending the 6-bytes "GET /\n" 2^32 times each time encoded with one
different key is still 24 GB long.

My position is clear on this point, we're not trying to build something
*that* secure, we're trying to avoid a lazy intermediary from finding a
method using strstr("GET ") in a stream it has in its request buffer.
If an attacker is able to make a browser send 24 GB of data to an
arbitrary location without anyone noticing, surely there are much more
fun to do than just trying to corrupt one entry in a cache.

Now maybe we can also build a sliding mask with something very simple
without involving expensive computations at all, but given the goals
of the suggested masking, I really think that it will bring nothing
at all in this precise context.

Obviously, would someone propose to encrypt my password using such
a masking method, I would categorically refuse and would approve
your proposal without hesitation. But we're not trying to do that
right now.

Regards,
Willy


From mjs@apple.com  Fri Jan  7 14:23:34 2011
Return-Path: <mjs@apple.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 7F8E728C12F for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:23:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.479
X-Spam-Level: 
X-Spam-Status: No, score=-106.479 tagged_above=-999 required=5 tests=[AWL=0.120, BAYES_00=-2.599, 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 QDZUkWi-V4WV for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:23:30 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id BA6F328C11A for <hybi@ietf.org>; Fri,  7 Jan 2011 14:23:27 -0800 (PST)
Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out3.apple.com (Postfix) with ESMTP id B157EC578FFE for <hybi@ietf.org>; Fri,  7 Jan 2011 14:25:32 -0800 (PST)
X-AuditID: 11807134-b7cfdae000001831-84-4d2792dc7693
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay14.apple.com (Apple SCV relay) with SMTP id A0.51.06193.CD2972D4; Fri,  7 Jan 2011 14:25:32 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.62.4] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEO006LTBMJ8T40@gertie.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 14:25:32 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D27843B.2090705@caucho.com>
Date: Fri, 07 Jan 2011 14:25:30 -0800
Message-id: <4A5090A9-D580-4F1E-9796-D04AB2C89A27@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> ?= <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <10468.1294412280.131214@puncture> <C54833C6-C323-49CA-8CD7-185F648F2F30@apple.com> <4D27843B.2090705@caucho.com>
To: Scott Ferguson <ferg@caucho.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 22:23:34 -0000

On Jan 7, 2011, at 1:23 PM, Scott Ferguson wrote:

> Maciej Stachowiak wrote:
>> On Jan 7, 2011, at 6:58 AM, Dave Cridland wrote:
>> 
>>  
>>> On Fri Jan  7 14:28:07 2011, Maciej Stachowiak wrote:
>>>    
>>>> 3) Some decent technical reasons have been given for why the framing should be masked as well, for example, when considering the threat model of using HTTP APIs in the browser to attack WebSocket services.
>>>>      
>>> Hmmmph. If you can mimic any data as an HTTP client, then by inference you can mimic any masking, surely?
>>>    
>> 
>> No. If the correct mask includes an unpredictable string sent by the server, then it's not possible to mimic it because the client can't compute the correct mask.
>> 
>> This is actually better than Sec-* headers, because if the server does the check in a buggy way, it won't be able to read from clients at all in the normal case.
>>  
> 
> To clarify, you're suggesting that the following is a threat:
> 
> frame-header <garbage>
> frame-header <garbage>
> frame-header <garbage>
> 
> where
> 
> 1. the hijacker cannot predict how the <garbage> bytes will be interpreted by the server
> 2. the hijacker somehow produces Sec-* headers in the POST request
> 3. the server allows a POST to be processed as a websocket request

Yes. It's a much lesser threat than the case where <garbage> can be controlled, obviously, but sometimes sending parseable commands with a garbage payload is still a risk. I think it would be better not to leave this narrower risk open, if we can avoid it and there's no compelling reason to do otherwise.

Regards,
Maciej



From ekr@rtfm.com  Fri Jan  7 14:25:10 2011
Return-Path: <ekr@rtfm.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 EFCC83A6985 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:25:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.611
X-Spam-Level: 
X-Spam-Status: No, score=-102.611 tagged_above=-999 required=5 tests=[AWL=0.365, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 0bqt63An71+9 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:25:09 -0800 (PST)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by core3.amsl.com (Postfix) with ESMTP id A604D28C105 for <hybi@ietf.org>; Fri,  7 Jan 2011 14:25:02 -0800 (PST)
Received: by gxk28 with SMTP id 28so8266468gxk.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 14:27:09 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.83.18 with SMTP id k18mr3840683agl.79.1294439229050; Fri, 07 Jan 2011 14:27:09 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Fri, 7 Jan 2011 14:27:08 -0800 (PST)
In-Reply-To: <20110107222312.GA2479@1wt.eu>
References: <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu>
Date: Fri, 7 Jan 2011 14:27:08 -0800
Message-ID: <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=0016e6407c646e4e9f0499491eb7
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 07 Jan 2011 22:25:11 -0000

--0016e6407c646e4e9f0499491eb7
Content-Type: text/plain; charset=ISO-8859-1

Yes. I understand your position. However, as I stated, I disagree.

I'd possibly be willing to live with a relatively long mask (e.g., 160 bits)
generated from
a shortish (4-8 byte) key. I oppose anything shorter.

-Ekr


On Fri, Jan 7, 2011 at 2:23 PM, Willy Tarreau <w@1wt.eu> wrote:

> On Fri, Jan 07, 2011 at 01:19:13PM -0800, Eric Rescorla wrote:
> > My objective is to make the bits that appear on the wire
> indistinguishable
> > from random
> > from the attacker's perspective. I think it's clear that this is the
> > strongest form of masking
> > available, and the method I proposed does that. A sliding mask does not
> > produce this
> > result because it means that an attacker can have any relationship he
> wants
> > between
> > bits which appear at the same offset in the mask. As I've now said a
> number
> > of times,
> > I am unaware of an attack which exploits this property, but that does not
> > mean there
> > isn't one, and so I prefer to have a stronger mechanism.
> >
> > It's important to recognize that this is a distinct question from the
> > *entropy* of the
> > mask. For instance. if you start with a 32-bit random seed and use that
> to
> > generate
> > an arbitrarily long mask, this provides more resistance to the above
> > property than
> > just using the key directly as a repeating mask. Which is precisely the
> > point of using
> > an expansion function for the mask (whether HMAC-SHA1, or AES-CTR).
>
> Thank you for this explanation. Now I understand better what you're trying
> to achieve. Yes I agree that the repeating mask is a lot weaker than a
> sliding mask, because in order to send a predefined message, the server
> would just have to establish the relation between the multiple bytes and
> send it as many times as the key space permits. But still that *a lot*.
> Sending the 6-bytes "GET /\n" 2^32 times each time encoded with one
> different key is still 24 GB long.
>
> My position is clear on this point, we're not trying to build something
> *that* secure, we're trying to avoid a lazy intermediary from finding a
> method using strstr("GET ") in a stream it has in its request buffer.
> If an attacker is able to make a browser send 24 GB of data to an
> arbitrary location without anyone noticing, surely there are much more
> fun to do than just trying to corrupt one entry in a cache.
>
> Now maybe we can also build a sliding mask with something very simple
> without involving expensive computations at all, but given the goals
> of the suggested masking, I really think that it will bring nothing
> at all in this precise context.
>
> Obviously, would someone propose to encrypt my password using such
> a masking method, I would categorically refuse and would approve
> your proposal without hesitation. But we're not trying to do that
> right now.
>
> Regards,
> Willy
>
>

--0016e6407c646e4e9f0499491eb7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Yes. I understand your position. However, as I stated, I disagree.<div><br>=
</div><div>I&#39;d possibly be willing to live with a relatively long mask =
(e.g., 160 bits) generated from</div><div>a shortish (4-8 byte) key. I oppo=
se anything shorter.<br>
<div><br></div><div>-Ekr</div><div><br><br><div class=3D"gmail_quote">On Fr=
i, Jan 7, 2011 at 2:23 PM, Willy Tarreau <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wrote:<br><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex;">
<div class=3D"im">On Fri, Jan 07, 2011 at 01:19:13PM -0800, Eric Rescorla w=
rote:<br>
&gt; My objective is to make the bits that appear on the wire indistinguish=
able<br>
&gt; from random<br>
&gt; from the attacker&#39;s perspective. I think it&#39;s clear that this =
is the<br>
&gt; strongest form of masking<br>
&gt; available, and the method I proposed does that. A sliding mask does no=
t<br>
&gt; produce this<br>
&gt; result because it means that an attacker can have any relationship he =
wants<br>
&gt; between<br>
&gt; bits which appear at the same offset in the mask. As I&#39;ve now said=
 a number<br>
&gt; of times,<br>
&gt; I am unaware of an attack which exploits this property, but that does =
not<br>
&gt; mean there<br>
&gt; isn&#39;t one, and so I prefer to have a stronger mechanism.<br>
&gt;<br>
&gt; It&#39;s important to recognize that this is a distinct question from =
the<br>
&gt; *entropy* of the<br>
&gt; mask. For instance. if you start with a 32-bit random seed and use tha=
t to<br>
&gt; generate<br>
&gt; an arbitrarily long mask, this provides more resistance to the above<b=
r>
&gt; property than<br>
&gt; just using the key directly as a repeating mask. Which is precisely th=
e<br>
&gt; point of using<br>
&gt; an expansion function for the mask (whether HMAC-SHA1, or AES-CTR).<br=
>
<br>
</div>Thank you for this explanation. Now I understand better what you&#39;=
re trying<br>
to achieve. Yes I agree that the repeating mask is a lot weaker than a<br>
sliding mask, because in order to send a predefined message, the server<br>
would just have to establish the relation between the multiple bytes and<br=
>
send it as many times as the key space permits. But still that *a lot*.<br>
Sending the 6-bytes &quot;GET /\n&quot; 2^32 times each time encoded with o=
ne<br>
different key is still 24 GB long.<br>
<br>
My position is clear on this point, we&#39;re not trying to build something=
<br>
*that* secure, we&#39;re trying to avoid a lazy intermediary from finding a=
<br>
method using strstr(&quot;GET &quot;) in a stream it has in its request buf=
fer.<br>
If an attacker is able to make a browser send 24 GB of data to an<br>
arbitrary location without anyone noticing, surely there are much more<br>
fun to do than just trying to corrupt one entry in a cache.<br>
<br>
Now maybe we can also build a sliding mask with something very simple<br>
without involving expensive computations at all, but given the goals<br>
of the suggested masking, I really think that it will bring nothing<br>
at all in this precise context.<br>
<br>
Obviously, would someone propose to encrypt my password using such<br>
a masking method, I would categorically refuse and would approve<br>
your proposal without hesitation. But we&#39;re not trying to do that<br>
right now.<br>
<br>
Regards,<br>
<font color=3D"#888888">Willy<br>
<br>
</font></blockquote></div><br></div></div>

--0016e6407c646e4e9f0499491eb7--

From mjs@apple.com  Fri Jan  7 14:25:12 2011
Return-Path: <mjs@apple.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 9FB7328C12E for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:25:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.498
X-Spam-Level: 
X-Spam-Status: No, score=-106.498 tagged_above=-999 required=5 tests=[AWL=0.099, BAYES_00=-2.599, 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 GCigXhwLEKoN for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:25:11 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id C1A4428C132 for <hybi@ietf.org>; Fri,  7 Jan 2011 14:25:05 -0800 (PST)
Received: from relay13.apple.com (relay13.apple.com [17.128.113.29]) by mail-out3.apple.com (Postfix) with ESMTP id 8B850C579197 for <hybi@ietf.org>; Fri,  7 Jan 2011 14:27:08 -0800 (PST)
X-AuditID: 1180711d-b7c30ae0000055b4-ae-4d27933c586f
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay13.apple.com (Apple SCV relay) with SMTP id 83.88.21940.C33972D4; Fri,  7 Jan 2011 14:27:08 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_8m99PKB0OIQZWDx21q/ZvQ)"
Received: from [17.153.62.4] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEO000W7BP71H10@elliott.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 14:27:08 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D27792E.2070902@ericsson.com>
Date: Fri, 07 Jan 2011 14:27:07 -0800
Message-id: <234FEC6C-8B5C-449F-92A7-CFAFCDBD5283@apple.com>
References: <AANLkTinZyTfmR57viAVC6B7NhikjHbZYiJON47FB5s2L@mail.gmail.com> <AANLkTikJc=OMR_L+ZwbY--WxmNx6yQcq1g5akoSEqRu_@mail.gmail.com> <AANLkTikkQH3Kd6XBGXQbwdTsoFePf1_ec6ftkYmRHoV=@mail.gmail.com> <AANLkTimO8YLQ4yvwj3d79LQMy-42AmZ-KcQ0-mX54Aw1@mail.gmail.com> <AANLkTim8-k0u5t_WOq7rXQQnNqerrrXZWcKYYx7-V=F6@mail.gmail.com> <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <AANLkTi=vPxEzkukZfXzKrCDWyX=yz3-7GARS373YbXHf@mail.gmail.com> <7EFACA83-7D9C-43AF-93D8-EE47642320C3@apple.com> <AANLkTikReCUBnHFazA-fuxD+mnaAoZQweFLR9=P-zdwi@mail.gmail.com> <B26AC0E9-567D-497D-B14F-335E603814E6@apple.com> <AANLkTi=-TSbeMPeY3H3aB_W8Mki0QJ86cu9Nc-LGu25Q@mail.gmail.com> <FA15A21D-E0BB-4920-9164-CE82373D15EA@apple.com> <4D27792E.2070902@ericsson.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 22:25:13 -0000

--Boundary_(ID_8m99PKB0OIQZWDx21q/ZvQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 7, 2011, at 12:35 PM, Salvatore Loreto wrote:

> On 1/7/11 7:47 PM, Maciej Stachowiak wrote:
>> 
>> On Jan 7, 2011, at 10:29 AM, John Tamplin wrote:
>> 
>>> On Fri, Jan 7, 2011 at 1:05 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>>>> Security features should not be optional, they should be mandatory. Using extensions,
>>>> a mechanism designed for optional features, and then layering requirements on top of
>>>> that to make masking still be required in the normal case, is needlessly fragile and
>>>> needlessly complex. I don't agree with adding that fragility without a corresponding benefit.
> a possible benefit from the John proposal is that one has *the freedom* to use the type of masking he want,
> the one he think is the better or the stronger... if hmac-sha1 is not enough strong for him.
> 
> 1) Define a new extension "clientmask" in the base spec, which
>    specifies that client->server masking is present.  An optional
>    parameter "type" specifies the type of masking, and if not
>    present defaults to "hmac-sha1".

Since we're not going to define any other type of masking at this time, it's not a benefit yet. If we define new masking algorithms in the future, we can allow masking selection without making masking an extension. So even then it's not a real benefit.

Regards,
Maciej




--Boundary_(ID_8m99PKB0OIQZWDx21q/ZvQ)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 7, 2011, at 12:35 PM, Salvatore Loreto wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div bgcolor="#ffffff" text="#000000">
    On 1/7/11 7:47 PM, Maciej Stachowiak wrote:
    <blockquote cite="mid:FA15A21D-E0BB-4920-9164-CE82373D15EA@apple.com" type="cite">
      <pre wrap="">On Jan 7, 2011, at 10:29 AM, John Tamplin wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">On Fri, Jan 7, 2011 at 1:05 PM, Maciej Stachowiak <a class="moz-txt-link-rfc2396E" href="mailto:mjs@apple.com">&lt;mjs@apple.com&gt;</a> wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Security features should not be optional, they should be mandatory. Using extensions,
a mechanism designed for optional features, and then layering requirements on top of
that to make masking still be required in the normal case, is needlessly fragile and
needlessly complex. I don't agree with adding that fragility without a corresponding benefit.
</pre>
        </blockquote>
      </blockquote>
    </blockquote>
    a possible benefit from the John proposal is that one has *the
    freedom* to use the type of masking he want,<br>
    the one he think is the better or the stronger... if hmac-sha1 is
    not enough strong for him.<br>
    <br>
    <blockquote>
      <pre wrap="">1) Define a new extension "clientmask" in the base spec, which
   specifies that client-&gt;server masking is present.  An optional
   parameter "type" specifies the type of masking, and if not
   present defaults to "hmac-sha1".
</pre>
    </blockquote>
    </div></blockquote></div><br><div>Since we're not going to define any other type of masking at this time, it's not a benefit yet. If we define new masking algorithms in the future, we can allow masking selection without making masking an extension. So even then it's not a real benefit.</div><div><br></div><div>Regards,</div><div>Maciej</div><div><br></div><div><br></div><div><br></div></body></html>

--Boundary_(ID_8m99PKB0OIQZWDx21q/ZvQ)--

From mjs@apple.com  Fri Jan  7 14:27:28 2011
Return-Path: <mjs@apple.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 425B828C12A for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:27:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.513
X-Spam-Level: 
X-Spam-Status: No, score=-106.513 tagged_above=-999 required=5 tests=[AWL=0.085, BAYES_00=-2.599, 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 60yfYiY1umuC for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:27:26 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 671AB28C12F for <hybi@ietf.org>; Fri,  7 Jan 2011 14:27:26 -0800 (PST)
Received: from relay13.apple.com (relay13.apple.com [17.128.113.29]) by mail-out4.apple.com (Postfix) with ESMTP id 60DB6CA100AE for <hybi@ietf.org>; Fri,  7 Jan 2011 14:29:32 -0800 (PST)
X-AuditID: 1180711d-b7c30ae0000055b4-86-4d2793cc1148
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay13.apple.com (Apple SCV relay) with SMTP id 82.19.21940.CC3972D4; Fri,  7 Jan 2011 14:29:32 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_pLnQCOgJ40s5++RoiSWrWw)"
Received: from [17.153.62.4] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEO006PEBT78T40@gertie.apple.com> for hybi@ietf.org; Fri, 07 Jan 2011 14:29:32 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110107204454.GD32612@1wt.eu>
Date: Fri, 07 Jan 2011 14:29:30 -0800
Message-id: <07C0DD4A-3654-4A2A-8451-DA3EDE88A98B@apple.com>
References: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <4D17B5FF.5060209@callenish.com> <AANLkTik-m1VKAoaNEU-_P6in28+_CSk+rOHbidtjHa76@mail.gmail.com> <AANLkTi=cNXGsaeqwH_LUDXf_soAHcEfKD+Xd4nXaY+mN@mail.gmail.com> <41249E48-B17E-47C7-9340-6F95B85182CD@apple.com> <20110107055244.GH28367@1wt.eu> <D4CDEBAB-4A1C-4716-A630-FBC1BD8FE297@apple.com> <20110107204454.GD32612@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 22:27:28 -0000

--Boundary_(ID_pLnQCOgJ40s5++RoiSWrWw)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 7, 2011, at 12:44 PM, Willy Tarreau wrote:

> On Fri, Jan 07, 2011 at 06:20:09AM -0800, Maciej Stachowiak wrote:
>>> 
>>> 
>> Willy, I think we're talking past each other. The threat model I'm talking about involves using HTTP APIs to connect to WebSocket servers. HTTP APIs in the browser will effectively let you send any bytes you want as the payload. You seem to be talking about the opposite threat model, where WebSocket APIs in the browser, to attack HTTP.
> 
> Yes, I am. That's why we're discussing about having masking on by default
> on the WS client, so that it cannot decide what the bytes will look like
> on the wire.
> 
> The HTTP API vs WS server was addressed a while ago with the Sec-* headers
> that the HTTP API was supposed not to be able to send.

For reasons I've explained a couple of times now, I think masking is a considerably stronger defense against this threat model than Sec-*, so long as entropy from the server is included in the mask. Short version: checking for named headers can easily be subject to bugs where the server is too lenient in its checks (using regexps to parse headers for instance), but masking isn't subject to this risk, because the server *has* to get it right to work correctly in the non-attack case. Since we're adding masking anyway, I'd like it to address this threat too even if we also have a weaker defense for it.

Regards,
Maciej


--Boundary_(ID_pLnQCOgJ40s5++RoiSWrWw)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: quoted-printable

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><br><div><div>On Jan 7, 2011, at 12:44 PM, Willy Tarreau =
wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div>On Fri, Jan 07, 2011 at 06:20:09AM -0800, Maciej =
Stachowiak wrote:<br><blockquote type=3D"cite"><blockquote =
type=3D"cite"><font class=3D"Apple-style-span" =
color=3D"#006312"><br><br></font></blockquote></blockquote><blockquote =
type=3D"cite">Willy, I think we're talking past each other. The threat =
model I'm talking about involves using HTTP APIs to connect to WebSocket =
servers. HTTP APIs in the browser will effectively let you send any =
bytes you want as the payload. You seem to be talking about the opposite =
threat model, where WebSocket APIs in the browser, to attack =
HTTP.<br></blockquote><br>Yes, I am. That's why we're discussing about =
having masking on by default<br>on the WS client, so that it cannot =
decide what the bytes will look like<br>on the wire.<br><br>The HTTP API =
vs WS server was addressed a while ago with the Sec-* headers<br>that =
the HTTP API was supposed not to be able to =
send.<br></div></blockquote><div><br></div><div>For reasons I've =
explained a couple of times now, I think masking is a considerably =
stronger defense against this threat model than Sec-*, so long as =
entropy from the server is included in the mask. Short version: checking =
for named headers can easily be subject to bugs where the server is too =
lenient in its checks (using regexps to parse headers for instance), but =
masking isn't subject to this risk, because the server *has* to get it =
right to work correctly in the non-attack case. Since we're adding =
masking anyway, I'd like it to address this threat too even if we also =
have a weaker defense for =
it.</div></div><br><div>Regards,</div><div>Maciej</div><div><br></div></bo=
dy></html>=

--Boundary_(ID_pLnQCOgJ40s5++RoiSWrWw)--

From ekr@rtfm.com  Fri Jan  7 14:40:47 2011
Return-Path: <ekr@rtfm.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 CFA2328C13B for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:40:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.615
X-Spam-Level: 
X-Spam-Status: No, score=-102.615 tagged_above=-999 required=5 tests=[AWL=0.361, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 RSq1Knd0V5tZ for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 14:40:46 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id ADDC628C172 for <hybi@ietf.org>; Fri,  7 Jan 2011 14:40:42 -0800 (PST)
Received: by gyd12 with SMTP id 12so7575265gyd.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 14:42:49 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.232.6 with SMTP id e6mr28777061agh.52.1294440169045; Fri, 07 Jan 2011 14:42:49 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Fri, 7 Jan 2011 14:42:48 -0800 (PST)
In-Reply-To: <07C0DD4A-3654-4A2A-8451-DA3EDE88A98B@apple.com>
References: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <4D17B5FF.5060209@callenish.com> <AANLkTik-m1VKAoaNEU-_P6in28+_CSk+rOHbidtjHa76@mail.gmail.com> <AANLkTi=cNXGsaeqwH_LUDXf_soAHcEfKD+Xd4nXaY+mN@mail.gmail.com> <41249E48-B17E-47C7-9340-6F95B85182CD@apple.com> <20110107055244.GH28367@1wt.eu> <D4CDEBAB-4A1C-4716-A630-FBC1BD8FE297@apple.com> <20110107204454.GD32612@1wt.eu> <07C0DD4A-3654-4A2A-8451-DA3EDE88A98B@apple.com>
Date: Fri, 7 Jan 2011 14:42:48 -0800
Message-ID: <AANLkTi=Z37WFS5HgZx+aAEH3DTRYs5MNt6WZmoyAoJVM@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: multipart/alternative; boundary=001636284f607580e3049949565f
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 22:40:47 -0000

--001636284f607580e3049949565f
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Jan 7, 2011 at 2:29 PM, Maciej Stachowiak <mjs@apple.com> wrote:

>
> On Jan 7, 2011, at 12:44 PM, Willy Tarreau wrote:
>
> On Fri, Jan 07, 2011 at 06:20:09AM -0800, Maciej Stachowiak wrote:
>
>
>
> Willy, I think we're talking past each other. The threat model I'm talking
> about involves using HTTP APIs to connect to WebSocket servers. HTTP APIs in
> the browser will effectively let you send any bytes you want as the payload.
> You seem to be talking about the opposite threat model, where WebSocket APIs
> in the browser, to attack HTTP.
>
>
> Yes, I am. That's why we're discussing about having masking on by default
> on the WS client, so that it cannot decide what the bytes will look like
> on the wire.
>
> The HTTP API vs WS server was addressed a while ago with the Sec-* headers
> that the HTTP API was supposed not to be able to send.
>
>
> For reasons I've explained a couple of times now, I think masking is a
> considerably stronger defense against this threat model than Sec-*, so long
> as entropy from the server is included in the mask. Short version: checking
> for named headers can easily be subject to bugs where the server is too
> lenient in its checks (using regexps to parse headers for instance), but
> masking isn't subject to this risk, because the server *has* to get it right
> to work correctly in the non-attack case. Since we're adding masking anyway,
> I'd like it to address this threat too even if we also have a weaker defense
> for it.
>
>
I agree that this is a good plan.

-Ekr


> Regards,
> Maciej
>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>

--001636284f607580e3049949565f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Fri, Jan 7, 2011 at 2:29 PM, Maciej S=
tachowiak <span dir=3D"ltr">&lt;<a href=3D"mailto:mjs@apple.com">mjs@apple.=
com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style=3D"word-wrap:break-word"><br><div><div class=3D"im"><div>On Jan =
7, 2011, at 12:44 PM, Willy Tarreau wrote:</div><br></div><blockquote type=
=3D"cite"><div><div class=3D"im">On Fri, Jan 07, 2011 at 06:20:09AM -0800, =
Maciej Stachowiak wrote:<br>
<blockquote type=3D"cite"><blockquote type=3D"cite"><font color=3D"#006312"=
><br><br></font></blockquote></blockquote></div><div class=3D"im"><blockquo=
te type=3D"cite">Willy, I think we&#39;re talking past each other. The thre=
at model I&#39;m talking about involves using HTTP APIs to connect to WebSo=
cket servers. HTTP APIs in the browser will effectively let you send any by=
tes you want as the payload. You seem to be talking about the opposite thre=
at model, where WebSocket APIs in the browser, to attack HTTP.<br>
</blockquote><br>Yes, I am. That&#39;s why we&#39;re discussing about havin=
g masking on by default<br>on the WS client, so that it cannot decide what =
the bytes will look like<br>on the wire.<br><br>The HTTP API vs WS server w=
as addressed a while ago with the Sec-* headers<br>
that the HTTP API was supposed not to be able to send.<br></div></div></blo=
ckquote><div><br></div><div>For reasons I&#39;ve explained a couple of time=
s now, I think masking is a considerably stronger defense against this thre=
at model than Sec-*, so long as entropy from the server is included in the =
mask. Short version: checking for named headers can easily be subject to bu=
gs where the server is too lenient in its checks (using regexps to parse he=
aders for instance), but masking isn&#39;t subject to this risk, because th=
e server *has* to get it right to work correctly in the non-attack case. Si=
nce we&#39;re adding masking anyway, I&#39;d like it to address this threat=
 too even if we also have a weaker defense for it.</div>
</div><br></div></blockquote><div><br></div><div>I agree that this is a goo=
d plan.</div><div><br></div><div>-Ekr</div><div>=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex;">
<div style=3D"word-wrap:break-word"><div>Regards,</div><div>Maciej</div><fo=
nt color=3D"#888888"><div><br></div></font></div><br>______________________=
_________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
<br></blockquote></div><br>

--001636284f607580e3049949565f--

From jat@google.com  Fri Jan  7 15:21:53 2011
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 0BC1428B797 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 15:21:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.855
X-Spam-Level: 
X-Spam-Status: No, score=-103.855 tagged_above=-999 required=5 tests=[AWL=-0.878, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 ITe8Ti8X2Fe7 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 15:21:52 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 24C4C28C129 for <hybi@ietf.org>; Fri,  7 Jan 2011 15:20:58 -0800 (PST)
Received: from wpaz24.hot.corp.google.com (wpaz24.hot.corp.google.com [172.24.198.88]) by smtp-out.google.com with ESMTP id p07NN44J028586 for <hybi@ietf.org>; Fri, 7 Jan 2011 15:23:04 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294442584; bh=0h4h4dvMBjNfJAMfj2fHrSMPPHk=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=kM4tlOtjXAEtUBQ9omBVsTrsxfaQUQTRxahWM3IiVJYAWf/youdubUv3ccOHKkEeS sEPnXdq1H3pna2f86fAfQ==
Received: from gyf2 (gyf2.prod.google.com [10.243.50.66]) by wpaz24.hot.corp.google.com with ESMTP id p07NN3Kw020596 for <hybi@ietf.org>; Fri, 7 Jan 2011 15:23:03 -0800
Received: by gyf2 with SMTP id 2so7243651gyf.29 for <hybi@ietf.org>; Fri, 07 Jan 2011 15:23:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=1Ym8X7xqyFn0miLLsnZqKfT4WoBRTbzBQedstu68k4E=; b=IKLhLL55Vkjdho5eW1UWVQ3u/RXsLIy1wMwGCun429g4QM3z6EKRhPmeU1N/B5fwAt JbjpinL60Ew4ORwHIsWg==
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=VjHFN0XIsqjPMsvUa2D1K/mA3I6YBQjw/y1NN5RUbj2a7J2b0lXjzeIoPf0fc8C1W4 syf8nSDvXY2n7kHb8z4A==
Received: by 10.151.158.12 with SMTP id k12mr25512025ybo.377.1294442582920; Fri, 07 Jan 2011 15:23:02 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Fri, 7 Jan 2011 15:22:42 -0800 (PST)
In-Reply-To: <07C0DD4A-3654-4A2A-8451-DA3EDE88A98B@apple.com>
References: <CA566BAEAD6B3F4E8B5C5C4F61710C110FCD75E2@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <AANLkTin5pfq3TGbaNvW4W4+aXhqj98EeLVdKKrf_2ope@mail.gmail.com> <AANLkTin31bLgLrVE4Hv7QWyGrWZynWFMbBezBo7+GLoc@mail.gmail.com> <AANLkTi==TDjCUs+odsBE27uOB+dWH1MKoRejiSwxj5TG@mail.gmail.com> <4D17B5FF.5060209@callenish.com> <AANLkTik-m1VKAoaNEU-_P6in28+_CSk+rOHbidtjHa76@mail.gmail.com> <AANLkTi=cNXGsaeqwH_LUDXf_soAHcEfKD+Xd4nXaY+mN@mail.gmail.com> <41249E48-B17E-47C7-9340-6F95B85182CD@apple.com> <20110107055244.GH28367@1wt.eu> <D4CDEBAB-4A1C-4716-A630-FBC1BD8FE297@apple.com> <20110107204454.GD32612@1wt.eu> <07C0DD4A-3654-4A2A-8451-DA3EDE88A98B@apple.com>
From: John Tamplin <jat@google.com>
Date: Fri, 7 Jan 2011 18:22:42 -0500
Message-ID: <AANLkTimXGiveW-8XCKmasCucaLvZ01xZgeb6uek9JBaf@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] proposed masking
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: Fri, 07 Jan 2011 23:21:53 -0000

On Fri, Jan 7, 2011 at 5:29 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> For reasons I've explained a couple of times now, I think masking is a
> considerably stronger defense against this threat model than Sec-*, so long
> as entropy from the server is included in the mask. Short version: checking
> for named headers can easily be subject to bugs where the server is too
> lenient in its checks (using regexps to parse headers for instance), but
> masking isn't subject to this risk, because the server *has* to get it right
> to work correctly in the non-attack case. Since we're adding masking anyway,
> I'd like it to address this threat too even if we also have a weaker defense
> for it.

Plus, AFAIK, there are various ways to send arbitrary headers, such as
with Flash.

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

From w@1wt.eu  Fri Jan  7 16:13:56 2011
Return-Path: <w@1wt.eu>
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 8A5A128C0DB for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 16:13:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.807
X-Spam-Level: 
X-Spam-Status: No, score=-0.807 tagged_above=-999 required=5 tests=[AWL=-1.364, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, J_CHICKENPOX_43=0.6, SARE_RAND_1=2]
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 cUgB4kifcBLC for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 16:13:52 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 04AA328B56A for <hybi@ietf.org>; Fri,  7 Jan 2011 16:13:48 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p080FnXN003042; Sat, 8 Jan 2011 01:15:49 +0100
Date: Sat, 8 Jan 2011 01:15:49 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110108001549.GD2479@1wt.eu>
References: <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 00:13:56 -0000

On Fri, Jan 07, 2011 at 02:27:08PM -0800, Eric Rescorla wrote:
> Yes. I understand your position. However, as I stated, I disagree.

I'm seeing that you disagree though I really don't get why considering
the balance of risks vs costs in some situations :-/

> I'd possibly be willing to live with a relatively long mask (e.g., 160 bits)
> generated from a shortish (4-8 byte) key. I oppose anything shorter.

OK. My concerns are to avoid per-message setup costs as well as reducing
internal states. Would it be OK for you if we used either a rotating 256
bit mask derived from the rotation of a 32 bit one, or even an infinite
length one constructed by iterating over a combination of the rotating
mask and the output data ? Such constructs are simple, fast and don't
permit the attacker to establish relations between message parts when
he doesn't know the key.

For instance, below is what we find when sending 100 times "GET /\n" with
the first method (it does obviously repeat itself) :

 76 26 92 ac 37 3b 24 83 d8 39 1d 6f 8d d1 7d 72
 8a 41 d1 68 0e 95 45 df ec 13 f8 79 9c 6c 8b dd
 65 43 e9 86 5f 74 37 e6 a3 13 75 20 9e b4 06 58
 e2 0e c2 0d 75 bf 2d 90 ff 76 83 53 f4 23 98 b8
 1e 69 81 c9 4c 11 4c cc cb 5c 66 45 e5 9e 6e 17
 f1 6b b9 27 1d f0 3e f5 84 5c eb 1c e7 46 e3 92

 76 26 92 ac 37 3b 24 83 d8 39 1d 6f 8d d1 7d 72
 8a 41 d1 68 0e 95 45 df ec 13 f8 79 9c 6c 8b dd
 65 43 e9 86 5f 74 37 e6 a3 13 75 20 9e b4 06 58
 e2 0e c2 0d 75 bf 2d 90 ff 76 83 53 f4 23 98 b8
 ...

And the second one does not even repeat at all :
 85 4c 0a e6 5c 48 8a 61 fd 6f 21 34 f7 1d 99 14
 53 41 90 7b ac bc da ce 10 fb 23 32 79 2c 3e 75
 82 0e 44 10 02 c9 b6 5a 61 f4 b6 dd 5a 57 6a ff
 ae c4 92 3f 52 47 a6 2c ab 89 f4 a1 b0 da 4c 5c
 7a 2f 3d 77 8f 65 df ca 0c e6 78 f0 bf ea ec 07
 d8 d1 9c 09 48 22 a4 a4 82 d7 d6 bc fb 79 03 56
 49 23 bb ba c0 94 96 7d ba b6 cc 98 fb 36 49 a4
 83 d1 cf 9a 0d 9f 31 67 05 cc 8b 6a d1 c4 27 a2
 25 28 17 82 d5 bc fb 7a 01 57 55 3c 7a f7 8a de
 c0 8a 7c ec aa bf 6e 84 52 7f 12 87 e6 6d ea 46
 3c 68 6a 81 5e 53 15 83 d1 b8 e6 6b 2d 3b da 50
 2e 02 68 fd ac c7 98 10 5e 4a 8c 66 f8 70 3e 6b
 6a 81 5e 52 18 8c de 55 21 2c 6b fe a0 2a 5c 4c
 0b 5e 40 0b fc 6c 2a 3e e0 6a 9c 0c 4a 1f 0e e5
 71 9c 3b 6e 70 9b 0c 9c 3a 6e 70 9b 0c 9c 3a 6e
 70 9b 0c 9c 3b 6e 71 9b 03 92 d9 cf 1d 97 6f c6
 bd eb e9 03 db da e1 77 35 5f c7 ce 85 d3 c1 8b
 73 e2 49 1c 0f e5 71 9c 3a 6e 70 9b 0c 9c 3a 6e
 70 9a 0d 9f 31 67 05 cc 8a 67 da cf 1e 94 62 ef
 a2 b6 68 82 44 45 20 34 f6 1c 9a 17 aa be 60 ea
 1c 8c ca 9f 8e 64 f2 1f b1 e7 86 4c 0a e6 5c 48
 8a 61 fe 72 38 6c 7f b5 c1 cc 8b de c1 88 77 9d
 ...

With a constant input stream, the difference is more obvious,
let's feed it 256 'A', we see the repeating pattern every
256 bit for the first method, and none for the second one.
In fact, with a 8-bit rotating key, the second makes the
pattern loop every 256 bytes on this text, and every 64k
for a 16-bit key, but here in the examples I used a 32-bit
key :

method 1 :
 fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
 fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
 fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
 fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
 fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
 fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
 fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
 fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c

method 2 :
 cb 9e 1c 96 05 cc a7 35 5f da 50 33 56 c4 8e 6d
 87 55 3c 76 a5 2f 4a 21 a3 26 b5 df 5a d0 b3 d6
 44 0e ed 04 ce ac c7 92 78 ab 3e 7c b6 e5 6f 8a
 60 e3 69 fb 2e 4c 27 b5 dc 57 c5 8c 66 f5 1f 9a
 11 f3 16 84 4e 2c 47 15 fc 36 65 ef 0a e0 63 e9
 7b ae cc a7 32 58 cb a1 20 a2 29 bb ee 0d e7 72
 98 0b e1 63 e6 74 9f 1d 94 7e bc f7 22 a8 3a 71
 90 72 99 0b e1 60 e2 69 fb 2e 4c 27 b5 dc 56 c5
 8f 6a 80 42 09 db 4e 2c 46 15 ff 3a 70 93 79 a8
 3a 71 93 76 a4 2e 4d 27 b2 d9 4b 1e 9d 17 82 49
 1b 8e 6c 87 55 3f 7a b0 d3 b9 eb 7e bc f7 25 ac
 c6 94 7f ba f0 13 f9 28 bb f1 10 f2 19 88 5a d0
 b2 d9 4b 1e 9c 16 85 4f 2d 44 0f ed 07 d2 b8 eb
 01 c3 86 54 3f 7d b4 de 5d d7 42 09 db 4e 2c 47
 12 f8 2b 41 00 c2 89 5b ce ac c7 92 79 ab c1 83
 46 14 ff 3a 70 93 76 a4 2f 4d 24 ae cd a7 32 59

Both functions are extremely simple, have no setup cost
and require very little internal state (4 bytes) :

mask_string_v1(char *string, unsigned int mask)
{
	while (*string) {
		*string++ ^= mask;
		mask = (mask << 1) | (mask >> 31);
	}
}

mask_string_v2(char *string, unsigned int mask)
{
	while (*string) {
		*string ^= mask;
		mask = (mask << 1) + (mask >> 31) + (unsigned char)*string++;
	}
}

Granted they're not cryptographically strong for anything, but at
least they're offering a masking that does not let the text's author
guess how bytes will be mangled. Especially the second one is
interesting because the mangling changes for every byte.

The real advantage I see is that we only need to hold the 32-bit
mask, and there is no setup cost at all. Would you object against
something like this for this specific usage ?

Willy

/*
  Complete example to encode/decode below, just performs one read() for
  simplicity, so will likely require a single write() or reading from a
  file.

  Outputs generated using :
  $ for ((i=0; i<100; i++)); do echo "GET /"; done > 100get.txt
  $ < 100get.txt ./xormask $RANDOM | od -An -tx1
*/

#include <stdio.h>
#include <string.h>

void mask_string(char *string, unsigned int mask, int len)
{
	while (len--) {
		*string ^= mask;
		mask = (mask << 1) + (mask >> 31) + (unsigned char)*string++;
	}
}

void unmask_string(char *string, unsigned int mask, int len)
{
	unsigned char c;

	while (len--) {
		c = *string;
		*string++ ^= mask;
		mask = (mask << 1) + (mask >> 31) + c;
	}
}

int main(int argc, char **argv)
{
	char buf[1024];
	int len;

	len = read(0, buf, sizeof(buf) - 1);
	buf[sizeof(buf)-1] = 0;
	mask_string(buf, strtoul(argv[1], NULL, 0), len);
	unmask_string(buf, strtoul(argv[1], NULL, 0), len);
	write(1, buf, len);
	return 0;
}

Regards,
Willy


From ekr@rtfm.com  Fri Jan  7 17:31:10 2011
Return-Path: <ekr@rtfm.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 6EA2D3A693E for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 17:31:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -99.603
X-Spam-Level: 
X-Spam-Status: No, score=-99.603 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, J_CHICKENPOX_43=0.6, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_LOW=-1, SARE_RAND_1=2, 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 TG-fjDZ29y7Q for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 17:31:08 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by core3.amsl.com (Postfix) with ESMTP id 6D9883A6832 for <hybi@ietf.org>; Fri,  7 Jan 2011 17:31:08 -0800 (PST)
Received: by iwn40 with SMTP id 40so18826092iwn.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 17:33:15 -0800 (PST)
Received: by 10.42.179.66 with SMTP id bp2mr1555876icb.81.1294450395223; Fri, 07 Jan 2011 17:33:15 -0800 (PST)
Received: from [10.76.74.154] ([166.205.138.113]) by mx.google.com with ESMTPS id he5sm1123954icb.10.2011.01.07.17.33.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 17:33:14 -0800 (PST)
References: <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu>
In-Reply-To: <20110108001549.GD2479@1wt.eu>
Mime-Version: 1.0 (iPhone Mail 8C148a)
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=us-ascii
Message-Id: <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com>
X-Mailer: iPhone Mail (8C148a)
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 7 Jan 2011 17:32:53 -0800
To: Willy Tarreau <w@1wt.eu>
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 01:31:10 -0000

On Jan 7, 2011, at 16:15, Willy Tarreau <w@1wt.eu> wrote:

> On Fri, Jan 07, 2011 at 02:27:08PM -0800, Eric Rescorla wrote:
>> Yes. I understand your position. However, as I stated, I disagree.
>=20
> I'm seeing that you disagree though I really don't get why considering
> the balance of risks vs costs in some situations :-/
>=20

I guess we will have to agree to disagree.


>> I'd possibly be willing to live with a relatively long mask (e.g., 160 bi=
ts)
>> generated from a shortish (4-8 byte) key. I oppose anything shorter.
>=20
> OK. My concerns are to avoid per-message setup costs as well as reducing
> internal states. Would it be OK for you if we used either a rotating 256
> bit mask derived from the rotation of a 32 bit one, or even an infinite
> length one constructed by iterating over a combination of the rotating
> mask and the output data ? Such constructs are simple, fast and don't
> permit the attacker to establish relations between message parts when
> he doesn't know the key.
>=20

No.=20

Ekr
> For instance, below is what we find when sending 100 times "GET /\n" with
> the first method (it does obviously repeat itself) :
>=20
> 76 26 92 ac 37 3b 24 83 d8 39 1d 6f 8d d1 7d 72
> 8a 41 d1 68 0e 95 45 df ec 13 f8 79 9c 6c 8b dd
> 65 43 e9 86 5f 74 37 e6 a3 13 75 20 9e b4 06 58
> e2 0e c2 0d 75 bf 2d 90 ff 76 83 53 f4 23 98 b8
> 1e 69 81 c9 4c 11 4c cc cb 5c 66 45 e5 9e 6e 17
> f1 6b b9 27 1d f0 3e f5 84 5c eb 1c e7 46 e3 92
>=20
> 76 26 92 ac 37 3b 24 83 d8 39 1d 6f 8d d1 7d 72
> 8a 41 d1 68 0e 95 45 df ec 13 f8 79 9c 6c 8b dd
> 65 43 e9 86 5f 74 37 e6 a3 13 75 20 9e b4 06 58
> e2 0e c2 0d 75 bf 2d 90 ff 76 83 53 f4 23 98 b8
> ...
>=20
> And the second one does not even repeat at all :
> 85 4c 0a e6 5c 48 8a 61 fd 6f 21 34 f7 1d 99 14
> 53 41 90 7b ac bc da ce 10 fb 23 32 79 2c 3e 75
> 82 0e 44 10 02 c9 b6 5a 61 f4 b6 dd 5a 57 6a ff
> ae c4 92 3f 52 47 a6 2c ab 89 f4 a1 b0 da 4c 5c
> 7a 2f 3d 77 8f 65 df ca 0c e6 78 f0 bf ea ec 07
> d8 d1 9c 09 48 22 a4 a4 82 d7 d6 bc fb 79 03 56
> 49 23 bb ba c0 94 96 7d ba b6 cc 98 fb 36 49 a4
> 83 d1 cf 9a 0d 9f 31 67 05 cc 8b 6a d1 c4 27 a2
> 25 28 17 82 d5 bc fb 7a 01 57 55 3c 7a f7 8a de
> c0 8a 7c ec aa bf 6e 84 52 7f 12 87 e6 6d ea 46
> 3c 68 6a 81 5e 53 15 83 d1 b8 e6 6b 2d 3b da 50
> 2e 02 68 fd ac c7 98 10 5e 4a 8c 66 f8 70 3e 6b
> 6a 81 5e 52 18 8c de 55 21 2c 6b fe a0 2a 5c 4c
> 0b 5e 40 0b fc 6c 2a 3e e0 6a 9c 0c 4a 1f 0e e5
> 71 9c 3b 6e 70 9b 0c 9c 3a 6e 70 9b 0c 9c 3a 6e
> 70 9b 0c 9c 3b 6e 71 9b 03 92 d9 cf 1d 97 6f c6
> bd eb e9 03 db da e1 77 35 5f c7 ce 85 d3 c1 8b
> 73 e2 49 1c 0f e5 71 9c 3a 6e 70 9b 0c 9c 3a 6e
> 70 9a 0d 9f 31 67 05 cc 8a 67 da cf 1e 94 62 ef
> a2 b6 68 82 44 45 20 34 f6 1c 9a 17 aa be 60 ea
> 1c 8c ca 9f 8e 64 f2 1f b1 e7 86 4c 0a e6 5c 48
> 8a 61 fe 72 38 6c 7f b5 c1 cc 8b de c1 88 77 9d
> ...
>=20
> With a constant input stream, the difference is more obvious,
> let's feed it 256 'A', we see the repeating pattern every
> 256 bit for the first method, and none for the second one.
> In fact, with a 8-bit rotating key, the second makes the
> pattern loop every 256 bytes on this text, and every 64k
> for a 16-bit key, but here in the examples I used a 32-bit
> key :
>=20
> method 1 :
> fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
> 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
> fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
> 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
> fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
> 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
> fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
> 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
> fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
> 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
> fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
> 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
> fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
> 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
> fa 36 af 9d f8 32 a6 8f dc 7b 35 a9 91 e0 02 c6
> 4f 5d 78 33 a5 89 d0 62 07 cc 5b 74 2a 96 ef 1c
>=20
> method 2 :
> cb 9e 1c 96 05 cc a7 35 5f da 50 33 56 c4 8e 6d
> 87 55 3c 76 a5 2f 4a 21 a3 26 b5 df 5a d0 b3 d6
> 44 0e ed 04 ce ac c7 92 78 ab 3e 7c b6 e5 6f 8a
> 60 e3 69 fb 2e 4c 27 b5 dc 57 c5 8c 66 f5 1f 9a
> 11 f3 16 84 4e 2c 47 15 fc 36 65 ef 0a e0 63 e9
> 7b ae cc a7 32 58 cb a1 20 a2 29 bb ee 0d e7 72
> 98 0b e1 63 e6 74 9f 1d 94 7e bc f7 22 a8 3a 71
> 90 72 99 0b e1 60 e2 69 fb 2e 4c 27 b5 dc 56 c5
> 8f 6a 80 42 09 db 4e 2c 46 15 ff 3a 70 93 79 a8
> 3a 71 93 76 a4 2e 4d 27 b2 d9 4b 1e 9d 17 82 49
> 1b 8e 6c 87 55 3f 7a b0 d3 b9 eb 7e bc f7 25 ac
> c6 94 7f ba f0 13 f9 28 bb f1 10 f2 19 88 5a d0
> b2 d9 4b 1e 9c 16 85 4f 2d 44 0f ed 07 d2 b8 eb
> 01 c3 86 54 3f 7d b4 de 5d d7 42 09 db 4e 2c 47
> 12 f8 2b 41 00 c2 89 5b ce ac c7 92 79 ab c1 83
> 46 14 ff 3a 70 93 76 a4 2f 4d 24 ae cd a7 32 59
>=20
> Both functions are extremely simple, have no setup cost
> and require very little internal state (4 bytes) :
>=20
> mask_string_v1(char *string, unsigned int mask)
> {
>    while (*string) {
>        *string++ ^=3D mask;
>        mask =3D (mask << 1) | (mask >> 31);
>    }
> }
>=20
> mask_string_v2(char *string, unsigned int mask)
> {
>    while (*string) {
>        *string ^=3D mask;
>        mask =3D (mask << 1) + (mask >> 31) + (unsigned char)*string++;
>    }
> }
>=20
> Granted they're not cryptographically strong for anything, but at
> least they're offering a masking that does not let the text's author
> guess how bytes will be mangled. Especially the second one is
> interesting because the mangling changes for every byte.
>=20
> The real advantage I see is that we only need to hold the 32-bit
> mask, and there is no setup cost at all. Would you object against
> something like this for this specific usage ?
>=20
> Willy
>=20
> /*
>  Complete example to encode/decode below, just performs one read() for
>  simplicity, so will likely require a single write() or reading from a
>  file.
>=20
>  Outputs generated using :
>  $ for ((i=3D0; i<100; i++)); do echo "GET /"; done > 100get.txt
>  $ < 100get.txt ./xormask $RANDOM | od -An -tx1
> */
>=20
> #include <stdio.h>
> #include <string.h>
>=20
> void mask_string(char *string, unsigned int mask, int len)
> {
>    while (len--) {
>        *string ^=3D mask;
>        mask =3D (mask << 1) + (mask >> 31) + (unsigned char)*string++;
>    }
> }
>=20
> void unmask_string(char *string, unsigned int mask, int len)
> {
>    unsigned char c;
>=20
>    while (len--) {
>        c =3D *string;
>        *string++ ^=3D mask;
>        mask =3D (mask << 1) + (mask >> 31) + c;
>    }
> }
>=20
> int main(int argc, char **argv)
> {
>    char buf[1024];
>    int len;
>=20
>    len =3D read(0, buf, sizeof(buf) - 1);
>    buf[sizeof(buf)-1] =3D 0;
>    mask_string(buf, strtoul(argv[1], NULL, 0), len);
>    unmask_string(buf, strtoul(argv[1], NULL, 0), len);
>    write(1, buf, len);
>    return 0;
> }
>=20
> Regards,
> Willy
>=20

From w@1wt.eu  Fri Jan  7 17:48:01 2011
Return-Path: <w@1wt.eu>
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 473B23A6966 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 17:48:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.094
X-Spam-Level: 
X-Spam-Status: No, score=-2.094 tagged_above=-999 required=5 tests=[AWL=-0.051, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 z3776CrBFOzz for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 17:48:00 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 425DD3A6832 for <hybi@ietf.org>; Fri,  7 Jan 2011 17:47:59 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p081o2NC003255; Sat, 8 Jan 2011 02:50:02 +0100
Date: Sat, 8 Jan 2011 02:50:02 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110108015002.GG2479@1wt.eu>
References: <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 01:48:01 -0000

On Fri, Jan 07, 2011 at 05:32:53PM -0800, Eric Rescorla wrote:
> 
> 
> On Jan 7, 2011, at 16:15, Willy Tarreau <w@1wt.eu> wrote:
> 
> > On Fri, Jan 07, 2011 at 02:27:08PM -0800, Eric Rescorla wrote:
> >> Yes. I understand your position. However, as I stated, I disagree.
> > 
> > I'm seeing that you disagree though I really don't get why considering
> > the balance of risks vs costs in some situations :-/
> > 
> 
> I guess we will have to agree to disagree.

Indeed. I don't see any other possible issue then. I will have tried to
propose some solutions in relation with estimated risks, and you will
have expressed your high expectations. I just have no idea why you
absolutely want to ensure that we could safely saturate a network link
for as long as the age of the universe without risking to see a request
which we will still see anyway, all that to protect against some proxies
that might have a sloppy request parser. Clearly that's beyond my
understanding, I'm just hoping someone else will understand what it
brings.

Willy


From ekr@rtfm.com  Fri Jan  7 18:06:56 2011
Return-Path: <ekr@rtfm.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 812F53A6966 for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 18:06:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.101
X-Spam-Level: 
X-Spam-Status: No, score=-101.101 tagged_above=-999 required=5 tests=[AWL=1.498, BAYES_00=-2.599, 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 5Hp0fB-G6aMv for <hybi@core3.amsl.com>; Fri,  7 Jan 2011 18:06:55 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id AD5953A6945 for <hybi@ietf.org>; Fri,  7 Jan 2011 18:06:55 -0800 (PST)
Received: by yie19 with SMTP id 19so5567263yie.31 for <hybi@ietf.org>; Fri, 07 Jan 2011 18:09:01 -0800 (PST)
Received: by 10.236.108.41 with SMTP id p29mr3145021yhg.54.1294452541838; Fri, 07 Jan 2011 18:09:01 -0800 (PST)
Received: from [10.76.74.154] ([166.205.138.113]) by mx.google.com with ESMTPS id g27sm15705939yhd.13.2011.01.07.18.08.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 Jan 2011 18:09:01 -0800 (PST)
References: <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu>
In-Reply-To: <20110108015002.GG2479@1wt.eu>
Mime-Version: 1.0 (iPhone Mail 8C148a)
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Message-Id: <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com>
X-Mailer: iPhone Mail (8C148a)
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 7 Jan 2011 18:08:53 -0800
To: Willy Tarreau <w@1wt.eu>
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 02:06:56 -0000

You haven't said anything new here do I think we are officially done

Ekr

On Jan 7, 2011, at 17:50, Willy Tarreau <w@1wt.eu> wrote:

> On Fri, Jan 07, 2011 at 05:32:53PM -0800, Eric Rescorla wrote:
>> 
>> 
>> On Jan 7, 2011, at 16:15, Willy Tarreau <w@1wt.eu> wrote:
>> 
>>> On Fri, Jan 07, 2011 at 02:27:08PM -0800, Eric Rescorla wrote:
>>>> Yes. I understand your position. However, as I stated, I disagree.
>>> 
>>> I'm seeing that you disagree though I really don't get why considering
>>> the balance of risks vs costs in some situations :-/
>>> 
>> 
>> I guess we will have to agree to disagree.
> 
> Indeed. I don't see any other possible issue then. I will have tried to
> propose some solutions in relation with estimated risks, and you will
> have expressed your high expectations. I just have no idea why you
> absolutely want to ensure that we could safely saturate a network link
> for as long as the age of the universe without risking to see a request
> which we will still see anyway, all that to protect against some proxies
> that might have a sloppy request parser. Clearly that's beyond my
> understanding, I'm just hoping someone else will understand what it
> brings.
> 
> Willy
> 

From w@1wt.eu  Sat Jan  8 00:10:34 2011
Return-Path: <w@1wt.eu>
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 0C56828C105 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 00:10:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.094
X-Spam-Level: 
X-Spam-Status: No, score=-2.094 tagged_above=-999 required=5 tests=[AWL=-0.051, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 MOtIkvkFgCbx for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 00:10:33 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 1BB9B28C0EB for <hybi@ietf.org>; Sat,  8 Jan 2011 00:10:32 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p088CW1m003988; Sat, 8 Jan 2011 09:12:32 +0100
Date: Sat, 8 Jan 2011 09:12:32 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110108081232.GH2479@1wt.eu>
References: <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 08:10:34 -0000

On Fri, Jan 07, 2011 at 06:08:53PM -0800, Eric Rescorla wrote:
> You haven't said anything new here do I think we are officially done

If you want, we can say that : I officially object to the cost of your
proposal given that it relies on pure guess and not a quantification
of the risk, and it is easily provable that it is overkill for the
simplest requests we have to care about (eg: "GET /\n", 48-bit long).

Willy


From w@1wt.eu  Sat Jan  8 03:14:28 2011
Return-Path: <w@1wt.eu>
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 B8E153A69D2 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 03:14:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.093
X-Spam-Level: 
X-Spam-Status: No, score=-2.093 tagged_above=-999 required=5 tests=[AWL=-0.050, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 UNKkqDfn5mSS for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 03:14:27 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 4DB663A69CE for <hybi@ietf.org>; Sat,  8 Jan 2011 03:14:26 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p08BGWBt004340 for hybi@ietf.org; Sat, 8 Jan 2011 12:16:32 +0100
Date: Sat, 8 Jan 2011 12:16:32 +0100
From: Willy Tarreau <w@1wt.eu>
To: "hybi@ietf.org" <hybi@ietf.org>
Message-ID: <20110108111632.GI2479@1wt.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.3i
Subject: [hybi] Masking overhead with measurements and code
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: Sat, 08 Jan 2011 11:14:28 -0000

Since I was not convinced at all by the supposedly very low
overhead of using HMAC to compute a masking key, I have written
a WebSocket framing parser which reads, parses and forwards frames.
It supports 7, 16 and 63-bit lengths, stops after forwarding the
last frame with opcode 0x01 and exits with an error if the input
is broken before reaching the end of the closing frame.

When called with any argument, it computes an hmac-sha1 key derived
from a simple 32-bit constant key (for simplicity) for each frame.

The payload is not even unmasked with the key, the purpose is just
to evaluate the cost for a front server/load balancer/switch supposed
to switch frames to a server farm.

I have ran it over a stream of messages whose payload was between 1
and 125 bytes, with an average of 29 bytes (rnd(1..5) ^ 3), so that
we're in line with many legitimate uses of the protocol such as online
chat, and it happens to always fit in one byte length, making the
stream generator even easier to write.

The results :

willy@pcw:~/c$ wc -c /dev/shm/ws-stream.bin
579976835 /dev/shm/ws-stream.bin

- without masking :
  willy@pcw:~/c$ time ./ws-parse < /dev/shm/ws-stream.bin >/dev/null 
  20000001 messages forwarded

  real    0m1.753s
  user    0m1.544s
  sys     0m0.208s

  => average bit rate : 4.1 Gbps

- with HMAC-based masking :
  willy@pcw:~/c$ time ./ws-parse 1 < /dev/shm/ws-stream.bin >/dev/null 
  20000001 messages forwarded

  real    0m42.098s
  user    0m41.759s
  sys     0m0.212s

  => average bit rate : 172 Mbps

Masking the stream with HMAC multiplies the parsing time by 24 on small
messages !!! We're not at all in the range of a few percent more. The
parser with HMAC is limited to only 172 Mbps on a 3 GHz system, which
is the speed at which the non-masking parser would run on a 125 MHz
system.

Considering those facts, I'm strongly opposed to using HMAC as well as
any algorithm which has a similar level of complexity, which is normally
required only for cryptographically strong usages.

We're not trying to encrypt the stream, we're just ensuring that no
broken intermediary will accidentally find a request that was put
there on purpose by an attacker. Such a complexity is not required
at all and is way overkill. The per-byte masking cost must remain
very low even for small frames.

I still think that a simple sliding XOR based on a cheap modification
of the seed is far more than enough against choosen text attacks for
this use case, such as the example code I provided yesterday, or any
other one with the same level of complexity.

The code to reproduce those tests can be freely downloaded there :

    http://1wt.eu/websocket/

It's clearly not a model of beauty as it's only a POC. So it's not needed
to comment on its ugliness or its possible improvements.

Regards,
Willy


From ekr@rtfm.com  Sat Jan  8 06:55:42 2011
Return-Path: <ekr@rtfm.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 7EA5128C106 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 06:55:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.549
X-Spam-Level: 
X-Spam-Status: No, score=-102.549 tagged_above=-999 required=5 tests=[AWL=0.427, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 vlFtpxoFiQEB for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 06:55:41 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id ABE9528C0F0 for <hybi@ietf.org>; Sat,  8 Jan 2011 06:55:41 -0800 (PST)
Received: by gwj17 with SMTP id 17so9683115gwj.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 06:57:49 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.114.5 with SMTP id m5mr4435859agc.25.1294498669391; Sat, 08 Jan 2011 06:57:49 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sat, 8 Jan 2011 06:57:49 -0800 (PST)
In-Reply-To: <20110108081232.GH2479@1wt.eu>
References: <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu>
Date: Sat, 8 Jan 2011 06:57:49 -0800
Message-ID: <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=0016361e84fc59f276049956f5e7
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 14:55:42 -0000

--0016361e84fc59f276049956f5e7
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Jan 8, 2011 at 12:12 AM, Willy Tarreau <w@1wt.eu> wrote:

> On Fri, Jan 07, 2011 at 06:08:53PM -0800, Eric Rescorla wrote:
> > You haven't said anything new here do I think we are officially done
>
> If you want, we can say that : I officially object to the cost of your
> proposal given that it relies on pure guess and not a quantification
> of the risk, and it is easily provable that it is overkill for the
> simplest requests we have to care about (eg: "GET /\n", 48-bit long).
>

You have proven no such thing.

-Ekr

--0016361e84fc59f276049956f5e7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Sat, Jan 8, 2011 at 12:12 AM, Willy T=
arreau <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Fri, Jan 07, 2011 at 06:08:53PM -0800, Eric Rescorla w=
rote:<br>
&gt; You haven&#39;t said anything new here do I think we are officially do=
ne<br>
<br>
</div>If you want, we can say that : I officially object to the cost of you=
r<br>
proposal given that it relies on pure guess and not a quantification<br>
of the risk, and it is easily provable that it is overkill for the<br>
simplest requests we have to care about (eg: &quot;GET /\n&quot;, 48-bit lo=
ng).<br>
<font color=3D"#888888"></font></blockquote><div><br></div><div>You have pr=
oven no such thing.=A0</div><div><br></div><div>-Ekr</div><div>=A0</div></d=
iv><br>

--0016361e84fc59f276049956f5e7--

From ekr@rtfm.com  Sat Jan  8 07:07:01 2011
Return-Path: <ekr@rtfm.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 032CA28C0F9 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:07:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.576
X-Spam-Level: 
X-Spam-Status: No, score=-102.576 tagged_above=-999 required=5 tests=[AWL=0.400, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 1eWZfev0qzIu for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:06:59 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 91C5928C0F0 for <hybi@ietf.org>; Sat,  8 Jan 2011 07:06:59 -0800 (PST)
Received: by gwj17 with SMTP id 17so9685431gwj.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 07:09:07 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.2.23 with SMTP id 23mr4434384agb.106.1294499347444; Sat, 08 Jan 2011 07:09:07 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sat, 8 Jan 2011 07:09:07 -0800 (PST)
In-Reply-To: <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com>
References: <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com>
Date: Sat, 8 Jan 2011 07:09:07 -0800
Message-ID: <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=00163631086bc432e10499571d8f
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 15:07:01 -0000

--00163631086bc432e10499571d8f
Content-Type: text/plain; charset=ISO-8859-1

Or more properly, you have not proven that there is no risk, but rather that
there is no risk, but merely chosen a particular attack. To repeat myself
for
the umpteenth time, an attacker can use a sliding mask to produce a message
with a particular structure. They cannot do that with a generated (CTR or
HMAC)
solution. No, I do not have an attack, but indistinguishability from random
is stronger than not.

As for your "official" objection, yes, yes, I know you object. Making it
"official"
doesn't somehow change anything.


Chairs; I think it's clear that we're long past anything that is new being
said here.

Can you please run a straw poll to resolve the question of masking. IMO the
relevant options are:


0. No masking.
1. A short fixed mask carried entirely in the packet.
2. A longish repeated mask computed from the packet. For concreteness,
suppose
    HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
<packet-key>), but
    obviously there's flexibility here.
3. A fully generated mask, e.g., using AES-CTR or HMAC-SHA for each byte.

-Ekr


On Sat, Jan 8, 2011 at 6:57 AM, Eric Rescorla <ekr@rtfm.com> wrote:

>
>
> On Sat, Jan 8, 2011 at 12:12 AM, Willy Tarreau <w@1wt.eu> wrote:
>
>> On Fri, Jan 07, 2011 at 06:08:53PM -0800, Eric Rescorla wrote:
>> > You haven't said anything new here do I think we are officially done
>>
>> If you want, we can say that : I officially object to the cost of your
>> proposal given that it relies on pure guess and not a quantification
>> of the risk, and it is easily provable that it is overkill for the
>> simplest requests we have to care about (eg: "GET /\n", 48-bit long).
>>
>
> You have proven no such thing.
>
> -Ekr
>
>
>

--00163631086bc432e10499571d8f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Or more properly, you have not proven that there is no risk, but rather tha=
t<div>there is no risk, but merely chosen a particular attack. To repeat my=
self for</div><div>the umpteenth time, an attacker can use a sliding mask t=
o produce a message</div>
<div>with a particular structure. They cannot do that with a generated (CTR=
 or HMAC)</div><div>solution. No, I do not have an attack, but indistinguis=
hability from random=A0</div><div>is stronger than not.</div><div><br></div=
>
<div>As for your &quot;official&quot; objection, yes, yes, I know you objec=
t. Making it &quot;official&quot;</div><div>doesn&#39;t somehow change anyt=
hing.</div><div><br></div><div><br></div><div>Chairs; I think it&#39;s clea=
r that we&#39;re long past anything that is new being said here.</div>
<div><br></div><div>Can you please run a straw poll to resolve the question=
 of masking. IMO the=A0</div><div>relevant options are:</div><div><br></div=
><div><br></div><div>0. No masking.</div><div>1. A short fixed mask carried=
 entirely in the packet.</div>
<div>2. A longish repeated mask computed from the packet. For concreteness,=
 suppose</div><div>=A0=A0 =A0HMAC-SHA1(&lt;uuid&gt;, &lt;server-conn-key&gt=
; || &lt;client-conn-key&gt; || &lt;packet-key&gt;), but</div><div>=A0=A0 =
=A0obviously there&#39;s flexibility here.</div>
<div>3. A fully generated mask, e.g., using AES-CTR or HMAC-SHA for each by=
te.</div><div><br></div><div>-Ekr</div><div><br></div><div><br><div class=
=3D"gmail_quote">On Sat, Jan 8, 2011 at 6:57 AM, Eric Rescorla <span dir=3D=
"ltr">&lt;<a href=3D"mailto:ekr@rtfm.com">ekr@rtfm.com</a>&gt;</span> wrote=
:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><br><br><div class=3D"gmail_quote"><div><di=
v></div><div class=3D"h5">On Sat, Jan 8, 2011 at 12:12 AM, Willy Tarreau <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu" target=3D"_blank">w@1wt.eu<=
/a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<div>On Fri, Jan 07, 2011 at 06:08:53PM -0800, Eric Rescorla wrote:<br>
&gt; You haven&#39;t said anything new here do I think we are officially do=
ne<br>
<br>
</div>If you want, we can say that : I officially object to the cost of you=
r<br>
proposal given that it relies on pure guess and not a quantification<br>
of the risk, and it is easily provable that it is overkill for the<br>
simplest requests we have to care about (eg: &quot;GET /\n&quot;, 48-bit lo=
ng).<br>
<font color=3D"#888888"></font></blockquote><div><br></div></div></div><div=
>You have proven no such thing.=A0</div><div><br></div><div>-Ekr</div><div>=
=A0</div></div><br>
</blockquote></div><br></div>

--00163631086bc432e10499571d8f--

From ekr@rtfm.com  Sat Jan  8 07:07:57 2011
Return-Path: <ekr@rtfm.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 2DB0D28C0F9 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:07:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.6
X-Spam-Level: 
X-Spam-Status: No, score=-102.6 tagged_above=-999 required=5 tests=[AWL=0.377,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 TTwHSYqfpa6b for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:07:56 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 116F428C0F0 for <hybi@ietf.org>; Sat,  8 Jan 2011 07:07:55 -0800 (PST)
Received: by gwj17 with SMTP id 17so9685607gwj.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 07:10:04 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.83.18 with SMTP id k18mr4435072agl.79.1294499403861; Sat, 08 Jan 2011 07:10:03 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sat, 8 Jan 2011 07:10:03 -0800 (PST)
In-Reply-To: <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com>
References: <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com>
Date: Sat, 8 Jan 2011 07:10:03 -0800
Message-ID: <AANLkTim1M=1mWi8v4KoPx_VRXonE04ykuprcbQvJP_Y3@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=0016e6407c64210ed804995721c2
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 15:07:57 -0000

--0016e6407c64210ed804995721c2
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Jan 8, 2011 at 7:09 AM, Eric Rescorla <ekr@rtfm.com> wrote:

> Or more properly, you have not proven that there is no risk, but rather
> that
> there is no risk, but merely chosen a particular attack.
>

Gah. "That there is no risk of a particular chosen attack."



> To repeat myself for
> the umpteenth time, an attacker can use a sliding mask to produce a message
> with a particular structure. They cannot do that with a generated (CTR or
> HMAC)
> solution. No, I do not have an attack, but indistinguishability from
> random
> is stronger than not.
>
> As for your "official" objection, yes, yes, I know you object. Making it
> "official"
> doesn't somehow change anything.
>
>
> Chairs; I think it's clear that we're long past anything that is new being
> said here.
>
> Can you please run a straw poll to resolve the question of masking. IMO
> the
> relevant options are:
>
>
> 0. No masking.
> 1. A short fixed mask carried entirely in the packet.
> 2. A longish repeated mask computed from the packet. For concreteness,
> suppose
>     HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> <packet-key>), but
>     obviously there's flexibility here.
> 3. A fully generated mask, e.g., using AES-CTR or HMAC-SHA for each byte.
>
> -Ekr
>
>
> On Sat, Jan 8, 2011 at 6:57 AM, Eric Rescorla <ekr@rtfm.com> wrote:
>
>>
>>
>> On Sat, Jan 8, 2011 at 12:12 AM, Willy Tarreau <w@1wt.eu> wrote:
>>
>>> On Fri, Jan 07, 2011 at 06:08:53PM -0800, Eric Rescorla wrote:
>>> > You haven't said anything new here do I think we are officially done
>>>
>>> If you want, we can say that : I officially object to the cost of your
>>> proposal given that it relies on pure guess and not a quantification
>>> of the risk, and it is easily provable that it is overkill for the
>>> simplest requests we have to care about (eg: "GET /\n", 48-bit long).
>>>
>>
>> You have proven no such thing.
>>
>> -Ekr
>>
>>
>>
>

--0016e6407c64210ed804995721c2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Sat, Jan 8, 2011 at 7:09 AM, Eric Res=
corla <span dir=3D"ltr">&lt;<a href=3D"mailto:ekr@rtfm.com">ekr@rtfm.com</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Or more properly, you have not proven that there is no risk, but rather tha=
t<div>there is no risk, but merely chosen a particular attack. </div></bloc=
kquote><div><br></div><div>Gah. &quot;That there is no risk of a particular=
 chosen attack.&quot;</div>
<div><br></div><div>=A0</div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>To repeat=
 myself for</div><div>the umpteenth time, an attacker can use a sliding mas=
k to produce a message</div>

<div>with a particular structure. They cannot do that with a generated (CTR=
 or HMAC)</div><div>solution. No, I do not have an attack, but indistinguis=
hability from random=A0</div><div>is stronger than not.</div><div><br></div=
>

<div>As for your &quot;official&quot; objection, yes, yes, I know you objec=
t. Making it &quot;official&quot;</div><div>doesn&#39;t somehow change anyt=
hing.</div><div><br></div><div><br></div><div>Chairs; I think it&#39;s clea=
r that we&#39;re long past anything that is new being said here.</div>

<div><br></div><div>Can you please run a straw poll to resolve the question=
 of masking. IMO the=A0</div><div>relevant options are:</div><div><br></div=
><div><br></div><div>0. No masking.</div><div>1. A short fixed mask carried=
 entirely in the packet.</div>

<div>2. A longish repeated mask computed from the packet. For concreteness,=
 suppose</div><div>=A0=A0 =A0HMAC-SHA1(&lt;uuid&gt;, &lt;server-conn-key&gt=
; || &lt;client-conn-key&gt; || &lt;packet-key&gt;), but</div><div>=A0=A0 =
=A0obviously there&#39;s flexibility here.</div>

<div>3. A fully generated mask, e.g., using AES-CTR or HMAC-SHA for each by=
te.</div><div><br></div><div>-Ekr</div><div><div></div><div class=3D"h5"><d=
iv><br></div><div><br><div class=3D"gmail_quote">On Sat, Jan 8, 2011 at 6:5=
7 AM, Eric Rescorla <span dir=3D"ltr">&lt;<a href=3D"mailto:ekr@rtfm.com" t=
arget=3D"_blank">ekr@rtfm.com</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><br><br><div class=3D"gmail_quote"><div><div=
></div><div>On Sat, Jan 8, 2011 at 12:12 AM, Willy Tarreau <span dir=3D"ltr=
">&lt;<a href=3D"mailto:w@1wt.eu" target=3D"_blank">w@1wt.eu</a>&gt;</span>=
 wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<div>On Fri, Jan 07, 2011 at 06:08:53PM -0800, Eric Rescorla wrote:<br>
&gt; You haven&#39;t said anything new here do I think we are officially do=
ne<br>
<br>
</div>If you want, we can say that : I officially object to the cost of you=
r<br>
proposal given that it relies on pure guess and not a quantification<br>
of the risk, and it is easily provable that it is overkill for the<br>
simplest requests we have to care about (eg: &quot;GET /\n&quot;, 48-bit lo=
ng).<br>
<font color=3D"#888888"></font></blockquote><div><br></div></div></div><div=
>You have proven no such thing.=A0</div><div><br></div><div>-Ekr</div><div>=
=A0</div></div><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br>

--0016e6407c64210ed804995721c2--

From w@1wt.eu  Sat Jan  8 07:21:53 2011
Return-Path: <w@1wt.eu>
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 4018D3A696A for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:21:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.093
X-Spam-Level: 
X-Spam-Status: No, score=-2.093 tagged_above=-999 required=5 tests=[AWL=-0.050, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 ePshkoonm9RG for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:21:52 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 271B13A6934 for <hybi@ietf.org>; Sat,  8 Jan 2011 07:21:51 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p08FNrpW005045; Sat, 8 Jan 2011 16:23:53 +0100
Date: Sat, 8 Jan 2011 16:23:53 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110108152353.GK2479@1wt.eu>
References: <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 15:21:53 -0000

On Sat, Jan 08, 2011 at 06:57:49AM -0800, Eric Rescorla wrote:
> On Sat, Jan 8, 2011 at 12:12 AM, Willy Tarreau <w@1wt.eu> wrote:
> 
> > On Fri, Jan 07, 2011 at 06:08:53PM -0800, Eric Rescorla wrote:
> > > You haven't said anything new here do I think we are officially done
> >
> > If you want, we can say that : I officially object to the cost of your
> > proposal given that it relies on pure guess and not a quantification
> > of the risk, and it is easily provable that it is overkill for the
> > simplest requests we have to care about (eg: "GET /\n", 48-bit long).
> >
> 
> You have proven no such thing.

Sending 2^48 different patterns on the wire, how ever they're mangled
will make your desired 48-bit pattern appear. Using keys smaller than
the pattern may help the attacker establish a relation which helps him
send less than 2^48 patterns, but using larger keys will not prevent
one 48-bit pattern from appearing in a series of 2^48 random-looking
different patterns.

You could even send /dev/random to the wire if you want. At one point
you will find "GET /\n", and you know that.

Also, I'd like to state that it's important to define what we're trying
to achieve. It has been speculated that some intermediaries might skip
non-HTTP looking garbage and automatically resync on what looks like
HTTP. That probably means that those intermediaries will automatically
consider a pattern starting as "GET " as a new request ?

If so it will appear every 2^32 32-bit message, or every 16 GB in a
random stream. Why use 160-bit cryptographically strong ciphers to
generate better random when 32 bits of those random will be enough to
get the faulty component to resync ?

It would be nice if you could for once defend your points based on
*facts* and not intimate feelings. All we know is that I have proven
nothing, but that's for sure considering that you're asking me to prove
that we can remain protected against a risk we cannot even reliably
describe !

If the components you're talking about exist, what allows you to think
that by sending random garbage when they're expecting a valid HTTP request,
you won't make them seek past the end of their request buffer, to a point
that it cleanly syncs on another request buffer which contains a valid
HTTP request ? How could you prove that it cannot happen ? That's a real
risk for a component which is able to do complex things such as skipping
over random data looking for a valid HTTP request, when the required
behaviour is a lot simpler to implement.

Willy


From w@1wt.eu  Sat Jan  8 07:29:43 2011
Return-Path: <w@1wt.eu>
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 DECB53A6934 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:29:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.093
X-Spam-Level: 
X-Spam-Status: No, score=-2.093 tagged_above=-999 required=5 tests=[AWL=-0.050, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 1+sI66hpbCAv for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:29:43 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id C57253A6908 for <hybi@ietf.org>; Sat,  8 Jan 2011 07:29:42 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p08FVl1V005096; Sat, 8 Jan 2011 16:31:47 +0100
Date: Sat, 8 Jan 2011 16:31:47 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110108153147.GL2479@1wt.eu>
References: <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 15:29:44 -0000

On Sat, Jan 08, 2011 at 07:09:07AM -0800, Eric Rescorla wrote:
> Chairs; I think it's clear that we're long past anything that is new being
> said here.

You're exagerating Eric. I have provided code, examples and performance
measurements to make progress. You desperately remained on your position
without any *fact* to explain it.

> Can you please run a straw poll to resolve the question of masking. IMO the
> relevant options are:
> 
> 
> 0. No masking.
> 1. A short fixed mask carried entirely in the packet.

1.5. A short sliding mask derived from a short one carried in the
     frame and which does not require many CPU cycles per frame.

> 2. A longish repeated mask computed from the packet. For concreteness,
> suppose
>     HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> <packet-key>), but
>     obviously there's flexibility here.
> 3. A fully generated mask, e.g., using AES-CTR or HMAC-SHA for each byte.

We should clarify one important point as well :
1. mask framing headers
2. mask payload only

Regards,
Willy


From neonux@gmail.com  Sat Jan  8 07:38:36 2011
Return-Path: <neonux@gmail.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 C81CC3A6975 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:38:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.377
X-Spam-Level: 
X-Spam-Status: No, score=-2.377 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_42=0.6, RCVD_IN_DNSWL_LOW=-1]
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 NMIbJNsXg4uZ for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:38:36 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id DDBFC3A6954 for <hybi@ietf.org>; Sat,  8 Jan 2011 07:38:35 -0800 (PST)
Received: by wwa36 with SMTP id 36so18364433wwa.13 for <hybi@ietf.org>; Sat, 08 Jan 2011 07:40:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=9SqzLib3j1dPou1AK8lS3KJelEY0kLfO+VmclfK45l0=; b=H6kQRtbh1qerBICsLkxKoa2pOPbO3OTytcPuLLFMthCaj/YDokmNvY96oSoMRCjnDG cMImO95jeZ2Hbbg93cmH3xyq612E0GJd0V+/tsm2BvICxMJLE66ryeXMsEdKoOpXYYPC 7SPziyjW/2jnq/Tf5X04WmUlGz5WkCuS+eUuQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=XslcD/68kzcJhmT48MEPpGd4s4BP0HlRKLFlkSBGEdwwH+DOwwz3kpaJBAz2AkREh0 rsBhKP7MqjfpyzAmSVM6q0mRFkZ624iQZvaUlWb/fUYsQIvm+x8lsz9cWhm8aUVB3yKy ehzZfekuqBbuJUiSNFgG/QAy2pY9ALqgwSRzw=
Received: by 10.227.143.18 with SMTP id s18mr16725867wbu.98.1294501242795; Sat, 08 Jan 2011 07:40:42 -0800 (PST)
MIME-Version: 1.0
Sender: neonux@gmail.com
Received: by 10.227.3.19 with HTTP; Sat, 8 Jan 2011 07:40:12 -0800 (PST)
In-Reply-To: <20110108152353.GK2479@1wt.eu>
References: <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <20110108152353.GK2479@1wt.eu>
From: Cedric Vivier <cedricv@neonux.com>
Date: Sat, 8 Jan 2011 23:40:12 +0800
X-Google-Sender-Auth: yE3xoeakbLXERdheWHWYA4V8Q3A
Message-ID: <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=UTF-8
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 15:40:29 -0000

On Sat, Jan 8, 2011 at 23:23, Willy Tarreau <w@1wt.eu> wrote:
> You could even send /dev/random to the wire if you want. At one point
> you will find "GET /\n", and you know that.

This might be a stupid idea but wouldn't fragmenting the frame at
every "HTTP/" [1] occurence within a message guarantee that no broken
proxy would ever interpret any 'request' ?

Eg:
0x04 0x0F "GET / HTTP/1.1"

becomes :

0x84 0x06 "GET / "
0x04 0x08 "HTTP/1.1"

(maybe it would need an IMPLICIT_MORE bit rather than already spec'ed MORE bit)


Looks much simpler to implement as part of WebSocket's data framing on
the client and still allows servers to use sendfile or similar as they
see fit.
Sorry for the noise if I'm completely off-track :-)

Regards,

From w@1wt.eu  Sat Jan  8 07:58:41 2011
Return-Path: <w@1wt.eu>
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 5ED7228C10E for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:58:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.792
X-Spam-Level: 
X-Spam-Status: No, score=-1.792 tagged_above=-999 required=5 tests=[AWL=-0.349, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, J_CHICKENPOX_42=0.6]
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 5GPI1z3OD9u5 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 07:58:40 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 215E928C10C for <hybi@ietf.org>; Sat,  8 Jan 2011 07:58:39 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p08G0k0A005178; Sat, 8 Jan 2011 17:00:46 +0100
Date: Sat, 8 Jan 2011 17:00:46 +0100
From: Willy Tarreau <w@1wt.eu>
To: Cedric Vivier <cedricv@neonux.com>
Message-ID: <20110108160046.GN2479@1wt.eu>
References: <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <20110108152353.GK2479@1wt.eu> <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 15:58:41 -0000

Hello Cedric,

On Sat, Jan 08, 2011 at 11:40:12PM +0800, Cedric Vivier wrote:
> On Sat, Jan 8, 2011 at 23:23, Willy Tarreau <w@1wt.eu> wrote:
> > You could even send /dev/random to the wire if you want. At one point
> > you will find "GET /\n", and you know that.
> 
> This might be a stupid idea but wouldn't fragmenting the frame at
> every "HTTP/" [1] occurence within a message guarantee that no broken
> proxy would ever interpret any 'request' ?
> 
> Eg:
> 0x04 0x0F "GET / HTTP/1.1"
> 
> becomes :
> 
> 0x84 0x06 "GET / "
> 0x04 0x08 "HTTP/1.1"
> 
> (maybe it would need an IMPLICIT_MORE bit rather than already spec'ed MORE bit)
> 
> 
> Looks much simpler to implement as part of WebSocket's data framing on
> the client and still allows servers to use sendfile or similar as they
> see fit.
> Sorry for the noise if I'm completely off-track :-)

No you're not off-track and it's a really good idea. In my opinion it
is hard for the sender to ensure it does that for specific strings,
however we could very well decide that frames emitted by a browser
must not be larger than XXX bytes (eg: 4 or 8 bytes). That way we'll
have two bytes of framing everywhere in the middle of requests. And
that does not even require complex changes at all. For instance,
preventing the browser from sending frames larger than 8 bytes will
imply a 25% size overhead for frames larger than 8 bytes, which is
equivalent to sending a 32-bit key with a 16-bytes frame.

Possibly that can be studied.

Thanks,
Willy


From ekr@rtfm.com  Sat Jan  8 08:01:25 2011
Return-Path: <ekr@rtfm.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 1751128C117 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 08:01:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.619
X-Spam-Level: 
X-Spam-Status: No, score=-102.619 tagged_above=-999 required=5 tests=[AWL=0.357, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 FS1KIRYRIw3D for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 08:01:24 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id 2501728C116 for <hybi@ietf.org>; Sat,  8 Jan 2011 08:01:24 -0800 (PST)
Received: by gyd12 with SMTP id 12so7763300gyd.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 08:03:32 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.232.6 with SMTP id e6mr29394907agh.52.1294502612071; Sat, 08 Jan 2011 08:03:32 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sat, 8 Jan 2011 08:03:31 -0800 (PST)
In-Reply-To: <20110108153147.GL2479@1wt.eu>
References: <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com> <20110108153147.GL2479@1wt.eu>
Date: Sat, 8 Jan 2011 08:03:31 -0800
Message-ID: <AANLkTi=toDKTkib-_kU_nF_12LS9fg5w6h9XmK26gO-t@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=001636284f605a8342049957e047
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 16:01:25 -0000

--001636284f605a8342049957e047
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Jan 8, 2011 at 7:31 AM, Willy Tarreau <w@1wt.eu> wrote:

> On Sat, Jan 08, 2011 at 07:09:07AM -0800, Eric Rescorla wrote:
> > Chairs; I think it's clear that we're long past anything that is new
> being
> > said here.
>
> You're exagerating Eric. I have provided code, examples and performance
> measurements to make progress. You desperately remained on your position
> without any *fact* to explain it.
>
>
Yeah, whatever.

-Ekr


> > Can you please run a straw poll to resolve the question of masking. IMO
> the
> > relevant options are:
> >
> >
> > 0. No masking.
> > 1. A short fixed mask carried entirely in the packet.
>
> 1.5. A short sliding mask derived from a short one carried in the
>     frame and which does not require many CPU cycles per frame.
>
> > 2. A longish repeated mask computed from the packet. For concreteness,
> > suppose
> >     HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> > <packet-key>), but
> >     obviously there's flexibility here.
> > 3. A fully generated mask, e.g., using AES-CTR or HMAC-SHA for each byte.
>
> We should clarify one important point as well :
> 1. mask framing headers
> 2. mask payload only
>
> Regards,
> Willy
>
>

--001636284f605a8342049957e047
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div><br><div class=3D"gmail_quote">On Sat, Jan 8, 2011 at 7:31 AM, Willy T=
arreau <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Sat, Jan 08, 2011 at 07:09:07AM -0800, Eric Rescorla w=
rote:<br>
&gt; Chairs; I think it&#39;s clear that we&#39;re long past anything that =
is new being<br>
&gt; said here.<br>
<br>
</div>You&#39;re exagerating Eric. I have provided code, examples and perfo=
rmance<br>
measurements to make progress. You desperately remained on your position<br=
>
without any *fact* to explain it.<br>
<div class=3D"im"><br></div></blockquote><div><br></div><div>Yeah, whatever=
.</div><div><br></div><div>-Ekr</div><div>=A0</div><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex;">
<div class=3D"im">
&gt; Can you please run a straw poll to resolve the question of masking. IM=
O the<br>
&gt; relevant options are:<br>
&gt;<br>
&gt;<br>
&gt; 0. No masking.<br>
&gt; 1. A short fixed mask carried entirely in the packet.<br>
<br>
</div>1.5. A short sliding mask derived from a short one carried in the<br>
 =A0 =A0 frame and which does not require many CPU cycles per frame.<br>
<div class=3D"im"><br>
&gt; 2. A longish repeated mask computed from the packet. For concreteness,=
<br>
&gt; suppose<br>
&gt; =A0 =A0 HMAC-SHA1(&lt;uuid&gt;, &lt;server-conn-key&gt; || &lt;client-=
conn-key&gt; ||<br>
&gt; &lt;packet-key&gt;), but<br>
&gt; =A0 =A0 obviously there&#39;s flexibility here.<br>
&gt; 3. A fully generated mask, e.g., using AES-CTR or HMAC-SHA for each by=
te.<br>
<br>
</div>We should clarify one important point as well :<br>
1. mask framing headers<br>
2. mask payload only<br>
<br>
Regards,<br>
<font color=3D"#888888">Willy<br>
<br>
</font></blockquote></div><br></div>

--001636284f605a8342049957e047--

From andy.warmcat.com@googlemail.com  Sat Jan  8 08:11:40 2011
Return-Path: <andy.warmcat.com@googlemail.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 40BAE28C115 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 08:11:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.551
X-Spam-Level: 
X-Spam-Status: No, score=-3.551 tagged_above=-999 required=5 tests=[AWL=0.048,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 oJhdyQKAeOwi for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 08:11:39 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 743D628C118 for <hybi@ietf.org>; Sat,  8 Jan 2011 08:11:38 -0800 (PST)
Received: by wwa36 with SMTP id 36so18380535wwa.13 for <hybi@ietf.org>; Sat, 08 Jan 2011 08:13:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=5TYE7V5a0mczDSq2NBi/lE9MNlRGuKdXQSHO6oEx/x0=; b=Aau6ofJJJa9QRbgUNqWA/x5qgqoemwD6l2OGGiV3HjSNOIXljODeiY+FxeMbWBtZ/T SwnnBI5UIC7u0Ejqf0L/mCDVt/UK0acB9VTd1Lw6T1BwlGZQQEVM3vFZ4zjH/NRjdzgG XiIe3vjwmsi87PbQLH2/XqCkIMpGU4UKVqXZc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=v1wxBho25mxSNeMCqzLvVSLcJDtkdjrciuDY7n9eioxUWQKQJac7/L4LQsKyXqhe7h PGTpxNbH84NKO25iuvJKgZ7GvyO8sTCS90koxcsOJdh022pUOaE2eL4JwDRxNG3JUcxd p1hcPkeHRmkIK7LUgkDFoygftnyXHHw6rZotA=
Received: by 10.227.154.69 with SMTP id n5mr729683wbw.131.1294503225478; Sat, 08 Jan 2011 08:13:45 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id q18sm18600411wbe.23.2011.01.08.08.13.43 (version=SSLv3 cipher=RC4-MD5); Sat, 08 Jan 2011 08:13:44 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D288D36.8090901@warmcat.com>
Date: Sat, 08 Jan 2011 16:13:42 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <20110107203958.GC32612@1wt.eu>	<AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>	<20110107222312.GA2479@1wt.eu>	<AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com>	<20110108001549.GD2479@1wt.eu>	<D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com>	<20110108015002.GG2479@1wt.eu>	<E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com>	<20110108081232.GH2479@1wt.eu>	<AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <20110108152353.GK2479@1wt.eu>
In-Reply-To: <20110108152353.GK2479@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Sat, 08 Jan 2011 16:11:40 -0000

On 01/08/11 15:23, Somebody in the thread at some point said:

> Also, I'd like to state that it's important to define what we're trying
> to achieve. It has been speculated that some intermediaries might skip

Yeah that might be a good idea.  But, maybe I missed the "point".

-Andy

From pieterh@gmail.com  Sat Jan  8 08:18:16 2011
Return-Path: <pieterh@gmail.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 54C9D28C15E for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 08:18:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.977
X-Spam-Level: 
X-Spam-Status: No, score=-2.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 b1gqGQThW+FZ for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 08:18:14 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 6D7BC28C132 for <hybi@ietf.org>; Sat,  8 Jan 2011 08:18:14 -0800 (PST)
Received: by wyf23 with SMTP id 23so19233816wyf.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 08:20:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=KvQFeSkNwfl9MJZCImAXbiroPhQVWI6PYB3ShrTpNBc=; b=H96qQZWCjyOcT8T9VQxcSJhLEnFUkvk4Y6HHRXymrp9Wso+qsmJ0M6RRH7/wBfEFsa bFhnsTNQvKwCoiZ6e/eyWJVeXKCQLTrXtFtWEIlHyd2SLiWuflsoF6awd9KUiK++Hfhd ngPCSZ2Bf5zbWJlciO9Es7q33ARNtObVXtYzo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=i3T5ja3zRJb4kPi1lfHEdWJxvrjO/3VCGECupsEZFyR9Nckr/hXr9WLG4MHxs6LdFa wwZ8qTQjkP22MJsyjj31Bsq1oGo+M0ZtN7zFR4RZjLa95BgtlL/FpuDX57bRxbNb1pWJ 49JbRdgHsJPsU1KJrn9uDjIapj2jPTYIa8GXc=
Received: by 10.216.21.66 with SMTP id q44mr1517270weq.10.1294503622116; Sat, 08 Jan 2011 08:20:22 -0800 (PST)
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.216.46.78 with HTTP; Sat, 8 Jan 2011 08:20:01 -0800 (PST)
In-Reply-To: <20110108153147.GL2479@1wt.eu>
References: <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com> <20110108153147.GL2479@1wt.eu>
From: Pieter Hintjens <ph@imatix.com>
Date: Sat, 8 Jan 2011 17:20:01 +0100
X-Google-Sender-Auth: o1FSALPyzAR1cajV74pmwG_37vQ
Message-ID: <AANLkTikqsd1yxLoXHsVTk1G0NMcL+y_ceNo=Qw32iZE9@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 16:18:16 -0000

On Sat, Jan 8, 2011 at 4:31 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sat, Jan 08, 2011 at 07:09:07AM -0800, Eric Rescorla wrote:

>> Can you please run a straw poll to resolve the question of masking. IMO =
the
>> relevant options are:

> 1.5. A short sliding mask derived from a short one carried in the
> =A0 =A0 frame and which does not require many CPU cycles per frame.

+1 until specific issues are raised with it that can be solved reasonably.

Willy, I appreciated the running code.

-Pieter

From andy.warmcat.com@googlemail.com  Sat Jan  8 08:18:51 2011
Return-Path: <andy.warmcat.com@googlemail.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 7E4D028C137 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 08:18:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.254
X-Spam-Level: 
X-Spam-Status: No, score=-3.254 tagged_above=-999 required=5 tests=[AWL=-0.255, BAYES_00=-2.599, J_CHICKENPOX_42=0.6, RCVD_IN_DNSWL_LOW=-1]
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 3n0EPE3+UyGS for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 08:18:50 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 1A88228C11E for <hybi@ietf.org>; Sat,  8 Jan 2011 08:18:47 -0800 (PST)
Received: by wyf23 with SMTP id 23so19234128wyf.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 08:20:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=pc4xL92LzlmLlD0twHadFrGBLJhy+O2kzD3wvFKBo3c=; b=S5RCYMGk34D4lfnGwpT3QdJBQYHfD1sZVDHtlIYwiNt7/xyRgnlmxTDRG9hityySqy AdwD+xVlOzhuXqXPfiZMj5l5OWGZ2KYGngZxzm1oaInWyeRoxWphP/zDFox6pj1njYqy rjOdW002bUEbYar4UaP9Um5l0qiy4IKbjvcaE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=vyJtnHA9TrHuqmbeiqBvKgozn8e8Dzwd5xSo3UgnPdjvl7QGCbiBjfbfCQ+pcOQ6BF rXRFTPJVkA4LgiUIHnAbzlFzTKSF+Yx/qnA2KjFiwQLBfrZxKhBoI3W5Gc0hfkgx8UzT FZk9O8r42iaC7zTUuiad98CccfgVMBXzCMmQE=
Received: by 10.227.156.69 with SMTP id v5mr595696wbw.10.1294503655817; Sat, 08 Jan 2011 08:20:55 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id f35sm18589450wbf.14.2011.01.08.08.20.54 (version=SSLv3 cipher=RC4-MD5); Sat, 08 Jan 2011 08:20:54 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D288EE1.3060601@warmcat.com>
Date: Sat, 08 Jan 2011 16:20:49 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <20110107222312.GA2479@1wt.eu>	<AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com>	<20110108001549.GD2479@1wt.eu>	<D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com>	<20110108015002.GG2479@1wt.eu>	<E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com>	<20110108081232.GH2479@1wt.eu>	<AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com>	<20110108152353.GK2479@1wt.eu>	<AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com> <20110108160046.GN2479@1wt.eu>
In-Reply-To: <20110108160046.GN2479@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Sat, 08 Jan 2011 16:18:51 -0000

On 01/08/11 16:00, Somebody in the thread at some point said:

>> 0x84 0x06 "GET / "
>> 0x04 0x08 "HTTP/1.1"
>>
>> (maybe it would need an IMPLICIT_MORE bit rather than already spec'ed MORE bit)
>>
>>
>> Looks much simpler to implement as part of WebSocket's data framing on
>> the client and still allows servers to use sendfile or similar as they
>> see fit.
>> Sorry for the noise if I'm completely off-track :-)
>
> No you're not off-track and it's a really good idea. In my opinion it

Making HTTP/ unspeakable sounds a lot more lightweight and deterministic 
to me too than some terrifically high bar of obfuscation crypto defined 
by some particular dude "just because".

-Andy

From mcmanus@ducksong.com  Sat Jan  8 09:02:13 2011
Return-Path: <mcmanus@ducksong.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 E4CE43A67DF for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 09:02:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.487
X-Spam-Level: 
X-Spam-Status: No, score=-2.487 tagged_above=-999 required=5 tests=[AWL=0.113,  BAYES_00=-2.599]
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 pKBypXO68SG6 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 09:02:13 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 060963A67C0 for <hybi@ietf.org>; Sat,  8 Jan 2011 09:02:09 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id C698410305; Sat,  8 Jan 2011 12:04:17 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 087FD1030A; Sat,  8 Jan 2011 12:04:12 -0500 (EST)
From: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
To: andy@warmcat.com
In-Reply-To: <4D288EE1.3060601@warmcat.com>
References: <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <20110108152353.GK2479@1wt.eu> <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com> <20110108160046.GN2479@1wt.eu>  <4D288EE1.3060601@warmcat.com>
Content-Type: text/plain; charset="UTF-8"
Date: Sat, 08 Jan 2011 12:04:01 -0500
Message-ID: <1294506241.7650.40.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 17:02:14 -0000

On Sat, 2011-01-08 at 16:20 +0000, Andy Green wrote:
>  defined 
> by some particular dude "just because".
> 

You are being unfair to Eric and his substantive contributions to both
this group, this discussion, and the Internet community.

That being said, I haven't yet heard anything that makes me concerned
that an attacker can "produce a messasge with a particular structure"
using an inexpensive sliding mask. It appears that that concern falls
outside the class of attacks we should realistically be worrying about
which is the attacker generating specific byte sequences of her
choosing.

I'm interested in hearing any arguments that advance my understanding of
the risk of such a simple mask beyond "it allows the attacker to produce
non-random (but also non-controllable) bytes". What is the relationship
here that leads us down a dangerous looking path? If I've missed them in
the recent torrent of dialogue, I apologize in advance and appreciate
the pointers.

-Pat

-- 
http://www.getfirefox.com/



From ekr@rtfm.com  Sat Jan  8 09:29:32 2011
Return-Path: <ekr@rtfm.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 9FED93A67AD for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 09:29:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.624
X-Spam-Level: 
X-Spam-Status: No, score=-102.624 tagged_above=-999 required=5 tests=[AWL=0.353, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 WAoYTGdpzpo4 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 09:29:31 -0800 (PST)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by core3.amsl.com (Postfix) with ESMTP id B65013A67E3 for <hybi@ietf.org>; Sat,  8 Jan 2011 09:29:31 -0800 (PST)
Received: by ywk9 with SMTP id 9so8022104ywk.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 09:31:40 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.2.23 with SMTP id 23mr4538670agb.106.1294507899690; Sat, 08 Jan 2011 09:31:39 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sat, 8 Jan 2011 09:31:39 -0800 (PST)
In-Reply-To: <1294506241.7650.40.camel@ds9.ducksong.com>
References: <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <20110108152353.GK2479@1wt.eu> <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com> <20110108160046.GN2479@1wt.eu> <4D288EE1.3060601@warmcat.com> <1294506241.7650.40.camel@ds9.ducksong.com>
Date: Sat, 8 Jan 2011 09:31:39 -0800
Message-ID: <AANLkTinzum-3CGyfct2dc02k3WBZrWTvv1F9CcSc7pWW@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 17:29:32 -0000

On Sat, Jan 8, 2011 at 9:04 AM, Pat McManus @Mozilla
<mcmanus@ducksong.com> wrote:
> On Sat, 2011-01-08 at 16:20 +0000, Andy Green wrote:
>> =A0defined
>> by some particular dude "just because".
>>
>
> You are being unfair to Eric and his substantive contributions to both
> this group, this discussion, and the Internet community.
>
> That being said, I haven't yet heard anything that makes me concerned
> that an attacker can "produce a messasge with a particular structure"
> using an inexpensive sliding mask. It appears that that concern falls
> outside the class of attacks we should realistically be worrying about
> which is the attacker generating specific byte sequences of her
> choosing.
>
> I'm interested in hearing any arguments that advance my understanding of
> the risk of such a simple mask beyond "it allows the attacker to produce
> non-random (but also non-controllable) bytes". What is the relationship
> here that leads us down a dangerous looking path? If I've missed them in
> the recent torrent of dialogue, I apologize in advance and appreciate
> the pointers.

Hi Patrick,

I don't really have anything that I expect to be convincing to the
non-paranoid.
The attack vector  (if there is any) is as you say: an attacker can
control the bytes
so that they are non-random, but only partly controllable (i.e., they
can guarantee
any chosen relationship between two bytes masklen apart). I don't have
an attack that
actually exploits this, it just gives me a bad feeling: in the
security community we try
to design stuff that is secure with only very weak assumptions about
the threat model
and it seems clear that indistinguishability requires weaker
assumptions, so all else
being equal, that seems like a better choice.

Now, obviously all else isn't equal, and if there is a major objection
to stronger masking,
then that should override my (and others, I would note) icky feelings
about weak masking.

However, the only argument against stronger masking that I'm aware of,
namely that it has
a performance cost, seems to me to be extremely weak in view not only
of the performance of
existing machines and of the expected increase in performance in the
future. So on balance
I continue to favor stronger masking. However, I can certainly
understand how others would
feel differently.

-Ekr

From andy.warmcat.com@googlemail.com  Sat Jan  8 09:33:45 2011
Return-Path: <andy.warmcat.com@googlemail.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 76C3A3A67F1 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 09:33:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.542
X-Spam-Level: 
X-Spam-Status: No, score=-3.542 tagged_above=-999 required=5 tests=[AWL=0.057,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 A2MHDZOexYZM for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 09:33:44 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id CE3E63A67DF for <hybi@ietf.org>; Sat,  8 Jan 2011 09:33:40 -0800 (PST)
Received: by wyf23 with SMTP id 23so19275736wyf.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 09:35:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=GWoMa7ACw18NgLHJDyxNUOzgUGpONJ2rJZRxNWyRtkc=; b=muHQtqC2Z9S/qpNixEKm9v/LAM8gKiypYG4+PpoLPBWgfe09E+88TbciqTEqm0PPDv E6Nev21Cpeu1dhjoaMlbSjPFvTULqkc3uY3QcS/3l1SRThfdbUSczbVEU3q6/8MDiIju V1zXybLStwaqVKRsVNy/m7i5F3TdzsNsJP2nA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=s9/zf0W8Pb+U1Iy70STv36k+BjsckJPJ2Uv6wNoo3ICaEYgI0bJcdwn4rnBO99tEXb eS8wghs4L4yOdzSFCrQSLd3ZlIFi+f4Vl+tGUyOm52UkYYERGGfAnpbSglXh2Eea+ZV0 Ms3iZn9oXLBmjDU8vcmDXOmgGlzXCx/ejz6eE=
Received: by 10.227.159.68 with SMTP id i4mr9883186wbx.176.1294508129103; Sat, 08 Jan 2011 09:35:29 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id q18sm18637761wbe.17.2011.01.08.09.35.28 (version=SSLv3 cipher=RC4-MD5); Sat, 08 Jan 2011 09:35:28 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D28A05F.9070100@warmcat.com>
Date: Sat, 08 Jan 2011 17:35:27 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
References: <20110107222312.GA2479@1wt.eu>	 <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com>	 <20110108001549.GD2479@1wt.eu>	 <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com>	 <20110108015002.GG2479@1wt.eu>	 <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com>	 <20110108081232.GH2479@1wt.eu>	 <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com>	 <20110108152353.GK2479@1wt.eu>	 <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com>	 <20110108160046.GN2479@1wt.eu> <4D288EE1.3060601@warmcat.com> <1294506241.7650.40.camel@ds9.ducksong.com>
In-Reply-To: <1294506241.7650.40.camel@ds9.ducksong.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Sat, 08 Jan 2011 17:33:45 -0000

On 01/08/11 17:04, Somebody in the thread at some point said:
> On Sat, 2011-01-08 at 16:20 +0000, Andy Green wrote:
>>   defined
>> by some particular dude "just because".
>>
>
> You are being unfair to Eric and his substantive contributions to both
> this group, this discussion, and the Internet community.

Hey, thanks for alerting me to how unfair you think I am being.  If you 
could provide any evidence about why what I said is unfair other than 
just announcing your opinion out of the blue, that would be even more 
awesome.

I base what I am saying on what I read on this list, where Willy seems 
to be sending out facts and code and Eric is sending out "whatever".

> That being said, I haven't yet heard anything that makes me concerned
> that an attacker can "produce a messasge with a particular structure"
> using an inexpensive sliding mask. It appears that that concern falls
> outside the class of attacks we should realistically be worrying about
> which is the attacker generating specific byte sequences of her
> choosing.

As I have said several times, I do not believe the case has been made we 
should care about even that; IMO we should wash our hands of these 
alleged broken intermediaries because there is no end to it.

Don't forget this is in a context where it can only be an intermediary 
targeted, and one that is broken in specific ways that is claimed to 
exist only after one unrepeatable -- Pons and Fleischmann style -- test.

> I'm interested in hearing any arguments that advance my understanding of

How about you turn your intellect to Cedric Vivier's novel suggestion to 
simply disallow "HTTP/" in websocket packets as well as the "political 
mainstream" masking and announce your thoughts on that.

-Andy


From neonux@gmail.com  Sat Jan  8 09:59:57 2011
Return-Path: <neonux@gmail.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 382C53A677C for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 09:59:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.827
X-Spam-Level: 
X-Spam-Status: No, score=-2.827 tagged_above=-999 required=5 tests=[AWL=0.150,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 8YQSE24vkS98 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 09:59:56 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 729463A635F for <hybi@ietf.org>; Sat,  8 Jan 2011 09:59:51 -0800 (PST)
Received: by wyf23 with SMTP id 23so19288681wyf.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 10:01:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=nnQin8/+tw9GN92v+z3N7FGHR5FIejC67igUU7B7Dn4=; b=DJ3gLBjuKG9Zq2l9QdT+2dKXqCO9r+j+yujctW19GBi8s23d+kU5zmf6oytSqvKVls ocqUDQJ7vU7AQClz/eN2GdqKTRuPav0tAa6v0SHd7H2D7iKdE2hcACwzxzUNC8Pdiz6e igxFIZF+HP8r+WN16MYvFmRyJK8c4VQn9pWxU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=GOc1iEEHl067il63l60cbPs7V94nXqhJVF6IPBHRmq0jH1kTkRkaXYu7AAJhtHJuOt eu8+LlHNaZxpVgE1ZnkjLX4gWkvDTQHIae64v20tAcJWUUM2wGGieOmO6swqpb8Gm+xC yrxzxDEcpsKYJ+S1WBc0X4p+t+VRHt3FPMvrQ=
Received: by 10.227.143.18 with SMTP id s18mr16817450wbu.98.1294509714834; Sat, 08 Jan 2011 10:01:54 -0800 (PST)
MIME-Version: 1.0
Sender: neonux@gmail.com
Received: by 10.227.3.19 with HTTP; Sat, 8 Jan 2011 10:01:24 -0800 (PST)
In-Reply-To: <1294506241.7650.40.camel@ds9.ducksong.com>
References: <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <20110108152353.GK2479@1wt.eu> <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com> <20110108160046.GN2479@1wt.eu> <4D288EE1.3060601@warmcat.com> <1294506241.7650.40.camel@ds9.ducksong.com>
From: Cedric Vivier <cedricv@neonux.com>
Date: Sun, 9 Jan 2011 02:01:24 +0800
X-Google-Sender-Auth: GQisc7KuaOAn0lasLRBOroSGisU
Message-ID: <AANLkTimJxNFDXA-Vd7pXZzOHWuujbaxzxzjcgzZTyQpe@mail.gmail.com>
To: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
Content-Type: text/plain; charset=UTF-8
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 17:59:57 -0000

On Sun, Jan 9, 2011 at 01:04, Pat McManus @Mozilla <mcmanus@ducksong.com> wrote:
> I'm interested in hearing any arguments that advance my understanding of
> the risk of such a simple mask beyond "it allows the attacker to produce
> non-random (but also non-controllable) bytes".

Considering an attacker could control of both the JavaScript
application and the WebSocket server (ie. a malicious website rather
than a XSS), simple masking certainly feels a fragile protection
against a determined attacker and I share Eric's concerns about it.

On top of this, even simple inexpensive masking significantly limits
potential efficiency of WebSocket servers as it makes any payload
essentially uncacheable therefore blocks usage of efficient and
scalable zero-copy mechanisms (sendfile/splice/tee/..) that are used
in modern HTTP servers.


Fragmenting messages containing "HTTP/" or, even simpler, inserting a
'break' byte every 8 bytes of the payload, seems like a simple and
minimum overhead way to guarantee an attacker cannot send out bytes
that would look like a request, while keeping the payload zero-copy
friendly for servers.


Regards,

From salvatore.loreto@ericsson.com  Sat Jan  8 10:16:49 2011
Return-Path: <salvatore.loreto@ericsson.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 D09233A67FC for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:16:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.546
X-Spam-Level: 
X-Spam-Status: No, score=-106.546 tagged_above=-999 required=5 tests=[AWL=0.053, BAYES_00=-2.599, 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 tq5i9vIw2Gx3 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:16:48 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 9CE303A677C for <hybi@ietf.org>; Sat,  8 Jan 2011 10:16:47 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-38-4d28aa8f3ef9
Received: from esessmw0191.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id 16.EC.13987.F8AA82D4; Sat,  8 Jan 2011 19:18:55 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0191.eemea.ericsson.se (153.88.115.85) with Microsoft SMTP Server id 8.2.234.1; Sat, 8 Jan 2011 19:18:54 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 2CACB2595	for <hybi@ietf.org>; Sat,  8 Jan 2011 20:18:55 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id EA8B450115	for <hybi@ietf.org>; Sat,  8 Jan 2011 20:18:54 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 73CBD4E704	for <hybi@ietf.org>; Sat,  8 Jan 2011 20:18:54 +0200 (EET)
Message-ID: <4D28AA8E.4080400@ericsson.com>
Date: Sat, 8 Jan 2011 19:18:54 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <20110107185801.GB32612@1wt.eu>	<AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com>	<20110107203958.GC32612@1wt.eu>	<AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>	<20110107222312.GA2479@1wt.eu>	<AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com>	<20110108001549.GD2479@1wt.eu>	<D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com>	<20110108015002.GG2479@1wt.eu>	<E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com>	<20110108081232.GH2479@1wt.eu>	<AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com>
In-Reply-To: <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 18:16:49 -0000

On 1/8/11 4:09 PM, Eric Rescorla wrote:
> Or more properly, you have not proven that there is no risk, but 
> rather that
> there is no risk, but merely chosen a particular attack. To repeat 
> myself for
> the umpteenth time, an attacker can use a sliding mask to produce a 
> message
> with a particular structure. They cannot do that with a generated (CTR 
> or HMAC)
> solution. No, I do not have an attack, but indistinguishability from 
> random
> is stronger than not.
>
> As for your "official" objection, yes, yes, I know you object. Making 
> it "official"
> doesn't somehow change anything.
>
>
> Chairs; I think it's clear that we're long past anything that is new 
> being said here.
>
> Can you please run a straw poll to resolve the question of masking. 
> IMO the
> relevant options are:
>
>
> 0. No masking.
(as co-chair)

there is already a clear consensus about masking from the straw poll 
ended yesterday
so "No masking" is not a possibility for a new poll.


The straw poll ended yesterday has showed a great consensus about the
GET+Upgrade+Masking approach
with mandatory masking from client to server

of course all the details about how it will play out are already agreed.
So we will consider the possibility to run a poll to resolve the 
question of masking.


cheers
/Sal


From salvatore.loreto@ericsson.com  Sat Jan  8 10:18:54 2011
Return-Path: <salvatore.loreto@ericsson.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 7F0E63A6804 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:18:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.547
X-Spam-Level: 
X-Spam-Status: No, score=-106.547 tagged_above=-999 required=5 tests=[AWL=0.052, BAYES_00=-2.599, 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 Ls5RPohdV995 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:18:52 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id 1BCA63A6810 for <hybi@ietf.org>; Sat,  8 Jan 2011 10:18:51 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-a1-4d28ab0b92a7
Received: from esessmw0191.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id B9.64.23694.B0BA82D4; Sat,  8 Jan 2011 19:20:59 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0191.eemea.ericsson.se (153.88.115.85) with Microsoft SMTP Server id 8.2.234.1; Sat, 8 Jan 2011 19:20:59 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 5B7452595	for <hybi@ietf.org>; Sat,  8 Jan 2011 20:20:58 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 28E2E50115	for <hybi@ietf.org>; Sat,  8 Jan 2011 20:20:57 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id B22874E704	for <hybi@ietf.org>; Sat,  8 Jan 2011 20:20:56 +0200 (EET)
Message-ID: <4D28AB08.8080907@ericsson.com>
Date: Sat, 8 Jan 2011 19:20:56 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <20110107185801.GB32612@1wt.eu>	<AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com>	<20110107203958.GC32612@1wt.eu>	<AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>	<20110107222312.GA2479@1wt.eu>	<AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com>	<20110108001549.GD2479@1wt.eu>	<D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com>	<20110108015002.GG2479@1wt.eu>	<E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com>	<20110108081232.GH2479@1wt.eu>	<AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com>	<AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com> <4D28AA8E.4080400@ericsson.com>
In-Reply-To: <4D28AA8E.4080400@ericsson.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 18:18:54 -0000

On 1/8/11 7:18 PM, Salvatore Loreto wrote:
> On 1/8/11 4:09 PM, Eric Rescorla wrote:
>> Or more properly, you have not proven that there is no risk, but
>> rather that
>> there is no risk, but merely chosen a particular attack. To repeat
>> myself for
>> the umpteenth time, an attacker can use a sliding mask to produce a
>> message
>> with a particular structure. They cannot do that with a generated (CTR
>> or HMAC)
>> solution. No, I do not have an attack, but indistinguishability from
>> random
>> is stronger than not.
>>
>> As for your "official" objection, yes, yes, I know you object. Making
>> it "official"
>> doesn't somehow change anything.
>>
>>
>> Chairs; I think it's clear that we're long past anything that is new
>> being said here.
>>
>> Can you please run a straw poll to resolve the question of masking.
>> IMO the
>> relevant options are:
>>
>>
>> 0. No masking.
> (as co-chair)
>
> there is already a clear consensus about masking from the straw poll
> ended yesterday
> so "No masking" is not a possibility for a new poll.
>
>
> The straw poll ended yesterday has showed a great consensus about the
> GET+Upgrade+Masking approach
> with mandatory masking from client to server
>
> of course all the details about how it will play out are already agreed.
I meant

"all the details about how it will play out are not yet decided neither 
agreed"

> So we will consider the possibility to run a poll to resolve the
> question of masking.
>
>
> cheers
> /Sal
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


-- 
Salvatore Loreto
www.sloreto.com


From mcmanus@ducksong.com  Sat Jan  8 10:19:41 2011
Return-Path: <mcmanus@ducksong.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 0C5B83A67FC for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:19:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.499
X-Spam-Level: 
X-Spam-Status: No, score=-2.499 tagged_above=-999 required=5 tests=[AWL=0.100,  BAYES_00=-2.599]
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 Z1DVmefmB6tM for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:19:39 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id C58D03A677C for <hybi@ietf.org>; Sat,  8 Jan 2011 10:19:39 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id 23B9210305; Sat,  8 Jan 2011 13:21:47 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 6566010157; Sat,  8 Jan 2011 13:21:43 -0500 (EST)
From: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
To: Cedric Vivier <cedricv@neonux.com>
In-Reply-To: <AANLkTimJxNFDXA-Vd7pXZzOHWuujbaxzxzjcgzZTyQpe@mail.gmail.com>
References: <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <20110108152353.GK2479@1wt.eu> <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com> <20110108160046.GN2479@1wt.eu> <4D288EE1.3060601@warmcat.com> <1294506241.7650.40.camel@ds9.ducksong.com> <AANLkTimJxNFDXA-Vd7pXZzOHWuujbaxzxzjcgzZTyQpe@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Date: Sat, 08 Jan 2011 13:21:31 -0500
Message-ID: <1294510891.7650.87.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 18:19:41 -0000

Hi Cedric,

On Sun, 2011-01-09 at 02:01 +0800, Cedric Vivier wrote:
> On Sun, Jan 9, 2011 at 01:04, Pat McManus @Mozilla <mcmanus@ducksong.com> wrote:
> > I'm interested in hearing any arguments that advance my understanding of
> > the risk of such a simple mask beyond "it allows the attacker to produce
> > non-random (but also non-controllable) bytes".
> 
> Considering an attacker could control of both the JavaScript
> application and the WebSocket server (ie. a malicious website rather
> than a XSS), simple masking certainly feels a fragile protection
> against a determined attacker and I share Eric's concerns about it.
> 

"feels fragile" doesn't resonate with me in this context on its own
without more reasoning. I'm not speaking for anyone else.

> On top of this, even simple inexpensive masking significantly limits
> potential efficiency of WebSocket servers as it makes any payload
> essentially uncacheable therefore blocks usage of efficient and
> scalable zero-copy mechanisms (sendfile/splice/tee/..) that are used
> in modern HTTP servers.
> 

In order to mitigate this the masking is applied unidirectionally from
client toward the server. The client is unlikely to have the kind of
data that benefits from zero copy (i.e. in page cache sent to multiple
recipients) and in any event is much less likely to have highly scalable
workloads where the copy-based IO is super relevant. 

A compromised server can already send whatever bytes it wants in the
server->client direction. The mask prevents the server from generating
bytes that travel from client to server and potentially cross an
intermediary along the way.

> 
> Fragmenting messages containing "HTTP/" or, even simpler, inserting a
> 'break' byte every 8 bytes of the payload, seems like a simple and
> minimum overhead way to guarantee an attacker cannot send out bytes
> that would look like a request, while keeping the payload zero-copy
> friendly for servers.
> 

in general I don't like the complexity of things that have to statefully
scan, pad to different lengths, and fragment payloads. Lots of state and
branching in the algorithm and in turn it only addresses a particular
attack rather than a category of attack. I don't see an advantage over a
simple cheap-per-message XOR.

-Pat

-- 
http://www.getfirefox.com/



From jat@google.com  Sat Jan  8 10:26:01 2011
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 118133A677C for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:26:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.753
X-Spam-Level: 
X-Spam-Status: No, score=-104.753 tagged_above=-999 required=5 tests=[AWL=-1.776, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 fWnqOY9irsal for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:26:00 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 0EE793A67FC for <hybi@ietf.org>; Sat,  8 Jan 2011 10:25:59 -0800 (PST)
Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id p08IS6bl029005 for <hybi@ietf.org>; Sat, 8 Jan 2011 10:28:06 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294511287; bh=Cn3ZKf7EFZtA2pVSkg0O0yjOWPU=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=tcg3MB7QadCOGsFzXg7uVdAMXT0ExWEL7zBveSszwJSQLQGOsdkgyTHUtFSwEjT08 3z/JodZuVr2gh3w9euQsA==
Received: from yie19 (yie19.prod.google.com [10.243.66.19]) by wpaz33.hot.corp.google.com with ESMTP id p08IS499011247 for <hybi@ietf.org>; Sat, 8 Jan 2011 10:28:04 -0800
Received: by yie19 with SMTP id 19so5585402yie.17 for <hybi@ietf.org>; Sat, 08 Jan 2011 10:28:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=4PLsrCE7nJ8nH7wa0Oe04Pmaks0QGrg2/8jvLn1ZDRE=; b=FdNp5pAQUoOc+0rN28gXNlyK5zaAIl8syuG+6rpw2KKy9Kx8JkQk07Lgr+B9perNrv 3m7wBG8jCSvkneFKyDLA==
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=QoSTfswNydfQOy+xUQo705+tr0ywZVxk3R/VkGUhJwJP3Y4C1mjV0IZ6tITykF8wS3 13/l5bpDHqTOADPsSArw==
Received: by 10.151.143.12 with SMTP id v12mr27229982ybn.35.1294511284334; Sat, 08 Jan 2011 10:28:04 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Sat, 8 Jan 2011 10:27:44 -0800 (PST)
In-Reply-To: <AANLkTimJxNFDXA-Vd7pXZzOHWuujbaxzxzjcgzZTyQpe@mail.gmail.com>
References: <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <20110108152353.GK2479@1wt.eu> <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com> <20110108160046.GN2479@1wt.eu> <4D288EE1.3060601@warmcat.com> <1294506241.7650.40.camel@ds9.ducksong.com> <AANLkTimJxNFDXA-Vd7pXZzOHWuujbaxzxzjcgzZTyQpe@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Sat, 8 Jan 2011 13:27:44 -0500
Message-ID: <AANLkTikiozGj00C5b75Yus=CfMJi0Z6+Rs3cvnmVmvan@mail.gmail.com>
To: Cedric Vivier <cedricv@neonux.com>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 18:26:01 -0000

On Sat, Jan 8, 2011 at 1:01 PM, Cedric Vivier <cedricv@neonux.com> wrote:
> Fragmenting messages containing "HTTP/" or, even simpler, inserting a
> 'break' byte every 8 bytes of the payload, seems like a simple and
> minimum overhead way to guarantee an attacker cannot send out bytes
> that would look like a request, while keeping the payload zero-copy
> friendly for servers.

I am not sure zero-copy of 8 byte payloads is something to count as an
advantage, and it also seems unlikely the client is going to benefit
from zero-copy sends anyway (as an example, many browsers store the
text internally as UTF16 so it already has to be converted to UTF8
before sending in a text frame -- it is easy to just do the XOR as you
build that frame).  Also, this feels very fragile -- do you also split
on "http/", "Http/", etc for ones that might interpret it in a case
insensitive manner?

Finally, from an implementation point of view, this seems far more
complicated than a simple XOR and the extra branches are likely to be
slower than in-register math if you are counting down to that level.

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

From bruce@callenish.com  Sat Jan  8 10:31:25 2011
Return-Path: <bruce@callenish.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 5D4213A67FC for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:31:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.578
X-Spam-Level: 
X-Spam-Status: No, score=-2.578 tagged_above=-999 required=5 tests=[AWL=0.021,  BAYES_00=-2.599]
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 oZKy2UcNU3fP for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:31:23 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 6F67B3A677C for <hybi@ietf.org>; Sat,  8 Jan 2011 10:31:23 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PbdbX-00015a-7O for hybi@ietf.org; Sat, 08 Jan 2011 10:33:31 -0800
Message-ID: <4D28AE05.4070500@callenish.com>
Date: Sat, 08 Jan 2011 10:33:41 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com>	<10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <10468.1294398928.011152@puncture>
In-Reply-To: <10468.1294398928.011152@puncture>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Sat, 08 Jan 2011 18:31:25 -0000

On 07/01/2011 3:15 AM, Dave Cridland wrote:
>
> Would the working group consider masking in this parallel universe? Of 
> course not, because that would be silly.

I disagree. I think an argument can be made for masking even in the 
absence of a known attack. Call me silly if you want to.

The simple fact is that there have been a number of protocols introduced 
over the years where attacks have been developed that were never 
envisioned by the designers of the specs. I think you can assume the 
same thing will happen with Websockets, no matter how careful the WG is.

But we can see in hindsight that had attackers not been able to control 
the bits on the wire, a huge class of attacks would not have been 
possible. Not all attacks, mind you, but a large number.

So it is not unreasonable for people to say now, with this new protocol, 
let us stop attackers from controlling bits on the wire as much as we 
can. It may never prove to be beneficial, but experience shows us that 
it is likely to be.

The question is how much are we willing to pay for a benefit that we 
can't quantify and that may never appear. Hopefully, if there were no 
cost at all to masking you would not have an issue with it. As the cost 
goes up, we start seeing more and more people decide that the price is 
too high for a risk that is so nebulous. So there is a real incentive to 
keeeping the cost of masking low, to me.

The other question is whether we can eliminate that cost altogether in 
situations where we can guarantee via other means that attackers are not 
controlling the bits.

>
>  intermediaries that are already vulnerable to attacks of the form 
> we're trying to protect against by using Flash or Java.

I keep seeing comparisons of Websockets to Flash and Java. These are not 
even close to being the same situation.

Browser vendors do not develop Flash or Java plugins. They do not ship 
with them. Many environments forbid the installation of any plugins for 
exactly the reason that Flash and Java are security risks. When a user 
installs the plugin, they have to take responsibility for doing so, and 
any bugs or security issues are directed to Adobe or Oracle or whoever 
developed the plugin.

Websockets is different. Websockets is going to be part of the browser. 
The browser vendors are going to ship their own code. That means that 
they are responsible for Websockets, as they are not responsible for 
Flash and Java. It also means that browsers will always have an 
implementation of Websockets installed in all environments, including 
the ones that don't allow plugins (although they may be configured to 
turn it off).

> (And, maybe, ActiveX?) One assumes that, therefore, these will be 
> fixed, and not just due to websockets, but due to the far more widely 
> used rich content technologies of today.

That seems to be false given that they haven't been fixed to date. I 
doubt that any browser vendor wants to take the risk and assume they 
will be fixed, only to see themselves labeled "Insecure" by people who 
don't understand where the real security vulnerability was.

This is a known vulnerability. No major browser vendor is going to ship 
a Websockets implementation that is exposed to it. They have all said so 
on this list. Let's move on.


From neonux@gmail.com  Sat Jan  8 10:39:37 2011
Return-Path: <neonux@gmail.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 CC4033A6804 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:39:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.877
X-Spam-Level: 
X-Spam-Status: No, score=-2.877 tagged_above=-999 required=5 tests=[AWL=0.100,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 UtFqzOSIW4Se for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:39:36 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id A16CB3A67FC for <hybi@ietf.org>; Sat,  8 Jan 2011 10:39:36 -0800 (PST)
Received: by wyf23 with SMTP id 23so19309596wyf.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 10:41:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=J4JlTWm+wlSbfVDrffPvCufxIe+Fpnuyqhy3vxEMuvQ=; b=rijcs0bpriDXnrrgOm6NSS9uqPWSB7MFMbEC7mbuIm3wuIOQEhd506IbXUoPfop+fk j4V0KrJJ1j/hvCTT25s6DMPj4KIZS0XRESH6/n/lVP+NJyLwM03ctJf9+83n/uMHAxwT BvJSzxaxAUnZVKymGJ3RDSYbRMLDgIQCLt2PY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=Y/WhV/jw3MRDlAK1HUkKZhxEurJtUtyNSBqkaSm9ooNtNA5i6cCAtgLVgc0N/c3W2z NKKQ+R2843RFyLT06uNKRXsSgfUMIJf4DWzXIwXtH0X2atmyZgauqGpN6uQYiOltgEZ5 J3QpISrxLX1UMCbsTKZxEAB43rig3QrlEd/rA=
Received: by 10.227.107.99 with SMTP id a35mr4717006wbp.156.1294512076347; Sat, 08 Jan 2011 10:41:16 -0800 (PST)
MIME-Version: 1.0
Sender: neonux@gmail.com
Received: by 10.227.3.19 with HTTP; Sat, 8 Jan 2011 10:40:46 -0800 (PST)
In-Reply-To: <AANLkTikiozGj00C5b75Yus=CfMJi0Z6+Rs3cvnmVmvan@mail.gmail.com>
References: <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <20110108152353.GK2479@1wt.eu> <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com> <20110108160046.GN2479@1wt.eu> <4D288EE1.3060601@warmcat.com> <1294506241.7650.40.camel@ds9.ducksong.com> <AANLkTimJxNFDXA-Vd7pXZzOHWuujbaxzxzjcgzZTyQpe@mail.gmail.com> <AANLkTikiozGj00C5b75Yus=CfMJi0Z6+Rs3cvnmVmvan@mail.gmail.com>
From: Cedric Vivier <cedricv@neonux.com>
Date: Sun, 9 Jan 2011 02:40:46 +0800
X-Google-Sender-Auth: G7y4U2MI1Wdr2f6tgmEM_qYVpDs
Message-ID: <AANLkTinmLRht79AZBT8dPnpEy_fjvJEZY7a2+fdF+OJ-@mail.gmail.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=UTF-8
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 18:39:37 -0000

On Sun, Jan 9, 2011 at 02:27, John Tamplin <jat@google.com> wrote:
> On Sat, Jan 8, 2011 at 1:01 PM, Cedric Vivier <cedricv@neonux.com> wrote:
>> Fragmenting messages containing "HTTP/" or, even simpler, inserting a
>> 'break' byte every 8 bytes of the payload, seems like a simple and
>> minimum overhead way to guarantee an attacker cannot send out bytes
>> that would look like a request, while keeping the payload zero-copy
>> friendly for servers.
>
> I am not sure zero-copy of 8 byte payloads is something to count as an
> advantage, and it also seems unlikely the client is going to benefit
> from zero-copy sends anyway (as an example, many browsers store the
> text internally as UTF16 so it already has to be converted to UTF8
> before sending in a text frame -- it is easy to just do the XOR as you
> build that frame).

Indeed. I assumed the masking was bi-directional, so a simple
fragmentation or byte insertion would have still kept the payload
easily cacheable on the server after preprocessing once (later send
the whole-length cached preload in one 'zero-copy call').

Now that masking is clarified to be for client-to-server direction
only, the concern regarding above use case is moot.


Regards,

From bruce@callenish.com  Sat Jan  8 10:58:03 2011
Return-Path: <bruce@callenish.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 B86513A6805 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:58:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.578
X-Spam-Level: 
X-Spam-Status: No, score=-2.578 tagged_above=-999 required=5 tests=[AWL=0.021,  BAYES_00=-2.599]
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 Yt5kfnux0EWH for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 10:58:03 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 2098F3A6802 for <hybi@ietf.org>; Sat,  8 Jan 2011 10:58:03 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pbe1K-00009v-Vp for hybi@ietf.org; Sat, 08 Jan 2011 11:00:11 -0800
Message-ID: <4D28B445.2010402@callenish.com>
Date: Sat, 08 Jan 2011 11:00:21 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D25A492.20701@warmcat.com> <10468.1294318555.770054@puncture>	<4D25C033.3010501@warmcat.com> <10468.1294322396.906068@puncture>	<4D25D82A.8070302@warmcat.com>	<AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com>	<20110106184607.GB27099@1wt.eu>	<AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>
In-Reply-To: <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 18:58:03 -0000

On 06/01/2011 9:47 PM, Eric Rescorla wrote:
> Really? That's not the behavior I'm familar of with chat systems, 
> where things
> are generally phrased in stanzas that are > 20 bytes longs. This is 
> true of
> XMPP, for instance. What systems are you thinking of?

Why are you claiming to know all the ways a protocol that hasn't even 
been released yet is going to be used? How many bytes long will Google 
Wave Websocket messages be 5 years from now? Or Suggest? Or any of a 
million other examples, including a bunch that will only be invented if 
Websockets is lean enough to allow them to exist.

Bulking things up because current usage doesn't allow for the kinds of 
applications and message sizes that Willy is talking about is pretty 
shortsighted.


From andy.warmcat.com@googlemail.com  Sat Jan  8 11:39:03 2011
Return-Path: <andy.warmcat.com@googlemail.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 1146228C145 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 11:39:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.545
X-Spam-Level: 
X-Spam-Status: No, score=-3.545 tagged_above=-999 required=5 tests=[AWL=0.054,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 QDhiuIhqfIJs for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 11:39:02 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id DA90C28C157 for <hybi@ietf.org>; Sat,  8 Jan 2011 11:38:59 -0800 (PST)
Received: by wwa36 with SMTP id 36so18475411wwa.13 for <hybi@ietf.org>; Sat, 08 Jan 2011 11:41:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=yBrBxIryVGbExGx26OtdNWj2LjhmvzJMmi62Dg/o470=; b=Ppdyes3ER130r5Bg9S1sKv9Bvle8ZKvevZuaA0rMFNBvhQOaXvZ8OJGJA2Kt4BbWZa dKO/p7etDK32lS/WZd4F1fazKunT1b0sRFzAtKVlseSHemMv2wVQgRar2VeQ45vhIOnZ aahQD68GXk5N0HodZrOfL7JYb5tizgLKAT/YE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=e3dfd5Kltw7Dc/wCNBuk6XRZfqwXjimQhhpxHMbjBCYKd3sLb4E9+aKh5CWzw5yOxu gtH5ObrKO7GFMeA1pe4WexiKu/9O701ovTgdrKIa9z98hIy1BCtxzLoQXY4juGOsRsq7 F9+IkCws6qVXweJmyl+J8kh+uIyKhiH3vm0iI=
Received: by 10.227.134.129 with SMTP id j1mr16904508wbt.56.1294515667693; Sat, 08 Jan 2011 11:41:07 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id m10sm18719080wbc.22.2011.01.08.11.40.09 (version=SSLv3 cipher=RC4-MD5); Sat, 08 Jan 2011 11:41:06 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D28BD89.70704@warmcat.com>
Date: Sat, 08 Jan 2011 19:39:53 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Bruce Atherton <bruce@callenish.com>
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<4D26D20C.8030906@warmcat.com>	<10468.1294391783.740346@puncture>	<20110107100313.GO28367@1wt.eu> <10468.1294398928.011152@puncture> <4D28AE05.4070500@callenish.com>
In-Reply-To: <4D28AE05.4070500@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Sat, 08 Jan 2011 19:39:03 -0000

On 01/08/11 18:33, Somebody in the thread at some point said:

> So it is not unreasonable for people to say now, with this new protocol,
> let us stop attackers from controlling bits on the wire as much as we
> can. It may never prove to be beneficial, but experience shows us that
> it is likely to be.

Sure that this is not unreasonable?  Don't forget a websocket connection 
that the client can send something on has had to go through the initial 
handshake dance proving it is talking to a willing partner.  It means 
you can't just spray packets around the internet already; it's a very 
very narrow attack path for sure, not a generic one.

Therefore all this brow-furrowing about what is, if anything, needed in 
addition to be "nice to the internet" is restricted to unidentified 
intermediaries broken in a specific way inbetween a client and a real 
websocket server -- everyone on every side of the debate is willing to 
concede that AFAIK.

> This is a known vulnerability. No major browser vendor is going to ship
> a Websockets implementation that is exposed to it. They have all said so
> on this list. Let's move on.

Actually handwaving that it is a "known vulnerability" over-eggs the 
pudding.  It is very much an unknown and unreproducible alleged 
vulnerability in software that has not been identified publicly (or 
AFAIK privately) and may be a byproduct of the interpretation of the 
testing action.  Nobody seems to want to "out" these alleged broken 
intermediaries as part of the protocol either.

Nor is Websockets "exposed" to this alleged vuln as you say, it is 
claimed it is part of the attack vector, along with wget, curl, nc, 
anything else you can open a socket connection with.

-Andy

From gregw@intalio.com  Sat Jan  8 12:04:59 2011
Return-Path: <gregw@intalio.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 BA7CA3A681E for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 12:04:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.927
X-Spam-Level: 
X-Spam-Status: No, score=-2.927 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 eiArr39DMn6z for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 12:04:59 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 08FB63A6814 for <hybi@ietf.org>; Sat,  8 Jan 2011 12:04:58 -0800 (PST)
Received: by vws7 with SMTP id 7so7391968vws.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 12:07:07 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.194.69 with SMTP id dx5mr8989460vcb.60.1294517226943; Sat, 08 Jan 2011 12:07:06 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sat, 8 Jan 2011 12:07:06 -0800 (PST)
In-Reply-To: <4D28AA8E.4080400@ericsson.com>
References: <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com> <4D28AA8E.4080400@ericsson.com>
Date: Sat, 8 Jan 2011 21:07:06 +0100
X-Google-Sender-Auth: TpT8mm4hqeF1eEOz4Gy7qcGsOpI
Message-ID: <AANLkTikp_zBR2EEJcdc54jq6bXShND3c8S1Ys_a=Fy+_@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 20:04:59 -0000

On 8 January 2011 19:18, Salvatore Loreto <salvatore.loreto@ericsson.com> wrote:
> The straw poll ended yesterday has showed a great consensus about the
> GET+Upgrade+Masking approach
> with mandatory masking from client to server

Sal,

I certainly did not vote for mandatory masking!

The straw poll I voted for was only "upgrade-with-unidirectional-xor-mask"
No mention of mandatory and certainly no mention of strong masking
that makes the payload totally random.


regards

From gregw@intalio.com  Sat Jan  8 12:07:56 2011
Return-Path: <gregw@intalio.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 6B81C3A6818 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 12:07:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.927
X-Spam-Level: 
X-Spam-Status: No, score=-2.927 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 1Oc3MaeZTd1d for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 12:07:55 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 821993A6814 for <hybi@ietf.org>; Sat,  8 Jan 2011 12:07:55 -0800 (PST)
Received: by qyk34 with SMTP id 34so423687qyk.10 for <hybi@ietf.org>; Sat, 08 Jan 2011 12:10:01 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.87.13 with SMTP id u13mr22900980qcl.55.1294517400896; Sat, 08 Jan 2011 12:10:00 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sat, 8 Jan 2011 12:10:00 -0800 (PST)
In-Reply-To: <AANLkTikqsd1yxLoXHsVTk1G0NMcL+y_ceNo=Qw32iZE9@mail.gmail.com>
References: <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <20110107222312.GA2479@1wt.eu> <AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com> <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com> <20110108153147.GL2479@1wt.eu> <AANLkTikqsd1yxLoXHsVTk1G0NMcL+y_ceNo=Qw32iZE9@mail.gmail.com>
Date: Sat, 8 Jan 2011 21:10:00 +0100
X-Google-Sender-Auth: i9DE7pofaIUEVx8NMtkhvBaFz_I
Message-ID: <AANLkTin5K=wxZ2nf59PANH2FNnfDUNuzLZGwfB2O5=qP@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Pieter Hintjens <ph@imatix.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 20:07:56 -0000

On 8 January 2011 17:20, Pieter Hintjens <ph@imatix.com> wrote:
> On Sat, Jan 8, 2011 at 4:31 PM, Willy Tarreau <w@1wt.eu> wrote:
>> On Sat, Jan 08, 2011 at 07:09:07AM -0800, Eric Rescorla wrote:
>
>>> Can you please run a straw poll to resolve the question of masking. IMO=
 the
>>> relevant options are:
>
>> 1.5. A short sliding mask derived from a short one carried in the
>> =A0 =A0 frame and which does not require many CPU cycles per frame.
>
> +1 until specific issues are raised with it that can be solved reasonably=
.


+1

From salvatore.loreto@ericsson.com  Sat Jan  8 12:11:51 2011
Return-Path: <salvatore.loreto@ericsson.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 910F828C133 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 12:11:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.547
X-Spam-Level: 
X-Spam-Status: No, score=-106.547 tagged_above=-999 required=5 tests=[AWL=0.051, BAYES_00=-2.599, 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 cmGXULzGveCR for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 12:11:50 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id 4172E28C120 for <hybi@ietf.org>; Sat,  8 Jan 2011 12:11:49 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-16-4d28c585196e
Received: from esessmw0256.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id E1.28.23694.585C82D4; Sat,  8 Jan 2011 21:13:58 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0256.eemea.ericsson.se (153.88.115.97) with Microsoft SMTP Server id 8.2.234.1; Sat, 8 Jan 2011 21:13:57 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 909C22595	for <hybi@ietf.org>; Sat,  8 Jan 2011 22:13:57 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 5218250535	for <hybi@ietf.org>; Sat,  8 Jan 2011 22:13:57 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id D6BC04FCB2	for <hybi@ietf.org>; Sat,  8 Jan 2011 22:13:56 +0200 (EET)
Message-ID: <4D28C584.5080709@ericsson.com>
Date: Sat, 8 Jan 2011 21:13:56 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: multipart/alternative; boundary="------------080609010400030404080909"
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: [hybi] consensus result on Straw Poll: GET+Upgrade+masking
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: Sat, 08 Jan 2011 20:11:51 -0000

--------------080609010400030404080909
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit

(as co-chair)

The straw poll on "*is Upgrade with client->sever XOR mask acceptable*" 
is over:
http://www.ietf.org/mail-archive/web/hybi/current/msg05426.html


The mailing list discussion generated by the straw-poll has showed a 
rough consensus
to draft the new WebSocket handshake (and insert it in the 04 version of 
the draft) based on

a GET + Upgrade + Masking approach

where
- Masking is mandatory on the client-to-server direction
- Masking is not done on the server-to-client direction

moreover from the discussion is also emerged a strong consensus on a 
XOR-based masking.


as said in a previous mail (in a different thread) details how this will 
play out are yet to be discussed/agreed.

best regards
/Sal

-- 
Salvatore Loreto
www.sloreto.com


--------------080609010400030404080909
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    (as co-chair)<br>
    <br>
    The straw poll on "<b>is Upgrade with client-&gt;sever XOR mask
      acceptable</b>" is over:<br>
    <a class="moz-txt-link-freetext" href="http://www.ietf.org/mail-archive/web/hybi/current/msg05426.html">http://www.ietf.org/mail-archive/web/hybi/current/msg05426.html</a><br>
    <br>
    <br>
    The mailing list discussion generated by the straw-poll has showed a
    rough consensus<br>
    to draft the new WebSocket handshake (and insert it in the 04
    version of the draft) based on<br>
    <br>
    a GET + Upgrade + Masking approach<br>
    <br>
    where<br>
    - Masking is mandatory on the client-to-server direction<br>
    - Masking is not done on the server-to-client direction <br>
    <br>
    moreover from the discussion is also emerged a strong consensus on a
    XOR-based masking.<br>
    <br>
    <br>
    as said in a previous mail (in a different thread) details how this
    will play out are yet to be discussed/agreed.<br>
    <br>
    best regards<br>
    /Sal<br>
    <pre class="moz-signature" cols="72">-- 
Salvatore Loreto
<a class="moz-txt-link-abbreviated" href="http://www.sloreto.com">www.sloreto.com</a></pre>
  </body>
</html>

--------------080609010400030404080909--

From salvatore.loreto@ericsson.com  Sat Jan  8 12:20:58 2011
Return-Path: <salvatore.loreto@ericsson.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 38C913A681B for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 12:20:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.549
X-Spam-Level: 
X-Spam-Status: No, score=-106.549 tagged_above=-999 required=5 tests=[AWL=0.050, BAYES_00=-2.599, 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 wasBK2aUTGxd for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 12:20:52 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 679003A681A for <hybi@ietf.org>; Sat,  8 Jan 2011 12:20:52 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-af-4d28c7a45427
Received: from esessmw0256.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id 27.F0.13987.4A7C82D4; Sat,  8 Jan 2011 21:23:00 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0256.eemea.ericsson.se (153.88.115.97) with Microsoft SMTP Server id 8.2.234.1; Sat, 8 Jan 2011 21:22:59 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id A4CDC2595; Sat,  8 Jan 2011 22:22:59 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 690F750535; Sat,  8 Jan 2011 22:22:59 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id D6C184FCB2; Sat,  8 Jan 2011 22:22:58 +0200 (EET)
Message-ID: <4D28C7A2.1060504@ericsson.com>
Date: Sat, 8 Jan 2011 21:22:58 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <20110107185801.GB32612@1wt.eu>	<AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com>	<20110107203958.GC32612@1wt.eu>	<AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>	<20110107222312.GA2479@1wt.eu>	<AANLkTin-qLgyfksjv5MC9jk1t6-CaaTGAg=tnvfYcAQr@mail.gmail.com>	<20110108001549.GD2479@1wt.eu>	<D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com>	<20110108015002.GG2479@1wt.eu>	<E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com>	<20110108081232.GH2479@1wt.eu>	<AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com>	<AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com>	<4D28AA8E.4080400@ericsson.com> <AANLkTikp_zBR2EEJcdc54jq6bXShND3c8S1Ys_a=Fy+_@mail.gmail.com>
In-Reply-To: <AANLkTikp_zBR2EEJcdc54jq6bXShND3c8S1Ys_a=Fy+_@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 20:20:58 -0000

On 1/8/11 9:07 PM, Greg Wilkins wrote:
> On 8 January 2011 19:18, Salvatore Loreto<salvatore.loreto@ericsson.com>  wrote:
>> The straw poll ended yesterday has showed a great consensus about the
>> GET+Upgrade+Masking approach
>> with mandatory masking from client to server
> Sal,
>
> I certainly did not vote for mandatory masking!
> The straw poll I voted for was only "upgrade-with-unidirectional-xor-mask"
as I said in the mails there are still details that need to be agreed.

one is what mandatory means!
the John proposal 
(http://www.ietf.org/mail-archive/web/hybi/current/msg05559.html)
seems to be a possible compromise we can work on

> No mention of mandatory and certainly no mention of strong masking
> that makes the payload totally random.
what kind of masking and how strong it has to be is another point yet to 
be discussed/agreed

cheers
/Sal
>
> regards


-- 
Salvatore Loreto
www.sloreto.com


From bruce@callenish.com  Sat Jan  8 14:02:13 2011
Return-Path: <bruce@callenish.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 524D83A68B9 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 14:02:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.579
X-Spam-Level: 
X-Spam-Status: No, score=-2.579 tagged_above=-999 required=5 tests=[AWL=0.020,  BAYES_00=-2.599]
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 dPYVJvNJHxkD for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 14:02:12 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 8F9573A6831 for <hybi@ietf.org>; Sat,  8 Jan 2011 14:02:12 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PbgtY-0005VR-Ie for hybi@ietf.org; Sat, 08 Jan 2011 14:04:20 -0800
Message-ID: <4D28DF6E.4080003@callenish.com>
Date: Sat, 08 Jan 2011 14:04:30 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com>	<20110107185801.GB32612@1wt.eu>	<AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com>	<20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>
In-Reply-To: <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 22:02:13 -0000

On 07/01/2011 1:19 PM, Eric Rescorla wrote:
>
> My objective is to make the bits that appear on the wire 
> indistinguishable from random
> from the attacker's perspective. I think it's clear that this is the 
> strongest form of masking
> available, and the method I proposed does that.

It is true that your goal is clear, but I don't understand why you think 
this goal is necessary.

The specification already allows for two forms of Websocket, a simple 
one denoted by the scheme "ws:" and a secure one denoted with "wss:". 
The latter one will have the random byte stream characteristics you are 
interested in. If you are uncomfortable with any other kind of stream, 
make sure your client only supports secure Websockets.

The reason for the division between the two types is that in some 
situations, people want the ability to trade-off some security for lower 
cost. This cost is not just in terms of machine processing, but other 
things as well. For example, the decreased cost of debugging streams of 
data when they are decipherable with a tool like Wireshark. Keeping 
masking simple decreases a bunch of costs in ways that matter enough to 
people that they are willing to support two separate websocket schemes 
in order to have that choice.

Or perhaps you are actually arguing that your masking should be the 
mechanism for the wss: scheme? Or that there should be no ws: scheme for 
anyone?


From mjs@apple.com  Sat Jan  8 14:24:57 2011
Return-Path: <mjs@apple.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 592DE3A68BD for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 14:24:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.599
X-Spam-Level: 
X-Spam-Status: No, score=-106.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, 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 g+Nt7IJXwme1 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 14:24:55 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id D79DC3A6842 for <hybi@ietf.org>; Sat,  8 Jan 2011 14:24:55 -0800 (PST)
Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out3.apple.com (Postfix) with ESMTP id B5CA8C5B9BAC for <hybi@ietf.org>; Sat,  8 Jan 2011 14:26:52 -0800 (PST)
X-AuditID: 11807134-b7cfdae000001831-72-4d28e4acb803
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay14.apple.com (Apple SCV relay) with SMTP id 1C.1B.06193.CA4E82D4; Sat,  8 Jan 2011 14:26:52 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.151.81.229] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEQ00L586CRKI30@elliott.apple.com> for hybi@ietf.org; Sat, 08 Jan 2011 14:26:52 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110108111632.GI2479@1wt.eu>
Date: Sat, 08 Jan 2011 14:26:50 -0800
Message-id: <91303A50-B94E-45C6-8392-9AA9EFD43D94@apple.com>
References: <20110108111632.GI2479@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sat, 08 Jan 2011 22:24:57 -0000

Hi Willy,

Thanks for actually testing! One thing to note about your experiment - you're testing only a single part of a complete WebSocket service, omitting the I/O parts and whatever processing actually occurs in response to a message received. So I don't think it's correct to infer a percent overhead from this experiment. What we can do, though, is see whether this isolated component alone would be too slow to let us process some number of messages per second.


Looking at this another way, I'd like to see how this compares to the goal of 200k messages processed per second on a server handling 1 million concurrent connections. Your test runs everything serially and therefore makes use of only a single CPU core. A realistic scenario would involve processing many connections in parallel. On my system (apparently somewhat slower than yours), here's what I get running 4 tests in parallel:


$ time sh -c './ws-parse 1 < /tmp/stream.bin > /dev/null & ./ws-parse 1 < /tmp/stream.bin > /dev/null & ./ws-parse 1 < /tmp/stream.bin > /dev/null & ./ws-parse 1 < /tmp/stream.bin > /dev/null'
20000002 messages forwarded
20000002 messages forwarded
20000002 messages forwarded
20000002 messages forwarded

real	1m34.343s
user	4m37.364s
sys	0m1.459s

That's 94 seconds total to process 80 million messages. This would imply a rate of ~850k operations per second, well within the margins for 200k messages processed a second, with plenty of CPU to spare to do the actual processing. Note: I doubt my laptop could actually handle a million concurrent connections as in the example scenario. A dual 6-core 3 GHz Xeon, for example would probably be able to do this 10-20x as fast as my single dual-core 2.66Ghz Core i7.

My conclusion: HMAC to compute a per-frame mask would not be an obstacle to handling a million concurrent connections on a single server. It falls well within a reasonable performance target.

Regards,
Maciej



On Jan 8, 2011, at 3:16 AM, Willy Tarreau wrote:

> Since I was not convinced at all by the supposedly very low
> overhead of using HMAC to compute a masking key, I have written
> a WebSocket framing parser which reads, parses and forwards frames.
> It supports 7, 16 and 63-bit lengths, stops after forwarding the
> last frame with opcode 0x01 and exits with an error if the input
> is broken before reaching the end of the closing frame.
> 
> When called with any argument, it computes an hmac-sha1 key derived
> from a simple 32-bit constant key (for simplicity) for each frame.
> 
> The payload is not even unmasked with the key, the purpose is just
> to evaluate the cost for a front server/load balancer/switch supposed
> to switch frames to a server farm.
> 
> I have ran it over a stream of messages whose payload was between 1
> and 125 bytes, with an average of 29 bytes (rnd(1..5) ^ 3), so that
> we're in line with many legitimate uses of the protocol such as online
> chat, and it happens to always fit in one byte length, making the
> stream generator even easier to write.
> 
> The results :
> 
> willy@pcw:~/c$ wc -c /dev/shm/ws-stream.bin
> 579976835 /dev/shm/ws-stream.bin
> 
> - without masking :
>  willy@pcw:~/c$ time ./ws-parse < /dev/shm/ws-stream.bin >/dev/null 
>  20000001 messages forwarded
> 
>  real    0m1.753s
>  user    0m1.544s
>  sys     0m0.208s
> 
>  => average bit rate : 4.1 Gbps
> 
> - with HMAC-based masking :
>  willy@pcw:~/c$ time ./ws-parse 1 < /dev/shm/ws-stream.bin >/dev/null 
>  20000001 messages forwarded
> 
>  real    0m42.098s
>  user    0m41.759s
>  sys     0m0.212s
> 
>  => average bit rate : 172 Mbps
> 
> Masking the stream with HMAC multiplies the parsing time by 24 on small
> messages !!! We're not at all in the range of a few percent more. The
> parser with HMAC is limited to only 172 Mbps on a 3 GHz system, which
> is the speed at which the non-masking parser would run on a 125 MHz
> system.
> 
> Considering those facts, I'm strongly opposed to using HMAC as well as
> any algorithm which has a similar level of complexity, which is normally
> required only for cryptographically strong usages.
> 
> We're not trying to encrypt the stream, we're just ensuring that no
> broken intermediary will accidentally find a request that was put
> there on purpose by an attacker. Such a complexity is not required
> at all and is way overkill. The per-byte masking cost must remain
> very low even for small frames.
> 
> I still think that a simple sliding XOR based on a cheap modification
> of the seed is far more than enough against choosen text attacks for
> this use case, such as the example code I provided yesterday, or any
> other one with the same level of complexity.
> 
> The code to reproduce those tests can be freely downloaded there :
> 
>    http://1wt.eu/websocket/
> 
> It's clearly not a model of beauty as it's only a POC. So it's not needed
> to comment on its ugliness or its possible improvements.
> 
> Regards,
> Willy
> 
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


From derhoermi@gmx.net  Sat Jan  8 14:36:41 2011
Return-Path: <derhoermi@gmx.net>
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 BAE233A68D1 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 14:36:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.662
X-Spam-Level: 
X-Spam-Status: No, score=-3.662 tagged_above=-999 required=5 tests=[AWL=-1.063, BAYES_00=-2.599]
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 aK7f1OxNG401 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 14:36:40 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 85E013A68D0 for <hybi@ietf.org>; Sat,  8 Jan 2011 14:36:38 -0800 (PST)
Received: (qmail invoked by alias); 08 Jan 2011 22:38:46 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp025) with SMTP; 08 Jan 2011 23:38:46 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1+IM0ZDTXaIQ5lZLhtPGfTqNsn51w4EjvP/lCzovV v4pwinRISxwIvX
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
Date: Sat, 08 Jan 2011 23:38:36 +0100
Message-ID: <9g6hi6tjasqui4m9m66jtdlvm1c6u6semp@hive.bjoern.hoehrmann.de>
References: <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <20110108152353.GK2479@1wt.eu> <AANLkTinUjxmECwUq32u4jWQQyp_Hq-M=tNgZqvk0+fDB@mail.gmail.com> <20110108160046.GN2479@1wt.eu> <4D288EE1.3060601@warmcat.com> <1294506241.7650.40.camel@ds9.ducksong.com>
In-Reply-To: <1294506241.7650.40.camel@ds9.ducksong.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 22:36:41 -0000

* Pat McManus @Mozilla wrote:
>That being said, I haven't yet heard anything that makes me concerned
>that an attacker can "produce a messasge with a particular structure"
>using an inexpensive sliding mask. It appears that that concern falls
>outside the class of attacks we should realistically be worrying about
>which is the attacker generating specific byte sequences of her
>choosing.
>
>I'm interested in hearing any arguments that advance my understanding of
>the risk of such a simple mask beyond "it allows the attacker to produce
>non-random (but also non-controllable) bytes". What is the relationship
>here that leads us down a dangerous looking path? If I've missed them in
>the recent torrent of dialogue, I apologize in advance and appreciate
>the pointers.

(I wish someone'd thought of asking this before another 100+ thread...)

Well, if you take my simple straw man (prefix a mask, xor the following
bytes with it, repeating the mask as necessary) then you simple need to
arrange the traffic in a manner that keeps the connection alive and send
a lot of data; eventually you get the attack payload you want on the
wire. If a proxy listening in on the connection somehow manages to skip
over all the rubbish and then takes up your attack payload and then does
something dangerous with it, then your attack has succeeded.

The only questions are whether such proxies are deployed in quantities
and configurations that should have us worried (there is no evidence at
all that there is a proxy that has the relevant combination of flaws)
and how much data you have to make the browser put on the wire.

You most likely don't need exactly one out of n keys for an attack to
succeed as you have some tolerances like case-insensitive protocol ele-
ments, and you can do some things to cleverly arrange the bytes you ask
the browser to mask and send, or for that matter you can make the pay-
load very large so many keys would work (if the key is just a byte you
simply generate all 256 masked payloads).

One could look at this by comparing it to another threat. There are for
sure intermediaries that have an integer overflow vulnerability with
requests that are longer than 2 or 4 GB, so if an attacker can make a
HTTP client send a very large crafted payload, an intermediary might
take part of the payload as second HTTP request. Should that mean all
HTTP clients that send untrusted data must limit the size to 2 GB, or
at least heavily encrypt data that is longer?

Earlier we talked about using a WEBSOCKET method in the handshake, and
Adam Barth reminded us that as far as cross-protocol attacks go, that's
a problem because sending "W" at the beginning hasn't been studied. So
should that mean over at the W3C "CORS" cannot use "OPTIONS" to verfiy
certain requests are welcome because "O" hasn't been studied there?

We haven't learned about any new attacks from Adam et al.'s paper, the
cache poisoning issue has been known since at least 2005 with request
smuggling attacks (fill in a couple of newlines in some XHR header and
the proxy sees two requests where the browser thought it's sending one)
and the host misdirection attack has been known since at least 2008, it
is even mentioned in the Wikipedia article on transparent proxies since
2009 and Roy T. Fielding and Jeff Hodges posted links to Robert Auger's
paper to the list in 2009, and the paper also discusses the cache issue.

Hasn't stopped Flash and Java plugin vendors from allowing attackers to
exploit these issues, hasn't stopped browser vendors from allowing the
plugins to run in their software, hasn't stopped Websocket drafts from
being adopted in browsers. Again, immediately after this list has been
created, Roy T. Fielding noted that an Upgrade handshake succeeding does
not mean intermediaries won't mistake further traffic as HTTP traffic.

I've been reading this whole discussion as an attempt to find something
that's simple and efficient with reasonably low risk. Robustness is the
last requirement in our requirements document with a lowercase "should".
You can't make any and all servers and intermediaries stop treating
traffic as HTTP traffic by sending a couple of magic bits. Water is wet.
Seriously, if browser vendors required a zero-risk design where the zero
is easy to prove, they should have shot down any and all proposals that
do not meet that requirement immediately instead of implementing drafts
that very obviously don't meet that requirement.

So with the masking straw man above the concern is essentially about a
proxy that has never been seen or heard of being vulnerable to attacks
we don't quite know how to make feasible. I can understand some worry
that this very simple scheme is insufficient, but going from there to
"the mask must include a client nonce, must include a server nonce,
must include some special secret, must include a block counter, must
include a per-frame key, the frame key must at least be 4 bytes long,
all the key material must be passed through HMAC-SHA1, the header must
be masked, any and all Websocket clients must mask always, ideally put
some CONNECT talisman ahead on the connection" and probably things I've
missed, is a very very long way.

Obviously I am not entirely comfortable with a scheme this simple, or
I would not keep calling it a straw man, but among all the proposals
we've had, it does seem to meet the many conflicting requirements best,
and, unlike the super duper double plus plus extra robust scheme, it's
somewhat consistent with how we got here.

It also seems wrong to look at this solely from the bits-on-the-wire
perspective. Browsers regularily check the web for browser updates and
anti-phising lists and whatnot, they could do sanity checks whether the
user is behind a vulnerably proxy. They also have XSS filters to check
for seemingly dangerous patterns, they could simply pre-scan the masked
frame, if it could be mistaken for a HTTP request, pick a different
key, if that fails, split the message into multiple frames, or whatever.

"If masked payload contains case-insensitively 'Host' regardless of the
key chosen, split message at after each 'Ho' into two frames".

You now need the previous miracle proxy we don't know exists and an
attack we don't know how to make feasible and also some additional proxy
bug that allows you to do dangerous things without "Host", at the cost
of rare failures because whatever key is applied doesn't prevent "Host",
and the server assumed the message would arrive as one frame but did
not. Add whatever additional bad words you care about, say "http", or
make the patterns a bit more complex to avoid the odd maybe-failure,
checking for a double newline somewhere after "Host" for instance. I'm
sure of course that's unacceptable, just like all the other proposals.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From w@1wt.eu  Sat Jan  8 14:38:27 2011
Return-Path: <w@1wt.eu>
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 66FAF3A68CB for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 14:38:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.089
X-Spam-Level: 
X-Spam-Status: No, score=-2.089 tagged_above=-999 required=5 tests=[AWL=-0.046, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 Vd9IJtpk33JV for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 14:38:26 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 1E65F3A68BD for <hybi@ietf.org>; Sat,  8 Jan 2011 14:38:25 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p08MeWuk006661; Sat, 8 Jan 2011 23:40:32 +0100
Date: Sat, 8 Jan 2011 23:40:32 +0100
From: Willy Tarreau <w@1wt.eu>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Message-ID: <20110108224032.GG5743@1wt.eu>
References: <20110108001549.GD2479@1wt.eu> <D49A74C1-9F07-46CC-A40C-34DA95F97EEC@rtfm.com> <20110108015002.GG2479@1wt.eu> <E8EBD3D6-7526-4D01-85AB-24B846884AC7@rtfm.com> <20110108081232.GH2479@1wt.eu> <AANLkTimmeNH50hNswbjq8ztwgyAvxUso=LSyKp7XyqK=@mail.gmail.com> <AANLkTimG5ZyrbR7N-3LbaSW4BD1EZ3v1o+mK57g6T=qR@mail.gmail.com> <4D28AA8E.4080400@ericsson.com> <AANLkTikp_zBR2EEJcdc54jq6bXShND3c8S1Ys_a=Fy+_@mail.gmail.com> <4D28C7A2.1060504@ericsson.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D28C7A2.1060504@ericsson.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: [hybi] Using extensions for masking (was: A bit of pragmatism)
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: Sat, 08 Jan 2011 22:38:27 -0000

On Sat, Jan 08, 2011 at 09:22:58PM +0100, Salvatore Loreto wrote:
> On 1/8/11 9:07 PM, Greg Wilkins wrote:
> >I certainly did not vote for mandatory masking!
> >The straw poll I voted for was only "upgrade-with-unidirectional-xor-mask"
> as I said in the mails there are still details that need to be agreed.
> 
> one is what mandatory means!
> the John proposal 
> (http://www.ietf.org/mail-archive/web/hybi/current/msg05559.html)
> seems to be a possible compromise we can work on

I noticed this proposal, it looks like a nice starting point, as
well as Greg's reply who reminded his close proposal to help merging
the two threads.

  http://www.ietf.org/mail-archive/web/hybi/current/msg05589.html

Since I've not seen any progress after that, and the last poll is over,
I think that it could be a good opportunity to try to merge them both.

One difference I'm seeing that we should get rid of to start more easily
is that John's proposal already names the masking type, and Greg already
suggests a fixed length masking key.
  => we could for now consider "the masking type" and "its key of the
     adequate length for the masking type". This will make it easier to
     focus on the general principle of using the extensions for that.

Among the comments I have on the proposals, I still think we should
use one of the reserved bit to indicate presence of extensions or not,
for the day we want to support multiplexing. Otherwise, and old version
intermediary might get the framing wrong if it can't detect presence of
extensions nor know their length (or maybe we could have the payload
len cover the extension data, though that would probably be harder to
implement for clients). It could also make it possible to strongly
mask some frames (eg: login/passwd). I'm not saying the reserved bit
is enough, but rather that it can help decide how to handle extensions
when some frames use them and others don't.

I find it interesting that both allow some types of communications to
happen without masking, considering that there has been some demand
that some non-browser clients could avoid masking in some situations.
After all, it leaves a choice comparable to how we currently decide
whether to use HTTP or HTTPS for some intra-enterprise communications.

I like the ability to mask some extensions too, though we should be
careful to keep the ability to have some in clear text (eg: support
for NAT by some dumb equipments of addresses sent in extension data).
Maybe the order of the extensions is enough for that.

Regards,
Willy


From w@1wt.eu  Sat Jan  8 15:34:56 2011
Return-Path: <w@1wt.eu>
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 7CE1A28C127 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 15:34:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.089
X-Spam-Level: 
X-Spam-Status: No, score=-2.089 tagged_above=-999 required=5 tests=[AWL=-0.046, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 vEWWB4QKjPpT for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 15:34:54 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 5F7B928C120 for <hybi@ietf.org>; Sat,  8 Jan 2011 15:34:52 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p08NawtD006785; Sun, 9 Jan 2011 00:36:58 +0100
Date: Sun, 9 Jan 2011 00:36:58 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110108233658.GH5743@1wt.eu>
References: <20110108111632.GI2479@1wt.eu> <91303A50-B94E-45C6-8392-9AA9EFD43D94@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <91303A50-B94E-45C6-8392-9AA9EFD43D94@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sat, 08 Jan 2011 23:34:56 -0000

Hi Maciej,

On Sat, Jan 08, 2011 at 02:26:50PM -0800, Maciej Stachowiak wrote:
> 
> Hi Willy,
> 
> Thanks for actually testing! One thing to note about your experiment - you're
> testing only a single part of a complete WebSocket service, omitting the I/O
> parts

I/O parts are intentionally not emphasized because depending on what the
intermediary does and how the lower levels work, it can represent a very
low overhead. For instance, the 10 Gbps Myricom NICs I'm working with are
very efficient at doing LRO (Large Receive Offload, which consists in
aggregating segments before passing through network layers). The application
layer receives TCP segments of about 20-50 kB, which precisely is in the
range of the read size I've used in the experiment (32 kB). Sending many
segments to a NIC already costs almost nothing with most NICs and drivers
today. So as long as the framing permits it, it is possible that a front
proxy splits aggregate streams to multiple server farms without too much
cost.

In fact, what I predict we'll see in the medium term is that we'll have
for WebSocket exactly what we already have with HTTP: dedicated boxes
which will do TCP packet splicing in ASICs and deliver it to the CPU to
perform content-based switching and policy enforcement. Thus the theorical
I/O operations cannot really be counted as I/O operations, but much more
as messages processed and/or bandwidth.

Also, please note that I/Os were not really omitted either, as currently
the fwrite() calls are of major concern, because they're responsible for
63% of the CPU usage. I could not count for the read(). I should have used
mmap() for that, it was way out of the scope.

> and whatever processing actually occurs in response to a message received.

Yes indeed.

> So I don't think it's correct to infer a percent overhead from this experiment.

It depends how you see it, it shows that on the amount of CPU spent in the WS
handling code, 96% was spent in HMAC, >2.5% in I/Os, <1.5% in frame parsing.

> What we can do, though, is see whether this isolated component alone would be
> too slow to let us process some number of messages per second.

Which finally is equivalent to see how to size the isolated component for a
given task.

> Looking at this another way, I'd like to see how this compares to the goal
> of 200k messages processed per second on a server handling 1 million concurrent
> connections. Your test runs everything serially and therefore makes use of only
> a single CPU core.

Yes, but that's common across stream processing devices to dedicate cores to
functions. That avoids the high cost of locking when there is a need for any
type of shared data.

> A realistic scenario would involve processing many connections in parallel.
> On my system (apparently somewhat slower than yours), here's what I get
> running 4 tests in parallel:
> 
> 
> $ time sh -c './ws-parse 1 < /tmp/stream.bin > /dev/null & ./ws-parse 1 < /tmp/stream.bin > /dev/null & ./ws-parse 1 < /tmp/stream.bin > /dev/null & ./ws-parse 1 < /tmp/stream.bin > /dev/null'
> 20000002 messages forwarded
> 20000002 messages forwarded
> 20000002 messages forwarded
> 20000002 messages forwarded
> 
> real	1m34.343s
> user	4m37.364s
> sys	0m1.459s
> 
> That's 94 seconds total to process 80 million messages. This would imply a rate of ~850k operations per second, well within the margins for 200k messages processed a second, with plenty of CPU to spare to do the actual processing. Note: I doubt my laptop could actually handle a million concurrent connections as in the example scenario. A dual 6-core 3 GHz Xeon, for example would probably be able to do this 10-20x as fast as my single dual-core 2.66Ghz Core i7.

Once again, it depends if the workload can realistically be split on multiple
cores, but I'm following you on this.

> My conclusion: HMAC to compute a per-frame mask would not be an obstacle to handling a million concurrent connections on a single server. It falls well within a reasonable performance target.

In a single server the size of yours. Without the HMAC, a much lower-end
processor is able to do the task. That means that it can enable routers
to perform software-based framing analysis for NAT. It can enable firewalls
to perform content analysis at a small cost.

Now look at it the other side. Right now we're finding high-end HTTP load
balancers capable of handling one million HTTP requests per second, and
almost as many connections per second. Those devices sell well BTW, because
there is a demand at large ISPs or enterprises. At these rates, they do very
little thing. They connect, forward, splice connections together and that's
almost all they do. But that's huge because they're offloading a lot of the
I/O job for multiple other devices that will be able to individually process
their share of the job.

Such devices require extremely fast frame processing, that's the key point.
The more expensive the per-frame forwarding cost, the higher the number of
equipments will be required for the task.

Some large sites already struggle with limited infrastructure performance.
I recently read somewhere from a Facebook engineer that they were impatient
to get 100GB Ethernet, because all their servers are connected at 10GB and
that's not enough. Ah it was here :

   http://www.pcworld.com/businesscenter/article/188412/facebook_sees_need_for_terabit_ethernet.html

I don't know what's their bandwidth, but at 500 million users and 250
regular (at least once a month), they must have big fat pipes well
used in both directions, with I-don't-know-how-many parallel chat
sessions.

Also it's important to keep in mind that if WebSocket gets success, it
can be adopted in areas we've not thought about. For instance, HTTP is
currently used by some databases. It's never fast enough. The "nosql"
DBs as some like to call them are stressed to process hundreds of
thousands of requests/response a second at even moderately sized sites.
HTTP is overkill for the task since the job consists in returning a
variable from RAM or storing one, but it's handy.

WebSocket might be a very well suited alternative to HTTP for these
uses. Wasting a major part of the DB's CPU sycle and latency decoding
frames in an environment where it's irrelevant is simply a shame.

Other uses : mobile phone operators are progressively pushing IP
closer to the radio, even for voice. We could think that WebSocket
could be used as an underlying block at some point in those environments
for its ability to frame data, and mix various types of frames together
(eg: data+voice+signaling with different opcodes).

The endpoint which has to process the frames should avoid spending its
time doing HMACs that are irrelevant to its use.

So as you can see, I'm really concerned by the relative overhead because
we'll always find a usage for a given sizing, and that's always been the
case since the first network protocols were designed. If IP conceptors
30 years ago had imagined that their packets would be processed by switches
at rates over 100 million per second, they would probably have adapted it
a little bit to make a few things easier to process for the hardware. That's
my concern too : how to ensure it scales smoothly in case it works.

Regards,
Willy


From ekr@rtfm.com  Sat Jan  8 15:57:06 2011
Return-Path: <ekr@rtfm.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 E5F2628C14F for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 15:57:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.628
X-Spam-Level: 
X-Spam-Status: No, score=-102.628 tagged_above=-999 required=5 tests=[AWL=0.349, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 pP1bQfeMZSdI for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 15:57:05 -0800 (PST)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by core3.amsl.com (Postfix) with ESMTP id 73F7E28C120 for <hybi@ietf.org>; Sat,  8 Jan 2011 15:57:05 -0800 (PST)
Received: by ywk9 with SMTP id 9so8091230ywk.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 15:59:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.114.5 with SMTP id m5mr4755195agc.25.1294531153294; Sat, 08 Jan 2011 15:59:13 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sat, 8 Jan 2011 15:59:13 -0800 (PST)
In-Reply-To: <91303A50-B94E-45C6-8392-9AA9EFD43D94@apple.com>
References: <20110108111632.GI2479@1wt.eu> <91303A50-B94E-45C6-8392-9AA9EFD43D94@apple.com>
Date: Sat, 8 Jan 2011 15:59:13 -0800
Message-ID: <AANLkTinwNQ=mbXcJT5vR1Mi82DTx21U195fNEFZQUJEX@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sat, 08 Jan 2011 23:57:07 -0000

FWIW, I don't know how you're computing HMAC, but the naive
implementation is about
1/2 as fast as optimized implementations. The trick is to precompute
and cache the
hash state after you have incorporated the keys. This saves a bunch of
setup overhead.

Best,
-Ekr


On Sat, Jan 8, 2011 at 2:26 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>
> Hi Willy,
>
> Thanks for actually testing! One thing to note about your experiment - yo=
u're testing only a single part of a complete WebSocket service, omitting t=
he I/O parts and whatever processing actually occurs in response to a messa=
ge received. So I don't think it's correct to infer a percent overhead from=
 this experiment. What we can do, though, is see whether this isolated comp=
onent alone would be too slow to let us process some number of messages per=
 second.
>
>
> Looking at this another way, I'd like to see how this compares to the goa=
l of 200k messages processed per second on a server handling 1 million conc=
urrent connections. Your test runs everything serially and therefore makes =
use of only a single CPU core. A realistic scenario would involve processin=
g many connections in parallel. On my system (apparently somewhat slower th=
an yours), here's what I get running 4 tests in parallel:
>
>
> $ time sh -c './ws-parse 1 < /tmp/stream.bin > /dev/null & ./ws-parse 1 <=
 /tmp/stream.bin > /dev/null & ./ws-parse 1 < /tmp/stream.bin > /dev/null &=
 ./ws-parse 1 < /tmp/stream.bin > /dev/null'
> 20000002 messages forwarded
> 20000002 messages forwarded
> 20000002 messages forwarded
> 20000002 messages forwarded
>
> real =A0 =A01m34.343s
> user =A0 =A04m37.364s
> sys =A0 =A0 0m1.459s
>
> That's 94 seconds total to process 80 million messages. This would imply =
a rate of ~850k operations per second, well within the margins for 200k mes=
sages processed a second, with plenty of CPU to spare to do the actual proc=
essing. Note: I doubt my laptop could actually handle a million concurrent =
connections as in the example scenario. A dual 6-core 3 GHz Xeon, for examp=
le would probably be able to do this 10-20x as fast as my single dual-core =
2.66Ghz Core i7.
>
> My conclusion: HMAC to compute a per-frame mask would not be an obstacle =
to handling a million concurrent connections on a single server. It falls w=
ell within a reasonable performance target.
>
> Regards,
> Maciej
>
>
>
> On Jan 8, 2011, at 3:16 AM, Willy Tarreau wrote:
>
>> Since I was not convinced at all by the supposedly very low
>> overhead of using HMAC to compute a masking key, I have written
>> a WebSocket framing parser which reads, parses and forwards frames.
>> It supports 7, 16 and 63-bit lengths, stops after forwarding the
>> last frame with opcode 0x01 and exits with an error if the input
>> is broken before reaching the end of the closing frame.
>>
>> When called with any argument, it computes an hmac-sha1 key derived
>> from a simple 32-bit constant key (for simplicity) for each frame.
>>
>> The payload is not even unmasked with the key, the purpose is just
>> to evaluate the cost for a front server/load balancer/switch supposed
>> to switch frames to a server farm.
>>
>> I have ran it over a stream of messages whose payload was between 1
>> and 125 bytes, with an average of 29 bytes (rnd(1..5) ^ 3), so that
>> we're in line with many legitimate uses of the protocol such as online
>> chat, and it happens to always fit in one byte length, making the
>> stream generator even easier to write.
>>
>> The results :
>>
>> willy@pcw:~/c$ wc -c /dev/shm/ws-stream.bin
>> 579976835 /dev/shm/ws-stream.bin
>>
>> - without masking :
>> =A0willy@pcw:~/c$ time ./ws-parse < /dev/shm/ws-stream.bin >/dev/null
>> =A020000001 messages forwarded
>>
>> =A0real =A0 =A00m1.753s
>> =A0user =A0 =A00m1.544s
>> =A0sys =A0 =A0 0m0.208s
>>
>> =A0=3D> average bit rate : 4.1 Gbps
>>
>> - with HMAC-based masking :
>> =A0willy@pcw:~/c$ time ./ws-parse 1 < /dev/shm/ws-stream.bin >/dev/null
>> =A020000001 messages forwarded
>>
>> =A0real =A0 =A00m42.098s
>> =A0user =A0 =A00m41.759s
>> =A0sys =A0 =A0 0m0.212s
>>
>> =A0=3D> average bit rate : 172 Mbps
>>
>> Masking the stream with HMAC multiplies the parsing time by 24 on small
>> messages !!! We're not at all in the range of a few percent more. The
>> parser with HMAC is limited to only 172 Mbps on a 3 GHz system, which
>> is the speed at which the non-masking parser would run on a 125 MHz
>> system.
>>
>> Considering those facts, I'm strongly opposed to using HMAC as well as
>> any algorithm which has a similar level of complexity, which is normally
>> required only for cryptographically strong usages.
>>
>> We're not trying to encrypt the stream, we're just ensuring that no
>> broken intermediary will accidentally find a request that was put
>> there on purpose by an attacker. Such a complexity is not required
>> at all and is way overkill. The per-byte masking cost must remain
>> very low even for small frames.
>>
>> I still think that a simple sliding XOR based on a cheap modification
>> of the seed is far more than enough against choosen text attacks for
>> this use case, such as the example code I provided yesterday, or any
>> other one with the same level of complexity.
>>
>> The code to reproduce those tests can be freely downloaded there :
>>
>> =A0 =A0http://1wt.eu/websocket/
>>
>> It's clearly not a model of beauty as it's only a POC. So it's not neede=
d
>> to comment on its ugliness or its possible improvements.
>>
>> Regards,
>> Willy
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From ekr@rtfm.com  Sat Jan  8 15:58:21 2011
Return-Path: <ekr@rtfm.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 49EED28C14F for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 15:58:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.632
X-Spam-Level: 
X-Spam-Status: No, score=-102.632 tagged_above=-999 required=5 tests=[AWL=0.345, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 wFPOtN+4-1GV for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 15:58:20 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 75B4128C120 for <hybi@ietf.org>; Sat,  8 Jan 2011 15:58:20 -0800 (PST)
Received: by yxt33 with SMTP id 33so8075648yxt.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 16:00:29 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.83.18 with SMTP id k18mr4746477agl.79.1294531229344; Sat, 08 Jan 2011 16:00:29 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sat, 8 Jan 2011 16:00:29 -0800 (PST)
In-Reply-To: <4D28DF6E.4080003@callenish.com>
References: <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <4D28DF6E.4080003@callenish.com>
Date: Sat, 8 Jan 2011 16:00:29 -0800
Message-ID: <AANLkTikhgk7yRoC1K37QetW-7ZHw8G26WZVUs7fM2y=J@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Sat, 08 Jan 2011 23:58:21 -0000

On Sat, Jan 8, 2011 at 2:04 PM, Bruce Atherton <bruce@callenish.com> wrote:
> On 07/01/2011 1:19 PM, Eric Rescorla wrote:
>>
>> My objective is to make the bits that appear on the wire indistinguishable
>> from random
>> from the attacker's perspective. I think it's clear that this is the
>> strongest form of masking
>> available, and the method I proposed does that.
>
> It is true that your goal is clear, but I don't understand why you think
> this goal is necessary.
>
> The specification already allows for two forms of Websocket, a simple one
> denoted by the scheme "ws:" and a secure one denoted with "wss:". The latter
> one will have the random byte stream characteristics you are interested in.
> If you are uncomfortable with any other kind of stream, make sure your
> client only supports secure Websockets.

Regrettably, this is not the case except for certain specific ciphers
(in particular
block cipher in CBC mode.) It's not at all the case for RC4 and only
the case for
some CTR mode implementations.

Best,
-Ekr

From metajack@gmail.com  Sat Jan  8 15:59:22 2011
Return-Path: <metajack@gmail.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 A43DE28C14F for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 15:59:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.947
X-Spam-Level: 
X-Spam-Status: No, score=-2.947 tagged_above=-999 required=5 tests=[AWL=0.030,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 YImtzCED89ub for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 15:59:22 -0800 (PST)
Received: from mail-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by core3.amsl.com (Postfix) with ESMTP id B2F3228C120 for <hybi@ietf.org>; Sat,  8 Jan 2011 15:59:21 -0800 (PST)
Received: by bwz12 with SMTP id 12so18169480bwz.31 for <hybi@ietf.org>; Sat, 08 Jan 2011 16:01:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=nTwULFkeVW4cTyca+V+mjQhfdxWi1oVnMqGpjYSJ/uo=; b=DfgnvjT/fj2ILsIA6/I9mo1zUSJH7fe5jNWs2xhwIed+IpkgqpM0Zzxkj10yOB7K64 rT1LUhq/AEX+0p5kSavSSBB0D+NoiNiLQV0oXJDpg3tL2EqIuj6/7NoKLUn28jXNOkAB Ilk/R4xhgb4hqRQEvvSY4z6ugOHCiHnP7h+Ec=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=ri+bCuh/UNyzuuK8B2DxmxEmXm9lYs3eTLw7d69f/ipOGMdb+e7AxVmhwUvCt4c3uj XfH61FwxHrryiCZNQQ9sjD+t7SExe33EzlQDBL0xQ0MtGVuddyV1+sn+nyc4iDTTuqsI wv5LzlIN4x482kOEuOR6kGnMGR9XIrKUH8ZHQ=
MIME-Version: 1.0
Received: by 10.204.59.76 with SMTP id k12mr20285645bkh.70.1294531289985; Sat, 08 Jan 2011 16:01:29 -0800 (PST)
Sender: metajack@gmail.com
Received: by 10.204.119.211 with HTTP; Sat, 8 Jan 2011 16:01:29 -0800 (PST)
In-Reply-To: <AANLkTinwNQ=mbXcJT5vR1Mi82DTx21U195fNEFZQUJEX@mail.gmail.com>
References: <20110108111632.GI2479@1wt.eu> <91303A50-B94E-45C6-8392-9AA9EFD43D94@apple.com> <AANLkTinwNQ=mbXcJT5vR1Mi82DTx21U195fNEFZQUJEX@mail.gmail.com>
Date: Sat, 8 Jan 2011 17:01:29 -0700
X-Google-Sender-Auth: _kc70bHzoyEN_QRhKvu6RANN5Fo
Message-ID: <AANLkTi=TSNRhk3qC7n2EaaNTHaiMLgE3hv3Qae_QL9hp@mail.gmail.com>
From: Jack Moffitt <jack@metajack.im>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sat, 08 Jan 2011 23:59:22 -0000

> FWIW, I don't know how you're computing HMAC, but the naive
> implementation is about
> 1/2 as fast as optimized implementations. The trick is to precompute
> and cache the
> hash state after you have incorporated the keys. This saves a bunch of
> setup overhead.

He used openssl's HMAC implementation. I'm not familiar with it
particularly, but it seems a reasonable approximation of what most
people will do. It's good to know there may be a 2x speedup to be
gained.

jack.

From mcmanus@ducksong.com  Sat Jan  8 16:03:38 2011
Return-Path: <mcmanus@ducksong.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 A7B9B28C14F for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 16:03:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.351
X-Spam-Level: 
X-Spam-Status: No, score=-2.351 tagged_above=-999 required=5 tests=[AWL=-0.068, BAYES_00=-2.599, HTML_MESSAGE=0.001, SARE_MILLIONSOF=0.315]
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 HE5uWq-LGj79 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 16:03:37 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 0739928C120 for <hybi@ietf.org>; Sat,  8 Jan 2011 16:03:36 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id F380510307; Sat,  8 Jan 2011 19:05:45 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 23321102A8; Sat,  8 Jan 2011 19:05:41 -0500 (EST)
From: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
To: Willy Tarreau <w@1wt.eu>
In-Reply-To: <20110108111632.GI2479@1wt.eu>
References: <20110108111632.GI2479@1wt.eu>
Content-Type: multipart/alternative; boundary="=-DBISiLqJezWDu+Ahu+Jg"
Date: Sat, 08 Jan 2011 19:05:27 -0500
Message-ID: <1294531527.7650.535.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sun, 09 Jan 2011 00:03:38 -0000

--=-DBISiLqJezWDu+Ahu+Jg
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

Willy, this is great. Thanks.

On Sat, 2011-01-08 at 12:16 +0100, Willy Tarreau wrote:

>  I have written
> a WebSocket framing parser which reads, parses and forwards frames.

[..]

> The payload is not even unmasked with the key, the purpose is just
> to evaluate the cost for a front server/load balancer/switch supposed
> to switch frames to a server farm.
> 
> I have ran it over a stream of messages whose payload was between 1
> and 125 bytes, with an average of 29 bytes (rnd(1..5) ^ 3), so that
> we're in line with many legitimate uses of the protocol such as online
> chat, and it happens to always fit in one byte length, making the
> stream generator even easier to write.
> 
> The results :

[..]

> Masking the stream with HMAC multiplies the parsing time by 24 on small
> messages !!! 


Based on your experiment I was able to repeat it here on a single core
of a 2.7ghz i5. (I got a multiple of about 22x).

I thought a few other datapoints were in order. So I rearranged your
test to be more like a server doing dispatch. I measured just frame
parsing, frame parsing with a xor on the data, and frame parsing with a
xor and a 20 byte hmac for each frame for frame sizes ranging on average
from 27 bytes up to 32KB.

The xor just uses a constant even when we calculate the hmac. It
shouldn't matter for measurement. 

These are gigabits per second of payload data:


Msgs      parsed    plain-xor    xor-hmac
--------  ------    ---------    --------
27 byte    11.7          7.1       0.15
250 byte   40.4         20.6       1.3
1 KB       50.8         25.2       5.1
4 KB       57.1         26.7      12.3
8 KB       57.1         26.7      17.0
32 KB      58.32        26.7      23.6

These are K-messages per second:

Msgs      parsed       plain-xor    xor-hmac
--------  ------       ---------    --------
27 byte    54000       33000          692
250 byte   20000       10000          668
1 KB        6349        3000          597
4 KB        1785         833          394
8 KB         892         416          265
32 KB        222         102           90


Most of the tests moved about 4GB of data that was all in page cache. It
looks like plain xor is expensive, but that basically is just measuring
memory bandwidth of streaming all the data bytes through the processor
cache which you have to figure a server is going to need to do
eventually - you can see the limit on my desktop is reached around
26gbit/s. I replaced xor with an accumulator and and got the same
timings.

One of the things only marginally related to the question at hand that
this tells me is that even at its most pathological case of 27 byte
messages the xor and ws framing doesn't kill us if we can process
33million of them per second on a single core of a commodity desktop.

I also ran a test that just calculated hmacs across the same 20 bytes to
find the bottleneck. It was 694K on one core of this box. One way to
look at the 27 byte test is that the core was doing almost exclusively
HMAC instead of core WS, but the other way is to say even though hmac
dominated the core it still did 692K messages per second! We can do a
deep dive on the I/O and where it matters, but the hmac rate is probably
the interesting limit for this discussion. (ekr suggests perhaps this
could preform better - but I think it is sufficient to use this as a
conservative number for now).

I guess I am swayed by what Maciej has to say - even though the hmac is
imo grotesquely way too expensive compared to the amount of risk it is
avoiding, it really doesn't add up to anything all that important to
obsess over. Claims of "a few percent" are not true, but even at its
most pathological a server can process 694 thousand of them per second
with a single core of a commodity desktop. Anyone interested in those
kinds of volumes easily has a LOT more processor (heck I have 3 unused
cores - and this is not a server class machine), and probably
specialized security processors (e.g. cavium nitrox) in the case of
routing switches,  that can cope without breaking a sweat - and in turn
can accommodate easily millions of messages per second.

Even with hmac enabled, processing this purely in software on even old
systems is totally reasonable for significant data flows. Giant
multiplexing servers will require more oomph. I can live with that -
they'll almost certainly have a lot more trouble terminating the
commensurate TCP than parsing websockets.

To sum it up: This is a lot like masking in general. I'm not a proponent
of HMAC because I think it is an un-necessary cost. But if that's what
we need to get consensus and ship this thing that is a reasonable
compromise I can support because I don't think it materially damages the
utility of websockets. And that is the question I find myself asking all
the time lately.

-Pat

-- 
http://www.getfirefox.com/


--=-DBISiLqJezWDu+Ahu+Jg
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.30.3">
</HEAD>
<BODY>
Willy, this is great. Thanks.<BR>
<BR>
On Sat, 2011-01-08 at 12:16 +0100, Willy Tarreau wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
 I have written
a WebSocket framing parser which reads, parses and forwards frames.
</PRE>
</BLOCKQUOTE>
[..]
<BLOCKQUOTE TYPE=CITE>
<PRE>
The payload is not even unmasked with the key, the purpose is just
to evaluate the cost for a front server/load balancer/switch supposed
to switch frames to a server farm.

I have ran it over a stream of messages whose payload was between 1
and 125 bytes, with an average of 29 bytes (rnd(1..5) ^ 3), so that
we're in line with many legitimate uses of the protocol such as online
chat, and it happens to always fit in one byte length, making the
stream generator even easier to write.

The results :
</PRE>
</BLOCKQUOTE>
[..]
<BLOCKQUOTE TYPE=CITE>
<PRE>
Masking the stream with HMAC multiplies the parsing time by 24 on small
messages !!! 
</PRE>
</BLOCKQUOTE>
<BR>
Based on your experiment I was able to repeat it here on a single core of a 2.7ghz i5. (I got a multiple of about 22x).<BR>
<BR>
I thought a few other datapoints were in order. So I rearranged your test to be more like a server doing dispatch. I measured just frame parsing, frame parsing with a xor on the data, and frame parsing with a xor and a 20 byte hmac for each frame for frame sizes ranging on average from 27 bytes up to 32KB.<BR>
<BR>
The xor just uses a constant even when we calculate the hmac. It shouldn't matter for measurement. <BR>
<BR>
These are gigabits per second of payload data:
<PRE>

Msgs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parsed&nbsp;&nbsp;&nbsp; plain-xor&nbsp;&nbsp;&nbsp; xor-hmac
--------&nbsp; ------&nbsp;&nbsp;&nbsp; ---------&nbsp;&nbsp;&nbsp; --------
27 byte&nbsp;&nbsp;&nbsp; 11.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.15
250 byte&nbsp;&nbsp; 40.4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20.6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.3
1 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50.8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25.2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.1
4 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 57.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.3
8 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 57.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17.0
32 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 58.32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 26.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 23.6

These are K-messages per second:

Msgs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parsed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plain-xor&nbsp;&nbsp;&nbsp; xor-hmac
--------&nbsp; ------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---------&nbsp;&nbsp;&nbsp; --------
27 byte&nbsp;&nbsp;&nbsp; 54000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 33000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 692
250 byte&nbsp;&nbsp; 20000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 668
1 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6349&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 597
4 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1785&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 833&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 394
8 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 892&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 416&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 265
32 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 222&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 102&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90

</PRE>
Most of the tests moved about 4GB of data that was all in page cache. It looks like plain xor is expensive, but that basically is just measuring memory bandwidth of streaming all the data bytes through the processor cache which you have to figure a server is going to need to do eventually - you can see the limit on my desktop is reached around 26gbit/s. I replaced xor with an accumulator and and got the same timings.<BR>
<BR>
One of the things only marginally related to the question at hand that&nbsp; this tells me is that even at its most pathological case of 27 byte messages the xor and ws framing doesn't kill us if we can process 33million of them per second on a single core of a commodity desktop.<BR>
<BR>
I also ran a test that just calculated hmacs across the same 20 bytes to find the bottleneck. It was 694K on one core of this box. One way to look at the 27 byte test is that the core was doing almost exclusively HMAC instead of core WS, but the other way is to say even though hmac dominated the core it still did 692K messages per second! We can do a deep dive on the I/O and where it matters, but the hmac rate is probably the interesting limit for this discussion. (ekr suggests perhaps this could preform better - but I think it is sufficient to use this as a conservative number for now).<BR>
<BR>
I guess I am swayed by what Maciej has to say - even though the hmac is imo grotesquely way too expensive compared to the amount of risk it is avoiding, it really doesn't add up to anything all that important to obsess over. Claims of &quot;a few percent&quot; are not true, but even at its most pathological a server can process 694 thousand of them per second with a single core of a commodity desktop. Anyone interested in those kinds of volumes easily has a LOT more processor (heck I have 3 unused cores - and this is not a server class machine), and probably specialized security processors (e.g. cavium nitrox) in the case of routing switches,&nbsp; that can cope without breaking a sweat - and in turn can accommodate easily millions of messages per second.<BR>
<BR>
Even with hmac enabled, processing this purely in software on even old systems is totally reasonable for significant data flows. Giant multiplexing servers will require more oomph. I can live with that - they'll almost certainly have a lot more trouble terminating the commensurate TCP than parsing websockets.<BR>
<BR>
To sum it up: This is a lot like masking in general. I'm not a proponent of HMAC because I think it is an un-necessary cost. But if that's what we need to get consensus and ship this thing that is a reasonable compromise I can support because I don't think it materially damages the utility of websockets. And that is the question I find myself asking all the time lately.<BR>
<BR>
-Pat<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
-- 
<A HREF="http://www.getfirefox.com/">http://www.getfirefox.com/</A>

</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

--=-DBISiLqJezWDu+Ahu+Jg--


From bruce@callenish.com  Sat Jan  8 16:10:58 2011
Return-Path: <bruce@callenish.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 6A30428C0D8 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 16:10:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.58
X-Spam-Level: 
X-Spam-Status: No, score=-2.58 tagged_above=-999 required=5 tests=[AWL=0.019,  BAYES_00=-2.599]
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 pByQnjE87sS2 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 16:10:56 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 7827028C120 for <hybi@ietf.org>; Sat,  8 Jan 2011 16:10:56 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pbiu8-00065F-Dg for hybi@ietf.org; Sat, 08 Jan 2011 16:13:04 -0800
Message-ID: <4D28FD92.60803@callenish.com>
Date: Sat, 08 Jan 2011 16:13:06 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<4D26D20C.8030906@warmcat.com>	<10468.1294391783.740346@puncture>	<20110107100313.GO28367@1wt.eu> <10468.1294398928.011152@puncture> <4D28AE05.4070500@callenish.com> <4D28BD89.70704@warmcat.com>
In-Reply-To: <4D28BD89.70704@warmcat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Sun, 09 Jan 2011 00:10:58 -0000

On 08/01/2011 11:39 AM, Andy Green wrote:
>
> Actually handwaving that it is a "known vulnerability" over-eggs the 
> pudding.  It is very much an unknown and unreproducible alleged 
> vulnerability in software that has not been identified publicly (or 
> AFAIK privately) and may be a byproduct of the interpretation of the 
> testing action.

As others have suggested, feel free to try to convince the browser 
vendors of that. But please do it off-list, as it has been tried on list 
many times without success and it is getting tedious to wade through. 
When you have convinced them, come back and let us know.

>   Nobody seems to want to "out" these alleged broken intermediaries as 
> part of the protocol either.
>

They are already "out" through all the other ways they can be accessed 
on the net. I don't see why making Websockets able to exploit the 
defects would have any more effect.

> Nor is Websockets "exposed" to this alleged vuln as you say, it is 
> claimed it is part of the attack vector, along with wget, curl, nc, 
> anything else you can open a socket connection with.

This comment suggests to me that you are still not understanding the 
reason that masking has been suggested. No one has ever claimed it could 
stop an attacker putting malicious bits into a Websocket connection. It 
is intended to stop them from doing it from within a browser. Browser 
vendors do not ship wget, curl, or anything that opens a raw socket.


From w@1wt.eu  Sat Jan  8 23:45:08 2011
Return-Path: <w@1wt.eu>
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 496193A6948 for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 23:45:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.931
X-Spam-Level: 
X-Spam-Status: No, score=-1.931 tagged_above=-999 required=5 tests=[AWL=-0.203, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, SARE_MILLIONSOF=0.315]
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 8jDsCr7LUufU for <hybi@core3.amsl.com>; Sat,  8 Jan 2011 23:45:05 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 499FB3A6956 for <hybi@ietf.org>; Sat,  8 Jan 2011 23:45:03 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p097l96I008032; Sun, 9 Jan 2011 08:47:09 +0100
Date: Sun, 9 Jan 2011 08:47:09 +0100
From: Willy Tarreau <w@1wt.eu>
To: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
Message-ID: <20110109074709.GK5743@1wt.eu>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1294531527.7650.535.camel@ds9.ducksong.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sun, 09 Jan 2011 07:45:08 -0000

Hi Pat,

On Sat, Jan 08, 2011 at 07:05:27PM -0500, Pat McManus @Mozilla wrote:
> Based on your experiment I was able to repeat it here on a single core
> of a 2.7ghz i5. (I got a multiple of about 22x).

Nice to see that results are easily reproduceable :-)

> I thought a few other datapoints were in order. So I rearranged your
> test to be more like a server doing dispatch. I measured just frame
> parsing, frame parsing with a xor on the data, and frame parsing with a
> xor and a 20 byte hmac for each frame for frame sizes ranging on average
> from 27 bytes up to 32KB.

Cool. I started to do that and stopped at one point because it was taking
too much time to me for little added value. Do not hesitate to post your
updates, as apparently the prog can serve as a basis for experiments. Maybe
if we complete it we could even post the parser as an example implementation
in an annex of the spec (it needs some improvements though).

> The xor just uses a constant even when we calculate the hmac. It
> shouldn't matter for measurement. 

That's not a problem for me either. As you've seen, I made similar choices
for the experiment.

> These are gigabits per second of payload data:
> 
> 
> Msgs      parsed    plain-xor    xor-hmac
> --------  ------    ---------    --------
> 27 byte    11.7          7.1       0.15
> 250 byte   40.4         20.6       1.3
> 1 KB       50.8         25.2       5.1
> 4 KB       57.1         26.7      12.3
> 8 KB       57.1         26.7      17.0
> 32 KB      58.32        26.7      23.6
> 
> These are K-messages per second:
> 
> Msgs      parsed       plain-xor    xor-hmac
> --------  ------       ---------    --------
> 27 byte    54000       33000          692
> 250 byte   20000       10000          668
> 1 KB        6349        3000          597
> 4 KB        1785         833          394
> 8 KB         892         416          265
> 32 KB        222         102           90

> Most of the tests moved about 4GB of data that was all in page cache. It
> looks like plain xor is expensive, but that basically is just measuring
> memory bandwidth of streaming all the data bytes through the processor
> cache which you have to figure a server is going to need to do
> eventually - you can see the limit on my desktop is reached around
> 26gbit/s. I replaced xor with an accumulator and and got the same
> timings.

I'm not surprised you hit memory bandwidth limits. In find, I was
impressed to see how efficient the framing is for a parser, as it's
very easy to handle. I suspect we can optimize the xor if we want so
that it works on 32- or 64- bit quantities at a time on aligned
boundaries, but that's not the point for now.

> One of the things only marginally related to the question at hand that
> this tells me is that even at its most pathological case of 27 byte
> messages the xor and ws framing doesn't kill us if we can process
> 33million of them per second on a single core of a commodity desktop.

Agreed. We must just keep in mind that we don't update the xor mask
right now, but if properly done it should not cause significantly more
memory accesses.

> I also ran a test that just calculated hmacs across the same 20 bytes to
> find the bottleneck. It was 694K on one core of this box. One way to
> look at the 27 byte test is that the core was doing almost exclusively
> HMAC instead of core WS, but the other way is to say even though hmac
> dominated the core it still did 692K messages per second! We can do a
> deep dive on the I/O and where it matters, but the hmac rate is probably
> the interesting limit for this discussion. (ekr suggests perhaps this
> could preform better - but I think it is sufficient to use this as a
> conservative number for now).

I've seen his suggestion too, but I don't know how to do what he suggests.
It was already not easy to find some example code for using HMAC, as the
openssl man is not particularly helpful on the subject.

> I guess I am swayed by what Maciej has to say - even though the hmac is
> imo grotesquely way too expensive compared to the amount of risk it is
> avoiding, it really doesn't add up to anything all that important to
> obsess over.

That's the point where I disagree. Granted for a browser with one message
once in a while, nobody will even notice the difference. But on some
intermediaries, we'll have to oversize their CPUs just for being able
to process a given amount of messages.

> Claims of "a few percent" are not true, but even at its
> most pathological a server can process 694 thousand of them per second
> with a single core of a commodity desktop. Anyone interested in those
> kinds of volumes easily has a LOT more processor

No, I disagree with this point too. It really depends on target usage.
Imagine that a product such as memcache is updated to support WebSocket
as an exchange protocol. There would be nothing wrong with that. The
message rate could be much higher on the centralized server. Also, more
and more services are migrating to virtualized environments. People do
pay for small systems, they order them in 500 MHz steps. Here we're
saying that someone who implements that in such an environment will
have to afford a bigger VM just to be able to process HMAC between
two VMs running on the same hypervisor !

> (heck I have 3 unused
> cores - and this is not a server class machine), and probably
> specialized security processors (e.g. cavium nitrox) in the case of
> routing switches,  that can cope without breaking a sweat - and in turn
> can accommodate easily millions of messages per second.

Not necessarily. From my experience, security processors excel on streaming
but are not better than commodity processors running at amazing frequencies
when it comes to key setups or such things (and often their libraries still
make use of the main processor power for those complex tasks).

Also, keep in mind that contrary to a common belief, border infrastructure
equipments are generally equipped with smaller processors than what you can
find in your average server or desktop. They often have dedicted ASICs for
switching and/or packet forwarding, state matching, but the upper layers are
handled by much smaller processors running finely tuned software.

For instance, I remember that the Alteon web switches were using two ASICs
per port for wire-speed packet forwarding and session processing, but when
it came to content inspection or layer 7 processing, the management CPU was
involved (a 150 MHz PPC) for that task.

If you check what's inside a big F5 LB such as an 8800, you'll be surprized 
to discover a smaller CPU than in the servers it distributes traffic to.

> Even with hmac enabled, processing this purely in software on even old
> systems is totally reasonable for significant data flows. Giant
> multiplexing servers will require more oomph. I can live with that -
> they'll almost certainly have a lot more trouble terminating the
> commensurate TCP than parsing websockets.

Precisely not. Efficient software and hardware already exists to process
TCP. HMAC processing can be improved but will always find a limit. Hashing
algorithms are designed to ensure that there is a non-null setup cost in
order to limit the ability to brute-force them. So even if we manage to
gain a nice 2x gain there, we'll still spend 90% of the CPU time in HMAC
computations.

> To sum it up: This is a lot like masking in general. I'm not a proponent
> of HMAC because I think it is an un-necessary cost. But if that's what
> we need to get consensus and ship this thing that is a reasonable
> compromise I can support because I don't think it materially damages the
> utility of websockets. And that is the question I find myself asking all
> the time lately.

I think that it sensibly limits the use cases and that's what I don't agree
with. Considering what improvement it brings over simple XOR masking, and
the huge additional cost, I'd really vote for the simpler mask method.

Thanks,
Willy


From gregw@intalio.com  Sun Jan  9 01:41:10 2011
Return-Path: <gregw@intalio.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 254803A6950 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 01:41:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.77
X-Spam-Level: 
X-Spam-Status: No, score=-2.77 tagged_above=-999 required=5 tests=[AWL=-0.109,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, SARE_MILLIONSOF=0.315]
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 MF+ffEoNUzBw for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 01:41:09 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id D2C613A694F for <hybi@ietf.org>; Sun,  9 Jan 2011 01:41:08 -0800 (PST)
Received: by vws7 with SMTP id 7so7575846vws.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 01:43:18 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.187.132 with SMTP id cw4mr5636333vcb.25.1294566198593; Sun, 09 Jan 2011 01:43:18 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 9 Jan 2011 01:43:18 -0800 (PST)
In-Reply-To: <1294531527.7650.535.camel@ds9.ducksong.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com>
Date: Sun, 9 Jan 2011 10:43:18 +0100
X-Google-Sender-Auth: B6H7-YtS2xc59lrSmfVRBeivde8
Message-ID: <AANLkTi=aHRD5tazXX7TqR3gHo9QWe9SLtvHjDghS1UjW@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
Content-Type: multipart/alternative; boundary=90e6ba4fbd9c67cb0d049966ae33
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sun, 09 Jan 2011 09:41:10 -0000

--90e6ba4fbd9c67cb0d049966ae33
Content-Type: text/plain; charset=ISO-8859-1

On 9 January 2011 01:05, Pat McManus @Mozilla <mcmanus@ducksong.com> wrote:

> I guess I am swayed by what Maciej has to say - even though the hmac is imo
> grotesquely way too expensive compared to the amount of risk it is avoiding,
> it really doesn't add up to anything all that important to obsess over.
> Claims of "a few percent" are not true, but even at its most pathological a
> server can process 694 thousand of them per second with a single core of a
> commodity desktop. Anyone interested in those kinds of volumes easily has a
> LOT more processor (heck I have 3 unused cores - and this is not a server
> class machine), and probably specialized security processors (e.g. cavium
> nitrox) in the case of routing switches,  that can cope without breaking a
> sweat - and in turn can accommodate easily millions of messages per second.
>

The HMAC message rate may be sufficient for a intermediary that does nothing
but forward messages.

But the CPU cost is significant and on server boxes that will be running WS
and running the application, then message rate is not the only thing as
servers have other things they need to use the CPU's for.
So if WS with no masking at my required message rate takes 5% of my CPU, but
I can probably live with XOR masking taking 10%, but HMAC masking taking
25-50% of my CPU is going to be prohibitive!

Not all of the high volume servers I've worked with have been CPU bound, but
certainly some of them have been.

regards

--90e6ba4fbd9c67cb0d049966ae33
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On 9 January 2011 01:05, Pat McManus @Mo=
zilla <span dir=3D"ltr">&lt;<a href=3D"mailto:mcmanus@ducksong.com">mcmanus=
@ducksong.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
I guess I am swayed by what Maciej has to say - even though the hmac is imo=
 grotesquely way too expensive compared to the amount of risk it is avoidin=
g, it really doesn&#39;t add up to anything all that important to obsess ov=
er. Claims of &quot;a few percent&quot; are not true, but even at its most =
pathological a server can process 694 thousand of them per second with a si=
ngle core of a commodity desktop. Anyone interested in those kinds of volum=
es easily has a LOT more processor (heck I have 3 unused cores - and this i=
s not a server class machine), and probably specialized security processors=
 (e.g. cavium nitrox) in the case of routing switches,=A0 that can cope wit=
hout breaking a sweat - and in turn can accommodate easily millions of mess=
ages per second.<br>
</div></blockquote><div><br>The HMAC message rate may be sufficient for a i=
ntermediary that does nothing but forward messages.<br><br>But the CPU cost=
 is significant and on server boxes that will be running WS and running the=
 application, then message rate is not the only thing as servers have other=
 things they need to use the CPU&#39;s for.<br>
So if WS with no masking at my required message rate takes 5% of my CPU, bu=
t I can probably live with XOR masking taking 10%, but HMAC masking taking =
25-50% of my CPU is going to be prohibitive!<br><br>Not all of the high vol=
ume servers I&#39;ve worked with have been CPU bound, but certainly some of=
 them have been.<br>
<br>regards<br><br></div></div>

--90e6ba4fbd9c67cb0d049966ae33--

From andy.warmcat.com@googlemail.com  Sun Jan  9 03:49:28 2011
Return-Path: <andy.warmcat.com@googlemail.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 C54623A697F for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 03:49:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 0MYYeFxgRlvB for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 03:49:27 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 600343A696E for <hybi@ietf.org>; Sun,  9 Jan 2011 03:49:26 -0800 (PST)
Received: by wyf23 with SMTP id 23so19651239wyf.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 03:51:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=P0h6hxdrWpW6v8iMmNEnpQmK27ZOiEOrrzi1a3F3rX4=; b=oEfv3eVhk8a5TQ8+ZufQ5MLCM+npJwn5gc818zTTBiyYoQDen63kohsmUDxc6VtDkn Ao5Pl/rFlp3eErDEgt8cfvRfv/3cmfNBFF1ESOqCF4OkpNCQ4rKk+hZEcCnvCfKgeoxm BhiZanylA7TfByjxBJEFu3NWB3L+qlKVYeVgk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=T+aCGhOlJ4pGyjAjwBcd2Nms+YY84MRZ9ZGZ7pOMGzeXN7+B6RkD6UmySiVpHIySxw HGpL6BBSvoHn75DTdu+O777Ou0bqmhHBqWZ8t1LKQOkHMFZN82QRvJh/2BAm+KamG0T2 zuzW7rJz+CHepk0fhyISKnmur1lh48N9il38k=
Received: by 10.227.132.208 with SMTP id c16mr1586137wbt.72.1294573896174; Sun, 09 Jan 2011 03:51:36 -0800 (PST)
Received: from [192.168.1.72] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id 11sm19189516wbi.6.2011.01.09.03.51.34 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 03:51:34 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D29A145.1080003@warmcat.com>
Date: Sun, 09 Jan 2011 11:51:33 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Bruce Atherton <bruce@callenish.com>
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<4D26D20C.8030906@warmcat.com>	<10468.1294391783.740346@puncture>	<20110107100313.GO28367@1wt.eu>	<10468.1294398928.011152@puncture>	<4D28AE05.4070500@callenish.com> <4D28BD89.70704@warmcat.com> <4D28FD92.60803@callenish.com>
In-Reply-To: <4D28FD92.60803@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Sun, 09 Jan 2011 11:49:28 -0000

On 01/09/11 00:13, Somebody in the thread at some point said:
> On 08/01/2011 11:39 AM, Andy Green wrote:

 >>> This is a known vulnerability. No major browser vendor is going
 >>> to ship a Websockets implementation that is exposed to it.
 >>> They have all said so on this list. Let's move on.

>> Actually handwaving that it is a "known vulnerability" over-eggs the
>> pudding. It is very much an unknown and unreproducible alleged
>> vulnerability in software that has not been identified publicly (or
>> AFAIK privately) and may be a byproduct of the interpretation of the
>> testing action.

> As others have suggested, feel free to try to convince the browser
> vendors of that. But please do it off-list, as it has been tried on list

Bruce, you are the guy who handwaved about "known vulnerability" on the 
list so it is you I replied to on the list.

I agree it is tiresome to keep posting reality-based corrections when 
the centre of gravity of the group doesn't care and is off agreeing 
something completely different.

>> Nor is Websockets "exposed" to this alleged vuln as you say, it is
>> claimed it is part of the attack vector, along with wget, curl, nc,
>> anything else you can open a socket connection with.
>
> This comment suggests to me that you are still not understanding the
> reason that masking has been suggested. No one has ever claimed it could
> stop an attacker putting malicious bits into a Websocket connection. It
> is intended to stop them from doing it from within a browser. Browser
> vendors do not ship wget, curl, or anything that opens a raw socket.

What you wrote is incorrect, websockets is not exposed to any 
vulnerability (I added your quote back in at the top).

The reason I don't bother engaging with what you think is the reason for 
munging, is that the error in logic leading to people thinking that 
munging does anything useful occurred a step or two back: when they 
accepted that fighting troll / ghost / alleged broken intermediaries was 
the problem of websocket protocol to fix, when they can't even point at 
one and the intermediaries remain exposed until they get updated 
themselves.  Even that they might ever exist is the problem that must be 
solved now by munging.

The browser guys now need some figleaf to explain why they revert their 
security taint on websockets and munging fits the bill perfectly, so 
they will just sit until munging comes.  Sure!

-Andy

From julian.reschke@gmx.de  Sun Jan  9 04:04:03 2011
Return-Path: <julian.reschke@gmx.de>
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 C2A2A3A6983 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 04:04:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.457
X-Spam-Level: 
X-Spam-Status: No, score=-104.457 tagged_above=-999 required=5 tests=[AWL=-1.858, BAYES_00=-2.599, 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 7DPqsc9TZQlb for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 04:04:03 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 9A8C93A6980 for <hybi@ietf.org>; Sun,  9 Jan 2011 04:04:01 -0800 (PST)
Received: (qmail invoked by alias); 09 Jan 2011 12:06:11 -0000
Received: from p508FAAD2.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.170.210] by mail.gmx.net (mp049) with SMTP; 09 Jan 2011 13:06:11 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/QKbkFbg7QtQOPmi/L2dzgcq5c/SgPZnVorbZS0M oaiwPXAvMKBU/J
Message-ID: <4D29A4B1.4020603@gmx.de>
Date: Sun, 09 Jan 2011 13:06:09 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: andy@warmcat.com
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<4D26D20C.8030906@warmcat.com>	<10468.1294391783.740346@puncture>	<20110107100313.GO28367@1wt.eu>	<10468.1294398928.011152@puncture>	<4D28AE05.4070500@callenish.com>	<4D28BD89.70704@warmcat.com> <4D28FD92.60803@callenish.com> <4D29A145.1080003@warmcat.com>
In-Reply-To: <4D29A145.1080003@warmcat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Sun, 09 Jan 2011 12:04:03 -0000

On 09.01.2011 12:51, Andy Green wrote:
> ...
> The browser guys now need some figleaf to explain why they revert their
> security taint on websockets and munging fits the bill perfectly, so
> they will just sit until munging comes. Sure!
> ...

One thing I'd like to understand is why Apple and Chrome haven't stopped 
shipping browsers with the -00 protocol enabled by default. One could 
think the problem isn't nearly as serious it seems.

Best regards, Julian

From mjs@apple.com  Sun Jan  9 04:45:53 2011
Return-Path: <mjs@apple.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 7C9323A6990 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 04:45:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.539
X-Spam-Level: 
X-Spam-Status: No, score=-106.539 tagged_above=-999 required=5 tests=[AWL=0.060, BAYES_00=-2.599, 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 PztlrfzlmGWI for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 04:45:52 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id A5EA83A698E for <hybi@ietf.org>; Sun,  9 Jan 2011 04:45:52 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out3.apple.com (Postfix) with ESMTP id 1A1B3C5D52AC for <hybi@ietf.org>; Sun,  9 Jan 2011 04:48:03 -0800 (PST)
X-AuditID: 11807136-b7bf8ae00000244a-a7-4d29ae82c786
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay15.apple.com (Apple SCV relay) with SMTP id 63.33.09290.28EA92D4; Sun,  9 Jan 2011 04:48:03 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [10.0.1.14] ([24.6.209.6]) by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LER00G4DA82RH10@gertie.apple.com> for hybi@ietf.org; Sun, 09 Jan 2011 04:48:02 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D29A4B1.4020603@gmx.de>
Date: Sun, 09 Jan 2011 04:48:01 -0800
Message-id: <A4871D8E-6228-49ED-8D47-B6174764C457@apple.com>
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <10468.1294398928.011152@puncture> <4D28AE05.4070500@callenish.com> <4D28BD89.70704@warmcat.com> <4D28FD92.60803@callenish.com> <4D29A145.1080003@warmcat.com> <4D29A4B1.4020603@gmx.de>
To: Julian Reschke <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Sun, 09 Jan 2011 12:45:53 -0000

On Jan 9, 2011, at 4:06 AM, Julian Reschke wrote:

> On 09.01.2011 12:51, Andy Green wrote:
>> ...
>> The browser guys now need some figleaf to explain why they revert their
>> security taint on websockets and munging fits the bill perfectly, so
>> they will just sit until munging comes. Sure!
>> ...
> 
> One thing I'd like to understand is why Apple and Chrome haven't stopped shipping browsers with the -00 protocol enabled by default. One could think the problem isn't nearly as serious it seems.

Our thinking so far is that the problem is severe enough that it should be addressed in the protocol design, since the protocol is not yet final, but not (at this time) severe enough to merit an emergency security update. The bar for security in a brand new protocol should be much higher than just "shouldn't be so bad that vendors will spin security updates just to disable it".

Regards,
Maciej


From gregw@intalio.com  Sun Jan  9 04:49:22 2011
Return-Path: <gregw@intalio.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 3F68A3A6990 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 04:49:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.927
X-Spam-Level: 
X-Spam-Status: No, score=-2.927 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 2Wb+qhdgVU8H for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 04:49:21 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 27FF33A698E for <hybi@ietf.org>; Sun,  9 Jan 2011 04:49:21 -0800 (PST)
Received: by vws7 with SMTP id 7so7619193vws.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 04:51:31 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.187.132 with SMTP id cw4mr5686640vcb.25.1294577491304; Sun, 09 Jan 2011 04:51:31 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 9 Jan 2011 04:51:31 -0800 (PST)
In-Reply-To: <4D29A145.1080003@warmcat.com>
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <10468.1294398928.011152@puncture> <4D28AE05.4070500@callenish.com> <4D28BD89.70704@warmcat.com> <4D28FD92.60803@callenish.com> <4D29A145.1080003@warmcat.com>
Date: Sun, 9 Jan 2011 13:51:31 +0100
X-Google-Sender-Auth: mlwoIeAuUU-R18nDeqyN0La4sv8
Message-ID: <AANLkTin4_+Od1QXWatsZW8H0UL=2WksCAQM58EE4y5H0@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: andy@warmcat.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Sun, 09 Jan 2011 12:49:22 -0000

On 9 January 2011 12:51, Andy Green <andy@warmcat.com> wrote:
> The browser guys now need some figleaf to explain why they revert their
> security taint on websockets and munging fits the bill perfectly, so they
> will just sit until munging comes. =A0Sure!

Andy,

I think that is a slightly unfair characterisation of why a consensus
has formed around masking.

I'm as dubious as any that WS enables any exploits against any real
deployed browsers with the cache poisoning vulnerability.   The reason
I believe that masking is looked at favourably is that it is not
targeted at a specific known exploit (as CONNECT handshake is), but is
instead targeted at a class of conceivable vulnerabilities that result
from sending arbitrary content in non-HTTP framing through HTTP
intermediaries.

We really need to try to take some of the heat out of this discussion,
so that progress made is not lost.

regards

From mjs@apple.com  Sun Jan  9 06:10:58 2011
Return-Path: <mjs@apple.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 97B753A69B5 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 06:10:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.086
X-Spam-Level: 
X-Spam-Status: No, score=-106.086 tagged_above=-999 required=5 tests=[AWL=-0.403, BAYES_00=-2.599, HTML_MESSAGE=0.001, J_CHICKENPOX_43=0.6, RCVD_IN_DNSWL_MED=-4, SARE_MILLIONSOF=0.315, 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 v2hmmhym741G for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 06:10:54 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id A6B473A69B2 for <hybi@ietf.org>; Sun,  9 Jan 2011 06:10:54 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out3.apple.com (Postfix) with ESMTP id 897BFC5D74CB for <hybi@ietf.org>; Sun,  9 Jan 2011 06:13:05 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-80-4d29c2711950
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay11.apple.com (Apple SCV relay) with SMTP id 4C.B2.04151.172C92D4; Sun,  9 Jan 2011 06:13:05 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_YweqZOt3Zh+jG1imsVJowg)"
Received: from [10.0.1.14] ([24.6.209.6]) by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LER00F96E5S5800@elliott.apple.com> for hybi@ietf.org; Sun, 09 Jan 2011 06:13:05 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <1294531527.7650.535.camel@ds9.ducksong.com>
Date: Sun, 09 Jan 2011 06:13:03 -0800
Message-id: <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com>
To: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 14:10:58 -0000

--Boundary_(ID_YweqZOt3Zh+jG1imsVJowg)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


Hi Pat, including XOR seems like a great idea. I coded up my own XORing version, and I decided to also test HMAC with cached state as suggested by Eric, and AES-CTR instead of XOR. 

Here is a summary of my results on two-way parallel runs:

Plain XOR: ~5.1 million msg/sec
HMAC+XOR: ~370 thousand msg/sec
cached state HMAC+XOR: 1.2 million msg/sec
AES-CTR: 2.6 million msg/sec

== Conclusions ==

- HMAC is much faster if you do the state caching thing.
- AES-CTR is even faster than that.
- We should use AES-CTR for masking.


Here is my code (based on Willy's version):



Here is the raw data:

== Plain XOR ==

time (./ws-parse < /tmp/stream.bin > /dev/null & ./ws-parse < /tmp/stream.bin > /dev/null)
Mode: 0
Mode: 0
20000002 messages forwarded
20000002 messages forwarded

real	0m3.922s
user	0m7.314s
sys	0m0.519s

== HMAC+XOR ==

$ time (./ws-parse 1 < /tmp/stream.bin > /dev/null & ./ws-parse 1 < /tmp/stream.bin > /dev/null)
Mode: 1
Mode: 1
20000002 messages forwarded
20000002 messages forwarded

real	0m53.586s
user	0m53.222s
sys	0m0.347s

== cached state HMAC+XOR ==

$ time (./ws-parse 2 < /tmp/stream.bin > /dev/null & ./ws-parse 2 < /tmp/stream.bin > /dev/null)
Mode: 2
Mode: 2
20000002 messages forwarded
20000002 messages forwarded

real	0m16.399s
user	0m32.098s
sys	0m0.631s

== AES-CTR ==

$ time (./ws-parse 3 < /tmp/stream.bin > /dev/null & ./ws-parse 3 < /tmp/stream.bin > /dev/null)
Mode: 3
Mode: 3
20000002 messages forwarded
20000002 messages forwarded

real	0m7.695s
user	0m7.396s
sys	0m0.290s




On Jan 8, 2011, at 4:05 PM, Pat McManus @Mozilla wrote:

> Willy, this is great. Thanks.
> 
> On Sat, 2011-01-08 at 12:16 +0100, Willy Tarreau wrote:
>> 
>>  I have written
>> a WebSocket framing parser which reads, parses and forwards frames.
> [..]
>> 
>> The payload is not even unmasked with the key, the purpose is just
>> to evaluate the cost for a front server/load balancer/switch supposed
>> to switch frames to a server farm.
>> 
>> I have ran it over a stream of messages whose payload was between 1
>> and 125 bytes, with an average of 29 bytes (rnd(1..5) ^ 3), so that
>> we're in line with many legitimate uses of the protocol such as online
>> chat, and it happens to always fit in one byte length, making the
>> stream generator even easier to write.
>> 
>> The results :
> [..]
>> 
>> Masking the stream with HMAC multiplies the parsing time by 24 on small
>> messages !!! 
> 
> Based on your experiment I was able to repeat it here on a single core of a 2.7ghz i5. (I got a multiple of about 22x).
> 
> I thought a few other datapoints were in order. So I rearranged your test to be more like a server doing dispatch. I measured just frame parsing, frame parsing with a xor on the data, and frame parsing with a xor and a 20 byte hmac for each frame for frame sizes ranging on average from 27 bytes up to 32KB.
> 
> The xor just uses a constant even when we calculate the hmac. It shouldn't matter for measurement. 
> 
> These are gigabits per second of payload data:
> 
> Msgs      parsed    plain-xor    xor-hmac
> --------  ------    ---------    --------
> 27 byte    11.7          7.1       0.15
> 250 byte   40.4         20.6       1.3
> 1 KB       50.8         25.2       5.1
> 4 KB       57.1         26.7      12.3
> 8 KB       57.1         26.7      17.0
> 32 KB      58.32        26.7      23.6
> 
> These are K-messages per second:
> 
> Msgs      parsed       plain-xor    xor-hmac
> --------  ------       ---------    --------
> 27 byte    54000       33000          692
> 250 byte   20000       10000          668
> 1 KB        6349        3000          597
> 4 KB        1785         833          394
> 8 KB         892         416          265
> 32 KB        222         102           90
> 
> Most of the tests moved about 4GB of data that was all in page cache. It looks like plain xor is expensive, but that basically is just measuring memory bandwidth of streaming all the data bytes through the processor cache which you have to figure a server is going to need to do eventually - you can see the limit on my desktop is reached around 26gbit/s. I replaced xor with an accumulator and and got the same timings.
> 
> One of the things only marginally related to the question at hand that  this tells me is that even at its most pathological case of 27 byte messages the xor and ws framing doesn't kill us if we can process 33million of them per second on a single core of a commodity desktop.
> 
> I also ran a test that just calculated hmacs across the same 20 bytes to find the bottleneck. It was 694K on one core of this box. One way to look at the 27 byte test is that the core was doing almost exclusively HMAC instead of core WS, but the other way is to say even though hmac dominated the core it still did 692K messages per second! We can do a deep dive on the I/O and where it matters, but the hmac rate is probably the interesting limit for this discussion. (ekr suggests perhaps this could preform better - but I think it is sufficient to use this as a conservative number for now).
> 
> I guess I am swayed by what Maciej has to say - even though the hmac is imo grotesquely way too expensive compared to the amount of risk it is avoiding, it really doesn't add up to anything all that important to obsess over. Claims of "a few percent" are not true, but even at its most pathological a server can process 694 thousand of them per second with a single core of a commodity desktop. Anyone interested in those kinds of volumes easily has a LOT more processor (heck I have 3 unused cores - and this is not a server class machine), and probably specialized security processors (e.g. cavium nitrox) in the case of routing switches,  that can cope without breaking a sweat - and in turn can accommodate easily millions of messages per second.
> 
> Even with hmac enabled, processing this purely in software on even old systems is totally reasonable for significant data flows. Giant multiplexing servers will require more oomph. I can live with that - they'll almost certainly have a lot more trouble terminating the commensurate TCP than parsing websockets.
> 
> To sum it up: This is a lot like masking in general. I'm not a proponent of HMAC because I think it is an un-necessary cost. But if that's what we need to get consensus and ship this thing that is a reasonable compromise I can support because I don't think it materially damages the utility of websockets. And that is the question I find myself asking all the time lately.
> 
> -Pat
> 
> -- 
> http://www.getfirefox.com/
> 
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


--Boundary_(ID_YweqZOt3Zh+jG1imsVJowg)
Content-type: multipart/mixed; boundary="Boundary_(ID_wzrGxTIoH/HWAsOBkWnp4A)"


--Boundary_(ID_wzrGxTIoH/HWAsOBkWnp4A)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Hi Pat, including XOR seems like a great idea. I coded up my own XORing version, and I decided to also test HMAC with cached state as suggested by Eric, and AES-CTR instead of XOR.&nbsp;</div><div><br></div><div>Here is a summary of my results on two-way parallel runs:</div><div><br></div><div>Plain XOR: ~5.1 million msg/sec</div><div>HMAC+XOR: ~370 thousand msg/sec</div><div>cached state HMAC+XOR: 1.2 million msg/sec</div><div>AES-CTR: 2.6 million msg/sec</div><div><br></div><div>== Conclusions ==</div><div><br></div><div>- HMAC is much faster if you do the state caching thing.</div><div>- AES-CTR is even faster than that.</div><div>- We should use AES-CTR for masking.</div><div><br></div><div><br></div><div>Here is my code (based on Willy's version):</div><div><br></div><div></div></body></html>

--Boundary_(ID_wzrGxTIoH/HWAsOBkWnp4A)
Content-type: application/octet-stream; name=ws-parse-extended.c
Content-transfer-encoding: 7bit
Content-disposition: attachment; filename=ws-parse-extended.c

/* Simple stupid WebSocket framing parser - Willy Tarreau - 2011.
 * Designed as a proof of concept. I claim no copyright on the code below,
 * you may use it at your own risk.
 *
 * gcc -O2  -s  ws-parse.c   -o ws-parse -lssl
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <openssl/hmac.h>
#include <openssl/aes.h>

#define MAXBUF 32768

struct buf {
	int len;
	unsigned char *start;
	unsigned char *end;
	unsigned char data[MAXBUF];
};

struct buf buf;
unsigned char crypt_buf[MAXBUF];
HMAC_CTX cached_ctx; 

static mode = 0;

/* reads bytes into buffer, returns 0 if none read, -1 on end/abort, or bytes read */
int recv_buf(struct buf *buf)
{
	int ret;

	if (buf->len >= MAXBUF / 2)
		return 0;

	if (buf->len == 0)
		buf->start = buf->end = buf->data;

	ret = read(0, buf->end, buf->end >= buf->start ?
		   buf->data + MAXBUF - buf->end :
		   buf->start - buf->end);

	if (ret <= 0)
		return -1;

	buf->len += ret;
	buf->end += ret;
	if (buf->end >= buf->data + MAXBUF)
		buf->end = buf->data;
	return ret;
}

/* sends bytes from buffer, returns number of bytes sent, -1 on abort */
int send_buf(struct buf *buf, int max)
{
	int ret;
	int sent;

	sent = 0;
	while (max && buf->len) {
		if (buf->end > buf->start) {
			if (max > buf->end - buf->start)
				max = buf->end - buf->start;
		} else {
			if (max > buf->data + MAXBUF - buf->start)
				max = buf->data + MAXBUF - buf->start;
		}
		ret = fwrite(buf->start, 1, max, stdout);
		if (ret < 0)
			return -1;

		sent += ret;
		max -= ret;
		buf->len -= ret;
		buf->start += ret;
		if (buf->start >= buf->data + MAXBUF)
			buf->start = buf->data;
	}

	if (!buf->len)
		buf->start = buf->end = buf->data;
	return sent;
}

void realign_buf(struct buf *buf)
{
	unsigned char tmpbuf[MAXBUF];
	int block1, block2;
	unsigned char *end;

	if (!buf->len) {
		buf->start = buf->end = buf->data;
		return;
	}

	if (buf->end > buf->start)
		block1 = buf->end - buf->start;
	else
		block1 = buf->data + MAXBUF - buf->start;

	if (block1 != buf->len)
		memcpy(tmpbuf, buf->data, buf->len - block1);
	memmove(buf->data, buf->start, block1);
	if (block1 != buf->len)
		memcpy(buf->data + block1, tmpbuf, buf->len - block1);
	buf->start = buf->data;
	buf->end = buf->start + buf->len;
	if (buf->end >= buf->data + MAXBUF)
		buf->end = buf->data;
}

/* parse a frame's length, returns header length, 0 if more data is needed */
int parse_frame_length(struct buf *buf, int *opcode, unsigned long long *length)
{
	unsigned long long len;
	int hl;

	if (buf->len < 2)
		return 0;

	if (buf->start >= buf->data + MAXBUF - 10)
		realign_buf(buf);

	*opcode = buf->start[0] & 0xF;
	len = buf->start[1] & 0x7F;
	hl = 2;

	if (len == 126) {
		hl += 2;
		if (buf->len < hl)
			return 0;
		len = (buf->start[2] << 8) + buf->start[3];
	}
	else if (len == 127) {
		hl += 8;
		if (buf->len < hl)
			return 0;
		len =  (buf->start[2] << 24) + (buf->start[3] << 16) +
		       (buf->start[4] << 8)  + buf->start[5];

		len <<= 32;
		len += (buf->start[6] << 24) + (buf->start[7] << 16) +
		       (buf->start[8] << 8)  + buf->start[9];
	}

	*length = len;
	return hl;
}

void init_masking_key(struct buf *buf, int hl)
{
        HMAC_CTX ctx;
	unsigned int seed;
	unsigned int entropy = 0;
	unsigned char mask_key[20];
	int mask_key_len;

	seed = 0; // use that as the random seed for now

        HMAC_Init(&ctx, (unsigned char *)&seed, sizeof(seed), EVP_sha1(  ));
        HMAC_Update(&ctx, (unsigned char *)&entropy, sizeof(entropy));
        HMAC_Final(&ctx, mask_key, &mask_key_len);
        HMAC_cleanup(&ctx);
}

void init_masking_key_with_cached_state(struct buf *buf, int hl)
{
	HMAC_CTX ctx = cached_ctx;
	unsigned int entropy = 0;
	unsigned char mask_key[20];
	int mask_key_len;

        HMAC_Update(&ctx, (unsigned char *)&entropy, sizeof(entropy));
	HMAC_Final(&ctx, mask_key, &mask_key_len);
}


/* call it with any argument to enable payload masking */
int main(int argc, char **argv)
{
	int ret;
	int opcode = 0;
	int last = 0;
	int stop_recv = 0;
	int nb_msg = 0;
        unsigned long long send_so_far;
	unsigned long long to_send = 0;
        AES_KEY key;
        unsigned char  iv[AES_BLOCK_SIZE];
        unsigned char ecount_buf[AES_BLOCK_SIZE];
        unsigned int num;
	unsigned int seed = 0;
        unsigned char mask[4] = { 0, 0, 0, 0 };

        if (argc > 1)
            mode = strtol(argv[1], 0, 10);
        
        fprintf(stderr, "Mode: %d\n", mode);

        if (mode == 2) {
            HMAC_Init(&cached_ctx, (unsigned char *)&seed, sizeof(seed), EVP_sha1(  ));
        }

        if (mode == 3) {
            memset(iv, 0, sizeof(iv));
            memset(ecount_buf, 0, sizeof(ecount_buf));
            AES_set_decrypt_key("abcdefghijklmnop", 128, &key);
        }

	memset(&buf, 0, sizeof(buf));
	while (!last || to_send) {
		if (!stop_recv) {
			ret = recv_buf(&buf);
			if (ret < 0)
				stop_recv = 1; // end reached
		}
		else if (!buf.len) {
			fprintf(stderr, "truncated input after %d messages\n", nb_msg);
			exit(1);
		}

		/* parse a new frame length */
		if (!to_send && buf.len) {
			ret = parse_frame_length(&buf, &opcode, &to_send);
			if (ret > 0) {
				nb_msg++;
				if (mode == 1)
                                    init_masking_key(&buf, ret);
				else if (mode == 2)
                                    init_masking_key_with_cached_state(&buf, ret);
				to_send += ret;
				if (opcode == 0x01)
					last = 1;
			}
		}

                puts("HERE");
                if (mode == 3) {
                    /* AES_ctr128_encrypt is its own inverse so can be used to decrypt. */
                    AES_ctr128_encrypt(buf.start, crypt_buf, to_send > MAXBUF ? MAXBUF : to_send, &key, iv, ecount_buf, &num);
                    memcpy(buf.start, crypt_buf, to_send > MAXBUF ? MAXBUF : to_send);

                } else {
                    int i;
                    for (i = 0; i < to_send; ++i) {
                        buf.start[i] ^= mask[i %4];
                    }
                }


		/* send what we have */
		if (to_send) {
			ret = send_buf(&buf, to_send > MAXBUF ? MAXBUF : to_send);
			if (ret < 0) {
				fprintf(stderr, "write error after %d messages\n", nb_msg);
				exit(2);
			}
			to_send -= ret;
		}
	}
	fprintf(stderr, "%d messages forwarded\n", nb_msg);
	return 0;
}

--Boundary_(ID_wzrGxTIoH/HWAsOBkWnp4A)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: quoted-printable

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><div></div><div><br></div><div>Here is the raw =
data:</div><div><br></div><div>=3D=3D Plain XOR =
=3D=3D</div><div><br></div><div><div>time (./ws-parse &lt; =
/tmp/stream.bin &gt; /dev/null &amp; ./ws-parse &lt; /tmp/stream.bin =
&gt; /dev/null)</div><div>Mode: 0</div><div>Mode: 0</div><div>20000002 =
messages forwarded</div><div>20000002 messages =
forwarded</div><div><br></div><div>real<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>0m3.922s</div><div>user<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>0m7.314s</div><div>sys<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	=
</span>0m0.519s</div></div><div><br></div><div><div>=3D=3D HMAC+XOR =
=3D=3D</div></div><div><br></div><div><div>$ time (./ws-parse 1 &lt; =
/tmp/stream.bin &gt; /dev/null &amp; ./ws-parse 1 &lt; /tmp/stream.bin =
&gt; /dev/null)</div><div>Mode: 1</div><div>Mode: 1</div><div>20000002 =
messages forwarded</div><div><div>20000002 messages =
forwarded</div></div><div><br></div><div>real<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>0m53.586s</div><div>user<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>0m53.222s</div><div>sys<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>0m0.347s</div></div><div><br></div><div><div><div>=3D=3D cached =
state HMAC+XOR =3D=3D</div></div></div><div><br></div><div><div>$ time =
(./ws-parse 2 &lt; /tmp/stream.bin &gt; /dev/null &amp; ./ws-parse 2 =
&lt; /tmp/stream.bin &gt; /dev/null)</div><div>Mode: 2</div><div>Mode: =
2</div><div>20000002 messages forwarded</div><div>20000002 messages =
forwarded</div><div><br></div><div>real<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>0m16.399s</div><div>user<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>0m32.098s</div><div>sys<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	=
</span>0m0.631s</div></div><div><br></div><div>=3D=3D AES-CTR =
=3D=3D</div><div><br></div><div><div>$ time (./ws-parse 3 &lt; =
/tmp/stream.bin &gt; /dev/null &amp; ./ws-parse 3 &lt; /tmp/stream.bin =
&gt; /dev/null)</div><div>Mode: 3</div><div>Mode: 3</div><div>20000002 =
messages forwarded</div><div><div>20000002 messages =
forwarded</div></div><div><br></div><div>real<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>0m7.695s</div><div>user<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>0m7.396s</div><div>sys<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>0m0.290s</div></div><div><br></div><div><br></div><div><br></div><b=
r><div><div>On Jan 8, 2011, at 4:05 PM, Pat McManus @Mozilla =
wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite">
<div>
Willy, this is great. Thanks.<br>
<br>
On Sat, 2011-01-08 at 12:16 +0100, Willy Tarreau wrote:
<blockquote type=3D"CITE">
<pre> I have written
a WebSocket framing parser which reads, parses and forwards frames.
</pre>
</blockquote>
[..]
<blockquote type=3D"CITE">
<pre>The payload is not even unmasked with the key, the purpose is just
to evaluate the cost for a front server/load balancer/switch supposed
to switch frames to a server farm.

I have ran it over a stream of messages whose payload was between 1
and 125 bytes, with an average of 29 bytes (rnd(1..5) ^ 3), so that
we're in line with many legitimate uses of the protocol such as online
chat, and it happens to always fit in one byte length, making the
stream generator even easier to write.

The results :
</pre>
</blockquote>
[..]
<blockquote type=3D"CITE">
<pre>Masking the stream with HMAC multiplies the parsing time by 24 on =
small
messages !!!=20
</pre>
</blockquote>
<br>
Based on your experiment I was able to repeat it here on a single core =
of a 2.7ghz i5. (I got a multiple of about 22x).<br>
<br>
I thought a few other datapoints were in order. So I rearranged your =
test to be more like a server doing dispatch. I measured just frame =
parsing, frame parsing with a xor on the data, and frame parsing with a =
xor and a 20 byte hmac for each frame for frame sizes ranging on average =
from 27 bytes up to 32KB.<br>
<br>
The xor just uses a constant even when we calculate the hmac. It =
shouldn't matter for measurement. <br>
<br>
These are gigabits per second of payload data:
<pre>
Msgs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parsed&nbsp;&nbsp;&nbsp; =
plain-xor&nbsp;&nbsp;&nbsp; xor-hmac
--------&nbsp; ------&nbsp;&nbsp;&nbsp; ---------&nbsp;&nbsp;&nbsp; =
--------
27 byte&nbsp;&nbsp;&nbsp; =
11.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
7.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.15
250 byte&nbsp;&nbsp; =
40.4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
20.6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.3
1 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
50.8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
25.2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.1
4 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
57.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
26.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12.3
8 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
57.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
26.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17.0
32 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
58.32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
26.7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 23.6

These are K-messages per second:

Msgs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
parsed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plain-xor&nbsp;&nbsp;&nbsp; =
xor-hmac
--------&nbsp; ------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
---------&nbsp;&nbsp;&nbsp; --------
27 byte&nbsp;&nbsp;&nbsp; 54000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
33000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 692
250 byte&nbsp;&nbsp; 20000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
10000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 668
1 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
6349&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
3000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 597
4 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
1785&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
833&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 394
8 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
892&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
416&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 265
32 KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
222&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
102&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 90

</pre>
Most of the tests moved about 4GB of data that was all in page cache. It =
looks like plain xor is expensive, but that basically is just measuring =
memory bandwidth of streaming all the data bytes through the processor =
cache which you have to figure a server is going to need to do =
eventually - you can see the limit on my desktop is reached around =
26gbit/s. I replaced xor with an accumulator and and got the same =
timings.<br>
<br>
One of the things only marginally related to the question at hand =
that&nbsp; this tells me is that even at its most pathological case of =
27 byte messages the xor and ws framing doesn't kill us if we can =
process 33million of them per second on a single core of a commodity =
desktop.<br>
<br>
I also ran a test that just calculated hmacs across the same 20 bytes to =
find the bottleneck. It was 694K on one core of this box. One way to =
look at the 27 byte test is that the core was doing almost exclusively =
HMAC instead of core WS, but the other way is to say even though hmac =
dominated the core it still did 692K messages per second! We can do a =
deep dive on the I/O and where it matters, but the hmac rate is probably =
the interesting limit for this discussion. (ekr suggests perhaps this =
could preform better - but I think it is sufficient to use this as a =
conservative number for now).<br>
<br>
I guess I am swayed by what Maciej has to say - even though the hmac is =
imo grotesquely way too expensive compared to the amount of risk it is =
avoiding, it really doesn't add up to anything all that important to =
obsess over. Claims of "a few percent" are not true, but even at its =
most pathological a server can process 694 thousand of them per second =
with a single core of a commodity desktop. Anyone interested in those =
kinds of volumes easily has a LOT more processor (heck I have 3 unused =
cores - and this is not a server class machine), and probably =
specialized security processors (e.g. cavium nitrox) in the case of =
routing switches,&nbsp; that can cope without breaking a sweat - and in =
turn can accommodate easily millions of messages per second.<br>
<br>
Even with hmac enabled, processing this purely in software on even old =
systems is totally reasonable for significant data flows. Giant =
multiplexing servers will require more oomph. I can live with that - =
they'll almost certainly have a lot more trouble terminating the =
commensurate TCP than parsing websockets.<br>
<br>
To sum it up: This is a lot like masking in general. I'm not a proponent =
of HMAC because I think it is an un-necessary cost. But if that's what =
we need to get consensus and ship this thing that is a reasonable =
compromise I can support because I don't think it materially damages the =
utility of websockets. And that is the question I find myself asking all =
the time lately.<br>
<br>
-Pat<br>
<br>
<table cellspacing=3D"0" cellpadding=3D"0" width=3D"100%">
<tbody><tr>
<td>
<pre>--=20
<a href=3D"http://www.getfirefox.com/">http://www.getfirefox.com/</a>

</pre>
</td>
</tr>
</tbody></table>
</div>

_______________________________________________<br>hybi mailing =
list<br><a =
href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>https://www.ietf.org/ma=
ilman/listinfo/hybi<br></blockquote></div><br></body></html>=

--Boundary_(ID_wzrGxTIoH/HWAsOBkWnp4A)--

--Boundary_(ID_YweqZOt3Zh+jG1imsVJowg)--

From w@1wt.eu  Sun Jan  9 06:32:24 2011
Return-Path: <w@1wt.eu>
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 73DCC3A69BE for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 06:32:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.086
X-Spam-Level: 
X-Spam-Status: No, score=-2.086 tagged_above=-999 required=5 tests=[AWL=-0.043, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 HiQd1C5fkGFJ for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 06:32:23 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 6A98F3A69B1 for <hybi@ietf.org>; Sun,  9 Jan 2011 06:32:22 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09EYNX9008790; Sun, 9 Jan 2011 15:34:23 +0100
Date: Sun, 9 Jan 2011 15:34:23 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110109143423.GM5743@1wt.eu>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 14:32:24 -0000

Hi Maciej,

On Sun, Jan 09, 2011 at 06:13:03AM -0800, Maciej Stachowiak wrote:
> 
> Hi Pat, including XOR seems like a great idea. I coded up my own XORing version, and I decided to also test HMAC with cached state as suggested by Eric, and AES-CTR instead of XOR. 
> 
> Here is a summary of my results on two-way parallel runs:
> 
> Plain XOR: ~5.1 million msg/sec
> HMAC+XOR: ~370 thousand msg/sec
> cached state HMAC+XOR: 1.2 million msg/sec
> AES-CTR: 2.6 million msg/sec

Those are indeed better results.

> == Conclusions ==
> 
> - HMAC is much faster if you do the state caching thing.
> - AES-CTR is even faster than that.
> - We should use AES-CTR for masking.

>From what was previously said, AES cannot be used due to export
regulations, so this can be quite a showstopper for broader adoption.

Regards,
Willy


From ekr@rtfm.com  Sun Jan  9 07:09:46 2011
Return-Path: <ekr@rtfm.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 9A16B3A69DF for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 07:09:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.636
X-Spam-Level: 
X-Spam-Status: No, score=-102.636 tagged_above=-999 required=5 tests=[AWL=0.341, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 VCdDjXTdtDFr for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 07:09:45 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id AA7F23A69DE for <hybi@ietf.org>; Sun,  9 Jan 2011 07:09:45 -0800 (PST)
Received: by yie19 with SMTP id 19so5918324yie.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 07:11:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.83.18 with SMTP id k18mr5128334agl.79.1294585916429; Sun, 09 Jan 2011 07:11:56 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sun, 9 Jan 2011 07:11:56 -0800 (PST)
In-Reply-To: <20110109074709.GK5743@1wt.eu>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <20110109074709.GK5743@1wt.eu>
Date: Sun, 9 Jan 2011 07:11:56 -0800
Message-ID: <AANLkTinBhpgknd9Bam5M7gbDMv6x_FA8Dea4Od1bE4A-@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sun, 09 Jan 2011 15:09:46 -0000

On Sat, Jan 8, 2011 at 11:47 PM, Willy Tarreau <w@1wt.eu> wrote:
>> I also ran a test that just calculated hmacs across the same 20 bytes to
>> find the bottleneck. It was 694K on one core of this box. One way to
>> look at the 27 byte test is that the core was doing almost exclusively
>> HMAC instead of core WS, but the other way is to say even though hmac
>> dominated the core it still did 692K messages per second! We can do a
>> deep dive on the I/O and where it matters, but the hmac rate is probably
>> the interesting limit for this discussion. (ekr suggests perhaps this
>> could preform better - but I think it is sufficient to use this as a
>> conservative number for now).
>
> I've seen his suggestion too, but I don't know how to do what he suggests.
> It was already not easy to find some example code for using HMAC, as the
> openssl man is not particularly helpful on the subject.

I'm not an expert on the OpenSSL interface, but the general procedure in most
systems is to call HMAC_Init() or equivalent and then memcpy() the result
so that it incorporates the key.





> I
>> Even with hmac enabled, processing this purely in software on even old
>> systems is totally reasonable for significant data flows. Giant
>> multiplexing servers will require more oomph. I can live with that -
>> they'll almost certainly have a lot more trouble terminating the
>> commensurate TCP than parsing websockets.
>
> Precisely not. Efficient software and hardware already exists to process
> TCP. HMAC processing can be improved but will always find a limit. Hashing
> algorithms are designed to ensure that there is a non-null setup cost in
> order to limit the ability to brute-force them.

(1) As far as I know, this is not in fact a design criterion for hash
algorithms. Indeed,
how could it be since the "key schedule" for a hash is fixed and so
you can always
precompute. Perhaps you're thinking of encryption algorithms--though
even then this
is no longer really a design goal.

(2) The precomputation I described above is precisely the optimization
that removes any
setup cost.

-Ekr

From ekr@rtfm.com  Sun Jan  9 07:12:04 2011
Return-Path: <ekr@rtfm.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 CCEAF3A659C for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 07:12:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.64
X-Spam-Level: 
X-Spam-Status: No, score=-102.64 tagged_above=-999 required=5 tests=[AWL=0.337, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 TKyYZ93qs-zz for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 07:12:04 -0800 (PST)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by core3.amsl.com (Postfix) with ESMTP id D7D9C3A657C for <hybi@ietf.org>; Sun,  9 Jan 2011 07:12:03 -0800 (PST)
Received: by gxk28 with SMTP id 28so8670234gxk.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 07:14:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.67.10 with SMTP id u10mr5170529agk.187.1294586054546; Sun, 09 Jan 2011 07:14:14 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sun, 9 Jan 2011 07:14:14 -0800 (PST)
In-Reply-To: <AANLkTi=aHRD5tazXX7TqR3gHo9QWe9SLtvHjDghS1UjW@mail.gmail.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <AANLkTi=aHRD5tazXX7TqR3gHo9QWe9SLtvHjDghS1UjW@mail.gmail.com>
Date: Sun, 9 Jan 2011 07:14:14 -0800
Message-ID: <AANLkTi=y75Pi2TCUd_KS1RbAgUD2OjDLYX_QnRrOXMba@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sun, 09 Jan 2011 15:12:04 -0000

On Sun, Jan 9, 2011 at 1:43 AM, Greg Wilkins <gregw@webtide.com> wrote:
>
>
> On 9 January 2011 01:05, Pat McManus @Mozilla <mcmanus@ducksong.com> wrot=
e:
>>
>> I guess I am swayed by what Maciej has to say - even though the hmac is
>> imo grotesquely way too expensive compared to the amount of risk it is
>> avoiding, it really doesn't add up to anything all that important to obs=
ess
>> over. Claims of "a few percent" are not true, but even at its most
>> pathological a server can process 694 thousand of them per second with a
>> single core of a commodity desktop. Anyone interested in those kinds of
>> volumes easily has a LOT more processor (heck I have 3 unused cores - an=
d
>> this is not a server class machine), and probably specialized security
>> processors (e.g. cavium nitrox) in the case of routing switches,=A0 that=
 can
>> cope without breaking a sweat - and in turn can accommodate easily milli=
ons
>> of messages per second.
>
> The HMAC message rate may be sufficient for a intermediary that does noth=
ing
> but forward messages.
>
> But the CPU cost is significant and on server boxes that will be running =
WS
> and running the application, then message rate is not the only thing as
> servers have other things they need to use the CPU's for.
> So if WS with no masking at my required message rate takes 5% of my CPU, =
but
> I can probably live with XOR masking taking 10%, but HMAC masking taking
> 25-50% of my CPU is going to be prohibitive!
>
> Not all of the high volume servers I've worked with have been CPU bound, =
but
> certainly some of them have been.

Wow, I think you have this completely backwards: it's in systems that
do almost nothing
that the cost of adding a new, expensive operation is large. In
systems that are already
doing a lot of other processing, the marginal cost is comparaitvely
low even though it may
occasionally push you over some threshold; Amdahl's law and all that.

-Ekr

From ekr@rtfm.com  Sun Jan  9 07:16:33 2011
Return-Path: <ekr@rtfm.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 90F7D3A67ED for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 07:16:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.863
X-Spam-Level: 
X-Spam-Status: No, score=-101.863 tagged_above=-999 required=5 tests=[AWL=-0.402, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_43=0.6, J_CHICKENPOX_63=0.6, RCVD_IN_DNSWL_LOW=-1, SARE_MILLIONSOF=0.315, 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 BhdyVIYK3Bqs for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 07:16:31 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 87CC03A67E5 for <hybi@ietf.org>; Sun,  9 Jan 2011 07:16:31 -0800 (PST)
Received: by gwj17 with SMTP id 17so9905661gwj.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 07:18:42 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.232.6 with SMTP id e6mr30051842agh.52.1294586321188; Sun, 09 Jan 2011 07:18:41 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sun, 9 Jan 2011 07:18:41 -0800 (PST)
In-Reply-To: <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com>
Date: Sun, 9 Jan 2011 07:18:41 -0800
Message-ID: <AANLkTimcJNS7q_bGR_Cz_YcKjAmTBE6-VKw63qm4-Upd@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: multipart/alternative; boundary=001636284f60ce3a8704996b5d02
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 15:16:33 -0000

--001636284f60ce3a8704996b5d02
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Jan 9, 2011 at 6:13 AM, Maciej Stachowiak <mjs@apple.com> wrote:

>
> Hi Pat, including XOR seems like a great idea. I coded up my own XORing
> version, and I decided to also test HMAC with cached state as suggested by
> Eric, and AES-CTR instead of XOR.
>
> Here is a summary of my results on two-way parallel runs:
>
> Plain XOR: ~5.1 million msg/sec
> HMAC+XOR: ~370 thousand msg/sec
> cached state HMAC+XOR: 1.2 million msg/sec
> AES-CTR: 2.6 million msg/sec
>
> == Conclusions ==
>
> - HMAC is much faster if you do the state caching thing.
> - AES-CTR is even faster than that.
> - We should use AES-CTR for masking.
>
>
You'll recall this was Adam's and my original suggestion. :)

We only started discussing hash-based systems when concerns about export
were raised. If those concerns are still operative, we can get another
factor of two by going from HMAC-SHA1 to SHA-1 alone. That doesn't thrill me
from a cryptographic perspective because merging the key is tricky,but I'm
sure we can figure something out that's sufficient unto the day.

Best,
-Ekr


> Here is my code (based on Willy's version):
>
>
>
> Here is the raw data:
>
> == Plain XOR ==
>
> time (./ws-parse < /tmp/stream.bin > /dev/null & ./ws-parse <
> /tmp/stream.bin > /dev/null)
> Mode: 0
> Mode: 0
> 20000002 messages forwarded
> 20000002 messages forwarded
>
> real 0m3.922s
> user 0m7.314s
> sys 0m0.519s
>
> == HMAC+XOR ==
>
> $ time (./ws-parse 1 < /tmp/stream.bin > /dev/null & ./ws-parse 1 <
> /tmp/stream.bin > /dev/null)
> Mode: 1
> Mode: 1
> 20000002 messages forwarded
> 20000002 messages forwarded
>
> real 0m53.586s
> user 0m53.222s
> sys 0m0.347s
>
> == cached state HMAC+XOR ==
>
> $ time (./ws-parse 2 < /tmp/stream.bin > /dev/null & ./ws-parse 2 <
> /tmp/stream.bin > /dev/null)
> Mode: 2
> Mode: 2
> 20000002 messages forwarded
> 20000002 messages forwarded
>
> real 0m16.399s
> user 0m32.098s
> sys 0m0.631s
>
> == AES-CTR ==
>
> $ time (./ws-parse 3 < /tmp/stream.bin > /dev/null & ./ws-parse 3 <
> /tmp/stream.bin > /dev/null)
> Mode: 3
> Mode: 3
> 20000002 messages forwarded
> 20000002 messages forwarded
>
> real 0m7.695s
> user 0m7.396s
> sys 0m0.290s
>
>
>
>
> On Jan 8, 2011, at 4:05 PM, Pat McManus @Mozilla wrote:
>
>  Willy, this is great. Thanks.
>
> On Sat, 2011-01-08 at 12:16 +0100, Willy Tarreau wrote:
>
>  I have written
> a WebSocket framing parser which reads, parses and forwards frames.
>
>  [..]
>
> The payload is not even unmasked with the key, the purpose is just
> to evaluate the cost for a front server/load balancer/switch supposed
> to switch frames to a server farm.
>
> I have ran it over a stream of messages whose payload was between 1
> and 125 bytes, with an average of 29 bytes (rnd(1..5) ^ 3), so that
> we're in line with many legitimate uses of the protocol such as online
> chat, and it happens to always fit in one byte length, making the
> stream generator even easier to write.
>
> The results :
>
>  [..]
>
> Masking the stream with HMAC multiplies the parsing time by 24 on small
> messages !!!
>
>
> Based on your experiment I was able to repeat it here on a single core of a
> 2.7ghz i5. (I got a multiple of about 22x).
>
> I thought a few other datapoints were in order. So I rearranged your test
> to be more like a server doing dispatch. I measured just frame parsing,
> frame parsing with a xor on the data, and frame parsing with a xor and a 20
> byte hmac for each frame for frame sizes ranging on average from 27 bytes up
> to 32KB.
>
> The xor just uses a constant even when we calculate the hmac. It shouldn't
> matter for measurement.
>
> These are gigabits per second of payload data:
>
> Msgs      parsed    plain-xor    xor-hmac
> --------  ------    ---------    --------
> 27 byte    11.7          7.1       0.15
> 250 byte   40.4         20.6       1.3
> 1 KB       50.8         25.2       5.1
> 4 KB       57.1         26.7      12.3
> 8 KB       57.1         26.7      17.0
> 32 KB      58.32        26.7      23.6
>
> These are K-messages per second:
>
> Msgs      parsed       plain-xor    xor-hmac
> --------  ------       ---------    --------
> 27 byte    54000       33000          692
> 250 byte   20000       10000          668
> 1 KB        6349        3000          597
> 4 KB        1785         833          394
> 8 KB         892         416          265
> 32 KB        222         102           90
>
>
> Most of the tests moved about 4GB of data that was all in page cache. It
> looks like plain xor is expensive, but that basically is just measuring
> memory bandwidth of streaming all the data bytes through the processor cache
> which you have to figure a server is going to need to do eventually - you
> can see the limit on my desktop is reached around 26gbit/s. I replaced xor
> with an accumulator and and got the same timings.
>
> One of the things only marginally related to the question at hand that
> this tells me is that even at its most pathological case of 27 byte messages
> the xor and ws framing doesn't kill us if we can process 33million of them
> per second on a single core of a commodity desktop.
>
> I also ran a test that just calculated hmacs across the same 20 bytes to
> find the bottleneck. It was 694K on one core of this box. One way to look at
> the 27 byte test is that the core was doing almost exclusively HMAC instead
> of core WS, but the other way is to say even though hmac dominated the core
> it still did 692K messages per second! We can do a deep dive on the I/O and
> where it matters, but the hmac rate is probably the interesting limit for
> this discussion. (ekr suggests perhaps this could preform better - but I
> think it is sufficient to use this as a conservative number for now).
>
> I guess I am swayed by what Maciej has to say - even though the hmac is imo
> grotesquely way too expensive compared to the amount of risk it is avoiding,
> it really doesn't add up to anything all that important to obsess over.
> Claims of "a few percent" are not true, but even at its most pathological a
> server can process 694 thousand of them per second with a single core of a
> commodity desktop. Anyone interested in those kinds of volumes easily has a
> LOT more processor (heck I have 3 unused cores - and this is not a server
> class machine), and probably specialized security processors (e.g. cavium
> nitrox) in the case of routing switches,  that can cope without breaking a
> sweat - and in turn can accommodate easily millions of messages per second.
>
> Even with hmac enabled, processing this purely in software on even old
> systems is totally reasonable for significant data flows. Giant multiplexing
> servers will require more oomph. I can live with that - they'll almost
> certainly have a lot more trouble terminating the commensurate TCP than
> parsing websockets.
>
> To sum it up: This is a lot like masking in general. I'm not a proponent of
> HMAC because I think it is an un-necessary cost. But if that's what we need
> to get consensus and ship this thing that is a reasonable compromise I can
> support because I don't think it materially damages the utility of
> websockets. And that is the question I find myself asking all the time
> lately.
>
> -Pat
>
>   -- http://www.getfirefox.com/
>
>   _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>

--001636284f60ce3a8704996b5d02
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Sun, Jan 9, 2011 at 6:13 AM, Maciej S=
tachowiak <span dir=3D"ltr">&lt;<a href=3D"mailto:mjs@apple.com">mjs@apple.=
com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style=3D"word-wrap:break-word"><div><br></div><div>Hi Pat, including X=
OR seems like a great idea. I coded up my own XORing version, and I decided=
 to also test HMAC with cached state as suggested by Eric, and AES-CTR inst=
ead of XOR.=A0</div>
<div><br></div><div>Here is a summary of my results on two-way parallel run=
s:</div><div><br></div><div>Plain XOR: ~5.1 million msg/sec</div><div>HMAC+=
XOR: ~370 thousand msg/sec</div><div>cached state HMAC+XOR: 1.2 million msg=
/sec</div>
<div>AES-CTR: 2.6 million msg/sec</div><div><br></div><div>=3D=3D Conclusio=
ns =3D=3D</div><div><br></div><div>- HMAC is much faster if you do the stat=
e caching thing.</div><div>- AES-CTR is even faster than that.</div><div>- =
We should use AES-CTR for masking.</div>
<div><br></div></div></blockquote><div><br></div><div>You&#39;ll recall thi=
s was Adam&#39;s and my original suggestion. :)</div><div><br></div><div>We=
 only started discussing hash-based systems when concerns about export were=
 raised. If those concerns are still operative, we can get another factor o=
f two by=A0going from HMAC-SHA1 to SHA-1 alone. That doesn&#39;t thrill me =
from a cryptographic perspective because merging the key is tricky,but I&#3=
9;m sure we can figure something out that&#39;s sufficient unto the day.</d=
iv>
<div><br></div><div>Best,</div><div>-Ekr</div><div>=A0</div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex;"><div style=3D"word-wrap:break-word"><div></div><div>Here i=
s my code (based on Willy&#39;s version):</div>
<div><br></div><div></div></div>
<br><div style=3D"word-wrap:break-word"><div></div><div><br></div><div>Here=
 is the raw data:</div><div><br></div><div>=3D=3D Plain XOR =3D=3D</div><di=
v><br></div><div><div>time (./ws-parse &lt; /tmp/stream.bin &gt; /dev/null =
&amp; ./ws-parse &lt; /tmp/stream.bin &gt; /dev/null)</div>
<div>Mode: 0</div><div>Mode: 0</div><div>20000002 messages forwarded</div><=
div>20000002 messages forwarded</div><div><br></div><div>real<span style=3D=
"white-space:pre-wrap">	</span>0m3.922s</div><div>user<span style=3D"white-=
space:pre-wrap">	</span>0m7.314s</div>
<div>sys<span style=3D"white-space:pre-wrap">	</span>0m0.519s</div></div><d=
iv><br></div><div><div>=3D=3D HMAC+XOR =3D=3D</div></div><div><br></div><di=
v><div>$ time (./ws-parse 1 &lt; /tmp/stream.bin &gt; /dev/null &amp; ./ws-=
parse 1 &lt; /tmp/stream.bin &gt; /dev/null)</div>
<div>Mode: 1</div><div>Mode: 1</div><div>20000002 messages forwarded</div><=
div><div>20000002 messages forwarded</div></div><div><br></div><div>real<sp=
an style=3D"white-space:pre-wrap">	</span>0m53.586s</div><div>user<span sty=
le=3D"white-space:pre-wrap">	</span>0m53.222s</div>
<div>sys<span style=3D"white-space:pre-wrap">	</span>0m0.347s</div></div><d=
iv><br></div><div><div><div>=3D=3D cached state HMAC+XOR =3D=3D</div></div>=
</div><div><br></div><div><div>$ time (./ws-parse 2 &lt; /tmp/stream.bin &g=
t; /dev/null &amp; ./ws-parse 2 &lt; /tmp/stream.bin &gt; /dev/null)</div>
<div>Mode: 2</div><div>Mode: 2</div><div>20000002 messages forwarded</div><=
div>20000002 messages forwarded</div><div><br></div><div>real<span style=3D=
"white-space:pre-wrap">	</span>0m16.399s</div><div>user<span style=3D"white=
-space:pre-wrap">	</span>0m32.098s</div>
<div>sys<span style=3D"white-space:pre-wrap">	</span>0m0.631s</div></div><d=
iv><br></div><div>=3D=3D AES-CTR =3D=3D</div><div><br></div><div><div>$ tim=
e (./ws-parse 3 &lt; /tmp/stream.bin &gt; /dev/null &amp; ./ws-parse 3 &lt;=
 /tmp/stream.bin &gt; /dev/null)</div>
<div>Mode: 3</div><div>Mode: 3</div><div>20000002 messages forwarded</div><=
div><div>20000002 messages forwarded</div></div><div><br></div><div>real<sp=
an style=3D"white-space:pre-wrap">	</span>0m7.695s</div><div>user<span styl=
e=3D"white-space:pre-wrap">	</span>0m7.396s</div>
<div>sys<span style=3D"white-space:pre-wrap">	</span>0m0.290s</div></div><d=
iv><br></div><div><br></div><div><br></div><br><div><div>On Jan 8, 2011, at=
 4:05 PM, Pat McManus @Mozilla wrote:</div><br><blockquote type=3D"cite">
<div>
Willy, this is great. Thanks.<br>
<br>
On Sat, 2011-01-08 at 12:16 +0100, Willy Tarreau wrote:
<blockquote type=3D"CITE">
<pre> I have written
a WebSocket framing parser which reads, parses and forwards frames.
</pre>
</blockquote>
[..]
<blockquote type=3D"CITE">
<pre>The payload is not even unmasked with the key, the purpose is just
to evaluate the cost for a front server/load balancer/switch supposed
to switch frames to a server farm.

I have ran it over a stream of messages whose payload was between 1
and 125 bytes, with an average of 29 bytes (rnd(1..5) ^ 3), so that
we&#39;re in line with many legitimate uses of the protocol such as online
chat, and it happens to always fit in one byte length, making the
stream generator even easier to write.

The results :
</pre>
</blockquote>
[..]
<blockquote type=3D"CITE">
<pre>Masking the stream with HMAC multiplies the parsing time by 24 on smal=
l
messages !!!=20
</pre>
</blockquote>
<br>
Based on your experiment I was able to repeat it here on a single core of a=
 2.7ghz i5. (I got a multiple of about 22x).<br>
<br>
I thought a few other datapoints were in order. So I rearranged your test t=
o be more like a server doing dispatch. I measured just frame parsing, fram=
e parsing with a xor on the data, and frame parsing with a xor and a 20 byt=
e hmac for each frame for frame sizes ranging on average from 27 bytes up t=
o 32KB.<br>

<br>
The xor just uses a constant even when we calculate the hmac. It shouldn&#3=
9;t matter for measurement. <br>
<br>
These are gigabits per second of payload data:
<pre>Msgs=A0=A0=A0=A0=A0 parsed=A0=A0=A0 plain-xor=A0=A0=A0 xor-hmac
--------=A0 ------=A0=A0=A0 ---------=A0=A0=A0 --------
27 byte=A0=A0=A0 11.7=A0=A0=A0=A0=A0=A0=A0=A0=A0 7.1=A0=A0=A0=A0=A0=A0 0.15
250 byte=A0=A0 40.4=A0=A0=A0=A0=A0=A0=A0=A0 20.6=A0=A0=A0=A0=A0=A0 1.3
1 KB=A0=A0=A0=A0=A0=A0 50.8=A0=A0=A0=A0=A0=A0=A0=A0 25.2=A0=A0=A0=A0=A0=A0 =
5.1
4 KB=A0=A0=A0=A0=A0=A0 57.1=A0=A0=A0=A0=A0=A0=A0=A0 26.7=A0=A0=A0=A0=A0 12.=
3
8 KB=A0=A0=A0=A0=A0=A0 57.1=A0=A0=A0=A0=A0=A0=A0=A0 26.7=A0=A0=A0=A0=A0 17.=
0
32 KB=A0=A0=A0=A0=A0 58.32=A0=A0=A0=A0=A0=A0=A0 26.7=A0=A0=A0=A0=A0 23.6

These are K-messages per second:

Msgs=A0=A0=A0=A0=A0 parsed=A0=A0=A0=A0=A0=A0 plain-xor=A0=A0=A0 xor-hmac
--------=A0 ------=A0=A0=A0=A0=A0=A0 ---------=A0=A0=A0 --------
27 byte=A0=A0=A0 54000=A0=A0=A0=A0=A0=A0 33000=A0=A0=A0=A0=A0=A0=A0=A0=A0 6=
92
250 byte=A0=A0 20000=A0=A0=A0=A0=A0=A0 10000=A0=A0=A0=A0=A0=A0=A0=A0=A0 668
1 KB=A0=A0=A0=A0=A0=A0=A0 6349=A0=A0=A0=A0=A0=A0=A0 3000=A0=A0=A0=A0=A0=A0=
=A0=A0=A0 597
4 KB=A0=A0=A0=A0=A0=A0=A0 1785=A0=A0=A0=A0=A0=A0=A0=A0 833=A0=A0=A0=A0=A0=
=A0=A0=A0=A0 394
8 KB=A0=A0=A0=A0=A0=A0=A0=A0 892=A0=A0=A0=A0=A0=A0=A0=A0 416=A0=A0=A0=A0=A0=
=A0=A0=A0=A0 265
32 KB=A0=A0=A0=A0=A0=A0=A0 222=A0=A0=A0=A0=A0=A0=A0=A0 102=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0 90

</pre>
Most of the tests moved about 4GB of data that was all in page cache. It lo=
oks like plain xor is expensive, but that basically is just measuring memor=
y bandwidth of streaming all the data bytes through the processor cache whi=
ch you have to figure a server is going to need to do eventually - you can =
see the limit on my desktop is reached around 26gbit/s. I replaced xor with=
 an accumulator and and got the same timings.<br>

<br>
One of the things only marginally related to the question at hand that=A0 t=
his tells me is that even at its most pathological case of 27 byte messages=
 the xor and ws framing doesn&#39;t kill us if we can process 33million of =
them per second on a single core of a commodity desktop.<br>

<br>
I also ran a test that just calculated hmacs across the same 20 bytes to fi=
nd the bottleneck. It was 694K on one core of this box. One way to look at =
the 27 byte test is that the core was doing almost exclusively HMAC instead=
 of core WS, but the other way is to say even though hmac dominated the cor=
e it still did 692K messages per second! We can do a deep dive on the I/O a=
nd where it matters, but the hmac rate is probably the interesting limit fo=
r this discussion. (ekr suggests perhaps this could preform better - but I =
think it is sufficient to use this as a conservative number for now).<br>

<br>
I guess I am swayed by what Maciej has to say - even though the hmac is imo=
 grotesquely way too expensive compared to the amount of risk it is avoidin=
g, it really doesn&#39;t add up to anything all that important to obsess ov=
er. Claims of &quot;a few percent&quot; are not true, but even at its most =
pathological a server can process 694 thousand of them per second with a si=
ngle core of a commodity desktop. Anyone interested in those kinds of volum=
es easily has a LOT more processor (heck I have 3 unused cores - and this i=
s not a server class machine), and probably specialized security processors=
 (e.g. cavium nitrox) in the case of routing switches,=A0 that can cope wit=
hout breaking a sweat - and in turn can accommodate easily millions of mess=
ages per second.<br>

<br>
Even with hmac enabled, processing this purely in software on even old syst=
ems is totally reasonable for significant data flows. Giant multiplexing se=
rvers will require more oomph. I can live with that - they&#39;ll almost ce=
rtainly have a lot more trouble terminating the commensurate TCP than parsi=
ng websockets.<br>

<br>
To sum it up: This is a lot like masking in general. I&#39;m not a proponen=
t of HMAC because I think it is an un-necessary cost. But if that&#39;s wha=
t we need to get consensus and ship this thing that is a reasonable comprom=
ise I can support because I don&#39;t think it materially damages the utili=
ty of websockets. And that is the question I find myself asking all the tim=
e lately.<br>

<br>
-Pat<br>
<br>
<table cellspacing=3D"0" cellpadding=3D"0" width=3D"100%">
<tbody><tr>
<td>
<pre>--=20
<a href=3D"http://www.getfirefox.com/" target=3D"_blank">http://www.getfire=
fox.com/</a>

</pre>
</td>
</tr>
</tbody></table>
</div>

_______________________________________________<br>hybi mailing list<br><a =
href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br><a hre=
f=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">https://=
www.ietf.org/mailman/listinfo/hybi</a><br>
</blockquote></div><br></div><br>__________________________________________=
_____<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
<br></blockquote></div><br>

--001636284f60ce3a8704996b5d02--

From mcmanus@ducksong.com  Sun Jan  9 07:39:36 2011
Return-Path: <mcmanus@ducksong.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 C4FD03A6803 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 07:39:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.503
X-Spam-Level: 
X-Spam-Status: No, score=-2.503 tagged_above=-999 required=5 tests=[AWL=0.096,  BAYES_00=-2.599]
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 bKyFu2DYtHKt for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 07:39:35 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id C58473A67FA for <hybi@ietf.org>; Sun,  9 Jan 2011 07:39:35 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id 845501043E; Sun,  9 Jan 2011 10:41:46 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 7EB0210305; Sun,  9 Jan 2011 10:41:41 -0500 (EST)
From: Patrick McManus <mcmanus@ducksong.com>
To: Eric Rescorla <ekr@rtfm.com>
In-Reply-To: <AANLkTi=y75Pi2TCUd_KS1RbAgUD2OjDLYX_QnRrOXMba@mail.gmail.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <AANLkTi=aHRD5tazXX7TqR3gHo9QWe9SLtvHjDghS1UjW@mail.gmail.com> <AANLkTi=y75Pi2TCUd_KS1RbAgUD2OjDLYX_QnRrOXMba@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Date: Sun, 09 Jan 2011 10:41:28 -0500
Message-ID: <1294587688.7650.561.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sun, 09 Jan 2011 15:39:36 -0000

On Sun, 2011-01-09 at 07:14 -0800, Eric Rescorla wrote:
> ges.
> >
> > But the CPU cost is significant and on server boxes that will be running WS
> > and running the application, then message rate is not the only thing as
> > servers have other things they need to use the CPU's for.
> > So if WS with no masking at my required message rate takes 5% of my CPU, but
> > I can probably live with XOR masking taking 10%, but HMAC masking taking
> > 25-50% of my CPU is going to be prohibitive!
> >
> > Not all of the high volume servers I've worked with have been CPU bound, but
> > certainly some of them have been.
> 
> Wow, I think you have this completely backwards: it's in systems that
> do almost nothing
> that the cost of adding a new, expensive operation is large. In
> systems that are already
> doing a lot of other processing, the marginal cost is comparaitvely
> low even though it may
> occasionally push you over some threshold; Amdahl's law and all that.

+1 ,.. at these volumes the concerning case is the ws-router, not the
server doing useful things. It is of course a syllogism to conclude that
the more expensive hmac means less resources for "real work". 

I think the more useful conclusion here given the raw volumes is that
any reasonable volume of "real work" precludes reaching message rates
where the hmac adds up to very much. Of course I cannot know that for
certain before someone accuses me of presuming I know every use case for
the protocol - it is a judgment based on experience. ymmv.

That leaves us, imo:

 1 - hmac adds a significant but bearable cost in return for a very
minor reduction in risk
 2 - aes costs computationally less for the same return but has
potential hassles with legal vetting. aes is being deployed in new intel
commodity processors, likely driving the cost down even further.
  3 - xor with a sliding mask is probably the cheapest option given
consensus on masking and comes bundled with a non-specific risk.

My preference remains for #3 because I'm not paranoid about the specific
risk - but I don't see any reason to object to #1 if that is needed for
consensus. Websockets would still be a perfectly good protocol with #1
and the fact that it reflects input from wide points of view might only
makes it stronger. I would want to research #2 more before supporting
that as part of the standard.




From w@1wt.eu  Sun Jan  9 07:48:14 2011
Return-Path: <w@1wt.eu>
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 E08D33A6803 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 07:48:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.086
X-Spam-Level: 
X-Spam-Status: No, score=-2.086 tagged_above=-999 required=5 tests=[AWL=-0.043, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 KYX1kRpKz+sX for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 07:48:14 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 991843A6805 for <hybi@ietf.org>; Sun,  9 Jan 2011 07:48:13 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09FoLnr008932; Sun, 9 Jan 2011 16:50:21 +0100
Date: Sun, 9 Jan 2011 16:50:20 +0100
From: Willy Tarreau <w@1wt.eu>
To: Patrick McManus <mcmanus@ducksong.com>
Message-ID: <20110109155020.GN5743@1wt.eu>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <AANLkTi=aHRD5tazXX7TqR3gHo9QWe9SLtvHjDghS1UjW@mail.gmail.com> <AANLkTi=y75Pi2TCUd_KS1RbAgUD2OjDLYX_QnRrOXMba@mail.gmail.com> <1294587688.7650.561.camel@ds9.ducksong.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1294587688.7650.561.camel@ds9.ducksong.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Sun, 09 Jan 2011 15:48:15 -0000

On Sun, Jan 09, 2011 at 10:41:28AM -0500, Patrick McManus wrote:
> On Sun, 2011-01-09 at 07:14 -0800, Eric Rescorla wrote:
> > ges.
> > >
> > > But the CPU cost is significant and on server boxes that will be running WS
> > > and running the application, then message rate is not the only thing as
> > > servers have other things they need to use the CPU's for.
> > > So if WS with no masking at my required message rate takes 5% of my CPU, but
> > > I can probably live with XOR masking taking 10%, but HMAC masking taking
> > > 25-50% of my CPU is going to be prohibitive!
> > >
> > > Not all of the high volume servers I've worked with have been CPU bound, but
> > > certainly some of them have been.
> > 
> > Wow, I think you have this completely backwards: it's in systems that
> > do almost nothing
> > that the cost of adding a new, expensive operation is large. In
> > systems that are already
> > doing a lot of other processing, the marginal cost is comparaitvely
> > low even though it may
> > occasionally push you over some threshold; Amdahl's law and all that.
> 
> +1 ,.. at these volumes the concerning case is the ws-router, not the
> server doing useful things. It is of course a syllogism to conclude that
> the more expensive hmac means less resources for "real work". 
> 
> I think the more useful conclusion here given the raw volumes is that
> any reasonable volume of "real work" precludes reaching message rates
> where the hmac adds up to very much. Of course I cannot know that for
> certain before someone accuses me of presuming I know every use case for
> the protocol - it is a judgment based on experience. ymmv.
> 
> That leaves us, imo:
> 
>  1 - hmac adds a significant but bearable cost in return for a very
> minor reduction in risk
>  2 - aes costs computationally less for the same return but has
> potential hassles with legal vetting. aes is being deployed in new intel
> commodity processors, likely driving the cost down even further.
>   3 - xor with a sliding mask is probably the cheapest option given
> consensus on masking and comes bundled with a non-specific risk.
> 
> My preference remains for #3 because I'm not paranoid about the specific
> risk - but I don't see any reason to object to #1 if that is needed for
> consensus. Websockets would still be a perfectly good protocol with #1
> and the fact that it reflects input from wide points of view might only
> makes it stronger. I would want to research #2 more before supporting
> that as part of the standard.

I agree with your approach Pat. Also, I'm still doing some work but it
appears that for our precise concern, HMAC will finally not provide any
better protection over a simple XOR due to the ease of making the client
generate known small messages. Anyway, both do still offer quite a good
masking capability, which is what we're looking for in the first place.

More on that later.

Cheers,
Willy


From w@1wt.eu  Sun Jan  9 09:49:13 2011
Return-Path: <w@1wt.eu>
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 37C393A67D4 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 09:49:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.086
X-Spam-Level: 
X-Spam-Status: No, score=-2.086 tagged_above=-999 required=5 tests=[AWL=-0.043, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 RhbZ9GNcZBNR for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 09:49:11 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id B6DE03A67C1 for <hybi@ietf.org>; Sun,  9 Jan 2011 09:49:09 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09HpItZ009259 for hybi@ietf.org; Sun, 9 Jan 2011 18:51:18 +0100
Date: Sun, 9 Jan 2011 18:51:18 +0100
From: Willy Tarreau <w@1wt.eu>
To: "hybi@ietf.org" <hybi@ietf.org>
Message-ID: <20110109175118.GP5743@1wt.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.3i
Subject: [hybi] Limitations of the XOR-based masking
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: Sun, 09 Jan 2011 17:49:13 -0000

Hi,

I found that it was possible to sensibly reduce the difficulty in making
an intermediary forward a valid HTTP request despite masking. My feeling
is that the risk remains extremely low as it still requires a substantial
amount of garbage to be skipped to find a request, and that we have not
detected any such vulnerable intermediaries. Still I wanted to share my
experiments.

Abstract:

  The attack described here does not exploit any weakness in the mask
  generation algorithm, it only exploits the way the mask is applied.
  This means that the strongest algorithm such as HMAC will not provide
  any advantage over the simpler ones such as a simple 32-bit random
  number obtained from a valid source. The residual risk is still almost
  zero, so if the HMAC method is acceptable, then any cheaper method
  providing at least a 32-bit key is also acceptable.


The goal of the initially proposed XOR masking is to prevent an attacker who
controls a server from forcing a client to send known text to it via a caching
intermediary which could see an HTTP request there and unduly cache the
attacker server's response.

It has been proven that some intermediaries will consider the 101+Upgrade
response as a final response and expect a new request from the client. It has
also been speculated that some lazy intermediaries might even scan the request
stream to seek a request after some garbage, hence the need to mask all the
stream.

It is a fact that some intermediaries exist who accept HTTP/0.9 requests after
an HTTP/1.1 request. Apache is one of them. And it even accepts requests
composed only from a GET method followed by a line feed, without resource name.
That might come from back in the old days where it was suggested that by default
the resource was "/".

What this means is that it's enough to send the 4 bytes "G", "E", "T", LF to
Apache for it to see a request. Even better, Apache rewrites the request as
a perfectly valid HTTP/1.1 request when forwarding it, which means that those
4 bytes are completely enough to fool a less lazy downstream cache :

  GET / HTTP/1.1
  Host: 10.8.3.1:8080
  X-Forwarded-For: 127.0.0.1
  X-Forwarded-Server: dummy-host.example.com
  Connection: Keep-Alive

This has several impacts :

1) A lazy intermediary which accepts the same requests as Apache, but which
   would search them anywhere in the stream could reformulate it as a plain
   valid request to next hop.

2) Even if the intermediary does not scan for the request anywhere in the
   stream, if we put the random key at the beginning of the stream, 1 time
   on 4 billion a random key will match "GET\n".

Note1: Apache does not expect a second request after a 101 and is not fooled
       by this issue.

Note2: It could probably be accepted that 4 billion connections to make a
       client emit such a request is high enough not to care more about the
       issue.


Hence it was interesting to see how the XOR-based masking could be abused to
make a client emit "GET\n" in less than 4 billion connections, regardless of
the algorithm used to build the masking key.

The principle is to make the client emit many incremental 32-bit values, hoping
that "GET\n" will appear soon enough. In theory, such a pattern should happen
every 2^32 patterns, which is every 16 gigabytes. This is far too much to
expect from a client to pass through a server to hope it will spot anything
useful. However, we have a way to reduce the analysis to two consecutive
phases each of the complexity of the square root of the pattern space (65536).

Since the currently discussed masking method involves a fixed mask which is
repeated over the stream, it is possible since the beginning of the stream
to determine how long it will take so a "GET\n" appear.

The fact that we're using a 160-bit mask means we can pack 5 of such 32-bit
patterns in a mask, then multiply by 5 the chances to see a "GET\n" from a
single pattern.

The client will then build a single frame composed of 5 times the same pattern,
then incremented 65536 times.

The server will check the input stream, looking for the bytes "G" and "E".
If those bytes do not appear, it will terminate the connection because it
means this connection will require too many blocks to get the correct values.

The 160-bit mask offers us the ability to find the required pattern a lot
faster, because in each connections, this fixed mask can in fact be seen as 5
indepedant 32-bit masks. The net effect it that it divides by 5 the number of
required connections to get the expected bytes (in practice, it is possible to
achieve the same optimization with a smaller mask, it just requires the client
to send multiple different patterns). On average, 65536/5 = 13107 connections
are required to get a candidate connection.

If the server finds that the XOR mask will make "G" and "E" appear, then it
reads the stream so that the client emits all possible combinations of 3rd
and 4th chars, which means that at most 20*65536 = 1.3 Megabytes are required
once a candidate connection is found.

The ws-attack program contains both the client and the server code. For the
sake of simplicity, it does not do any networking, but it is designed with
clearly distinct parts which communicate via a sequentially accessed buffer,
so that the roles are more easily identifiable and both could be split if
required.

Results :

   The program can be downloaded at http://1wt.eu/websocket/ws-attack.c

willy@pcw:~/c$ time ./ws-attack 
Found pattern 'GET\n' at block 172226 after 6615 connections and 1469504 bytes sent

real    0m0.030s
user    0m0.032s
sys     0m0.000s
willy@pcw:~/c$ time ./ws-attack 
Found pattern 'GET\n' at block 207343 after 16071 connections and 1696448 bytes sent

real    0m0.069s
user    0m0.068s
sys     0m0.000s
willy@pcw:~/c$ time ./ws-attack 
Found pattern 'GET\n' at block 150470 after 95 connections and 1313024 bytes sent

real    0m0.003s
user    0m0.000s
sys     0m0.004s
willy@pcw:~/c$ time ./ws-attack 
Found pattern 'GET\n' at block 139582 after 28577 connections and 1996592 bytes sent

real    0m0.119s
user    0m0.116s
sys     0m0.008s


Conclusion :

Between 1.3 and 1.9 MB of framing data were required to get the expected
request the masking method was supposed to prevent from appearing.

A sliding self-regenerating mask would only make it slightly harder for the
server to decide upon accepting or rejecting the connection, because once it
gets the seed, it can locally simulate the emitted stream to find whether the
pattern will appear or not, but the improvement is not significant.

All in all, we see that we still need the client to send megabytes of data
to make a short request pop up. It is extremely unlikely that any caching
intermediary would skip over that amount of data to spot a valid request, and
it is contrary to the principle of lazyness because implementing such one is
a lot harder than making it do the right thing. BTW, no such intermediary has
yet been detected nor identified.

All the issues always converge to the same point : avoiding the LF character
(and possibly the CR) in the WS stream. But that's not easy or it requires
more expensive escaping or encoding (eg: base64).

Proposals :

 1) keep the XOR-based masking with a simpler key generation algorithm to
    keep the per-frame masking cost low. An improvement might also consist
    in avoiding the LF character in the key.

 2) use a more expensive LF-less masking such as base64, but this one must be
    optional.

 3) escape the LF character and define an escape character which must also be
    escaped itself. It is cheaper network-wise, but more expensive on the
    client side where the stream must be read once to count the LFs before
    being encoded and emitted.

 4) use Dave Cridland's idea of inserting an invalid HTTP request before the
    beginning of the stream. The request should remain simple and short with
    the goal to quickly fail.

My personal suggestion would be stay in line with the progress that was done
and to go for #1.

Regards,
Willy


From andy.warmcat.com@googlemail.com  Sun Jan  9 10:41:00 2011
Return-Path: <andy.warmcat.com@googlemail.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 E54DF3A682F for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 10:41:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.547
X-Spam-Level: 
X-Spam-Status: No, score=-3.547 tagged_above=-999 required=5 tests=[AWL=0.052,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 L0hfJhZaZnMY for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 10:41:00 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 362B83A67DF for <hybi@ietf.org>; Sun,  9 Jan 2011 10:40:59 -0800 (PST)
Received: by wyf23 with SMTP id 23so19824467wyf.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 10:43:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=yGiUbtecK4b/lbra89jYhwoRFJmn44davY2Kqn3nqsY=; b=ldIajXPYGx+htkzlDH6wvb8Nw9fIa5MuRQRggvMtOz6SXf3SXv7x3fJnN1P94H4tX0 Tm0aFr/s3wogo0rBEOZeV51haUiS8nB8oy120rYZ2sFYW3Q7LfKlnLTZLcf44yt3MPIj Xq2RbhAJZoheywv2ll5RtOhgFN4C8TXRKj1LE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=n7iZ3S2KbwmpNbCAOCwYMpzPHTAfugUqjwPgmS0QIfJV1OYyTeDknQ7lYQ7F44Vlyw nfJFPWyeUB4JuEpWrS0JyU62h1h2NUY3LsN+H6XC4Po5BYqb8pKbOni9Ibze0HD6m9vi MrWGMIrbwFcXTWCwftlZ67rcndS0vJt2kcPQo=
Received: by 10.227.132.143 with SMTP id b15mr1754307wbt.9.1294598508823; Sun, 09 Jan 2011 10:41:48 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id f35sm19438090wbf.14.2011.01.09.10.41.47 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 10:41:48 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D2A016A.1080500@warmcat.com>
Date: Sun, 09 Jan 2011 18:41:46 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <20110109175118.GP5743@1wt.eu>
In-Reply-To: <20110109175118.GP5743@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Limitations of the XOR-based masking
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Sun, 09 Jan 2011 18:41:01 -0000

On 01/09/11 17:51, Somebody in the thread at some point said:

>   1) keep the XOR-based masking with a simpler key generation algorithm to
>      keep the per-frame masking cost low. An improvement might also consist
>      in avoiding the LF character in the key.
>
>   2) use a more expensive LF-less masking such as base64, but this one must be
>      optional.
>
>   3) escape the LF character and define an escape character which must also be
>      escaped itself. It is cheaper network-wise, but more expensive on the
>      client side where the stream must be read once to count the LFs before
>      being encoded and emitted.
>
>   4) use Dave Cridland's idea of inserting an invalid HTTP request before the
>      beginning of the stream. The request should remain simple and short with
>      the goal to quickly fail.
>
> My personal suggestion would be stay in line with the progress that was done
> and to go for #1.

Congratulations dude for doing that work, making it repeatable by 
providing code and identifying the tools used.

Although there's still no broken intermediary identified as you pointed 
out twice, otherwise this poured out a lot more facts and logic than 
heretofore.

Options 1 - 3 kill or reduce the chance of zerocopy, 4 leaves that open. 
  For that reason 4 sounds like the best guy to me.

Is the attack that it defeats is enough for the browser guys?

Is there anything otherwise wrong with Dave's idea, it's really simple 
and lightweight and leaves the rest of the current draft intact.

-Andy

From salvatore.loreto@ericsson.com  Sun Jan  9 11:29:55 2011
Return-Path: <salvatore.loreto@ericsson.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 069DA3A67FB for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 11:29:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.55
X-Spam-Level: 
X-Spam-Status: No, score=-106.55 tagged_above=-999 required=5 tests=[AWL=0.049, BAYES_00=-2.599, 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 pJtsRYSyHppd for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 11:29:53 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id 7D2A23A67D4 for <hybi@ietf.org>; Sun,  9 Jan 2011 11:29:52 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-a8-4d2a0d330d36
Received: from esessmw0256.eemea.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id AA.CC.23694.33D0A2D4; Sun,  9 Jan 2011 20:32:03 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0256.eemea.ericsson.se (153.88.115.97) with Microsoft SMTP Server id 8.2.234.1; Sun, 9 Jan 2011 20:32:02 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id B7265251F	for <hybi@ietf.org>; Sun,  9 Jan 2011 21:32:02 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 7E9A5504FE	for <hybi@ietf.org>; Sun,  9 Jan 2011 21:32:02 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 0B6DF4FCB2	for <hybi@ietf.org>; Sun,  9 Jan 2011 21:32:01 +0200 (EET)
Message-ID: <4D2A0D31.1070703@ericsson.com>
Date: Sun, 9 Jan 2011 20:32:01 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <20110109175118.GP5743@1wt.eu> <4D2A016A.1080500@warmcat.com>
In-Reply-To: <4D2A016A.1080500@warmcat.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Sun, 09 Jan 2011 19:29:55 -0000

On 1/9/11 7:41 PM, Andy Green wrote:
> On 01/09/11 17:51, Somebody in the thread at some point said:
>
>>    1) keep the XOR-based masking with a simpler key generation algorithm to
>>       keep the per-frame masking cost low. An improvement might also consist
>>       in avoiding the LF character in the key.
>>
>>    2) use a more expensive LF-less masking such as base64, but this one must be
>>       optional.
>>
>>    3) escape the LF character and define an escape character which must also be
>>       escaped itself. It is cheaper network-wise, but more expensive on the
>>       client side where the stream must be read once to count the LFs before
>>       being encoded and emitted.
>>
>>    4) use Dave Cridland's idea of inserting an invalid HTTP request before the
>>       beginning of the stream. The request should remain simple and short with
>>       the goal to quickly fail.
>>
>> My personal suggestion would be stay in line with the progress that was done
>> and to go for #1.
> Congratulations dude for doing that work, making it repeatable by
> providing code and identifying the tools used.
>
> Although there's still no broken intermediary identified as you pointed
> out twice, otherwise this poured out a lot more facts and logic than
> heretofore.
>
> Options 1 - 3 kill or reduce the chance of zerocopy, 4 leaves that open.
>    For that reason 4 sounds like the best guy to me.
>
> Is the attack that it defeats is enough for the browser guys?
>
> Is there anything otherwise wrong with Dave's idea, it's really simple
> and lightweight and leaves the rest of the current draft intact.
>
> -Andy
Hi Andy,

as officially announced yesterday 
(http://www.ietf.org/mail-archive/web/hybi/current/msg05677.html)
the consensus expressed (a strong consensus I would say) by the 
strawpoll was for adopt an handshake based on GET+Upgrade+masking.

so please,
just accept the fact the consensus is to go for masking!


/Sal

---
Salvatore Loreto
www.sloreto.com


From mjs@apple.com  Sun Jan  9 11:42:35 2011
Return-Path: <mjs@apple.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 BEE323A6833 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 11:42:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.511
X-Spam-Level: 
X-Spam-Status: No, score=-106.511 tagged_above=-999 required=5 tests=[AWL=0.088, BAYES_00=-2.599, 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 CFjh+PPVZT2k for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 11:42:34 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id C5F413A6830 for <hybi@ietf.org>; Sun,  9 Jan 2011 11:42:34 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out3.apple.com (Postfix) with ESMTP id 7FD64C5E62B6 for <hybi@ietf.org>; Sun,  9 Jan 2011 11:44:46 -0800 (PST)
X-AuditID: 11807136-b7bf8ae00000244a-14-4d2a102e196d
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay15.apple.com (Apple SCV relay) with SMTP id A8.C3.09290.E201A2D4; Sun,  9 Jan 2011 11:44:46 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [10.0.1.14] ([24.6.209.6]) by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LER00LXCTIL6230@et.apple.com> for hybi@ietf.org; Sun, 09 Jan 2011 11:44:46 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110109143423.GM5743@1wt.eu>
Date: Sun, 09 Jan 2011 11:44:45 -0800
Message-id: <BDA504E6-A722-4513-A660-467E22140958@apple.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 19:42:35 -0000

On Jan 9, 2011, at 6:34 AM, Willy Tarreau wrote:

> Hi Maciej,
> 
> On Sun, Jan 09, 2011 at 06:13:03AM -0800, Maciej Stachowiak wrote:
>> 
>> Hi Pat, including XOR seems like a great idea. I coded up my own XORing version, and I decided to also test HMAC with cached state as suggested by Eric, and AES-CTR instead of XOR. 
>> 
>> Here is a summary of my results on two-way parallel runs:
>> 
>> Plain XOR: ~5.1 million msg/sec
>> HMAC+XOR: ~370 thousand msg/sec
>> cached state HMAC+XOR: 1.2 million msg/sec
>> AES-CTR: 2.6 million msg/sec
> 
> Those are indeed better results.
> 
>> == Conclusions ==
>> 
>> - HMAC is much faster if you do the state caching thing.
>> - AES-CTR is even faster than that.
>> - We should use AES-CTR for masking.
> 
> From what was previously said, AES cannot be used due to export
> regulations, so this can be quite a showstopper for broader adoption.

I remember that being said, but I am skeptical. My understanding of US crypto export regulations is that merely using existing crypto facilities from the operating system or from separate components is not subject to export limitations. AES-CTR is in libcrypto which is widely available all over the world. I'm skeptical that there is any place in the world where you can easily use SHA1 HMAC but not AES-CTR. So if anyone wants to claim that use of AES-CTR would cause problems with export regulations, I would ask them to substantiate that claim.

Even if the export considerations do turn out to be real, AES-CTR has better security properties and considerably better performance than HMAC. I don't think we should let the legal regime around crypto limit the quality of the protocol.

Regards,
Maciej



From w@1wt.eu  Sun Jan  9 12:01:47 2011
Return-Path: <w@1wt.eu>
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 520523A683D for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:01:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.085
X-Spam-Level: 
X-Spam-Status: No, score=-2.085 tagged_above=-999 required=5 tests=[AWL=-0.042, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 YHyiTSGs+XdV for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:01:46 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id F33E63A6811 for <hybi@ietf.org>; Sun,  9 Jan 2011 12:01:45 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09K3kcH009608; Sun, 9 Jan 2011 21:03:46 +0100
Date: Sun, 9 Jan 2011 21:03:46 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110109200346.GR5743@1wt.eu>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu> <BDA504E6-A722-4513-A660-467E22140958@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <BDA504E6-A722-4513-A660-467E22140958@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 20:01:47 -0000

On Sun, Jan 09, 2011 at 11:44:45AM -0800, Maciej Stachowiak wrote:
> > From what was previously said, AES cannot be used due to export
> > regulations, so this can be quite a showstopper for broader adoption.
> 
> I remember that being said, but I am skeptical. My understanding of US crypto export regulations is that merely using existing crypto facilities from the operating system or from separate components is not subject to export limitations. AES-CTR is in libcrypto which is widely available all over the world. I'm skeptical that there is any place in the world where you can easily use SHA1 HMAC but not AES-CTR. So if anyone wants to claim that use of AES-CTR would cause problems with export regulations, I would ask them to substantiate that claim.
> 
> Even if the export considerations do turn out to be real, AES-CTR has better security properties and considerably better performance than HMAC. I don't think we should let the legal regime around crypto limit the quality of the protocol.

Well, I understand your point, but it could be seen from a different angle :
some will think that it's not worth risking to limit WS adoption just because
we're trying to cover an issue that has been speculated might exist. For
instance, most low-level network equipment would not require any form of
encryption at all. If a NAT router requires support for AES in order to
be able to NAT addresses presented in the stream, it's very well possible
that the firm will need a license to address some countries.

Also, you may be interested in the other experiment I have posted. In short,
we could make such a supposedly existing intermediary emit a request after
feeding it with several megs of data and a few tens of thousands of connection
attempts. In this context, AES-CTR will only require more bytes to be sent
(at most 16 GB). But there is no reason to think that an intermediary that is
broken enough to be able to spot a request after several megs of data is not
able anymore after several gigs.

So in the end, despite the better crypto properties for AES-CTR than HMAC,
whether they're basic XOR, HMAC or AES, they're addressing the same issues
and risks, at different costs to exploit the supposed issues and at different
implementation costs.

Regards,
Willy


From metajack@gmail.com  Sun Jan  9 12:03:42 2011
Return-Path: <metajack@gmail.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 401FC3A682F for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:03:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.952
X-Spam-Level: 
X-Spam-Status: No, score=-2.952 tagged_above=-999 required=5 tests=[AWL=0.025,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 OV8tPyI+McOc for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:03:41 -0800 (PST)
Received: from mail-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by core3.amsl.com (Postfix) with ESMTP id C88013A6811 for <hybi@ietf.org>; Sun,  9 Jan 2011 12:03:40 -0800 (PST)
Received: by bwz12 with SMTP id 12so18552414bwz.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 12:05:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=oyAF+TzYhkZwuAgpVzHOJtyualGHUqciba8Zd1yZpnM=; b=q4q7W0WYPJzlgMoHu1tbNel6onV7r3qTK0P+SmgsAxxlESkURa2NZLIors3tGCMn+8 WqBdTiab3a7nD4VH9BElqqEqATu954YvErrwyNEIII8OARKT56/2LdXnkuiJIv0XoLmf 89/p5cje1CtHGKYG91WQGuFdyiY0YrJ5Z23hI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=DdqV7QRmd4lxjnca/dRbeGlkuu5HtIIY9q5HWyVWMwzxoVnRFXEIEPn8ptb66WCyUu /wzzprIP8oaXygsKDk3vR6NIG/yZdRGsRgto8a2nqdXJt295oD1dizhxNg0RPlyBtIZF KCc6eXe/NT1gfyRJ6OjWB09P1x+12lVQh/9t0=
MIME-Version: 1.0
Received: by 10.204.81.72 with SMTP id w8mr13855717bkk.205.1294603550513; Sun, 09 Jan 2011 12:05:50 -0800 (PST)
Sender: metajack@gmail.com
Received: by 10.204.119.211 with HTTP; Sun, 9 Jan 2011 12:05:50 -0800 (PST)
In-Reply-To: <BDA504E6-A722-4513-A660-467E22140958@apple.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu> <BDA504E6-A722-4513-A660-467E22140958@apple.com>
Date: Sun, 9 Jan 2011 13:05:50 -0700
X-Google-Sender-Auth: GfH6wRxlERF4MehPnYj7al-SeuU
Message-ID: <AANLkTinepCRMGo6hgDweeCWxz1aGYBFmFNieUNo8fK0p@mail.gmail.com>
From: Jack Moffitt <jack@metajack.im>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 20:03:42 -0000

> I remember that being said, but I am skeptical. My understanding of US cr=
ypto export regulations is that merely using existing crypto facilities fro=
m the operating system or from separate components is not subject to export=
 limitations. AES-CTR is in libcrypto which is widely available all over th=
e world. I'm skeptical that there is any place in the world where you can e=
asily use SHA1 HMAC but not AES-CTR. So if anyone wants to claim that use o=
f AES-CTR would cause problems with export regulations, I would ask them to=
 substantiate that claim.

This does not seem to be the case:

http://stackoverflow.com/questions/2135081/does-my-application-contain-encr=
yption

It appears not to matter if you use something that is part of the
system, even for uses as benign as using a system library to access an
https URL.  Of course, it's possible Apple is overly conservative.

I don't think it's terribly difficult to get the required permission,
but I imagine that TLS adoption in iOS apps is quite low because of
this problem. Given that the App Store seems to enforce these
regulations, I think we can expect it to also apply to a WebSocket
with AES-CTR.

It appears that this may be improving:

http://www.federalregister.gov/articles/2011/01/07/2010-32803/publicly-avai=
lable-mass-market-encryption-software-and-other-specified-publicly-availabl=
e-encryption

jack.

From mjs@apple.com  Sun Jan  9 12:14:22 2011
Return-Path: <mjs@apple.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 0D4243A67D4 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:14:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.524
X-Spam-Level: 
X-Spam-Status: No, score=-106.524 tagged_above=-999 required=5 tests=[AWL=0.075, BAYES_00=-2.599, 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 sllzzE3z4Mja for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:14:21 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 081193A6833 for <hybi@ietf.org>; Sun,  9 Jan 2011 12:14:21 -0800 (PST)
Received: from relay13.apple.com (relay13.apple.com [17.128.113.29]) by mail-out3.apple.com (Postfix) with ESMTP id A6F17C5E72BA for <hybi@ietf.org>; Sun,  9 Jan 2011 12:16:32 -0800 (PST)
X-AuditID: 1180711d-b7c30ae0000055b4-f7-4d2a17a06251
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay13.apple.com (Apple SCV relay) with SMTP id 0B.50.21940.0A71A2D4; Sun,  9 Jan 2011 12:16:32 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.103.151] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LER00LO6UZJ6240@et.apple.com> for hybi@ietf.org; Sun, 09 Jan 2011 12:16:32 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTinepCRMGo6hgDweeCWxz1aGYBFmFNieUNo8fK0p@mail.gmail.com>
Date: Sun, 09 Jan 2011 12:16:31 -0800
Message-id: <24A9239F-68B2-4AA2-8B37-0AF5A2879DBC@apple.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu> <BDA504E6-A722-4513-A660-467E22140958@apple.com> <AANLkTinepCRMGo6hgDweeCWxz1aGYBFmFNieUNo8fK0p@mail.gmail.com>
To: Jack Moffitt <jack@metajack.im>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 20:14:22 -0000

On Jan 9, 2011, at 12:05 PM, Jack Moffitt wrote:

>> I remember that being said, but I am skeptical. My understanding of US crypto export regulations is that merely using existing crypto facilities from the operating system or from separate components is not subject to export limitations. AES-CTR is in libcrypto which is widely available all over the world. I'm skeptical that there is any place in the world where you can easily use SHA1 HMAC but not AES-CTR. So if anyone wants to claim that use of AES-CTR would cause problems with export regulations, I would ask them to substantiate that claim.
> 
> This does not seem to be the case:
> 
> http://stackoverflow.com/questions/2135081/does-my-application-contain-encryption
> 
> It appears not to matter if you use something that is part of the
> system, even for uses as benign as using a system library to access an
> https URL.  Of course, it's possible Apple is overly conservative.

I work for Apple, and the answer there doesn't seem to match what I've heard about export compliance from our legal department. However, since it's a complicated issue, I won't claim there is a definitive answer to this question, and I am certainly not qualified to give legal advice on the matter. 

> 
> I don't think it's terribly difficult to get the required permission,
> but I imagine that TLS adoption in iOS apps is quite low because of
> this problem. Given that the App Store seems to enforce these
> regulations, I think we can expect it to also apply to a WebSocket
> with AES-CTR.
> 
> It appears that this may be improving:
> 
> http://www.federalregister.gov/articles/2011/01/07/2010-32803/publicly-available-mass-market-encryption-software-and-other-specified-publicly-available-encryption

If the legal regime is being liberalized, then we definitely shouldn't cripple the protocol.

Regards,
Maciej


From mjs@apple.com  Sun Jan  9 12:20:14 2011
Return-Path: <mjs@apple.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 177023A6810 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:20:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.532
X-Spam-Level: 
X-Spam-Status: No, score=-106.532 tagged_above=-999 required=5 tests=[AWL=0.067, BAYES_00=-2.599, 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 blEwrd8MU-Bi for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:20:13 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 2C6D03A67D4 for <hybi@ietf.org>; Sun,  9 Jan 2011 12:20:12 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out4.apple.com (Postfix) with ESMTP id DB576CA6C898 for <hybi@ietf.org>; Sun,  9 Jan 2011 12:22:23 -0800 (PST)
X-AuditID: 11807136-b7bf8ae00000244a-aa-4d2a18ff58cf
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay15.apple.com (Apple SCV relay) with SMTP id 04.28.09290.FF81A2D4; Sun,  9 Jan 2011 12:22:23 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.103.151] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LER00KYXV9AC200@elliott.apple.com> for hybi@ietf.org; Sun, 09 Jan 2011 12:22:23 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110109200346.GR5743@1wt.eu>
Date: Sun, 09 Jan 2011 12:22:22 -0800
Message-id: <DB77A28F-CE0C-4AAF-AB4E-7DBE06D4D1D8@apple.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu> <BDA504E6-A722-4513-A660-467E22140958@apple.com> <20110109200346.GR5743@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 20:20:14 -0000

On Jan 9, 2011, at 12:03 PM, Willy Tarreau wrote:

> On Sun, Jan 09, 2011 at 11:44:45AM -0800, Maciej Stachowiak wrote:
>>> From what was previously said, AES cannot be used due to export
>>> regulations, so this can be quite a showstopper for broader adoption.
>> 
>> I remember that being said, but I am skeptical. My understanding of US crypto export regulations is that merely using existing crypto facilities from the operating system or from separate components is not subject to export limitations. AES-CTR is in libcrypto which is widely available all over the world. I'm skeptical that there is any place in the world where you can easily use SHA1 HMAC but not AES-CTR. So if anyone wants to claim that use of AES-CTR would cause problems with export regulations, I would ask them to substantiate that claim.
>> 
>> Even if the export considerations do turn out to be real, AES-CTR has better security properties and considerably better performance than HMAC. I don't think we should let the legal regime around crypto limit the quality of the protocol.
> 
> Well, I understand your point, but it could be seen from a different angle :
> some will think that it's not worth risking to limit WS adoption just because
> we're trying to cover an issue that has been speculated might exist. For
> instance, most low-level network equipment would not require any form of
> encryption at all. If a NAT router requires support for AES in order to
> be able to NAT addresses presented in the stream, it's very well possible
> that the firm will need a license to address some countries.
> 
> Also, you may be interested in the other experiment I have posted. In short,
> we could make such a supposedly existing intermediary emit a request after
> feeding it with several megs of data and a few tens of thousands of connection
> attempts. In this context, AES-CTR will only require more bytes to be sent
> (at most 16 GB). But there is no reason to think that an intermediary that is
> broken enough to be able to spot a request after several megs of data is not
> able anymore after several gigs.

I think your conclusion here is wrong. AES-CTR does not repeat the key schedule on any fixed cycle, as I understand it. It generates a psuedorandom non-repeating keystream. Your analysis was for a repeating 160-bit mask. I'm not sure I am convinced by the rest of your analysis, but it doesn't apply to AES-CTR.

> 
> So in the end, despite the better crypto properties for AES-CTR than HMAC,
> whether they're basic XOR, HMAC or AES, they're addressing the same issues
> and risks, at different costs to exploit the supposed issues and at different
> implementation costs.

Keep in mind that we're trying to address multiple threat models, and also to be robust against attacks we haven't thought of yet. It's definitely not the case that these different approaches are equivalent in all ways, even if it were true that they are equivalent for the "send a giant blow" attack.

Regards,
Maciej



From metajack@gmail.com  Sun Jan  9 12:22:04 2011
Return-Path: <metajack@gmail.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 5D3643A67D4 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:22:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.956
X-Spam-Level: 
X-Spam-Status: No, score=-2.956 tagged_above=-999 required=5 tests=[AWL=0.021,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 ejQ3Q22dDbjM for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:21:57 -0800 (PST)
Received: from mail-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by core3.amsl.com (Postfix) with ESMTP id 8A7C73A6842 for <hybi@ietf.org>; Sun,  9 Jan 2011 12:21:57 -0800 (PST)
Received: by bwz12 with SMTP id 12so18559808bwz.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 12:24:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=TfpF7BNsxqnlmiuHyfBYoCJ3T9zZjiyDIbaxmCHiwjo=; b=QJQQJNjUD7OctJc5xwsO82+uECqrq4Uq3tFdTB1wMqxT6FRTze3HJ/CxoV0o/rruX0 9bNGHMqLh+xtA+kzqJKpjQTgtapvltbhHUxbXA0qEJdGt0o5KBjeYgWcHKp2qIP8k7ME KNNZSnprsG4cz/0IjhMIqPG1dGbP6nAz6Hzqw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=NQNNhNDrTzLxDQ/wisGoZrJnxb8lbFWEmTNV6uh4i+bGdOAVrgqcZ5QYlszbTi/0Ad lcx0GB0j32urFblGW+nXRM/N1j1B+uF+hb85ETfw8YCvhh6KAl11VvGVqkvATilIWUcf Gnlzv3DCoF1JAp5R/ra+lB5YT2y/hsBsrwHik=
MIME-Version: 1.0
Received: by 10.204.140.208 with SMTP id j16mr2642963bku.151.1294604648341; Sun, 09 Jan 2011 12:24:08 -0800 (PST)
Sender: metajack@gmail.com
Received: by 10.204.119.211 with HTTP; Sun, 9 Jan 2011 12:24:08 -0800 (PST)
In-Reply-To: <24A9239F-68B2-4AA2-8B37-0AF5A2879DBC@apple.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu> <BDA504E6-A722-4513-A660-467E22140958@apple.com> <AANLkTinepCRMGo6hgDweeCWxz1aGYBFmFNieUNo8fK0p@mail.gmail.com> <24A9239F-68B2-4AA2-8B37-0AF5A2879DBC@apple.com>
Date: Sun, 9 Jan 2011 13:24:08 -0700
X-Google-Sender-Auth: OXG-iy7K77buWZ1_-qzWUXD_MfE
Message-ID: <AANLkTimP+CN=krOJbiizCb8TjyM+4Nb4c_CqOpcsP=h1@mail.gmail.com>
From: Jack Moffitt <jack@metajack.im>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 20:22:04 -0000

> If the legal regime is being liberalized, then we definitely shouldn't cripple the protocol.

I should have said before, but I agree with this point. The problem
already exists for TLS and other protocols that are pretty critical,
and I see no reason why WebSocket should make concessions for legal
reasons in that context.

jack.

From w@1wt.eu  Sun Jan  9 12:26:21 2011
Return-Path: <w@1wt.eu>
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 AD7933A683D for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:26:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.085
X-Spam-Level: 
X-Spam-Status: No, score=-2.085 tagged_above=-999 required=5 tests=[AWL=-0.042, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 FBA4Ud1G1tVy for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:26:19 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 4CD4B3A67D4 for <hybi@ietf.org>; Sun,  9 Jan 2011 12:26:19 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09KSR2C009675; Sun, 9 Jan 2011 21:28:27 +0100
Date: Sun, 9 Jan 2011 21:28:27 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110109202827.GS5743@1wt.eu>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu> <BDA504E6-A722-4513-A660-467E22140958@apple.com> <20110109200346.GR5743@1wt.eu> <DB77A28F-CE0C-4AAF-AB4E-7DBE06D4D1D8@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <DB77A28F-CE0C-4AAF-AB4E-7DBE06D4D1D8@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 20:26:21 -0000

On Sun, Jan 09, 2011 at 12:22:22PM -0800, Maciej Stachowiak wrote:
> I think your conclusion here is wrong. AES-CTR does not repeat the key
> schedule on any fixed cycle, as I understand it.

I've never said that. The fact that it *does not* repeat the key
precisely is what makes it harder to get the expected pattern.

> It generates a psuedorandom non-repeating keystream.

Exactly. And in a pseudorandom keystream, a given 32-bit pattern
will appear once in 16GB, and could appear once in a cleaverly
built 4GB stream too.

> Your analysis was for a repeating 160-bit mask. I'm not sure I
> am convinced by the rest of your analysis, but it doesn't apply
> to AES-CTR.

The program does not appear to AES-CTR, but the base of the analysis
definitely does : we can get a parsable HTTP request that at least
one known intermediary is able to process in 2^32 32-bit patterns.

Regards,
Willy


From mjs@apple.com  Sun Jan  9 12:32:28 2011
Return-Path: <mjs@apple.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 6E9F63A684B for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:32:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.539
X-Spam-Level: 
X-Spam-Status: No, score=-106.539 tagged_above=-999 required=5 tests=[AWL=0.060, BAYES_00=-2.599, 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 sBox9n4f4eZG for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:32:27 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 88F493A684A for <hybi@ietf.org>; Sun,  9 Jan 2011 12:32:27 -0800 (PST)
Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out3.apple.com (Postfix) with ESMTP id 79D02C5E7BA2 for <hybi@ietf.org>; Sun,  9 Jan 2011 12:34:39 -0800 (PST)
X-AuditID: 11807134-b7cfdae000001831-df-4d2a1bdf7c93
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay14.apple.com (Apple SCV relay) with SMTP id 6F.6A.06193.FDB1A2D4; Sun,  9 Jan 2011 12:34:39 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.103.151] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LER00L49VTP6250@et.apple.com> for hybi@ietf.org; Sun, 09 Jan 2011 12:34:39 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110109202827.GS5743@1wt.eu>
Date: Sun, 09 Jan 2011 12:34:37 -0800
Message-id: <AB4429EC-1F62-483A-8731-33343B096DA0@apple.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu> <BDA504E6-A722-4513-A660-467E22140958@apple.com> <20110109200346.GR5743@1wt.eu> <DB77A28F-CE0C-4AAF-AB4E-7DBE06D4D1D8@apple.com> <20110109202827.GS5743@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 20:32:28 -0000

On Jan 9, 2011, at 12:28 PM, Willy Tarreau wrote:

> On Sun, Jan 09, 2011 at 12:22:22PM -0800, Maciej Stachowiak wrote:
>> I think your conclusion here is wrong. AES-CTR does not repeat the key
>> schedule on any fixed cycle, as I understand it.
> 
> I've never said that. The fact that it *does not* repeat the key
> precisely is what makes it harder to get the expected pattern.
> 
>> It generates a psuedorandom non-repeating keystream.
> 
> Exactly. And in a pseudorandom keystream, a given 32-bit pattern
> will appear once in 16GB, and could appear once in a cleaverly
> built 4GB stream too.

There's no way to guarantee that a chosen 32-bit pattern will appear anywhere in AES-CTR output for an attacker-controlled input. It could appear 0 times, no matter what the input is. So your claim is false.

Regards,
Maciej


From w@1wt.eu  Sun Jan  9 12:49:56 2011
Return-Path: <w@1wt.eu>
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 924713A6845 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:49:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.085
X-Spam-Level: 
X-Spam-Status: No, score=-2.085 tagged_above=-999 required=5 tests=[AWL=-0.042, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 f6AtiV81-m2s for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 12:49:55 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 73E1C3A6814 for <hybi@ietf.org>; Sun,  9 Jan 2011 12:49:54 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09Kq2QH009718; Sun, 9 Jan 2011 21:52:02 +0100
Date: Sun, 9 Jan 2011 21:52:02 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110109205202.GT5743@1wt.eu>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu> <BDA504E6-A722-4513-A660-467E22140958@apple.com> <20110109200346.GR5743@1wt.eu> <DB77A28F-CE0C-4AAF-AB4E-7DBE06D4D1D8@apple.com> <20110109202827.GS5743@1wt.eu> <AB4429EC-1F62-483A-8731-33343B096DA0@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AB4429EC-1F62-483A-8731-33343B096DA0@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Sun, 09 Jan 2011 20:49:56 -0000

On Sun, Jan 09, 2011 at 12:34:37PM -0800, Maciej Stachowiak wrote:
> 
> On Jan 9, 2011, at 12:28 PM, Willy Tarreau wrote:
> 
> > On Sun, Jan 09, 2011 at 12:22:22PM -0800, Maciej Stachowiak wrote:
> >> I think your conclusion here is wrong. AES-CTR does not repeat the key
> >> schedule on any fixed cycle, as I understand it.
> > 
> > I've never said that. The fact that it *does not* repeat the key
> > precisely is what makes it harder to get the expected pattern.
> > 
> >> It generates a psuedorandom non-repeating keystream.
> > 
> > Exactly. And in a pseudorandom keystream, a given 32-bit pattern
> > will appear once in 16GB, and could appear once in a cleaverly
> > built 4GB stream too.
> 
> There's no way to guarantee that a chosen 32-bit pattern will appear anywhere in AES-CTR output for an attacker-controlled input. It could appear 0 times, no matter what the input is. So your claim is false.

That's the principle of randomness. A typical pseudo-random should make
any pattern appear. Of course it is possible that it does not appear, but
the probability to see the pattern at least once in a perfectly random
series of 2^32 patterns is of 1-(1-1/(2^32))^(2^32) = 1-1/e = 63%. It's
already 39% in half the patterns and becomes 86% in the double of the
patterns.

Regards,
Willy


From bruce@callenish.com  Sun Jan  9 13:14:08 2011
Return-Path: <bruce@callenish.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 0A6D928C0D8 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 13:14:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.58
X-Spam-Level: 
X-Spam-Status: No, score=-2.58 tagged_above=-999 required=5 tests=[AWL=0.019,  BAYES_00=-2.599]
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 5MX6Sq4TE67D for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 13:14:07 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 581B128C0D0 for <hybi@ietf.org>; Sun,  9 Jan 2011 13:14:07 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pc2cc-0007F3-8e for hybi@ietf.org; Sun, 09 Jan 2011 13:16:18 -0800
Message-ID: <4D2A25A1.7010909@callenish.com>
Date: Sun, 09 Jan 2011 13:16:17 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com>	<20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<4D26D20C.8030906@warmcat.com>	<10468.1294391783.740346@puncture>	<20110107100313.GO28367@1wt.eu>	<10468.1294398928.011152@puncture>	<4D28AE05.4070500@callenish.com> <4D28BD89.70704@warmcat.com> <4D28FD92.60803@callenish.com> <4D29A145.1080003@warmcat.com>
In-Reply-To: <4D29A145.1080003@warmcat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Sun, 09 Jan 2011 21:14:08 -0000

On 09/01/2011 3:51 AM, Andy Green wrote:
>
> Bruce, you are the guy who handwaved about "known vulnerability" on 
> the list so it is you I replied to on the list.
>

I did say that this is a known vulnerability. I did not say that it is a 
valid vulnerability to worry about. Whether it is or it isn't, I don't 
know and I don't care because what I think doesn't matter in this instance.

I see a lot of people get frustrated on this list because they think 
that the point of the discussion is to present the best technical 
argument. It isn't. The point is to persuade other people about the best 
technical argument. And the people who ship web browsers have all said 
that they are not persuaded by the types of arguments you have presented.

Andy, I can understand your frustration, but it isn't helping anything. 
The decision has been made via the straw poll to use masking in the 
protocol. Let's put this to rest now, please.


From bruce@callenish.com  Sun Jan  9 14:00:27 2011
Return-Path: <bruce@callenish.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 E5E2A3A6850 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 14:00:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.581
X-Spam-Level: 
X-Spam-Status: No, score=-2.581 tagged_above=-999 required=5 tests=[AWL=0.018,  BAYES_00=-2.599]
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 QbH1742ojK+E for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 14:00:26 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 960D73A67D4 for <hybi@ietf.org>; Sun,  9 Jan 2011 14:00:26 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pc3LR-0006dK-D1 for hybi@ietf.org; Sun, 09 Jan 2011 14:02:37 -0800
Message-ID: <4D2A307C.3080109@callenish.com>
Date: Sun, 09 Jan 2011 14:02:36 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com>	<20110107185801.GB32612@1wt.eu>	<AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com>	<20110107203958.GC32612@1wt.eu>	<AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>	<4D28DF6E.4080003@callenish.com> <AANLkTikhgk7yRoC1K37QetW-7ZHw8G26WZVUs7fM2y=J@mail.gmail.com>
In-Reply-To: <AANLkTikhgk7yRoC1K37QetW-7ZHw8G26WZVUs7fM2y=J@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] A bit of pragmatism
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: Sun, 09 Jan 2011 22:00:28 -0000

Thanks for the correction, but I still don't understand.

If you are suggesting your mask for the wss: scheme in order to provide 
for a stream of apparent random bits on the wire, then that makes 
perfect sense. But for the purposely less-secure unencrypted ws: scheme 
I don't understand why it would be necessary.

On 08/01/2011 4:00 PM, Eric Rescorla wrote:
> On Sat, Jan 8, 2011 at 2:04 PM, Bruce Atherton<bruce@callenish.com>  wrote:
>> On 07/01/2011 1:19 PM, Eric Rescorla wrote:
>>> My objective is to make the bits that appear on the wire indistinguishable
>>> from random
>>> from the attacker's perspective. I think it's clear that this is the
>>> strongest form of masking
>>> available, and the method I proposed does that.
>> It is true that your goal is clear, but I don't understand why you think
>> this goal is necessary.
>>
>> The specification already allows for two forms of Websocket, a simple one
>> denoted by the scheme "ws:" and a secure one denoted with "wss:". The latter
>> one will have the random byte stream characteristics you are interested in.
>> If you are uncomfortable with any other kind of stream, make sure your
>> client only supports secure Websockets.
> Regrettably, this is not the case except for certain specific ciphers
> (in particular
> block cipher in CBC mode.) It's not at all the case for RC4 and only
> the case for
> some CTR mode implementations.
>
> Best,
> -Ekr


From ekr@rtfm.com  Sun Jan  9 14:14:44 2011
Return-Path: <ekr@rtfm.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 7A9EC3A6835 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 14:14:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.644
X-Spam-Level: 
X-Spam-Status: No, score=-102.644 tagged_above=-999 required=5 tests=[AWL=0.333, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 Cy9LgZD1Iwh5 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 14:14:43 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id 91F0F3A67D4 for <hybi@ietf.org>; Sun,  9 Jan 2011 14:14:43 -0800 (PST)
Received: by gyd12 with SMTP id 12so8049621gyd.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 14:16:55 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.67.10 with SMTP id u10mr5414017agk.187.1294611413266; Sun, 09 Jan 2011 14:16:53 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Sun, 9 Jan 2011 14:16:53 -0800 (PST)
In-Reply-To: <4D2A307C.3080109@callenish.com>
References: <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <4D28DF6E.4080003@callenish.com> <AANLkTikhgk7yRoC1K37QetW-7ZHw8G26WZVUs7fM2y=J@mail.gmail.com> <4D2A307C.3080109@callenish.com>
Date: Sun, 9 Jan 2011 14:16:53 -0800
Message-ID: <AANLkTimv-1DV=ZVyzSSaDHTsVGaRHm8kNPjWNVW5_a1G@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] A bit of pragmatism
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: Sun, 09 Jan 2011 22:14:44 -0000

On Sun, Jan 9, 2011 at 2:02 PM, Bruce Atherton <bruce@callenish.com> wrote:
> Thanks for the correction, but I still don't understand.
>
> If you are suggesting your mask for the wss: scheme in order to provide f=
or
> a stream of apparent random bits on the wire, then that makes perfect sen=
se.
> But for the purposely less-secure unencrypted ws: scheme I don't understa=
nd
> why it would be necessary.

It's not a matter of random versus non-random. RC4 and AES-CTR without rand=
om IV
(which is not a requirement of the standard) provide the attacker with
complete control over
the payload bits on the wire, beause he can predict the keystream.

-Ekr


> On 08/01/2011 4:00 PM, Eric Rescorla wrote:
>>
>> On Sat, Jan 8, 2011 at 2:04 PM, Bruce Atherton<bruce@callenish.com>
>> =A0wrote:
>>>
>>> On 07/01/2011 1:19 PM, Eric Rescorla wrote:
>>>>
>>>> My objective is to make the bits that appear on the wire
>>>> indistinguishable
>>>> from random
>>>> from the attacker's perspective. I think it's clear that this is the
>>>> strongest form of masking
>>>> available, and the method I proposed does that.
>>>
>>> It is true that your goal is clear, but I don't understand why you thin=
k
>>> this goal is necessary.
>>>
>>> The specification already allows for two forms of Websocket, a simple o=
ne
>>> denoted by the scheme "ws:" and a secure one denoted with "wss:". The
>>> latter
>>> one will have the random byte stream characteristics you are interested
>>> in.
>>> If you are uncomfortable with any other kind of stream, make sure your
>>> client only supports secure Websockets.
>>
>> Regrettably, this is not the case except for certain specific ciphers
>> (in particular
>> block cipher in CBC mode.) It's not at all the case for RC4 and only
>> the case for
>> some CTR mode implementations.
>>
>> Best,
>> -Ekr
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From ietf@adambarth.com  Sun Jan  9 14:20:08 2011
Return-Path: <ietf@adambarth.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 0A94E3A6857 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 14:20:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.943
X-Spam-Level: 
X-Spam-Status: No, score=-3.943 tagged_above=-999 required=5 tests=[AWL=-0.966, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 xrt8+PPS4hum for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 14:20:07 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id E88A93A6835 for <hybi@ietf.org>; Sun,  9 Jan 2011 14:20:06 -0800 (PST)
Received: by yxt33 with SMTP id 33so8274612yxt.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 14:22:18 -0800 (PST)
Received: by 10.150.57.14 with SMTP id f14mr2735010yba.45.1294611737503; Sun, 09 Jan 2011 14:22:17 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id v8sm16720689yhg.40.2011.01.09.14.22.15 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 14:22:15 -0800 (PST)
Received: by iyi42 with SMTP id 42so18850239iyi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 14:22:14 -0800 (PST)
Received: by 10.231.156.1 with SMTP id u1mr11739045ibw.52.1294611734538; Sun, 09 Jan 2011 14:22:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 14:21:44 -0800 (PST)
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 14:21:44 -0800
Message-ID: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Subject: [hybi] It's time to ship
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: Sun, 09 Jan 2011 22:20:08 -0000

Gentle people of hybi,

There's been a lot of good discussion in this working group gathering
consensus around the data framing and the handshake.  At some point we
need to declare victory and ship the protocol, otherwise proprietary
solutions will continue to eat our lunch.

I've written up a more formal version of Pat's proposal based on the
recent straw poll and subsequent discussion.  This protocol is by no
means perfect, but it's good enough:

http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt

As a working group, it's time to ship.

Kind regards,
Adam

From w@1wt.eu  Sun Jan  9 14:40:25 2011
Return-Path: <w@1wt.eu>
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 1C26C3A6835 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 14:40:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.084
X-Spam-Level: 
X-Spam-Status: No, score=-2.084 tagged_above=-999 required=5 tests=[AWL=-0.041, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 leg0XeIQtwt4 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 14:40:23 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id DC0A23A67D4 for <hybi@ietf.org>; Sun,  9 Jan 2011 14:40:22 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09MgSZP010131; Sun, 9 Jan 2011 23:42:28 +0100
Date: Sun, 9 Jan 2011 23:42:28 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110109224228.GU5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Sun, 09 Jan 2011 22:40:25 -0000

Hello Adam,

On Sun, Jan 09, 2011 at 02:21:44PM -0800, Adam Barth wrote:
> Gentle people of hybi,
> 
> There's been a lot of good discussion in this working group gathering
> consensus around the data framing and the handshake.  At some point we
> need to declare victory and ship the protocol, otherwise proprietary
> solutions will continue to eat our lunch.
> 
> I've written up a more formal version of Pat's proposal based on the
> recent straw poll and subsequent discussion.  This protocol is by no
> means perfect, but it's good enough:
> 
> http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt

It would help a lot other WG participants if you could present suggestions,
ideas and changes instead of a full proposal. It's hard to spot the proposed
changes.

At first glance, I'm noticing a few things :

  - you're using the OPTIONS method. The WG's consensus was voted as using
    GET. While technically working, OPTIONS limits some possibilities since
    no path is sent to the server.

  - your proposal involves AES-128-CTR. As was discussed here, it seems there
    are still export regulations for certain countries eventhough they're
    apparently fading out. It could still be a problem for companies who want
    to export products to some countries and which never had to put crypto in
    them.

  - several people on the list asked for the ability to be able to disable
    the masking in some well-controlled environments (eg: server-to-server
    communications). I see no provisions for this.

  - it has not yet been stated whether only the payload or also the framing
    should be masked. Your proposal masks both, which means that it definitely
    blocks any possibility of performing multiplexing later. There does not
    appear to have been a consensus in this area yet.

  - is was suggested that some (all ?) of the nonces could go away if masking
    is used. Surely this is something that needs to be rechecked.

  - Greg proposed to replace the MORE bit with a FIN bit so that the first
    hello frame from the server starts with a high bit set, thus ensuring
    that we can break the connection on non-HTTP compliant intermediaries
    which would expect a second response after the 101.

Those are just a few notes, it's really not easy to changes :-/

Thanks for this work,
Willy



> 
> As a working group, it's time to ship.
> 
> Kind regards,
> Adam
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi

From ietf@adambarth.com  Sun Jan  9 14:47:32 2011
Return-Path: <ietf@adambarth.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 D57753A6842 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 14:47:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.936
X-Spam-Level: 
X-Spam-Status: No, score=-3.936 tagged_above=-999 required=5 tests=[AWL=-0.959, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 zOnhL5EVgzq8 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 14:47:32 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id CF5A53A67D4 for <hybi@ietf.org>; Sun,  9 Jan 2011 14:47:31 -0800 (PST)
Received: by yie19 with SMTP id 19so6001271yie.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 14:49:43 -0800 (PST)
Received: by 10.236.108.41 with SMTP id p29mr5850522yhg.54.1294613383075; Sun, 09 Jan 2011 14:49:43 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id x62sm3488129yhc.30.2011.01.09.14.49.41 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 14:49:41 -0800 (PST)
Received: by iwn40 with SMTP id 40so19932580iwn.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 14:49:40 -0800 (PST)
Received: by 10.231.199.12 with SMTP id eq12mr28120350ibb.2.1294613380638; Sun, 09 Jan 2011 14:49:40 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 14:49:10 -0800 (PST)
In-Reply-To: <20110109224228.GU5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 14:49:10 -0800
Message-ID: <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Sun, 09 Jan 2011 22:47:32 -0000

On Sun, Jan 9, 2011 at 2:42 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 09, 2011 at 02:21:44PM -0800, Adam Barth wrote:
>> Gentle people of hybi,
>>
>> There's been a lot of good discussion in this working group gathering
>> consensus around the data framing and the handshake. =A0At some point we
>> need to declare victory and ship the protocol, otherwise proprietary
>> solutions will continue to eat our lunch.
>>
>> I've written up a more formal version of Pat's proposal based on the
>> recent straw poll and subsequent discussion. =A0This protocol is by no
>> means perfect, but it's good enough:
>>
>> http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
>
> It would help a lot other WG participants if you could present suggestion=
s,
> ideas and changes instead of a full proposal. It's hard to spot the propo=
sed
> changes.

We've had plenty of suggestions, ideas, and changes.  It's time to ship.

> At first glance, I'm noticing a few things :
>
> =A0- you're using the OPTIONS method. The WG's consensus was voted as usi=
ng
> =A0 =A0GET. While technically working, OPTIONS limits some possibilities =
since
> =A0 =A0no path is sent to the server.

Be that as it may.  OPTIONS is good enough.

> =A0- your proposal involves AES-128-CTR. As was discussed here, it seems =
there
> =A0 =A0are still export regulations for certain countries eventhough they=
're
> =A0 =A0apparently fading out. It could still be a problem for companies w=
ho want
> =A0 =A0to export products to some countries and which never had to put cr=
ypto in
> =A0 =A0them.

Frankly, the export restriction issue is a bunch of BS.  AES-128-CTR
is good enough.

> =A0- several people on the list asked for the ability to be able to disab=
le
> =A0 =A0the masking in some well-controlled environments (eg: server-to-se=
rver
> =A0 =A0communications). I see no provisions for this.

The protocol is good enough without this added flexibility.  If we
find this is really important, we can add this ability in a future
version of the protocol.

> =A0- it has not yet been stated whether only the payload or also the fram=
ing
> =A0 =A0should be masked. Your proposal masks both, which means that it de=
finitely
> =A0 =A0blocks any possibility of performing multiplexing later. There doe=
s not
> =A0 =A0appear to have been a consensus in this area yet.

The protocol is good enough without this added flexibility.  If we
find this is really important, we can add this ability in a future
version of the protocol.

> =A0- is was suggested that some (all ?) of the nonces could go away if ma=
sking
> =A0 =A0is used. Surely this is something that needs to be rechecked.

I have checked this issue.  Each nonce in the protocol serves a
specific purpose and is valuable.

> =A0- Greg proposed to replace the MORE bit with a FIN bit so that the fir=
st
> =A0 =A0hello frame from the server starts with a high bit set, thus ensur=
ing
> =A0 =A0that we can break the connection on non-HTTP compliant intermediar=
ies
> =A0 =A0which would expect a second response after the 101.

The protocol is good enough without this change.  The masking has us
covered here.

>> As a working group, it's time to ship.

Kind regards,
Adam

From w@1wt.eu  Sun Jan  9 15:00:20 2011
Return-Path: <w@1wt.eu>
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 810253A6835 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:00:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.084
X-Spam-Level: 
X-Spam-Status: No, score=-2.084 tagged_above=-999 required=5 tests=[AWL=-0.041, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 LCvLVGudHlNE for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:00:19 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 91E8D3A67D4 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:00:18 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09N2TMf010193; Mon, 10 Jan 2011 00:02:29 +0100
Date: Mon, 10 Jan 2011 00:02:29 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110109230229.GX5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Sun, 09 Jan 2011 23:00:20 -0000

On Sun, Jan 09, 2011 at 02:49:10PM -0800, Adam Barth wrote:
> On Sun, Jan 9, 2011 at 2:42 PM, Willy Tarreau <w@1wt.eu> wrote:
> > On Sun, Jan 09, 2011 at 02:21:44PM -0800, Adam Barth wrote:
> >> Gentle people of hybi,
> >>
> >> There's been a lot of good discussion in this working group gathering
> >> consensus around the data framing and the handshake.  At some point we
> >> need to declare victory and ship the protocol, otherwise proprietary
> >> solutions will continue to eat our lunch.
> >>
> >> I've written up a more formal version of Pat's proposal based on the
> >> recent straw poll and subsequent discussion.  This protocol is by no
> >> means perfect, but it's good enough:
> >>
> >> http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
> >
> > It would help a lot other WG participants if you could present suggestions,
> > ideas and changes instead of a full proposal. It's hard to spot the proposed
> > changes.
> 
> We've had plenty of suggestions, ideas, and changes.  It's time to ship.

Yesterday, Sal said that there were a number of points to discuss yet, why
this sudden hurry ?

> > At first glance, I'm noticing a few things :
> >
> >  - you're using the OPTIONS method. The WG's consensus was voted as using
> >    GET. While technically working, OPTIONS limits some possibilities since
> >    no path is sent to the server.
> 
> Be that as it may.  OPTIONS is good enough.

But on what basis are you trying to change what was adopted as a consensus ?
I mean, I *know* that OPTIONS can evict more broken intermediaries than GET,
but the participants here have been working on the GET hypothesis with its
capabilities. Noone has had the opportunity to talk about their expectations
and the implications such a change would have for them.

> >  - your proposal involves AES-128-CTR. As was discussed here, it seems there
> >    are still export regulations for certain countries eventhough they're
> >    apparently fading out. It could still be a problem for companies who want
> >    to export products to some countries and which never had to put crypto in
> >    them.
> 
> Frankly, the export restriction issue is a bunch of BS.  AES-128-CTR
> is good enough.

Good enough for what purpose precisely ? HTTP Upgrade is good enough for
Websocket without even any form of masking. Masking was added to address
specific issues that aren't precisely quantified.

> >  - several people on the list asked for the ability to be able to disable
> >    the masking in some well-controlled environments (eg: server-to-server
> >    communications). I see no provisions for this.
> 
> The protocol is good enough without this added flexibility.  If we
> find this is really important, we can add this ability in a future
> version of the protocol.

No, it will be too late because it will never be possible to mix masked
and non-masked frames later since there will be no way to distinguish them.

> >  - it has not yet been stated whether only the payload or also the framing
> >    should be masked. Your proposal masks both, which means that it definitely
> >    blocks any possibility of performing multiplexing later. There does not
> >    appear to have been a consensus in this area yet.
> 
> The protocol is good enough without this added flexibility.  If we
> find this is really important, we can add this ability in a future
> version of the protocol.

Adam, please I can understand that you're in a hurry, but you have
copy-pasted exactly the same response as to the question above. I would
have found it more polite to respond later when you have more time.

> >  - is was suggested that some (all ?) of the nonces could go away if masking
> >    is used. Surely this is something that needs to be rechecked.
> 
> I have checked this issue.  Each nonce in the protocol serves a
> specific purpose and is valuable.

Then would you please take care of explaining them to us in this context
when you have more time ?

> >  - Greg proposed to replace the MORE bit with a FIN bit so that the first
> >    hello frame from the server starts with a high bit set, thus ensuring
> >    that we can break the connection on non-HTTP compliant intermediaries
> >    which would expect a second response after the 101.
> 
> The protocol is good enough without this change.  The masking has us
> covered here.

No, I'm talking about the ability to ensure that a non-compliant intermediary
will fail early instead of remaining stuck waiting for the server to talk.
That once one of Hixie's major concerns and one of the reasons for the Hello
frames suggestion.

Regards,
Willy


From mjs@apple.com  Sun Jan  9 15:04:02 2011
Return-Path: <mjs@apple.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 705A63A6807 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:04:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.517
X-Spam-Level: 
X-Spam-Status: No, score=-106.517 tagged_above=-999 required=5 tests=[AWL=0.081, BAYES_00=-2.599, 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 y6ubwYetJVVm for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:04:01 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 77C5A3A67D4 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:04:01 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out3.apple.com (Postfix) with ESMTP id A3FB0C5EC7BE for <hybi@ietf.org>; Sun,  9 Jan 2011 15:06:13 -0800 (PST)
X-AuditID: 11807136-b7bf8ae00000244a-01-4d2a3f650d11
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay15.apple.com (Apple SCV relay) with SMTP id 98.DA.09290.56F3A2D4; Sun,  9 Jan 2011 15:06:13 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_f8Aurbcq16zgdca0xP/+aQ)"
Received: from [10.0.1.14] ([24.6.209.6]) by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LES003MZ2UC1T00@et.apple.com> for hybi@ietf.org; Sun, 09 Jan 2011 15:06:13 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110109230229.GX5743@1wt.eu>
Date: Sun, 09 Jan 2011 15:06:12 -0800
Message-id: <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Hybi <hybi@ietf.org>
Subject: [hybi] OPTIONS (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:04:02 -0000

--Boundary_(ID_f8Aurbcq16zgdca0xP/+aQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 9, 2011, at 3:02 PM, Willy Tarreau wrote:

> On Sun, Jan 09, 2011 at 02:49:10PM -0800, Adam Barth wrote:
>> On Sun, Jan 9, 2011 at 2:42 PM, Willy Tarreau <w@1wt.eu> wrote:
>>> On Sun, Jan 09, 2011 at 02:21:44PM -0800, Adam Barth wrote:
>>>> 
> 
>>> At first glance, I'm noticing a few things :
>>> 
>>>  - you're using the OPTIONS method. The WG's consensus was voted as using
>>>    GET. While technically working, OPTIONS limits some possibilities since
>>>    no path is sent to the server.
>> 
>> Be that as it may.  OPTIONS is good enough.
> 
> But on what basis are you trying to change what was adopted as a consensus ?
> I mean, I *know* that OPTIONS can evict more broken intermediaries than GET,
> but the participants here have been working on the GET hypothesis with its
> capabilities. Noone has had the opportunity to talk about their expectations
> and the implications such a change would have for them.

Now seems like a fine time to discuss OPTIONS. What are the pros and cons? It seems to avoid the HTTP compliance issues that CONNECT had, at least.

Regards,
Maciej


--Boundary_(ID_f8Aurbcq16zgdca0xP/+aQ)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: quoted-printable

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><br><div><div>On Jan 9, 2011, at 3:02 PM, Willy Tarreau =
wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div>On Sun, Jan 09, 2011 at 02:49:10PM -0800, Adam Barth =
wrote:<br><blockquote type=3D"cite">On Sun, Jan 9, 2011 at 2:42 PM, =
Willy Tarreau &lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt; =
wrote:<br></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite">On Sun, Jan 09, 2011 at 02:21:44PM -0800, Adam Barth =
wrote:<br></blockquote></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite"><blockquote type=3D"cite"><font class=3D"Apple-style-span" =
color=3D"#144FAE"><font class=3D"Apple-style-span" =
color=3D"#540000"><br></font></font></blockquote></blockquote></blockquote=
><br><blockquote type=3D"cite"><blockquote type=3D"cite">At first =
glance, I'm noticing a few things =
:<br></blockquote></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite"><br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">&nbsp;- you're using the OPTIONS =
method. The WG's consensus was voted as =
using<br></blockquote></blockquote><blockquote type=3D"cite"><blockquote =
type=3D"cite">&nbsp; &nbsp;GET. While technically working, OPTIONS =
limits some possibilities since<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">&nbsp; &nbsp;no path is sent to =
the server.<br></blockquote></blockquote><blockquote =
type=3D"cite"><br></blockquote><blockquote type=3D"cite">Be that as it =
may. &nbsp;OPTIONS is good enough.<br></blockquote><br>But on what basis =
are you trying to change what was adopted as a consensus ?<br>I mean, I =
*know* that OPTIONS can evict more broken intermediaries than =
GET,<br>but the participants here have been working on the GET =
hypothesis with its<br>capabilities. Noone has had the opportunity to =
talk about their expectations<br>and the implications such a change =
would have for them.<br></div></blockquote><div><br></div><div>Now seems =
like a fine time to discuss OPTIONS. What are the pros and cons? It =
seems to avoid the HTTP compliance issues that CONNECT had, at =
least.</div><div><br></div><div>Regards,</div><div>Maciej</div><div><br></=
div></div></body></html>=

--Boundary_(ID_f8Aurbcq16zgdca0xP/+aQ)--

From ietf@adambarth.com  Sun Jan  9 15:07:49 2011
Return-Path: <ietf@adambarth.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 076CC3A6853 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:07:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.93
X-Spam-Level: 
X-Spam-Status: No, score=-3.93 tagged_above=-999 required=5 tests=[AWL=-0.953,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 JwdYjvjcAEna for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:07:48 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 199D93A6835 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:07:47 -0800 (PST)
Received: by qyj19 with SMTP id 19so20374254qyj.10 for <hybi@ietf.org>; Sun, 09 Jan 2011 15:09:59 -0800 (PST)
Received: by 10.224.36.202 with SMTP id u10mr16770444qad.316.1294614599633; Sun, 09 Jan 2011 15:09:59 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id q12sm16962346qcu.6.2011.01.09.15.09.57 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 15:09:58 -0800 (PST)
Received: by iwn40 with SMTP id 40so19940906iwn.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 15:09:57 -0800 (PST)
Received: by 10.231.12.132 with SMTP id x4mr3604117ibx.177.1294614596936; Sun, 09 Jan 2011 15:09:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 15:09:26 -0800 (PST)
In-Reply-To: <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 15:09:26 -0800
Message-ID: <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:07:49 -0000

On Sun, Jan 9, 2011 at 3:06 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>
> On Jan 9, 2011, at 3:02 PM, Willy Tarreau wrote:
>
> On Sun, Jan 09, 2011 at 02:49:10PM -0800, Adam Barth wrote:
>
> On Sun, Jan 9, 2011 at 2:42 PM, Willy Tarreau <w@1wt.eu> wrote:
>
> On Sun, Jan 09, 2011 at 02:21:44PM -0800, Adam Barth wrote:
>
>
> At first glance, I'm noticing a few things :
>
> =A0- you're using the OPTIONS method. The WG's consensus was voted as usi=
ng
>
> =A0 =A0GET. While technically working, OPTIONS limits some possibilities =
since
>
> =A0 =A0no path is sent to the server.
>
> Be that as it may. =A0OPTIONS is good enough.
>
> But on what basis are you trying to change what was adopted as a consensu=
s ?
> I mean, I *know* that OPTIONS can evict more broken intermediaries than G=
ET,
> but the participants here have been working on the GET hypothesis with it=
s
> capabilities. Noone has had the opportunity to talk about their expectati=
ons
> and the implications such a change would have for them.
>
> Now seems like a fine time to discuss OPTIONS. What are the pros and cons=
?
> It seems to avoid the HTTP compliance issues that CONNECT had, at least.

Whether we use OPTIONS or GET is much less than 1% of the value
proposition of the WebSockets protocol.  Rather than optimizing that
part of the protocol, it's more important to pick something and go
with it.

Honestly, I picked OPTIONS because it was the example given in
http://www.ietf.org/rfc/rfc2817.txt.

Adam

From mjs@apple.com  Sun Jan  9 15:07:59 2011
Return-Path: <mjs@apple.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 A562A28C0D7 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:07:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.523
X-Spam-Level: 
X-Spam-Status: No, score=-106.523 tagged_above=-999 required=5 tests=[AWL=0.075, BAYES_00=-2.599, 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 lOIJjRVY0qvD for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:07:58 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 501BC3A6835 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:07:58 -0800 (PST)
Received: from relay13.apple.com (relay13.apple.com [17.128.113.29]) by mail-out3.apple.com (Postfix) with ESMTP id 8C6C1C5EC9FF for <hybi@ietf.org>; Sun,  9 Jan 2011 15:10:10 -0800 (PST)
X-AuditID: 1180711d-b7c30ae0000055b4-00-4d2a4052b439
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay13.apple.com (Apple SCV relay) with SMTP id 25.D3.21940.2504A2D4; Sun,  9 Jan 2011 15:10:10 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_3eE6kIbJB8Q1pmJQvMOI2Q)"
Received: from [10.0.1.14] ([24.6.209.6]) by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LES00KUO30XC240@elliott.apple.com> for hybi@ietf.org; Sun, 09 Jan 2011 15:10:10 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110109230229.GX5743@1wt.eu>
Date: Sun, 09 Jan 2011 15:10:09 -0800
Message-id: <6F2780F7-D603-46D6-B737-8B085AF32B2C@apple.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Hybi <hybi@ietf.org>
Subject: [hybi] HELLO frames (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:07:59 -0000

--Boundary_(ID_3eE6kIbJB8Q1pmJQvMOI2Q)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 9, 2011, at 3:02 PM, Willy Tarreau wrote:

> On Sun, Jan 09, 2011 at 02:49:10PM -0800, Adam Barth wrote:
> 
>>>  - Greg proposed to replace the MORE bit with a FIN bit so that the first
>>>    hello frame from the server starts with a high bit set, thus ensuring
>>>    that we can break the connection on non-HTTP compliant intermediaries
>>>    which would expect a second response after the 101.
>> 
>> The protocol is good enough without this change.  The masking has us
>> covered here.
> 
> No, I'm talking about the ability to ensure that a non-compliant intermediary
> will fail early instead of remaining stuck waiting for the server to talk.
> That once one of Hixie's major concerns and one of the reasons for the Hello
> frames suggestion.

Is there any evidence that either client-->server or sever-->client HELLO frames would reduce the rate of apparent successful connections that later fail in real-world deployment? If so, we can consider adding them on their own merits.

Regards,
Maciej

--Boundary_(ID_3eE6kIbJB8Q1pmJQvMOI2Q)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: quoted-printable

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><br><div><div>On Jan 9, 2011, at 3:02 PM, Willy Tarreau =
wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div>On Sun, Jan 09, 2011 at 02:49:10PM -0800, Adam Barth =
wrote:<br><font class=3D"Apple-style-span" =
color=3D"#006312"><br></font><blockquote type=3D"cite"><blockquote =
type=3D"cite">&nbsp;- Greg proposed to replace the MORE bit with a FIN =
bit so that the first<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">&nbsp; &nbsp;hello frame from =
the server starts with a high bit set, thus =
ensuring<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">&nbsp; &nbsp;that we can break =
the connection on non-HTTP compliant =
intermediaries<br></blockquote></blockquote><blockquote =
type=3D"cite"><blockquote type=3D"cite">&nbsp; &nbsp;which would expect =
a second response after the =
101.<br></blockquote></blockquote><blockquote =
type=3D"cite"><br></blockquote><blockquote type=3D"cite">The protocol is =
good enough without this change. &nbsp;The masking has =
us<br></blockquote><blockquote type=3D"cite">covered =
here.<br></blockquote><br>No, I'm talking about the ability to ensure =
that a non-compliant intermediary<br>will fail early instead of =
remaining stuck waiting for the server to talk.<br>That once one of =
Hixie's major concerns and one of the reasons for the Hello<br>frames =
suggestion.<br></div></blockquote></div><br><div>Is there any evidence =
that either client--&gt;server or sever--&gt;client HELLO frames would =
reduce the rate of apparent successful connections that later fail in =
real-world deployment? If so, we can consider adding them on their own =
merits.</div><div><br></div><div>Regards,</div><div>Maciej</div></body></h=
tml>=

--Boundary_(ID_3eE6kIbJB8Q1pmJQvMOI2Q)--

From ietf@adambarth.com  Sun Jan  9 15:10:14 2011
Return-Path: <ietf@adambarth.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 3959328C0D7 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:10:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.923
X-Spam-Level: 
X-Spam-Status: No, score=-3.923 tagged_above=-999 required=5 tests=[AWL=-0.946, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 310Qf+dKt1Qm for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:10:13 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 4B7013A6853 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:10:13 -0800 (PST)
Received: by qyj19 with SMTP id 19so20375267qyj.10 for <hybi@ietf.org>; Sun, 09 Jan 2011 15:12:25 -0800 (PST)
Received: by 10.229.94.143 with SMTP id z15mr24041176qcm.282.1294614745068; Sun, 09 Jan 2011 15:12:25 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id t7sm15819499qcs.28.2011.01.09.15.12.23 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 15:12:23 -0800 (PST)
Received: by iyi42 with SMTP id 42so18871669iyi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 15:12:22 -0800 (PST)
Received: by 10.231.192.7 with SMTP id do7mr5852513ibb.102.1294614742619; Sun, 09 Jan 2011 15:12:22 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 15:11:52 -0800 (PST)
In-Reply-To: <20110109230229.GX5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 15:11:52 -0800
Message-ID: <AANLkTikSiuBr1G+UekXJjPKs6CgO0YMAYyWZe0xJ90u8@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Sun, 09 Jan 2011 23:10:14 -0000

On Sun, Jan 9, 2011 at 3:02 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 09, 2011 at 02:49:10PM -0800, Adam Barth wrote:
>> We've had plenty of suggestions, ideas, and changes. =A0It's time to shi=
p.
>
> Yesterday, Sal said that there were a number of points to discuss yet, wh=
y
> this sudden hurry ?

There is no sudden hurry.  WebSockets have already been delayed far
too long.  It's time to ship.

Adam

From mjs@apple.com  Sun Jan  9 15:10:36 2011
Return-Path: <mjs@apple.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 1C77128C0E1 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:10:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.528
X-Spam-Level: 
X-Spam-Status: No, score=-106.528 tagged_above=-999 required=5 tests=[AWL=0.071, BAYES_00=-2.599, 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 fpkj9rnup7Jq for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:10:35 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 9D45A3A6853 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:10:33 -0800 (PST)
Received: from relay13.apple.com (relay13.apple.com [17.128.113.29]) by mail-out3.apple.com (Postfix) with ESMTP id C97F5C5EDCF6 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:12:45 -0800 (PST)
X-AuditID: 1180711d-b7c30ae0000055b4-ca-4d2a40ed2ccf
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay13.apple.com (Apple SCV relay) with SMTP id 7B.05.21940.DE04A2D4; Sun,  9 Jan 2011 15:12:45 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [10.0.1.14] ([24.6.209.6]) by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LES00KWX358C240@elliott.apple.com> for hybi@ietf.org; Sun, 09 Jan 2011 15:12:45 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com>
Date: Sun, 09 Jan 2011 15:12:44 -0800
Message-id: <E1A5F4AA-5F7A-4832-A75B-3503E4F5AEFF@apple.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com>
To: Adam Barth <ietf@adambarth.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:10:36 -0000

On Jan 9, 2011, at 3:09 PM, Adam Barth wrote:

> Whether we use OPTIONS or GET is much less than 1% of the value
> proposition of the WebSockets protocol.  Rather than optimizing that
> part of the protocol, it's more important to pick something and go
> with it.
> 
> Honestly, I picked OPTIONS because it was the example given in
> http://www.ietf.org/rfc/rfc2817.txt.

I personally have no objections to OPTIONS. The reason for this side thread is so that anyone who has a concrete problem with OPTIONS can raise it now. I'm not aware of any such problems, but Willy said there might be some. I'm definitely into shipping soon, but it can't hurt to be informed.

Regards,
Maciej



From w@1wt.eu  Sun Jan  9 15:16:09 2011
Return-Path: <w@1wt.eu>
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 030F23A6853 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:16:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.084
X-Spam-Level: 
X-Spam-Status: No, score=-2.084 tagged_above=-999 required=5 tests=[AWL=-0.041, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 rYfmMatqkHSi for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:16:08 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 16FCA3A6835 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:16:02 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09NI8TT010275; Mon, 10 Jan 2011 00:18:08 +0100
Date: Mon, 10 Jan 2011 00:18:08 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110109231808.GY5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:16:09 -0000

On Sun, Jan 09, 2011 at 03:06:12PM -0800, Maciej Stachowiak wrote:
> 
> On Jan 9, 2011, at 3:02 PM, Willy Tarreau wrote:
> 
> > On Sun, Jan 09, 2011 at 02:49:10PM -0800, Adam Barth wrote:
> >> On Sun, Jan 9, 2011 at 2:42 PM, Willy Tarreau <w@1wt.eu> wrote:
> >>> On Sun, Jan 09, 2011 at 02:21:44PM -0800, Adam Barth wrote:
> >>>> 
> > 
> >>> At first glance, I'm noticing a few things :
> >>> 
> >>>  - you're using the OPTIONS method. The WG's consensus was voted as using
> >>>    GET. While technically working, OPTIONS limits some possibilities since
> >>>    no path is sent to the server.
> >> 
> >> Be that as it may.  OPTIONS is good enough.
> > 
> > But on what basis are you trying to change what was adopted as a consensus ?
> > I mean, I *know* that OPTIONS can evict more broken intermediaries than GET,
> > but the participants here have been working on the GET hypothesis with its
> > capabilities. Noone has had the opportunity to talk about their expectations
> > and the implications such a change would have for them.
> 
> Now seems like a fine time to discuss OPTIONS. What are the pros and cons? It seems to avoid the HTTP compliance issues that CONNECT had, at least.

Yes, OPTIONS+101 is equivalent for servers to what CONNECT is for proxies.
It has been evocated a bit in the past, but the discussion quickly ended and
nobody gave his opinion.

The pros is that some intermediaries unaware of the Upgrade mechanism will
respond themselves with 405, 501 or 200 depending on whether they support
it or not, which will cause a cleaner failure.

The cons is that it removes the ability to use any form of path in the
request, so you can only rely on the server name. Sure that's a lot better
than relying on its IP address, but it might not fit everyone's use. I can
live with it if required, as I've said several times in the last few months.
However, you once expressed concerns on this point about the ability to
forge OPTIONS requests using XMLHttpRequest (which I did not know were
possible).

The point is that it was said yesterday to one guy that once a consensus is
achieved, it must not be revisited, and now we're doing exactly that :-/

Willy


From w@1wt.eu  Sun Jan  9 15:22:16 2011
Return-Path: <w@1wt.eu>
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 169C53A6835 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:22:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.083
X-Spam-Level: 
X-Spam-Status: No, score=-2.083 tagged_above=-999 required=5 tests=[AWL=-0.040, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 ToKSimEaPKWd for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:22:14 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id ABC513A67D4 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:22:13 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09NOMpX010289; Mon, 10 Jan 2011 00:24:22 +0100
Date: Mon, 10 Jan 2011 00:24:22 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110109232422.GZ5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <6F2780F7-D603-46D6-B737-8B085AF32B2C@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <6F2780F7-D603-46D6-B737-8B085AF32B2C@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] HELLO frames (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:22:16 -0000

On Sun, Jan 09, 2011 at 03:10:09PM -0800, Maciej Stachowiak wrote:
> Is there any evidence that either client-->server or sever-->client HELLO frames would reduce the rate of apparent successful connections that later fail in real-world deployment? If so, we can consider adding them on their own merits.

Yes, we had several examples in the past of intermediaries which don't know
about the specifics of the 101 status code and which process it as 100, as
the HTTP spec says that if you don't know how to handle code XYZ, you can
handle it as X00. The problem is that 100 is an intermediate response, which
indicates that another one will come after it. So the intermediary sends the
headers to the client and waits for the server to talk, doing nothing else.

Older versions of haproxy used to do that because I implemented the RFC as
I had read it. It was only after joining the WG that I discovered the magics
of 101. Apache does that too. But Apache takes OPTIONS requests for itself,
so a GET+101 on apache will require a hello frame while an OPTIONS will
immediately be rejected, so for this one it's irrelevant.

In fact I'd be more worried about load balancers and content switches
in general. They have to support 100 because of the very common
"Expect: 100-Continue" that is present in many POST requests, and it's
highly likely that they'll process 101 as a 100 just as haproxy did,
because 101 was part of RFC2817 and not 2616.

So yes, for this matter, the hello frames will really help quickly
terminate connections through failed intermediaries instead of leaving
them hanging.

Regards,
Willy


From julian.reschke@gmx.de  Sun Jan  9 15:37:28 2011
Return-Path: <julian.reschke@gmx.de>
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 89D6A3A6859 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:37:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.442
X-Spam-Level: 
X-Spam-Status: No, score=-104.442 tagged_above=-999 required=5 tests=[AWL=-1.843, BAYES_00=-2.599, 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 gAKEfv2Dg9BT for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:37:27 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 284103A6853 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:37:26 -0800 (PST)
Received: (qmail invoked by alias); 09 Jan 2011 23:39:36 -0000
Received: from p508FD146.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.209.70] by mail.gmx.net (mp018) with SMTP; 10 Jan 2011 00:39:36 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+N6Dkgd6KNCNbTwpOSuIgIJZo+g4fucfCZv65QkJ Rwj9K+sN0DSfXp
Message-ID: <4D2A4738.2000500@gmx.de>
Date: Mon, 10 Jan 2011 00:39:36 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Adam Barth <ietf@adambarth.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>	<20110109224228.GU5743@1wt.eu>	<AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com>	<20110109230229.GX5743@1wt.eu>	<0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com>
In-Reply-To: <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:37:28 -0000

On 10.01.2011 00:09, Adam Barth wrote:
> ...
> Whether we use OPTIONS or GET is much less than 1% of the value
> proposition of the WebSockets protocol.  Rather than optimizing that
> part of the protocol, it's more important to pick something and go
> with it.
>
> Honestly, I picked OPTIONS because it was the example given in
> http://www.ietf.org/rfc/rfc2817.txt.
> ...

OPTIONS isn't special with respect to Upgrade. (*)

My understanding is that the authors picked this example in order to 
avoid to let the server ignore the Upgrade request in GET, and then 
return the contents over an non-secured channel.

Unless there's a specific reason why people think OPTIONS is better than 
GET here, we should stick with what was discussed before.

Best regards, Julian

(*) I may be wrong, in which case we should clarify this in HTTPbis.

From julian.reschke@gmx.de  Sun Jan  9 15:38:35 2011
Return-Path: <julian.reschke@gmx.de>
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 78DD43A6853 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:38:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.426
X-Spam-Level: 
X-Spam-Status: No, score=-104.426 tagged_above=-999 required=5 tests=[AWL=-1.827, BAYES_00=-2.599, 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 Lq2pbz2WeY3Q for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:38:34 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 50A8F3A6858 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:38:34 -0800 (PST)
Received: (qmail invoked by alias); 09 Jan 2011 23:40:45 -0000
Received: from p508FD146.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.209.70] by mail.gmx.net (mp071) with SMTP; 10 Jan 2011 00:40:45 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX19xOmFHQH9xqoT0y8yZ9mjTRAa+c1Ni5fBV1yETM3 n9yHY46eQ2WAaG
Message-ID: <4D2A477D.80406@gmx.de>
Date: Mon, 10 Jan 2011 00:40:45 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>	<20110109224228.GU5743@1wt.eu>	<AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com>	<20110109230229.GX5743@1wt.eu>	<0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <20110109231808.GY5743@1wt.eu>
In-Reply-To: <20110109231808.GY5743@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:38:35 -0000

On 10.01.2011 00:18, Willy Tarreau wrote:
> ...
> The cons is that it removes the ability to use any form of path in the
> request, so you can only rely on the server name. Sure that's a lot better
> than relying on its IP address, but it might not fit everyone's use. I can
> live with it if required, as I've said several times in the last few months.
 > ...

Hmmm? OPTIONS can have a path just like any other method.

Best regards, Julian

From julian.reschke@gmx.de  Sun Jan  9 15:40:24 2011
Return-Path: <julian.reschke@gmx.de>
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 21EB53A6853 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:40:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.411
X-Spam-Level: 
X-Spam-Status: No, score=-104.411 tagged_above=-999 required=5 tests=[AWL=-1.812, BAYES_00=-2.599, 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 XRmRnRrutW1R for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:40:22 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 3EFFE3A6858 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:40:21 -0800 (PST)
Received: (qmail invoked by alias); 09 Jan 2011 23:42:33 -0000
Received: from p508FD146.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.209.70] by mail.gmx.net (mp043) with SMTP; 10 Jan 2011 00:42:33 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX199n/NBnBt93wBWZ4SxlAwVBxGUxdepL3vDgZOo4B Dk2EiXWyqMifyb
Message-ID: <4D2A47E9.3050604@gmx.de>
Date: Mon, 10 Jan 2011 00:42:33 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>	<20110109224228.GU5743@1wt.eu>	<AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com>	<20110109230229.GX5743@1wt.eu>	<6F2780F7-D603-46D6-B737-8B085AF32B2C@apple.com> <20110109232422.GZ5743@1wt.eu>
In-Reply-To: <20110109232422.GZ5743@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] HELLO frames (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:40:24 -0000

On 10.01.2011 00:24, Willy Tarreau wrote:
> ...
> In fact I'd be more worried about load balancers and content switches
> in general. They have to support 100 because of the very common
> "Expect: 100-Continue" that is present in many POST requests, and it's
> highly likely that they'll process 101 as a 100 just as haproxy did,
> because 101 was part of RFC2817 and not 2616.
> ...

This is incorrect, see 
<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.10.1.2>.

Best regards, Julian

From w@1wt.eu  Sun Jan  9 15:42:06 2011
Return-Path: <w@1wt.eu>
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 2D4DC28C0E9 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:42:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.083
X-Spam-Level: 
X-Spam-Status: No, score=-2.083 tagged_above=-999 required=5 tests=[AWL=-0.040, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 MExsw3VAgJVV for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:42:05 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id E60A43A6853 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:42:04 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09NiDIB010348; Mon, 10 Jan 2011 00:44:13 +0100
Date: Mon, 10 Jan 2011 00:44:13 +0100
From: Willy Tarreau <w@1wt.eu>
To: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <20110109234413.GA5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <20110109231808.GY5743@1wt.eu> <4D2A477D.80406@gmx.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D2A477D.80406@gmx.de>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:42:06 -0000

On Mon, Jan 10, 2011 at 12:40:45AM +0100, Julian Reschke wrote:
> On 10.01.2011 00:18, Willy Tarreau wrote:
> >...
> >The cons is that it removes the ability to use any form of path in the
> >request, so you can only rely on the server name. Sure that's a lot better
> >than relying on its IP address, but it might not fit everyone's use. I can
> >live with it if required, as I've said several times in the last few 
> >months.
> > ...
> 
> Hmmm? OPTIONS can have a path just like any other method.

Oh yes Julian, you're making a good point, in fact I got fooled by the
"OPTIONS *" request. Yes indeed, with a path OPTIONS becomes equivalent
to GET and is forwarded.

Regards,
Willy


From bruce@callenish.com  Sun Jan  9 15:43:53 2011
Return-Path: <bruce@callenish.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 DBCE83A6859 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:43:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.581
X-Spam-Level: 
X-Spam-Status: No, score=-2.581 tagged_above=-999 required=5 tests=[AWL=0.018,  BAYES_00=-2.599]
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 af0PVZ6dyE39 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:43:53 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 0FAB83A6853 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:43:53 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pc4xY-0006vG-5l for hybi@ietf.org; Sun, 09 Jan 2011 15:46:04 -0800
Message-ID: <4D2A48BB.5020400@callenish.com>
Date: Sun, 09 Jan 2011 15:46:03 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <20110106221426.GA28367@1wt.eu>	<AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com>	<20110107053410.GG28367@1wt.eu>	<AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com>	<20110107061043.GJ28367@1wt.eu>	<AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com>	<20110107063854.GN28367@1wt.eu>	<670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com>	<20110107185801.GB32612@1wt.eu>	<AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com>	<20110107203958.GC32612@1wt.eu>	<AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com>	<4D28DF6E.4080003@callenish.com>	<AANLkTikhgk7yRoC1K37QetW-7ZHw8G26WZVUs7fM2y=J@mail.gmail.com>	<4D2A307C.3080109@callenish.com> <AANLkTimv-1DV=ZVyzSSaDHTsVGaRHm8kNPjWNVW5_a1G@mail.gmail.com>
In-Reply-To: <AANLkTimv-1DV=ZVyzSSaDHTsVGaRHm8kNPjWNVW5_a1G@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] A bit of pragmatism
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: Sun, 09 Jan 2011 23:43:54 -0000

I apologize if I am being thick, but I still don't understand.

It is my understanding that the masking algorithms which have been 
previously suggested prevent the attacker from controlling the payload 
bits on the wire from within a browser using Websockets without the 
added burden of being cryptographically secure. I had thought that you 
were arguing that the attacker could still control patterns in the bits, 
but not the bits themselves. That seemed like a reasonable thing for the 
ws: scheme to allow, to me, since by design it is a lighter weight, less 
secure form of Websockets and there have never been any exploits that 
relied on that characteristic that anyone has mentioned so far. Now it 
sounds like you are arguing that an attacker can completely control the 
bits no matter what unless it is cryptographically secure.

I'm sure I'm missing something, but I haven't a clue what it is.

On 09/01/2011 2:16 PM, Eric Rescorla wrote:
> It's not a matter of random versus non-random. RC4 and AES-CTR without random IV
> (which is not a requirement of the standard) provide the attacker with
> complete control over
> the payload bits on the wire, beause he can predict the keystream.


From w@1wt.eu  Sun Jan  9 15:44:31 2011
Return-Path: <w@1wt.eu>
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 422D83A6859 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:44:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.083
X-Spam-Level: 
X-Spam-Status: No, score=-2.083 tagged_above=-999 required=5 tests=[AWL=-0.040, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 YLCskKLFhxLW for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:44:30 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id DD57C3A6853 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:44:29 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09NkcvB010382; Mon, 10 Jan 2011 00:46:38 +0100
Date: Mon, 10 Jan 2011 00:46:38 +0100
From: Willy Tarreau <w@1wt.eu>
To: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <20110109234638.GB5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <6F2780F7-D603-46D6-B737-8B085AF32B2C@apple.com> <20110109232422.GZ5743@1wt.eu> <4D2A47E9.3050604@gmx.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D2A47E9.3050604@gmx.de>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] HELLO frames (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:44:31 -0000

On Mon, Jan 10, 2011 at 12:42:33AM +0100, Julian Reschke wrote:
> On 10.01.2011 00:24, Willy Tarreau wrote:
> >...
> >In fact I'd be more worried about load balancers and content switches
> >in general. They have to support 100 because of the very common
> >"Expect: 100-Continue" that is present in many POST requests, and it's
> >highly likely that they'll process 101 as a 100 just as haproxy did,
> >because 101 was part of RFC2817 and not 2616.
> >...
> 
> This is incorrect, see 
> <http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.10.1.2>.

OK, but that's not what I'd call a definition. It's just as little verbose
as CONNECT, it lets one imagine it's just to use a new HTTP version. Both
were given an example for the first time in 2817 in my opinion.

Thanks for the reminder anyway ;-)
Willy


From julian.reschke@gmx.de  Sun Jan  9 15:48:02 2011
Return-Path: <julian.reschke@gmx.de>
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 E193C3A685A for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:48:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.396
X-Spam-Level: 
X-Spam-Status: No, score=-104.396 tagged_above=-999 required=5 tests=[AWL=-1.797, BAYES_00=-2.599, 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 SIOs7TBrGuMo for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:48:01 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 665E73A6853 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:48:00 -0800 (PST)
Received: (qmail invoked by alias); 09 Jan 2011 23:50:12 -0000
Received: from p508FD146.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.209.70] by mail.gmx.net (mp040) with SMTP; 10 Jan 2011 00:50:12 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/uyOkqI3TuQFxvFm+i73BMCWRnI6AxqBos82cdgM g+eKYkWVPbKysb
Message-ID: <4D2A49B4.8030809@gmx.de>
Date: Mon, 10 Jan 2011 00:50:12 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <6F2780F7-D603-46D6-B737-8B085AF32B2C@apple.com> <20110109232422.GZ5743@1wt.eu> <4D2A47E9.3050604@gmx.de> <20110109234638.GB5743@1wt.eu>
In-Reply-To: <20110109234638.GB5743@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] HELLO frames (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:48:03 -0000

On 10.01.2011 00:46, Willy Tarreau wrote:
> On Mon, Jan 10, 2011 at 12:42:33AM +0100, Julian Reschke wrote:
>> On 10.01.2011 00:24, Willy Tarreau wrote:
>>> ...
>>> In fact I'd be more worried about load balancers and content switches
>>> in general. They have to support 100 because of the very common
>>> "Expect: 100-Continue" that is present in many POST requests, and it's
>>> highly likely that they'll process 101 as a 100 just as haproxy did,
>>> because 101 was part of RFC2817 and not 2616.
>>> ...
>>
>> This is incorrect, see
>> <http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.10.1.2>.
>
> OK, but that's not what I'd call a definition. It's just as little verbose
> as CONNECT, it lets one imagine it's just to use a new HTTP version. Both
> were given an example for the first time in 2817 in my opinion.

Well, there's also the text in 
<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.14.42>.

So... we recently adopted language from 2817 into HTTPbis; could you 
please check that, and provide feedback to the WG if you feel we need to 
improve what we have?

Best regards, Julian

From w@1wt.eu  Sun Jan  9 15:53:39 2011
Return-Path: <w@1wt.eu>
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 811483A6859 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:53:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.082
X-Spam-Level: 
X-Spam-Status: No, score=-2.082 tagged_above=-999 required=5 tests=[AWL=-0.039, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 74MtDm1H1NRq for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 15:53:38 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id AB9623A6853 for <hybi@ietf.org>; Sun,  9 Jan 2011 15:53:37 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p09NtjlG010437; Mon, 10 Jan 2011 00:55:45 +0100
Date: Mon, 10 Jan 2011 00:55:45 +0100
From: Willy Tarreau <w@1wt.eu>
To: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <20110109235545.GC5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <6F2780F7-D603-46D6-B737-8B085AF32B2C@apple.com> <20110109232422.GZ5743@1wt.eu> <4D2A47E9.3050604@gmx.de> <20110109234638.GB5743@1wt.eu> <4D2A49B4.8030809@gmx.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D2A49B4.8030809@gmx.de>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] HELLO frames (was Re:  It's time to ship)
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: Sun, 09 Jan 2011 23:53:39 -0000

On Mon, Jan 10, 2011 at 12:50:12AM +0100, Julian Reschke wrote:
> On 10.01.2011 00:46, Willy Tarreau wrote:
> >On Mon, Jan 10, 2011 at 12:42:33AM +0100, Julian Reschke wrote:
> >>On 10.01.2011 00:24, Willy Tarreau wrote:
> >>>...
> >>>In fact I'd be more worried about load balancers and content switches
> >>>in general. They have to support 100 because of the very common
> >>>"Expect: 100-Continue" that is present in many POST requests, and it's
> >>>highly likely that they'll process 101 as a 100 just as haproxy did,
> >>>because 101 was part of RFC2817 and not 2616.
> >>>...
> >>
> >>This is incorrect, see
> >><http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.10.1.2>.
> >
> >OK, but that's not what I'd call a definition. It's just as little verbose
> >as CONNECT, it lets one imagine it's just to use a new HTTP version. Both
> >were given an example for the first time in 2817 in my opinion.
> 
> Well, there's also the text in 
> <http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.14.42>.

Yes I know, but the connection between 101 and Upgrade was not easy to
establish. I discovered that particularity here with websocket for the
first time after 10 years of everyday use of HTTP.

> So... we recently adopted language from 2817 into HTTPbis; could you 
> please check that, and provide feedback to the WG if you feel we need to 
> improve what we have?

I remember having checked that part in http-bis, as I was one of those
asking for the merging of CONNECT and 101 into http-bis, and found it to
be OK. I could recheck though. But it's always harder to spot things that
are difficult to understand once you know them. I'd better ask someone
else to indicate me if he understands how to use it.

Cheers,
Willy


From w@1wt.eu  Sun Jan  9 16:06:58 2011
Return-Path: <w@1wt.eu>
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 41C1D3A685A for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:06:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.082
X-Spam-Level: 
X-Spam-Status: No, score=-2.082 tagged_above=-999 required=5 tests=[AWL=-0.039, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 mPlBteDzNpGY for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:06:57 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id B042A3A6853 for <hybi@ietf.org>; Sun,  9 Jan 2011 16:06:56 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A098DQ010460 for hybi@ietf.org; Mon, 10 Jan 2011 01:09:08 +0100
Date: Mon, 10 Jan 2011 01:09:08 +0100
From: Willy Tarreau <w@1wt.eu>
To: Hybi <hybi@ietf.org>
Message-ID: <20110110000908.GD5743@1wt.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.3i
Subject: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 00:06:58 -0000

I have reused Maciej's code for AES-128-CTR to make it emit a constant
stream and look there for a supposedly processable request (which is
valid since Apache processes it and transcodes it if it finds it at
the beginning of the stream).

willy@pcw:~/c$ time ./aes-128-ctr-get 
Found the 'GET\n' pattern on the wire after 1608425803 bytes

real    0m20.761s
user    0m20.761s
sys     0m0.000s

It requires the client to send more data, but here we're only
at 1.6 GB, roughly just 1000 times more than with the basic XOR
method.

However, it's limited to 640 Mbps only. It means that using this
as a mandatory masking method will not even allow me to use a
memcache at gigabit speeds on my local network :-(

Once again, I'm not saying that I'd believe that any intermediary
would seek a request that far. Neither do I believe it would seek
one after one megabyte nor after any non CRLF byte BTW.

But we're proposing this method because other ones are not deemed
sure enough. However, it does not either cover the issues which
caused the other methods to be proposed.

So now either we should conclude that using AES to prevent a request
from popping up is acceptable because the risks are low, so it must
be possible to disable it for some use cases, or we conclude that
it's not usable and the only masking solution consists in never
putting a CR/LF on the wire.

But we have to make choices. We can't disable the protocol that way
to fix a problem we finally don't fix.

Regards,
Willy


From bruce@callenish.com  Sun Jan  9 16:14:52 2011
Return-Path: <bruce@callenish.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 C96873A6853 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:14:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.582
X-Spam-Level: 
X-Spam-Status: No, score=-2.582 tagged_above=-999 required=5 tests=[AWL=0.017,  BAYES_00=-2.599]
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 3VRiesJw4hW4 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:14:51 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id E8BEA3A6833 for <hybi@ietf.org>; Sun,  9 Jan 2011 16:14:51 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pc5RW-0001Pl-Qz for hybi@ietf.org; Sun, 09 Jan 2011 16:17:03 -0800
Message-ID: <4D2A4FFE.6000503@callenish.com>
Date: Sun, 09 Jan 2011 16:17:02 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: [hybi] Summary of issues concerning the default masking algorithm
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: Mon, 10 Jan 2011 00:14:52 -0000

Now that masking is officially going to be part of the protocol, I for 
one would find it useful to have all the concerns of the masking 
algorithm in one place to make it easier to reason about. I realize that 
much of this has already been discussed in various threads in all kinds 
of messages and that some (though I do not think all) consider the 
decisions on the algorithm pretty much made, but I think it would be 
easier to reason about and be certain we have consensus on them if the 
information could be gathered in a single thread.

Here is my understanding of the current state of issues around the 
masking algorithm. Please feel free to correct me or add more information.

The problems masking is intended to address are:

   1) to prevent an attacker from using a browser to initiate a 
Websocket connection to a vulnerable intermediary or non-Websocket 
server that can be exploited by sending apparent HTTP or elements of 
other protocols in a Websocket frame

and more controversially:

   2) to prevent an attacker from using a browser to open a cross-site 
scripting HTTP connection that emulates a Websocket connection

   3) to prevent potential unknown future attacks using a browser with a 
Websocket connection that can be avoided by disallowing an attacker's 
control of bits on the wire

If there are other problems masking is seen as a solution for, please 
add them. Those are the ones I am aware of.

The most basic masking suggestion I have seen is to provide a per-frame 
random mask that is sent with the frame and XORed with the contents.

The features which have been suggested to enhance this scheme that I 
know of are:

a) The client nonce should influence the mask

b) The server nonce should influence the mask

c) The mask should be kept off the wire by generating the mask using a 
shared secret
   - This means replacing the per-frame mask with a per-frame key used 
in generating the mask
   - the shared secret that has been suggested is a connection key 
generated from the client and server nonce, thus including features a and b

d) The attacker should not only be prevented from controlling the bits, 
but also the pattern of bits

Again there may be other features that have been suggested but those are 
the ones I am aware of.

I'll leave it to the advocates of each of these features to summarize 
the benefits of them that justify their costs, as I don't think I could 
do justice to them. I can make a stab at the costs, though.

For feature a, the only cost I can see is in the increase in complexity 
in generating the mask.

For feature b, there is the increase in complexity in generating the 
mask as well as the fact that you can not send a payload with the 
initial handshake from the client because you do not yet have the server 
nonce.

The principal cost of feature c that I can see is that it stops tools 
like wireshark from being able to decode streams.

The cost of feature d is increased complexity in implementation and 
added computational cost.

Feel free to add to or argue with any of these points. I've tried to 
state things as neutrally as I can.


From ietf@adambarth.com  Sun Jan  9 16:18:47 2011
Return-Path: <ietf@adambarth.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 207F23A6853 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:18:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.916
X-Spam-Level: 
X-Spam-Status: No, score=-3.916 tagged_above=-999 required=5 tests=[AWL=-0.939, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 fCScN-Pp36L8 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:18:46 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id 34E5D3A6833 for <hybi@ietf.org>; Sun,  9 Jan 2011 16:18:46 -0800 (PST)
Received: by gyd12 with SMTP id 12so8071823gyd.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 16:20:58 -0800 (PST)
Received: by 10.90.120.12 with SMTP id s12mr5565720agc.21.1294618857975; Sun, 09 Jan 2011 16:20:57 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id e44sm6829430yha.34.2011.01.09.16.20.56 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 16:20:57 -0800 (PST)
Received: by iwn40 with SMTP id 40so19970843iwn.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 16:20:55 -0800 (PST)
Received: by 10.231.156.1 with SMTP id u1mr11822930ibw.52.1294618855778; Sun, 09 Jan 2011 16:20:55 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 16:20:25 -0800 (PST)
In-Reply-To: <20110110000908.GD5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 16:20:25 -0800
Message-ID: <AANLkTik5BDTB-T8wbyXJF8iseSryfHgOATLDNc6HUz7k@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 00:18:47 -0000

On Sun, Jan 9, 2011 at 4:09 PM, Willy Tarreau <w@1wt.eu> wrote:
> I have reused Maciej's code for AES-128-CTR to make it emit a constant
> stream and look there for a supposedly processable request (which is
> valid since Apache processes it and transcodes it if it finds it at
> the beginning of the stream).
>
> willy@pcw:~/c$ time ./aes-128-ctr-get
> Found the 'GET\n' pattern on the wire after 1608425803 bytes
>
> real =A0 =A00m20.761s
> user =A0 =A00m20.761s
> sys =A0 =A0 0m0.000s
>
> It requires the client to send more data, but here we're only
> at 1.6 GB, roughly just 1000 times more than with the basic XOR
> method.
>
> However, it's limited to 640 Mbps only. It means that using this
> as a mandatory masking method will not even allow me to use a
> memcache at gigabit speeds on my local network :-(

Then you shouldn't use WebSockets to talk to memcache on your local
network.  WebSockets is not the solution to every problem.  For the
important uses cases, 640 Mbps with today's CPUs is vastly more than
enough.

> Once again, I'm not saying that I'd believe that any intermediary
> would seek a request that far. Neither do I believe it would seek
> one after one megabyte nor after any non CRLF byte BTW.
>
> But we're proposing this method because other ones are not deemed
> sure enough. However, it does not either cover the issues which
> caused the other methods to be proposed.
>
> So now either we should conclude that using AES to prevent a request
> from popping up is acceptable because the risks are low, so it must
> be possible to disable it for some use cases, or we conclude that
> it's not usable and the only masking solution consists in never
> putting a CR/LF on the wire.

The masking is not optional.  If your use case doesn't work with
masking, please a different protocol.

Kind regards,
Adam

From gregw@intalio.com  Sun Jan  9 16:21:55 2011
Return-Path: <gregw@intalio.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 ADFDF3A6853 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:21:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.927
X-Spam-Level: 
X-Spam-Status: No, score=-2.927 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 BrphjqmE70gQ for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:21:54 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 123823A6833 for <hybi@ietf.org>; Sun,  9 Jan 2011 16:21:53 -0800 (PST)
Received: by vws7 with SMTP id 7so7754484vws.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 16:24:05 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.187.132 with SMTP id cw4mr5866880vcb.25.1294619045849; Sun, 09 Jan 2011 16:24:05 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 9 Jan 2011 16:24:05 -0800 (PST)
In-Reply-To: <4D2A4FFE.6000503@callenish.com>
References: <4D2A4FFE.6000503@callenish.com>
Date: Mon, 10 Jan 2011 01:24:05 +0100
X-Google-Sender-Auth: bgx5kQnJONX7PdB0dlLOmjz0EGY
Message-ID: <AANLkTim273LNAK8SQOAYgzu3QpenaDzFVsUES_nrwGmF@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Summary of issues concerning the default masking algorithm
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: Mon, 10 Jan 2011 00:21:55 -0000

Bruce,

there are also proposed  features of:

  e) masking the framing as well as the payload.

  f) making masking use the current frame extension mechanism

 g) make masking be a negotiated extension (either to turn it on or off)

From w@1wt.eu  Sun Jan  9 16:23:28 2011
Return-Path: <w@1wt.eu>
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 036AA3A685A for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:23:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.082
X-Spam-Level: 
X-Spam-Status: No, score=-2.082 tagged_above=-999 required=5 tests=[AWL=-0.039, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 Hqj2xlv-is52 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:23:26 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 567863A6833 for <hybi@ietf.org>; Sun,  9 Jan 2011 16:23:26 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A0PYuT010531; Mon, 10 Jan 2011 01:25:34 +0100
Date: Mon, 10 Jan 2011 01:25:33 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110110002533.GE5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <AANLkTik5BDTB-T8wbyXJF8iseSryfHgOATLDNc6HUz7k@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTik5BDTB-T8wbyXJF8iseSryfHgOATLDNc6HUz7k@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 00:23:28 -0000

On Sun, Jan 09, 2011 at 04:20:25PM -0800, Adam Barth wrote:
> On Sun, Jan 9, 2011 at 4:09 PM, Willy Tarreau <w@1wt.eu> wrote:
> > I have reused Maciej's code for AES-128-CTR to make it emit a constant
> > stream and look there for a supposedly processable request (which is
> > valid since Apache processes it and transcodes it if it finds it at
> > the beginning of the stream).
> >
> > willy@pcw:~/c$ time ./aes-128-ctr-get
> > Found the 'GET\n' pattern on the wire after 1608425803 bytes
> >
> > real    0m20.761s
> > user    0m20.761s
> > sys     0m0.000s
> >
> > It requires the client to send more data, but here we're only
> > at 1.6 GB, roughly just 1000 times more than with the basic XOR
> > method.
> >
> > However, it's limited to 640 Mbps only. It means that using this
> > as a mandatory masking method will not even allow me to use a
> > memcache at gigabit speeds on my local network :-(
> 
> Then you shouldn't use WebSockets to talk to memcache on your local
> network.  WebSockets is not the solution to every problem.  For the
> important uses cases, 640 Mbps with today's CPUs is vastly more than
> enough.

But a frontal switch which has to process the frames in an internet
infrastructure will require a crypto card to handle the non-secure
version of websocket. Clearly that does not make much sense !

The same machine has no problem handling 10 Gbps of HTTP traffic.
640 Mbps of WS traffic for multi-megabytes frames is a very low
performance in my opinion for a 3 GHz processor ! Any server is
able to cope with that bandwidth for large frames.

Regards,
Willy


From ietf@adambarth.com  Sun Jan  9 16:29:55 2011
Return-Path: <ietf@adambarth.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 47B613A6862 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:29:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.91
X-Spam-Level: 
X-Spam-Status: No, score=-3.91 tagged_above=-999 required=5 tests=[AWL=-0.933,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 KsMzdeGYk-95 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:29:54 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 4FDF53A6855 for <hybi@ietf.org>; Sun,  9 Jan 2011 16:29:54 -0800 (PST)
Received: by qyk34 with SMTP id 34so982856qyk.10 for <hybi@ietf.org>; Sun, 09 Jan 2011 16:32:06 -0800 (PST)
Received: by 10.229.91.10 with SMTP id k10mr24084613qcm.141.1294619526189; Sun, 09 Jan 2011 16:32:06 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id s10sm15534847qco.11.2011.01.09.16.32.04 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 16:32:05 -0800 (PST)
Received: by iwn40 with SMTP id 40so19975488iwn.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 16:32:04 -0800 (PST)
Received: by 10.231.85.137 with SMTP id o9mr12048244ibl.27.1294619523971; Sun, 09 Jan 2011 16:32:03 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 16:31:33 -0800 (PST)
In-Reply-To: <20110110002533.GE5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <AANLkTik5BDTB-T8wbyXJF8iseSryfHgOATLDNc6HUz7k@mail.gmail.com> <20110110002533.GE5743@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 16:31:33 -0800
Message-ID: <AANLkTimFc52=zm245VNhZ0pymOSmyT4NnSxXxrsAEjgD@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 00:29:55 -0000

On Sun, Jan 9, 2011 at 4:25 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 09, 2011 at 04:20:25PM -0800, Adam Barth wrote:
>> On Sun, Jan 9, 2011 at 4:09 PM, Willy Tarreau <w@1wt.eu> wrote:
>> > I have reused Maciej's code for AES-128-CTR to make it emit a constant
>> > stream and look there for a supposedly processable request (which is
>> > valid since Apache processes it and transcodes it if it finds it at
>> > the beginning of the stream).
>> >
>> > willy@pcw:~/c$ time ./aes-128-ctr-get
>> > Found the 'GET\n' pattern on the wire after 1608425803 bytes
>> >
>> > real =A0 =A00m20.761s
>> > user =A0 =A00m20.761s
>> > sys =A0 =A0 0m0.000s
>> >
>> > It requires the client to send more data, but here we're only
>> > at 1.6 GB, roughly just 1000 times more than with the basic XOR
>> > method.
>> >
>> > However, it's limited to 640 Mbps only. It means that using this
>> > as a mandatory masking method will not even allow me to use a
>> > memcache at gigabit speeds on my local network :-(
>>
>> Then you shouldn't use WebSockets to talk to memcache on your local
>> network. =A0WebSockets is not the solution to every problem. =A0For the
>> important uses cases, 640 Mbps with today's CPUs is vastly more than
>> enough.
>
> But a frontal switch which has to process the frames in an internet
> infrastructure will require a crypto card to handle the non-secure
> version of websocket. Clearly that does not make much sense !
>
> The same machine has no problem handling 10 Gbps of HTTP traffic.
> 640 Mbps of WS traffic for multi-megabytes frames is a very low
> performance in my opinion for a 3 GHz processor ! Any server is
> able to cope with that bandwidth for large frames.

Somehow, we will survive.

Kind regards,
Adam

From gregw@intalio.com  Sun Jan  9 16:37:34 2011
Return-Path: <gregw@intalio.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 216A03A6855 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:37:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.928
X-Spam-Level: 
X-Spam-Status: No, score=-2.928 tagged_above=-999 required=5 tests=[AWL=0.049,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 GdP24tPRxgff for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:37:33 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 0BB0D3A6833 for <hybi@ietf.org>; Sun,  9 Jan 2011 16:37:32 -0800 (PST)
Received: by qwi2 with SMTP id 2so3561486qwi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 16:39:45 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.87.13 with SMTP id u13mr23837401qcl.55.1294619984931; Sun, 09 Jan 2011 16:39:44 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 9 Jan 2011 16:39:44 -0800 (PST)
In-Reply-To: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>
Date: Mon, 10 Jan 2011 01:39:44 +0100
X-Google-Sender-Auth: BYR6GexxIQvDk5kepPcmrpqvJb0
Message-ID: <AANLkTikTQ98ORhYJEK8LJCcjs9e4r_eKn1xr858mCnBn@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 00:37:34 -0000

On 9 January 2011 23:21, Adam Barth <ietf@adambarth.com> wrote:
> Gentle people of hybi,
>
> There's been a lot of good discussion in this working group gathering
> consensus around the data framing and the handshake. =A0At some point we
> need to declare victory and ship the protocol, otherwise proprietary
> solutions will continue to eat our lunch.
>
> I've written up a more formal version of Pat's proposal based on the
> recent straw poll and subsequent discussion. =A0This protocol is by no
> means perfect, but it's good enough:
>
> http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
>

I cannot agree this proposal.

I would only accept a cryptographic masking algorithm if it is applied
as an extension (mandatory for browsers) that can be replaced by other
algorithms
I would only accept stream based masking if it does not apply to framing.

If we were to follow John Tamplins prior proposal, then I'd accept
AES-128-CTR (or similar) if that was the consensus, but my preference
is still for something simpler.


regards

From fielding@gbiv.com  Sun Jan  9 16:40:08 2011
Return-Path: <fielding@gbiv.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 34DFB3A6855 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:40:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.168
X-Spam-Level: 
X-Spam-Status: No, score=-103.168 tagged_above=-999 required=5 tests=[AWL=-0.569, BAYES_00=-2.599, 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 4ZX+3Gl6mpuK for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:40:07 -0800 (PST)
Received: from homiemail-a34.g.dreamhost.com (caiajhbdccah.dreamhost.com [208.97.132.207]) by core3.amsl.com (Postfix) with ESMTP id 3FC333A6833 for <hybi@ietf.org>; Sun,  9 Jan 2011 16:40:07 -0800 (PST)
Received: from homiemail-a34.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a34.g.dreamhost.com (Postfix) with ESMTP id 7BC8A10062; Sun,  9 Jan 2011 16:42:19 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gbiv.com; h=subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to; q=dns; s=gbiv.com; b=qHjq3vW92AqsrBUJ nZx74XhYsZFpwvlpJeHOfjAQmIfoMRciInAiEb7dzdFhXm/hJn0aRAIFYOZyI1WX CEPcckmp3zXWVy9co3vlFTe9w0zOrOeZZGHlA834DQ2wmAa93kDsN6oE9A4PNXTW gso9Gy1ifF7gNAq/fck1qWO+/tI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gbiv.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=gbiv.com; bh=bXXhbY43lkCnShyodRhZN/apJis=; b=wZ0zVQqGPgnlR7vvEsOZ6sOqV9W0 g4cqv+OBW6MLlyrGHOsCAEEZxIWdI8aEvNXZ25tr7SItHjFye/5JKM8IpqP/Disr IokLJKa1vQC2FxzZA8glPr2yq4EdTd5JfSl1ucw+jVOgT9jz3CKqJf173shy5cT5 pyz4haAIgvt3f0g=
Received: from [192.168.1.84] (99-21-208-82.lightspeed.irvnca.sbcglobal.net [99.21.208.82]) (Authenticated sender: fielding@gbiv.com) by homiemail-a34.g.dreamhost.com (Postfix) with ESMTPA id 3215C1005D; Sun,  9 Jan 2011 16:42:19 -0800 (PST)
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset=us-ascii
From: "Roy T. Fielding" <fielding@gbiv.com>
In-Reply-To: <4D2A4738.2000500@gmx.de>
Date: Sun, 9 Jan 2011 16:42:28 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <A76D8525-91F2-43E7-96E9-778113FB128C@gbiv.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>	<20110109224228.GU5743@1wt.eu>	<AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com>	<20110109230229.GX5743@1wt.eu>	<0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com> <4D2A4738.2000500@gmx.de>
To: Julian Reschke <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.1082)
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Mon, 10 Jan 2011 00:40:08 -0000

On Jan 9, 2011, at 3:39 PM, Julian Reschke wrote:

> On 10.01.2011 00:09, Adam Barth wrote:
>> ...
>> Whether we use OPTIONS or GET is much less than 1% of the value
>> proposition of the WebSockets protocol.  Rather than optimizing that
>> part of the protocol, it's more important to pick something and go
>> with it.
>>=20
>> Honestly, I picked OPTIONS because it was the example given in
>> http://www.ietf.org/rfc/rfc2817.txt.
>> ...
>=20
> OPTIONS isn't special with respect to Upgrade. (*)
>=20
> My understanding is that the authors picked this example in order to =
avoid to let the server ignore the Upgrade request in GET, and then =
return the contents over an non-secured channel.
>=20
> Unless there's a specific reason why people think OPTIONS is better =
than GET here, we should stick with what was discussed before.

OPTIONS is the appropriate method to use when the client
does not want the action taken to be retrieval of a
representation, especially when the resource might be
subject to hit counting (like an advertisement).

OPTIONS is preferred when you don't want the server to
provide an old-version response during an Upgrade, since
it has no negative implications for a compliant server.
Websocket should use OPTIONS for HTTP if it is not going
to mint a new method of its own.

....Roy


From w@1wt.eu  Sun Jan  9 16:41:35 2011
Return-Path: <w@1wt.eu>
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 8399B3A6860 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:41:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.082
X-Spam-Level: 
X-Spam-Status: No, score=-2.082 tagged_above=-999 required=5 tests=[AWL=-0.039, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 KPiIXXu2+Ar1 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:41:34 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 41EED3A6833 for <hybi@ietf.org>; Sun,  9 Jan 2011 16:41:34 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A0hhVl010576; Mon, 10 Jan 2011 01:43:43 +0100
Date: Mon, 10 Jan 2011 01:43:43 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110110004343.GF5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <AANLkTik5BDTB-T8wbyXJF8iseSryfHgOATLDNc6HUz7k@mail.gmail.com> <20110110002533.GE5743@1wt.eu> <AANLkTimFc52=zm245VNhZ0pymOSmyT4NnSxXxrsAEjgD@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTimFc52=zm245VNhZ0pymOSmyT4NnSxXxrsAEjgD@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 00:41:35 -0000

On Sun, Jan 09, 2011 at 04:31:33PM -0800, Adam Barth wrote:
> On Sun, Jan 9, 2011 at 4:25 PM, Willy Tarreau <w@1wt.eu> wrote:
> > On Sun, Jan 09, 2011 at 04:20:25PM -0800, Adam Barth wrote:
> >> On Sun, Jan 9, 2011 at 4:09 PM, Willy Tarreau <w@1wt.eu> wrote:
> >> > I have reused Maciej's code for AES-128-CTR to make it emit a constant
> >> > stream and look there for a supposedly processable request (which is
> >> > valid since Apache processes it and transcodes it if it finds it at
> >> > the beginning of the stream).
> >> >
> >> > willy@pcw:~/c$ time ./aes-128-ctr-get
> >> > Found the 'GET\n' pattern on the wire after 1608425803 bytes
> >> >
> >> > real    0m20.761s
> >> > user    0m20.761s
> >> > sys     0m0.000s
> >> >
> >> > It requires the client to send more data, but here we're only
> >> > at 1.6 GB, roughly just 1000 times more than with the basic XOR
> >> > method.
> >> >
> >> > However, it's limited to 640 Mbps only. It means that using this
> >> > as a mandatory masking method will not even allow me to use a
> >> > memcache at gigabit speeds on my local network :-(
> >>
> >> Then you shouldn't use WebSockets to talk to memcache on your local
> >> network.  WebSockets is not the solution to every problem.  For the
> >> important uses cases, 640 Mbps with today's CPUs is vastly more than
> >> enough.
> >
> > But a frontal switch which has to process the frames in an internet
> > infrastructure will require a crypto card to handle the non-secure
> > version of websocket. Clearly that does not make much sense !
> >
> > The same machine has no problem handling 10 Gbps of HTTP traffic.
> > 640 Mbps of WS traffic for multi-megabytes frames is a very low
> > performance in my opinion for a 3 GHz processor ! Any server is
> > able to cope with that bandwidth for large frames.
> 
> Somehow, we will survive.

Adam, it's not a matter of surviving or not, it's a matter of spending
*all* the CPU cycles of a machine for something which is proven inefficient
against the use case it was introduced for in the first place. The reason
it is inefficient is not because of they crypto part, but precisely because
the use case is wrong ("a caching intermediary might seek a request anywhere
in the stream and for as long as possible").

It is possible that you planned to cover other vulnerabilities with this,
but since you posted a complete paper without any argument for each new
point, it's very hard to spot the reasons. We can just discover something
is here, there is no *why* to that.

Under these conditions, you can certainly expect that some people will
bother why we'd suddenly decide that the protocol will work that way
despite the costs when there is no explanation at all.

Regards,
Willy


From ietf@adambarth.com  Sun Jan  9 16:44:41 2011
Return-Path: <ietf@adambarth.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 074153A6860 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:44:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.904
X-Spam-Level: 
X-Spam-Status: No, score=-3.904 tagged_above=-999 required=5 tests=[AWL=-0.927, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 lLzZhsnNSWpe for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:44:40 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 0088C3A685A for <hybi@ietf.org>; Sun,  9 Jan 2011 16:44:39 -0800 (PST)
Received: by qwi2 with SMTP id 2so3564057qwi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 16:46:52 -0800 (PST)
Received: by 10.229.43.72 with SMTP id v8mr2968104qce.290.1294620410186; Sun, 09 Jan 2011 16:46:50 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id y17sm17035171qci.21.2011.01.09.16.46.48 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 16:46:49 -0800 (PST)
Received: by iyi42 with SMTP id 42so18912323iyi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 16:46:48 -0800 (PST)
Received: by 10.231.192.7 with SMTP id do7mr5919144ibb.102.1294620407988; Sun, 09 Jan 2011 16:46:47 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 16:46:17 -0800 (PST)
In-Reply-To: <AANLkTikTQ98ORhYJEK8LJCcjs9e4r_eKn1xr858mCnBn@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <AANLkTikTQ98ORhYJEK8LJCcjs9e4r_eKn1xr858mCnBn@mail.gmail.com>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 16:46:17 -0800
Message-ID: <AANLkTik0dLB_GKeAr8uKnF8QvOG53gETmTdgVWRaAT_s@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 00:44:41 -0000

On Sun, Jan 9, 2011 at 4:39 PM, Greg Wilkins <gregw@webtide.com> wrote:
> On 9 January 2011 23:21, Adam Barth <ietf@adambarth.com> wrote:
>> Gentle people of hybi,
>>
>> There's been a lot of good discussion in this working group gathering
>> consensus around the data framing and the handshake. =A0At some point we
>> need to declare victory and ship the protocol, otherwise proprietary
>> solutions will continue to eat our lunch.
>>
>> I've written up a more formal version of Pat's proposal based on the
>> recent straw poll and subsequent discussion. =A0This protocol is by no
>> means perfect, but it's good enough:
>>
>> http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
>
> I cannot agree this proposal.

Thanks for your feedback.  I'd encourage you not to implement this
protocol then.

Kind regards,
Adam

From w@1wt.eu  Sun Jan  9 16:44:57 2011
Return-Path: <w@1wt.eu>
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 8D4923A6860 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:44:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.081
X-Spam-Level: 
X-Spam-Status: No, score=-2.081 tagged_above=-999 required=5 tests=[AWL=-0.038, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 JXfyJwF++IAr for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:44:56 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 8217E3A685A for <hybi@ietf.org>; Sun,  9 Jan 2011 16:44:56 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A0l1aa010599; Mon, 10 Jan 2011 01:47:01 +0100
Date: Mon, 10 Jan 2011 01:47:01 +0100
From: Willy Tarreau <w@1wt.eu>
To: "Roy T. Fielding" <fielding@gbiv.com>
Message-ID: <20110110004701.GG5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com> <4D2A4738.2000500@gmx.de> <A76D8525-91F2-43E7-96E9-778113FB128C@gbiv.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <A76D8525-91F2-43E7-96E9-778113FB128C@gbiv.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Mon, 10 Jan 2011 00:44:57 -0000

On Sun, Jan 09, 2011 at 04:42:28PM -0800, Roy T. Fielding wrote:
> OPTIONS is the appropriate method to use when the client
> does not want the action taken to be retrieval of a
> representation, especially when the resource might be
> subject to hit counting (like an advertisement).
> 
> OPTIONS is preferred when you don't want the server to
> provide an old-version response during an Upgrade, since
> it has no negative implications for a compliant server.
> Websocket should use OPTIONS for HTTP if it is not going
> to mint a new method of its own.

Thanks for this precision Roy. However, my initial remark was more
for the "*" than OPTIONS itself (eventhough I mentally associated
them both).

"*" undoubtly has pros but it has cons too. A consensus was reached
on GET yesterday afer something like one month of poll. It's a bit
hard that a counter proposal is made the day after the consensus
that way.

Regards,
Willy


From w@1wt.eu  Sun Jan  9 16:49:26 2011
Return-Path: <w@1wt.eu>
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 899213A6860 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:49:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.081
X-Spam-Level: 
X-Spam-Status: No, score=-2.081 tagged_above=-999 required=5 tests=[AWL=-0.038, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 U2yIKM7aqIhX for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:49:25 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 9FFC43A685A for <hybi@ietf.org>; Sun,  9 Jan 2011 16:49:24 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A0pZqs010620; Mon, 10 Jan 2011 01:51:35 +0100
Date: Mon, 10 Jan 2011 01:51:35 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110110005135.GH5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <AANLkTikTQ98ORhYJEK8LJCcjs9e4r_eKn1xr858mCnBn@mail.gmail.com> <AANLkTik0dLB_GKeAr8uKnF8QvOG53gETmTdgVWRaAT_s@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTik0dLB_GKeAr8uKnF8QvOG53gETmTdgVWRaAT_s@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 00:49:26 -0000

On Sun, Jan 09, 2011 at 04:46:17PM -0800, Adam Barth wrote:
> On Sun, Jan 9, 2011 at 4:39 PM, Greg Wilkins <gregw@webtide.com> wrote:
> > On 9 January 2011 23:21, Adam Barth <ietf@adambarth.com> wrote:
> >> Gentle people of hybi,
> >>
> >> There's been a lot of good discussion in this working group gathering
> >> consensus around the data framing and the handshake.  At some point we
> >> need to declare victory and ship the protocol, otherwise proprietary
> >> solutions will continue to eat our lunch.
> >>
> >> I've written up a more formal version of Pat's proposal based on the
> >> recent straw poll and subsequent discussion.  This protocol is by no
> >> means perfect, but it's good enough:
> >>
> >> http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
> >
> > I cannot agree this proposal.
> 
> Thanks for your feedback.  I'd encourage you not to implement this
> protocol then.

Adam, excuse me, but you remained silent for the last days during
discussions where you could have brought many strong points, and
you suddenly come here acting as if you were the only one to decide
what will be in the final draft, and deliberately deciding to ignore
the WG's pariticipants' concerns.

I can understand that you had some work, I can understand that you're
fed up with things that are constantly delayed, but one reason it
takes so much time to move on here is that from time to time all that
was agreed upon is suddenly put upside down.

It's really not easy to work that way.

You really sound like you have a big hurry or you are afraid of something
imminent related to the protocol (you were talking about proprietary
designs in your first mail). If you have more info to put here, surely
will help people understand better your motives.

Thanks,
Willy


From julian.reschke@gmx.de  Sun Jan  9 16:54:02 2011
Return-Path: <julian.reschke@gmx.de>
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 7F7423A685C for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:54:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.381
X-Spam-Level: 
X-Spam-Status: No, score=-104.381 tagged_above=-999 required=5 tests=[AWL=-1.782, BAYES_00=-2.599, 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 jqj-i8lcgjw2 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 16:54:01 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 77B003A685A for <hybi@ietf.org>; Sun,  9 Jan 2011 16:53:59 -0800 (PST)
Received: (qmail invoked by alias); 10 Jan 2011 00:56:11 -0000
Received: from p508FD146.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.209.70] by mail.gmx.net (mp043) with SMTP; 10 Jan 2011 01:56:11 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX19vUVxHRsdvWd5jkWyuDNLLpF60BtE9nH7AosPJMn TTtBDzRuLLbwTR
Message-ID: <4D2A592B.3000404@gmx.de>
Date: Mon, 10 Jan 2011 01:56:11 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "Roy T. Fielding" <fielding@gbiv.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>	<20110109224228.GU5743@1wt.eu>	<AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com>	<20110109230229.GX5743@1wt.eu>	<0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com> <4D2A4738.2000500@gmx.de> <A76D8525-91F2-43E7-96E9-778113FB128C@gbiv.com>
In-Reply-To: <A76D8525-91F2-43E7-96E9-778113FB128C@gbiv.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Mon, 10 Jan 2011 00:54:02 -0000

On 10.01.2011 01:42, Roy T. Fielding wrote:
> ...
>> OPTIONS isn't special with respect to Upgrade. (*)
>>
>> My understanding is that the authors picked this example in order to avoid to let the server ignore the Upgrade request in GET, and then return the contents over an non-secured channel.
>>
>> Unless there's a specific reason why people think OPTIONS is better than GET here, we should stick with what was discussed before.
>
> OPTIONS is the appropriate method to use when the client
> does not want the action taken to be retrieval of a
> representation, especially when the resource might be
> subject to hit counting (like an advertisement).

Which would be relevant if the URI used for websockets *also* functions 
as something people could do a GET on and receive something useful 
(other than an error message explaining what's going on) -- I think that 
would be simple to avoid.

> OPTIONS is preferred when you don't want the server to
> provide an old-version response during an Upgrade, since
> it has no negative implications for a compliant server.
> Websocket should use OPTIONS for HTTP if it is not going
> to mint a new method of its own.

Ack. I have no problem with that as long as it's understood why the spec 
makes that choice.

For simplicity, the best *server* side choice IMHO is to treat Upgrade 
the same way for a given URI, no matter what what request method was.

Best regards, Julian


From brofield@gmail.com  Sun Jan  9 17:00:25 2011
Return-Path: <brofield@gmail.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 5BF3E3A6866 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 17:00:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.577
X-Spam-Level: 
X-Spam-Status: No, score=-2.577 tagged_above=-999 required=5 tests=[AWL=0.400,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 B-x0yHdLwpbV for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 17:00:22 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 0F4363A6862 for <hybi@ietf.org>; Sun,  9 Jan 2011 17:00:21 -0800 (PST)
Received: by qyj19 with SMTP id 19so20417466qyj.10 for <hybi@ietf.org>; Sun, 09 Jan 2011 17:02:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=a3Ly9wHChUGzObZDYgMue8XHfG2Wu9rjpP3lgmqcza8=; b=MiwGn7O5Rd6KGTD32oTskOShEskdhninvzAe5vk+jnxq9TS5mrSORE3p1pca79Ymla 5PJe1kGMZh+rBfHtnvXWQ+FcAfCdmahrImdJ+b1NSUuc9xBWxyQbcgCu3shUkhE+DkTm jXxdpMtWOsb4U0jcWL9fjeYF7Aw7SlY8ROErs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=JzaTxS80CH3P1M5Xsa/5dy41fhljDBQSSXJP6+OCdr1ruxvBgWnIeA97cJYiHe3hqn qxjeNR4uw9HuM+YaTNnUfaDYW1KBpqqa5t5jTCXTvDISfHq5kZ2wJ3tZfvsbVBb+tsOA CY2AL0+0od7psC3S/XstbxO0ljW9JlpdNBq+w=
MIME-Version: 1.0
Received: by 10.229.212.6 with SMTP id gq6mr24607470qcb.150.1294621353943; Sun, 09 Jan 2011 17:02:33 -0800 (PST)
Sender: brofield@gmail.com
Received: by 10.229.84.66 with HTTP; Sun, 9 Jan 2011 17:02:33 -0800 (PST)
In-Reply-To: <4D26DE2D.5040901@ericsson.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <4D26DE2D.5040901@ericsson.com>
Date: Mon, 10 Jan 2011 11:02:33 +1000
X-Google-Sender-Auth: g86CffozRLpk_Ny_tM56p9GQDLQ
Message-ID: <AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com>
From: Brodie Thiesfield <brodie@jellycan.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi@ietf.org
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Mon, 10 Jan 2011 01:00:25 -0000

I understand that this can be addressed later, however supporting peer
to peer in the protocol appears to only require a client to also
support the optional masking of the server responses.

In the case of a browser acting as the server, it will need to
implement the server side of things like handshake and unmasking
client messages. However, given that it is really also a client (with
the same unknown intermediataries, etc), I assume that it would be
desirable to have the same security protections as a simple client,
and so it would also want to send messages using masking.

As long as simple clients can also receive messages from a server with
masking enabled, then there appears to be no reason that peer to peer
wouldn't work with the same security guarantees (for the protocol)
that client->server does.

i.e.
client -> server = masked
server -> client = cleartext | masked

How the server notifies the client that it is going to send masked
responses remains unspecified.

Regards,
Brodie


On Fri, Jan 7, 2011 at 7:34 PM, Salvatore Loreto
<salvatore.loreto@ericsson.com> wrote:
> On 1/7/11 2:23 AM, John Tamplin wrote:
>
> On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <bruce@callenish.com> wrote:
>>
>> So far it appears that Greg, Brodie, Jerod, and I favour including
>> peer-to-peer design considerations in the spec. I am not sure, but it sounds
>> like John considers it out of scope and Scott considers it in scope. What
>> about the rest of you?
>
> I am not opposed to it exactly, but given how long everything has taken I am
> keen to keep the base protocol minimal so we can actually get something out
> the door.
>
> I agree with John,
> lets keep the base protocol minimal at moment.
> Once we have reached consensus on the minimal base protocol we can
> start to add other stuff on top of the minimal base.
>
> If there is consensus in doing something in the future we can track it in
> the issue tracker
> so we won't forget.
>
>
> cheers
> /Sal
>
> --
> Salvatore Loreto
> www.sloreto.com
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>

From fielding@gbiv.com  Sun Jan  9 17:15:39 2011
Return-Path: <fielding@gbiv.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 33DB23A686D for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 17:15:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.128
X-Spam-Level: 
X-Spam-Status: No, score=-103.128 tagged_above=-999 required=5 tests=[AWL=-0.529, BAYES_00=-2.599, 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 NcWCLA6O7Z+C for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 17:15:38 -0800 (PST)
Received: from homiemail-a66.g.dreamhost.com (caiajhbdcbhh.dreamhost.com [208.97.132.177]) by core3.amsl.com (Postfix) with ESMTP id 788F23A6868 for <hybi@ietf.org>; Sun,  9 Jan 2011 17:15:38 -0800 (PST)
Received: from homiemail-a66.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a66.g.dreamhost.com (Postfix) with ESMTP id 98AA5350078; Sun,  9 Jan 2011 17:17:50 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gbiv.com; h=subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to; q=dns; s=gbiv.com; b=TObTURDFsYr3XjLG HtGiPLVpbvHvdiwLb/gY2+zmC2US3rzvnPGB5MUHP0rPRvWTGsRTxv0W295B5HMT 2yRSt6o/lHQCkOrWwoTkkjD90FlL7MxbLZXaQYuyUxN/1TXr/+eOJevJ6uudA2oj PsNGsoRpn/xmyFA5KUD7aM0dszY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gbiv.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=gbiv.com; bh=VauROHMRKSYMvBZn1B4OxuDM8WQ=; b=c7ibLIthG3qzZvrCqZxb0zuzzR++ ptLlPQ2my1asXWpOo4GuvJuD70/OFAdJHQqrqxflIJ8mu8gAlO34RXtsbijIpfFB B0CQk6S5l9hta6vKVqTbgYaC2Ar9vA87RC4L9z0y5IIZR9GN6clxEvW2wPqMpWlh zB6lbTfgv+9ou9o=
Received: from [192.168.1.84] (99-21-208-82.lightspeed.irvnca.sbcglobal.net [99.21.208.82]) (Authenticated sender: fielding@gbiv.com) by homiemail-a66.g.dreamhost.com (Postfix) with ESMTPA id 76BFF350072;  Sun,  9 Jan 2011 17:17:50 -0800 (PST)
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset=us-ascii
From: "Roy T. Fielding" <fielding@gbiv.com>
In-Reply-To: <4D2A592B.3000404@gmx.de>
Date: Sun, 9 Jan 2011 17:17:59 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <02F6DC8B-7BFE-4EAA-B91A-7DBB3CD73A7E@gbiv.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>	<20110109224228.GU5743@1wt.eu>	<AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com>	<20110109230229.GX5743@1wt.eu>	<0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com> <4D2A4738.2000500@gmx.de> <A76D8525-91F2-43E7-96E9-778113FB128C@gbiv.com> <4D2A592B.3000404@gmx.de>
To: Julian Reschke <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.1082)
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Mon, 10 Jan 2011 01:15:39 -0000

On Jan 9, 2011, at 4:56 PM, Julian Reschke wrote:
> For simplicity, the best *server* side choice IMHO is to treat Upgrade =
the same way for a given URI, no matter what what request method was.

No, the value of upgrade is similar to conditional GETs:
asking for an optional improvement to the protocol without
costing an extra round trip.  The common case is a normal
GET request, and the server responds to that GET request
as its first message after the protocol is upgraded,
without any further bits needed from the client.

IOW, waka (or some future HTTP/2.0) can be bootstrapped
at near-zero cost with Upgrade because waka knows how
to respond to the semantics of GET.  The same applies to
any other valid HTTP method -- the server must provide a
valid answer to that request, in the syntax of the new
protocol, after the 101 is sent (see 2616 sec 14.42).

....Roy


From fielding@gbiv.com  Sun Jan  9 17:31:40 2011
Return-Path: <fielding@gbiv.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 665B228C0E7 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 17:31:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.092
X-Spam-Level: 
X-Spam-Status: No, score=-103.092 tagged_above=-999 required=5 tests=[AWL=-0.493, BAYES_00=-2.599, 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 G3KiVs-9MzEV for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 17:31:39 -0800 (PST)
Received: from homiemail-a63.g.dreamhost.com (jankymail-mx1.g.dreamhost.com [208.97.132.126]) by core3.amsl.com (Postfix) with ESMTP id 5969728C0E5 for <hybi@ietf.org>; Sun,  9 Jan 2011 17:31:39 -0800 (PST)
Received: from homiemail-a63.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a63.g.dreamhost.com (Postfix) with ESMTP id B93D82F4065; Sun,  9 Jan 2011 17:33:51 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gbiv.com; h=subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to; q=dns; s=gbiv.com; b=d4kOjG2y+A+ZzEF9 D6TVVn0OlqK6guBY0xfTauElLe8aDZaZ/VAg7ZmBz4tZjmNIvrkMbOCLV3m21BEy XrOnzeSoiYTZJXSwfImj8k/M72VtSGlKgZWDC4taXNh5WQKa/a8dIFsg8Uq0aXK0 eGqtvf2G1t8UpIQCR6LK1z51JJ4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gbiv.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=gbiv.com; bh=W+H02DfuMCGJyc9Yj0OwBkJZm54=; b=15rLzQuWFP3wZDGRpOFnpt3klpOn owfFF6/oWMFnVAWit3YbyS9xgDNe0GRNuKLXENK1F/C5VYJ0FoXMlZyagtZ+J5KA zlF3t7V4HKidTVUfi6IBLQx07s3mfgWwQiv1kV5jHkN85iHlviFWW5wESDwdKrnS H6pQEF0cEMpBTwo=
Received: from [192.168.1.84] (99-21-208-82.lightspeed.irvnca.sbcglobal.net [99.21.208.82]) (Authenticated sender: fielding@gbiv.com) by homiemail-a63.g.dreamhost.com (Postfix) with ESMTPA id A33ED2F4060;  Sun,  9 Jan 2011 17:33:49 -0800 (PST)
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset=us-ascii
From: "Roy T. Fielding" <fielding@gbiv.com>
In-Reply-To: <20110110004701.GG5743@1wt.eu>
Date: Sun, 9 Jan 2011 17:33:59 -0800
Content-Transfer-Encoding: 7bit
Message-Id: <FABB6AB4-DD5D-4982-94FC-05EC69996878@gbiv.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com> <4D2A4738.2000500@gmx.de> <A76D8525-91F2-43E7-96E9-778113FB128C@gbiv.com> <20110110004701.GG5743@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re:  It's time to ship)
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: Mon, 10 Jan 2011 01:31:40 -0000

On Jan 9, 2011, at 4:47 PM, Willy Tarreau wrote:
> "*" undoubtly has pros but it has cons too. A consensus was reached
> on GET yesterday afer something like one month of poll. It's a bit
> hard that a counter proposal is made the day after the consensus
> that way.

Yes, it's a bit hard.  OTOH, the poll was nonsense because it
conflated multiple undesirable options, and I ignored it as such.

In any case, the IETF does not make decisions by polling.  

What we are looking for is rough consensus and running code,
and it is quite clear that we don't have either one at the moment.
We should not be making any decisions -- we should be in bake-off
mode.

....Roy


From ietf@adambarth.com  Sun Jan  9 17:40:15 2011
Return-Path: <ietf@adambarth.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 9D9B128C0E3 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 17:40:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.897
X-Spam-Level: 
X-Spam-Status: No, score=-3.897 tagged_above=-999 required=5 tests=[AWL=-0.920, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 aT7ih0b8pd1L for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 17:40:14 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id B345C28C0DB for <hybi@ietf.org>; Sun,  9 Jan 2011 17:40:14 -0800 (PST)
Received: by qwi2 with SMTP id 2so3588350qwi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 17:42:26 -0800 (PST)
Received: by 10.229.95.11 with SMTP id b11mr2054126qcn.28.1294623746792; Sun, 09 Jan 2011 17:42:26 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id q12sm17073550qcu.30.2011.01.09.17.42.25 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 17:42:25 -0800 (PST)
Received: by iyi42 with SMTP id 42so18938406iyi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 17:42:24 -0800 (PST)
Received: by 10.231.147.149 with SMTP id l21mr11954095ibv.152.1294623744415; Sun, 09 Jan 2011 17:42:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 17:41:54 -0800 (PST)
In-Reply-To: <FABB6AB4-DD5D-4982-94FC-05EC69996878@gbiv.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com> <4D2A4738.2000500@gmx.de> <A76D8525-91F2-43E7-96E9-778113FB128C@gbiv.com> <20110110004701.GG5743@1wt.eu> <FABB6AB4-DD5D-4982-94FC-05EC69996878@gbiv.com>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 17:41:54 -0800
Message-ID: <AANLkTimeY5+xcDo8OK0tP-0WANm3YjW42qk8FBWx_r_a@mail.gmail.com>
To: "Roy T. Fielding" <fielding@gbiv.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re: It's time to ship)
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: Mon, 10 Jan 2011 01:40:15 -0000

On Sun, Jan 9, 2011 at 5:33 PM, Roy T. Fielding <fielding@gbiv.com> wrote:
> On Jan 9, 2011, at 4:47 PM, Willy Tarreau wrote:
>> "*" undoubtly has pros but it has cons too. A consensus was reached
>> on GET yesterday afer something like one month of poll. It's a bit
>> hard that a counter proposal is made the day after the consensus
>> that way.
>
> Yes, it's a bit hard. =A0OTOH, the poll was nonsense because it
> conflated multiple undesirable options, and I ignored it as such.
>
> In any case, the IETF does not make decisions by polling.
>
> What we are looking for is rough consensus and running code,
> and it is quite clear that we don't have either one at the moment.
> We should not be making any decisions -- we should be in bake-off
> mode.

Perhaps I should have titled my message "it's time to bake."  :)

Adam

From bruce@callenish.com  Sun Jan  9 17:45:08 2011
Return-Path: <bruce@callenish.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 B6EF028C0EB for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 17:45:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.582
X-Spam-Level: 
X-Spam-Status: No, score=-2.582 tagged_above=-999 required=5 tests=[AWL=0.017,  BAYES_00=-2.599]
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 RBfJoi3UQMZ6 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 17:45:08 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id EF6AB28C0E3 for <hybi@ietf.org>; Sun,  9 Jan 2011 17:45:07 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pc6qt-00023v-2J for hybi@ietf.org; Sun, 09 Jan 2011 17:47:19 -0800
Message-ID: <4D2A6526.5050800@callenish.com>
Date: Sun, 09 Jan 2011 17:47:18 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <4D2A4FFE.6000503@callenish.com> <AANLkTim273LNAK8SQOAYgzu3QpenaDzFVsUES_nrwGmF@mail.gmail.com>
In-Reply-To: <AANLkTim273LNAK8SQOAYgzu3QpenaDzFVsUES_nrwGmF@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Summary of issues concerning the default masking algorithm
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: Mon, 10 Jan 2011 01:45:08 -0000

Hi, Greg.

These seem to be questions about where to apply masking rather than 
issues with the masking algorithm itself. I was thinking they deserve 
their own thread, but if you think they are better discussed here then 
let us consider the costs and benefits of each, and where people think 
the right trade-off can be found.

On 09/01/2011 4:24 PM, Greg Wilkins wrote:
> Bruce,
>
> there are also proposed  features of:
>
>    e) masking the framing as well as the payload.
>
>    f) making masking use the current frame extension mechanism
>
>   g) make masking be a negotiated extension (either to turn it on or off)


From Martin.Thomson@andrew.com  Sun Jan  9 18:19:09 2011
Return-Path: <Martin.Thomson@andrew.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 B110628C0E3 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 18:19:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.543
X-Spam-Level: 
X-Spam-Status: No, score=-2.543 tagged_above=-999 required=5 tests=[AWL=0.056,  BAYES_00=-2.599]
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 HFbewgyzRlc7 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 18:19:08 -0800 (PST)
Received: from csmailgw1.commscope.com (csmailgw1.commscope.com [198.135.207.244]) by core3.amsl.com (Postfix) with ESMTP id C3B0828C0E8 for <hybi@ietf.org>; Sun,  9 Jan 2011 18:19:08 -0800 (PST)
Received: from [10.86.20.102] ([10.86.20.102]:57363 "EHLO ACDCE7HC1.commscope.com") by csmailgw1.commscope.com with ESMTP id S41081441Ab1AJCVU (ORCPT <rfc822;hybi@ietf.org>); Sun, 9 Jan 2011 20:21:20 -0600
Received: from SISPE7HC1.commscope.com (10.97.4.12) by ACDCE7HC1.commscope.com (10.86.20.102) with Microsoft SMTP Server (TLS) id 8.3.137.0; Sun, 9 Jan 2011 20:21:20 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC1.commscope.com ([fe80::8a9:4724:f6bb:3cdf%10]) with mapi; Mon, 10 Jan 2011 10:21:17 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Willy Tarreau <w@1wt.eu>, Hybi <hybi@ietf.org>
Date: Mon, 10 Jan 2011 10:21:16 +0800
Thread-Topic: [hybi] AES-128-CTR not much safer, but not fast either
Thread-Index: AcuwWp3tCD+5RqxfRIy4nMoyQjMGjgAEgOWQ
Message-ID: <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com>
References: <20110110000908.GD5743@1wt.eu>
In-Reply-To: <20110110000908.GD5743@1wt.eu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw1.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 02:19:09 -0000

T24gMjAxMS0wMS0xMCBhdCAxMTowOTowOCwgV2lsbHkgVGFycmVhdSB3cm90ZToNCj4gd2lsbHlA
cGN3On4vYyQgdGltZSAuL2Flcy0xMjgtY3RyLWdldA0KPiBGb3VuZCB0aGUgJ0dFVFxuJyBwYXR0
ZXJuIG9uIHRoZSB3aXJlIGFmdGVyIDE2MDg0MjU4MDMgYnl0ZXMNCg0KWW91IG1pZ2h0IGFsc28g
ZmluZCB0aGUgY29sbGVjdGVkIHdvcmtzIG9mIFNoYWtlc3BlYXJlIGluIHRoZSBieXRlIHN0cmVh
bSBoYWQgeW91IHdhaXRlZCBhIGxpdHRsZSBsb25nZXIuICBJJ20gbm90IHN1cmUgd2hhdCB5b3Ug
YXJlIGhvcGluZyB0byBwcm92ZSBieSBzZWFyY2hpbmcuDQo=

From bruce@callenish.com  Sun Jan  9 18:30:15 2011
Return-Path: <bruce@callenish.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 79E3128C0E3 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 18:30:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.583
X-Spam-Level: 
X-Spam-Status: No, score=-2.583 tagged_above=-999 required=5 tests=[AWL=0.016,  BAYES_00=-2.599]
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 Lc6kVu32WTlK for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 18:30:14 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 266C628C0D9 for <hybi@ietf.org>; Sun,  9 Jan 2011 18:30:14 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pc7YX-0003eU-9r for hybi@ietf.org; Sun, 09 Jan 2011 18:32:25 -0800
Message-ID: <4D2A6FB9.1030005@callenish.com>
Date: Sun, 09 Jan 2011 18:32:25 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D2A4FFE.6000503@callenish.com>
In-Reply-To: <4D2A4FFE.6000503@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Summary of issues concerning the default masking algorithm
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: Mon, 10 Jan 2011 02:30:15 -0000

Here is where I currently stand on the trade-offs in costs versus 
benefits from the 4 features I've listed. This is absent an actual list 
of the benefits being provided by anyone else nor of any feedback on the 
costs, so it is perhaps premature. This is my current perspective, though.

> For feature a, the only cost I can see is in the increase in 
> complexity in generating the mask.

I don't understand the benefit, but the cost seems so minimal I can't 
see why it would be a problem.

>
> For feature b, there is the increase in complexity in generating the 
> mask as well as the fact that you can not send a payload with the 
> initial handshake from the client because you do not yet have the 
> server nonce.

The benefit I can see to this is that it prevents an attacker from 
faking a websocket connection by laying down what looks like perfectly 
valid websocket frames. Without the server nonce, this won't be possible 
because the masks generated by the attacker will not show the influence 
of the server nonce on them.

The cost seems pretty minimal to me in order to get that guarantee.

>
> The principal cost of feature c that I can see is that it stops tools 
> like wireshark from being able to decode streams.

The benefit that I can see with this feature is that it will force the 
server to pay attention to whether the server nonce was used to generate 
the mask, since the server will need to generate the mask itself by 
using the nonce.

The cost of losing the ability to decode streams is, to me, extremely 
high. It is beyond that, it is painful. When I have to debug a network 
issue in a customer's environment, a problem that would take me a few 
hours with a decoded stream jumps to days or even weeks. What is worse 
is that it is often difficult if not impossible to demonstrate to the 
customer when the issue is not with my application. Although I can 
create multitudes of logs that show all the bits my application receives 
and sends, the customer has no way of knowing whether there are bits 
that are not logged because they are dealt with via another code path.

Also, without having a decoded stream it can be very difficult to 
pinpoint where in a customer's network the actual problem is arising. 
This is another case of "not my fault, still my problem". If my 
application doesn't work in the customer's environment then I lose the 
customer. Whenever I have to deal with an encrypted stream I groan in agony.

So the benefits would have to be pretty high for me to consider this a 
good trade-off to make. The benefit I listed above doesn't make it.

>
> The cost of feature d is increased complexity in implementation and 
> added computational cost.

I have no idea what the benefit to this is, but I trust that the people 
arguing about it have a reason for believing there is one and I hope 
they describe it here in simple words I can understand.

I find it interesting how we have gone from requiring the simplest of 
possible Websocket servers to ones that require teasing out highly 
optimized versions of HMAC from other libraries. I think that keeping 
things as simple to implement as possible is the sensible thing to do, 
but I am uncertain about what definition to give "possible".

I don't have the expertise to properly evaluate the computational cost. 
Willy seems to know a lot about the subject, though, so he has my proxy. 
If Willy is convinced it is worth it then so am I.


From ekr@rtfm.com  Sun Jan  9 18:36:09 2011
Return-Path: <ekr@rtfm.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 6F8F028C0E4 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 18:36:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.652
X-Spam-Level: 
X-Spam-Status: No, score=-101.652 tagged_above=-999 required=5 tests=[AWL=0.551, BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_LOW=-1, 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 fpiVQcSh1o88 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 18:36:08 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id 36B1828C0D9 for <hybi@ietf.org>; Sun,  9 Jan 2011 18:36:07 -0800 (PST)
Received: by gyd12 with SMTP id 12so8098717gyd.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 18:38:19 -0800 (PST)
Received: by 10.91.196.17 with SMTP id y17mr5944626agp.207.1294627099142; Sun, 09 Jan 2011 18:38:19 -0800 (PST)
Received: from [10.58.83.125] ([166.205.138.101]) by mx.google.com with ESMTPS id b27sm36949604ana.8.2011.01.09.18.38.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 18:38:18 -0800 (PST)
References: <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <670C37A1-B413-49C0-8C47-E2E06DB447ED@apple.com> <20110107185801.GB32612@1wt.eu> <AANLkTinLf4z9S0EatVRi5ZdeEPcuJrOmvn6cpAELtf2w@mail.gmail.com> <20110107203958.GC32612@1wt.eu> <AANLkTinWX4k2mbGqK5qbiVtCTATC38xKJApLHCEuce85@mail.gmail.com> <4D28DF6E.4080003@callenish.com> <AANLkTikhgk7yRoC1K37QetW-7ZHw8G26WZVUs7fM2y=J@mail.gmail.com> <4D2A307C.3080109@callenish.com> <AANLkTimv-1DV=ZVyzSSaDHTsVGaRHm8kNPjWNVW5_a1G@mail.gmail.com> <4D2A48BB.5020400@callenish.com>
In-Reply-To: <4D2A48BB.5020400@callenish.com>
Mime-Version: 1.0 (iPhone Mail 8C148a)
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=us-ascii
Message-Id: <54845921-0C87-41B2-A2FC-6D1F3F6B7815@rtfm.com>
X-Mailer: iPhone Mail (8C148a)
From: Eric Rescorla <ekr@rtfm.com>
Date: Sun, 9 Jan 2011 18:38:05 -0800
To: Bruce Atherton <bruce@callenish.com>
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Mon, 10 Jan 2011 02:36:09 -0000

What I am saying is that the crypto in tls generally doesn't provide any pro=
tection here because absent masking the attacker can produce predictable cip=
hertext. Maybe that is orthogonal to your point but I thought it was worth n=
oting

Ekr

On Jan 9, 2011, at 15:46, Bruce Atherton <bruce@callenish.com> wrote:

> I apologize if I am being thick, but I still don't understand.
>=20
> It is my understanding that the masking algorithms which have been previou=
sly suggested prevent the attacker from controlling the payload bits on the w=
ire from within a browser using Websockets without the added burden of being=
 cryptographically secure. I had thought that you were arguing that the atta=
cker could still control patterns in the bits, but not the bits themselves. T=
hat seemed like a reasonable thing for the ws: scheme to allow, to me, since=
 by design it is a lighter weight, less secure form of Websockets and there h=
ave never been any exploits that relied on that characteristic that anyone h=
as mentioned so far. Now it sounds like you are arguing that an attacker can=
 completely control the bits no matter what unless it is cryptographically s=
ecure.
>=20
> I'm sure I'm missing something, but I haven't a clue what it is.
>=20
> On 09/01/2011 2:16 PM, Eric Rescorla wrote:
>> It's not a matter of random versus non-random. RC4 and AES-CTR without ra=
ndom IV
>> (which is not a requirement of the standard) provide the attacker with
>> complete control over
>> the payload bits on the wire, beause he can predict the keystream.
>=20
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi

From ekr@rtfm.com  Sun Jan  9 18:37:01 2011
Return-Path: <ekr@rtfm.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 96BE628C0E8 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 18:37:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.836
X-Spam-Level: 
X-Spam-Status: No, score=-101.836 tagged_above=-999 required=5 tests=[AWL=0.367, BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_LOW=-1, 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 MQY6i7fl+bBs for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 18:37:00 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id E4B4D28C0D9 for <hybi@ietf.org>; Sun,  9 Jan 2011 18:36:59 -0800 (PST)
Received: by gwj17 with SMTP id 17so10030268gwj.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 18:39:12 -0800 (PST)
Received: by 10.100.172.7 with SMTP id u7mr9662482ane.176.1294627151992; Sun, 09 Jan 2011 18:39:11 -0800 (PST)
Received: from [10.58.83.125] ([166.205.138.101]) by mx.google.com with ESMTPS id b27sm36949604ana.8.2011.01.09.18.39.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 18:39:11 -0800 (PST)
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <4D26DE2D.5040901@ericsson.com> <AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com>
In-Reply-To: <AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com>
Mime-Version: 1.0 (iPhone Mail 8C148a)
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=us-ascii
Message-Id: <B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com>
X-Mailer: iPhone Mail (8C148a)
From: Eric Rescorla <ekr@rtfm.com>
Date: Sun, 9 Jan 2011 18:39:01 -0800
To: Brodie Thiesfield <brodie@jellycan.com>
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Mon, 10 Jan 2011 02:37:01 -0000

Not really. Meaningful p2p operation requires nat traversal

Ekr

On Jan 9, 2011, at 17:02, Brodie Thiesfield <brodie@jellycan.com> wrote:

> I understand that this can be addressed later, however supporting peer
> to peer in the protocol appears to only require a client to also
> support the optional masking of the server responses.
>=20
> In the case of a browser acting as the server, it will need to
> implement the server side of things like handshake and unmasking
> client messages. However, given that it is really also a client (with
> the same unknown intermediataries, etc), I assume that it would be
> desirable to have the same security protections as a simple client,
> and so it would also want to send messages using masking.
>=20
> As long as simple clients can also receive messages from a server with
> masking enabled, then there appears to be no reason that peer to peer
> wouldn't work with the same security guarantees (for the protocol)
> that client->server does.
>=20
> i.e.
> client -> server =3D masked
> server -> client =3D cleartext | masked
>=20
> How the server notifies the client that it is going to send masked
> responses remains unspecified.
>=20
> Regards,
> Brodie
>=20
>=20
> On Fri, Jan 7, 2011 at 7:34 PM, Salvatore Loreto
> <salvatore.loreto@ericsson.com> wrote:
>> On 1/7/11 2:23 AM, John Tamplin wrote:
>>=20
>> On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <bruce@callenish.com> wrot=
e:
>>>=20
>>> So far it appears that Greg, Brodie, Jerod, and I favour including
>>> peer-to-peer design considerations in the spec. I am not sure, but it so=
unds
>>> like John considers it out of scope and Scott considers it in scope. Wha=
t
>>> about the rest of you?
>>=20
>> I am not opposed to it exactly, but given how long everything has taken I=
 am
>> keen to keep the base protocol minimal so we can actually get something o=
ut
>> the door.
>>=20
>> I agree with John,
>> lets keep the base protocol minimal at moment.
>> Once we have reached consensus on the minimal base protocol we can
>> start to add other stuff on top of the minimal base.
>>=20
>> If there is consensus in doing something in the future we can track it in=

>> the issue tracker
>> so we won't forget.
>>=20
>>=20
>> cheers
>> /Sal
>>=20
>> --
>> Salvatore Loreto
>> www.sloreto.com
>>=20
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>>=20
>>=20
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi

From brofield@gmail.com  Sun Jan  9 18:58:04 2011
Return-Path: <brofield@gmail.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 EAC8028C0E8 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 18:58:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.644
X-Spam-Level: 
X-Spam-Status: No, score=-2.644 tagged_above=-999 required=5 tests=[AWL=0.333,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 9yrtW02dm9VD for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 18:58:02 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 91F3128C0D9 for <hybi@ietf.org>; Sun,  9 Jan 2011 18:58:02 -0800 (PST)
Received: by qwi2 with SMTP id 2so3623578qwi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 19:00:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=uYl7t/OJQ8npf4D7fDYBKRPPYSp9s5OzeVgFVJRLlmY=; b=iF9uAcBkj+gnvW9279Ma/+2TlOyhOEESMhbqX8D6T71xRUYFQ/dAjhhsa39Fkw+uYG Ra9sFl6REN9RHCOo+iemq5lVVy9xlholenG8FzxZreLwZ/VcjL/Y4VETf3w0NYziEqxK CDK2ZqukZ7wkUOc2N3UDQgdPDJ+x7zgqPhnq8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=uvkNZfMK6z4mDVlZ+6RBbh1eYS/AVDx6FX90RSk4UZrUPOTRuaqVu7jVt2QeHF5xOM Dr26Fc5ZMjAG2NSHj6aNo0Ryy/iqSTQOT4ILxLikfpd+loUKpW1nBe+IOcGdSbao1x8x QKFdLvr4/yL/WTGVat+An+va6Oml0BoVlnhUs=
MIME-Version: 1.0
Received: by 10.229.229.200 with SMTP id jj8mr14739746qcb.74.1294628414865; Sun, 09 Jan 2011 19:00:14 -0800 (PST)
Sender: brofield@gmail.com
Received: by 10.229.84.66 with HTTP; Sun, 9 Jan 2011 19:00:14 -0800 (PST)
In-Reply-To: <B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <4D26DE2D.5040901@ericsson.com> <AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com> <B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com>
Date: Mon, 10 Jan 2011 12:00:14 +0900
X-Google-Sender-Auth: nQCRGmbCyqI_x62-SOIeTfhfPe0
Message-ID: <AANLkTi=mobwinB_+oxznk4cpnQstBHjHb-9orpeVS8Wo@mail.gmail.com>
From: Brodie Thiesfield <brodie@jellycan.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Mon, 10 Jan 2011 02:58:04 -0000

Where clients aren't behind NAT a direct connection can be used, when
they are then a central hub relay. More complex schemes could be added
later, however simply trying for a direct connection and falling back
to a central relay is possible with the existing protocol.

However this problem is solved though, we will still have a client is
acting as a server and (I am assuming) that client will still want to
send masked data too. In the case of direct connection, where no
central server can modify the data stream, the client on the other end
must unmask the data coming from the server. So the most basic support
for p2p with the current protocol maintaining security guarantees
would only require a client to be able to accept either masked or
unmasked responses from the server.

The security paranoid could then also optionally configure a server to
send masked responses (if supported).

Regards,
Brodie


On Mon, Jan 10, 2011 at 11:39 AM, Eric Rescorla <ekr@rtfm.com> wrote:
> Not really. Meaningful p2p operation requires nat traversal
>
> Ekr
>
> On Jan 9, 2011, at 17:02, Brodie Thiesfield <brodie@jellycan.com> wrote:
>
>> I understand that this can be addressed later, however supporting peer
>> to peer in the protocol appears to only require a client to also
>> support the optional masking of the server responses.
>>
>> In the case of a browser acting as the server, it will need to
>> implement the server side of things like handshake and unmasking
>> client messages. However, given that it is really also a client (with
>> the same unknown intermediataries, etc), I assume that it would be
>> desirable to have the same security protections as a simple client,
>> and so it would also want to send messages using masking.
>>
>> As long as simple clients can also receive messages from a server with
>> masking enabled, then there appears to be no reason that peer to peer
>> wouldn't work with the same security guarantees (for the protocol)
>> that client->server does.
>>
>> i.e.
>> client -> server = masked
>> server -> client = cleartext | masked
>>
>> How the server notifies the client that it is going to send masked
>> responses remains unspecified.
>>
>> Regards,
>> Brodie
>>
>>
>> On Fri, Jan 7, 2011 at 7:34 PM, Salvatore Loreto
>> <salvatore.loreto@ericsson.com> wrote:
>>> On 1/7/11 2:23 AM, John Tamplin wrote:
>>>
>>> On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <bruce@callenish.com> wrote:
>>>>
>>>> So far it appears that Greg, Brodie, Jerod, and I favour including
>>>> peer-to-peer design considerations in the spec. I am not sure, but it sounds
>>>> like John considers it out of scope and Scott considers it in scope. What
>>>> about the rest of you?
>>>
>>> I am not opposed to it exactly, but given how long everything has taken I am
>>> keen to keep the base protocol minimal so we can actually get something out
>>> the door.
>>>
>>> I agree with John,
>>> lets keep the base protocol minimal at moment.
>>> Once we have reached consensus on the minimal base protocol we can
>>> start to add other stuff on top of the minimal base.
>>>
>>> If there is consensus in doing something in the future we can track it in
>>> the issue tracker
>>> so we won't forget.
>>>
>>>
>>> cheers
>>> /Sal
>>>
>>> --
>>> Salvatore Loreto
>>> www.sloreto.com
>>>
>>> _______________________________________________
>>> hybi mailing list
>>> hybi@ietf.org
>>> https://www.ietf.org/mailman/listinfo/hybi
>>>
>>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>

From ifette@google.com  Sun Jan  9 22:06:07 2011
Return-Path: <ifette@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 519443A6A06 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:06:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.121
X-Spam-Level: 
X-Spam-Status: No, score=-104.121 tagged_above=-999 required=5 tests=[AWL=-1.445, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 NfON1crOI6xc for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:06:05 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id AEA283A6A03 for <hybi@ietf.org>; Sun,  9 Jan 2011 22:06:05 -0800 (PST)
Received: from kpbe20.cbf.corp.google.com (kpbe20.cbf.corp.google.com [172.25.105.84]) by smtp-out.google.com with ESMTP id p0A68HxA008263 for <hybi@ietf.org>; Sun, 9 Jan 2011 22:08:17 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294639698; bh=FviWSME5MySLv+E4kh/pyQZVlPE=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=sh01qf3yjFaHevucL0zFqkkKrvOnSzyEOsvAIuMKw6UB094pRmQNjxKfyYggPLYs9 whdTm0GyVIncspTIESVYg==
Received: from qwa26 (qwa26.prod.google.com [10.241.193.26]) by kpbe20.cbf.corp.google.com with ESMTP id p0A68GpP027242 for <hybi@ietf.org>; Sun, 9 Jan 2011 22:08:16 -0800
Received: by qwa26 with SMTP id 26so19351173qwa.14 for <hybi@ietf.org>; Sun, 09 Jan 2011 22:08:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=IY1l8zFxKHfXfHFnclcoeJsQoiZly0/BugxxhaVwruk=; b=omSGboPZ0oosE7u2d11y2vguKFqy2SZHWi4X1roemJeiruv2oyOKTSmio9kz0OaA21 m3K+AwJwd7Lt6Rt0OEWA==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=dNt1SJrJjeYfZsBpt0WJdS/tpf8L3m6YZudkVnBeElR9eJY6TNVnirAzH3J/kWCrr3 cldzCiEwnUQqrJqqo7Rw==
MIME-Version: 1.0
Received: by 10.229.251.137 with SMTP id ms9mr1570qcb.188.1294639693623; Sun, 09 Jan 2011 22:08:13 -0800 (PST)
Received: by 10.229.0.137 with HTTP; Sun, 9 Jan 2011 22:08:13 -0800 (PST)
In-Reply-To: <20110109224228.GU5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu>
Date: Sun, 9 Jan 2011 22:08:13 -0800
Message-ID: <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=00163630feb30d29c3049977cb0d
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Mon, 10 Jan 2011 06:06:07 -0000

--00163630feb30d29c3049977cb0d
Content-Type: text/plain; charset=UTF-8

On Sun, Jan 9, 2011 at 2:42 PM, Willy Tarreau <w@1wt.eu> wrote:

> Hello Adam,
>
> On Sun, Jan 09, 2011 at 02:21:44PM -0800, Adam Barth wrote:
> > Gentle people of hybi,
> >
> > There's been a lot of good discussion in this working group gathering
> > consensus around the data framing and the handshake.  At some point we
> > need to declare victory and ship the protocol, otherwise proprietary
> > solutions will continue to eat our lunch.
> >
> > I've written up a more formal version of Pat's proposal based on the
> > recent straw poll and subsequent discussion.  This protocol is by no
> > means perfect, but it's good enough:
> >
> > http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
>
> It would help a lot other WG participants if you could present suggestions,
> ideas and changes instead of a full proposal. It's hard to spot the
> proposed
> changes.
>
> At first glance, I'm noticing a few things :
>
>  - you're using the OPTIONS method. The WG's consensus was voted as using
>    GET. While technically working, OPTIONS limits some possibilities since
>    no path is sent to the server.
>
>
I agree it is important to be able to identify between various resources on
a server. E.g. for our use, we will have multiple different websocket
endpoints, and we want our frontend to be able to dispatch to the
appropriate backend based on the information in the handshake. That said, I
think the draft allows for that (Sec-WebSocket-URL), or as pointed out on
another thread, it appears OPTIONS does allow for a path component. So, I
think we should be able to resolve that point.


>  - your proposal involves AES-128-CTR. As was discussed here, it seems
> there
>    are still export regulations for certain countries eventhough they're
>    apparently fading out. It could still be a problem for companies who
> want
>    to export products to some countries and which never had to put crypto
> in
>    them.
>

It would be nice to understand if this is actually a hard constraint.
AES-128-CTR has the benefit of being well understood, as well as fast, as
demonstrated by Maciej in another thread. That said, I don't care strongly
one way or another here.


>
>  - several people on the list asked for the ability to be able to disable
>    the masking in some well-controlled environments (eg: server-to-server
>    communications). I see no provisions for this.
>
>
There's nothing that would prevent you from writing an extension that would
disable the masking, from my understanding.


>  - it has not yet been stated whether only the payload or also the framing
>    should be masked. Your proposal masks both, which means that it
> definitely
>    blocks any possibility of performing multiplexing later. There does not
>    appear to have been a consensus in this area yet.
>
>
I'm not sure why this would block the possibility of multiplexing. I would
agree that would be a problem if it were the case. However, a number of the
early proposals for multiplexing included something like a stream-id in the
frame. This could still be present. Though it would be masked, so would the
length and other things that a meaningful intermediary would care about, so
assuming the intermediary was capable of un-masking, is this an issue?


>  - is was suggested that some (all ?) of the nonces could go away if
> masking
>    is used. Surely this is something that needs to be rechecked.
>

 - Greg proposed to replace the MORE bit with a FIN bit so that the first
>    hello frame from the server starts with a high bit set, thus ensuring
>    that we can break the connection on non-HTTP compliant intermediaries
>    which would expect a second response after the 101.
>
>
The draft Adam sent out is based on an intermediate version I had checked
into SVN, back when it looked like we were gaining speed on CONNECT. I
didn't yet get around to flipping MORE/FIN, but I don't have any ojbections
to this.


> Those are just a few notes, it's really not easy to changes :-/
>

There's a tool on the IETF to diff drafts. I find it quite helpful, that
said, a lot of text has changed because I had already started to make other
requested changes (including trying to resolve the HTTP compliance issue, by
stating the requirements of the handshake rather than stating send X bytes,
send Y bytes, ...). This makes the diff a bit harder to interpret, for sure.

That said, I do hope that this can spur some more targeted conversations and
drive progress.


>
> Thanks for this work,
> Willy
>
>
>
> >
> > As a working group, it's time to ship.
> >
> > Kind regards,
> > Adam
> > _______________________________________________
> > hybi mailing list
> > hybi@ietf.org
> > https://www.ietf.org/mailman/listinfo/hybi
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--00163630feb30d29c3049977cb0d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sun, Jan 9, 2011 at 2:42 PM, Willy Tarreau <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wro=
te:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-=
left:1px #ccc solid;padding-left:1ex;">
Hello Adam,<br>
<div class=3D"im"><br>
On Sun, Jan 09, 2011 at 02:21:44PM -0800, Adam Barth wrote:<br>
&gt; Gentle people of hybi,<br>
&gt;<br>
&gt; There&#39;s been a lot of good discussion in this working group gather=
ing<br>
&gt; consensus around the data framing and the handshake. =C2=A0At some poi=
nt we<br>
&gt; need to declare victory and ship the protocol, otherwise proprietary<b=
r>
&gt; solutions will continue to eat our lunch.<br>
&gt;<br>
&gt; I&#39;ve written up a more formal version of Pat&#39;s proposal based =
on the<br>
&gt; recent straw poll and subsequent discussion. =C2=A0This protocol is by=
 no<br>
&gt; means perfect, but it&#39;s good enough:<br>
&gt;<br>
&gt; <a href=3D"http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01=
.txt" target=3D"_blank">http://www.ietf.org/id/draft-abarth-thewebsocketpro=
tocol-01.txt</a><br>
<br>
</div>It would help a lot other WG participants if you could present sugges=
tions,<br>
ideas and changes instead of a full proposal. It&#39;s hard to spot the pro=
posed<br>
changes.<br>
<br>
At first glance, I&#39;m noticing a few things :<br>
<br>
 =C2=A0- you&#39;re using the OPTIONS method. The WG&#39;s consensus was vo=
ted as using<br>
 =C2=A0 =C2=A0GET. While technically working, OPTIONS limits some possibili=
ties since<br>
 =C2=A0 =C2=A0no path is sent to the server.<br>
<br></blockquote><div><br></div><div>I agree it is important to be able to =
identify between various resources on a server. E.g. for our use, we will h=
ave multiple different websocket endpoints, and we want our frontend to be =
able to dispatch to the appropriate backend based on the information in the=
 handshake. That said, I think the draft allows for that (Sec-WebSocket-URL=
), or as pointed out on another thread, it appears OPTIONS does allow for a=
 path component. So, I think we should be able to resolve that point.</div>
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex;">
 =C2=A0- your proposal involves AES-128-CTR. As was discussed here, it seem=
s there<br>
 =C2=A0 =C2=A0are still export regulations for certain countries eventhough=
 they&#39;re<br>
 =C2=A0 =C2=A0apparently fading out. It could still be a problem for compan=
ies who want<br>
 =C2=A0 =C2=A0to export products to some countries and which never had to p=
ut crypto in<br>
 =C2=A0 =C2=A0them.<br></blockquote><div><br></div><div>It would be nice to=
 understand if this is actually a hard constraint. AES-128-CTR has the bene=
fit of being well understood, as well as fast, as demonstrated by Maciej in=
 another thread. That said, I don&#39;t care strongly one way or another he=
re.</div>
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
 =C2=A0- several people on the list asked for the ability to be able to dis=
able<br>
 =C2=A0 =C2=A0the masking in some well-controlled environments (eg: server-=
to-server<br>
 =C2=A0 =C2=A0communications). I see no provisions for this.<br>
<br></blockquote><div><br></div><div>There&#39;s nothing that would prevent=
 you from writing an extension that would disable the masking, from my unde=
rstanding.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

 =C2=A0- it has not yet been stated whether only the payload or also the fr=
aming<br>
 =C2=A0 =C2=A0should be masked. Your proposal masks both, which means that =
it definitely<br>
 =C2=A0 =C2=A0blocks any possibility of performing multiplexing later. Ther=
e does not<br>
 =C2=A0 =C2=A0appear to have been a consensus in this area yet.<br>
<br></blockquote><div><br></div><div>I&#39;m not sure why this would block =
the possibility of multiplexing. I would agree that would be a problem if i=
t were the case. However, a number of the early proposals for multiplexing =
included something like a stream-id in the frame. This could still be prese=
nt. Though it would be masked, so would the length and other things that a =
meaningful intermediary would care about, so assuming the intermediary was =
capable of un-masking, is this an issue?</div>
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex;">
 =C2=A0- is was suggested that some (all ?) of the nonces could go away if =
masking<br>
 =C2=A0 =C2=A0is used. Surely this is something that needs to be rechecked.=
<br>=C2=A0</blockquote><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
 =C2=A0- Greg proposed to replace the MORE bit with a FIN bit so that the f=
irst<br>
 =C2=A0 =C2=A0hello frame from the server starts with a high bit set, thus =
ensuring<br>
 =C2=A0 =C2=A0that we can break the connection on non-HTTP compliant interm=
ediaries<br>
 =C2=A0 =C2=A0which would expect a second response after the 101.<br>
<br></blockquote><div><br></div><div>The draft Adam sent out is based on an=
 intermediate version I had checked into SVN, back when it looked like we w=
ere gaining speed on CONNECT. I didn&#39;t yet get around to flipping MORE/=
FIN, but I don&#39;t have any ojbections to this.</div>
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex;">
Those are just a few notes, it&#39;s really not easy to changes :-/<br></bl=
ockquote><div><br></div><div>There&#39;s a tool on the IETF to diff drafts.=
 I find it quite helpful, that said, a lot of text has changed because I ha=
d already started to make other requested changes (including trying to reso=
lve the HTTP compliance issue, by stating the requirements of the handshake=
 rather than stating send X bytes, send Y bytes, ...). This makes the diff =
a bit harder to interpret, for sure.</div>
<div><br></div><div>That said, I do hope that this can spur some more targe=
ted conversations and drive progress.</div><div>=C2=A0</div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex;">

<br>
Thanks for this work,<br>
Willy<br>
<div class=3D"im"><br>
<br>
<br>
&gt;<br>
&gt; As a working group, it&#39;s time to ship.<br>
&gt;<br>
&gt; Kind regards,<br>
&gt; Adam<br>
</div>&gt; _______________________________________________<br>
&gt; hybi mailing list<br>
&gt; <a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
&gt; <a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blan=
k">https://www.ietf.org/mailman/listinfo/hybi</a><br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</blockquote></div><br>

--00163630feb30d29c3049977cb0d--

From gregw@intalio.com  Sun Jan  9 22:20:18 2011
Return-Path: <gregw@intalio.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 10B113A6A83 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:20:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.928
X-Spam-Level: 
X-Spam-Status: No, score=-2.928 tagged_above=-999 required=5 tests=[AWL=0.049,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 KfHIEFYXZSrS for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:20:17 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 38BC23A6A61 for <hybi@ietf.org>; Sun,  9 Jan 2011 22:18:54 -0800 (PST)
Received: by qwi2 with SMTP id 2so3720831qwi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 22:20:52 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.235.143 with SMTP id kg15mr24083098qcb.17.1294640451073; Sun, 09 Jan 2011 22:20:51 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 9 Jan 2011 22:20:51 -0800 (PST)
In-Reply-To: <4D2A6526.5050800@callenish.com>
References: <4D2A4FFE.6000503@callenish.com> <AANLkTim273LNAK8SQOAYgzu3QpenaDzFVsUES_nrwGmF@mail.gmail.com> <4D2A6526.5050800@callenish.com>
Date: Mon, 10 Jan 2011 07:20:51 +0100
X-Google-Sender-Auth: HwdUp1sNgTZZCTNTWzB90Bw_ew4
Message-ID: <AANLkTim6_6R32gZLS1LYw+wPqAs0NA_veNkQZHAdv7RB@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Summary of issues concerning the default masking algorithm
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: Mon, 10 Jan 2011 06:20:18 -0000

On 10 January 2011 02:47, Bruce Atherton <bruce@callenish.com> wrote:
> Hi, Greg.
>
> These seem to be questions about where to apply masking rather than issues
> with the masking algorithm itself. I was thinking they deserve their own
> thread, but if you think they are better discussed here then let us consider
> the costs and benefits of each, and where people think the right trade-off
> can be found.
>

I think they are very closely bound.

If masking uses a crypto algorithm, then having the flexibility of an
extension to change the algorithm is more important.
If masking is just XOR of a random mask, then perhaps it such agility
is less important.

If masking is stream based, then masking the framing becomes even more
of a PITA that it would be otherwise.  Multiplexing become very
complex and Debugging tools would not even be able to identify frames
without tracking the entire stream.


regards

From gregw@intalio.com  Sun Jan  9 22:22:19 2011
Return-Path: <gregw@intalio.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 992E83A6A4A for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:22:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.928
X-Spam-Level: 
X-Spam-Status: No, score=-2.928 tagged_above=-999 required=5 tests=[AWL=0.049,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 OvnWnKM0i1ac for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:22:18 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id B52CC3A6A49 for <hybi@ietf.org>; Sun,  9 Jan 2011 22:22:18 -0800 (PST)
Received: by qwi2 with SMTP id 2so3722782qwi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 22:24:31 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.53.213 with SMTP id n21mr26564349qag.399.1294640671478; Sun, 09 Jan 2011 22:24:31 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 9 Jan 2011 22:24:31 -0800 (PST)
In-Reply-To: <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com>
Date: Mon, 10 Jan 2011 07:24:31 +0100
X-Google-Sender-Auth: tFKVc6bjp9MN3oGuXAkfT_kmAm4
Message-ID: <AANLkTimBrf=c57s5ZP-ZYuyt_25wax6BOCSsyaQf+K3n@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: ifette@google.com
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 06:22:19 -0000

2011/1/10 Ian Fette ($B%$%"%s%U%'%C%F%#(B) <ifette@google.com>:
>>  - several people on the list asked for the ability to be able to disable
>>    the masking in some well-controlled environments (eg: server-to-server
>>    communications). I see no provisions for this.
>>
>
> There's nothing that would prevent you from writing an extension that would
> disable the masking, from my understanding.

By masking the framing, the masking inherently becomes part of the framing.
Intermediaries will need to be written that understand the masking,
just so that they can parse the framing.

Thus you cannot turn masking off unless you modify every WS component
in the chain with knowledge of the no-masking extension.

The whole point of extensions was to allows opaque extension data to
be associated with frames so that it is only handled by components
that care about it.

From gregw@intalio.com  Sun Jan  9 22:26:48 2011
Return-Path: <gregw@intalio.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 6808A3A6A5C for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:26:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.929
X-Spam-Level: 
X-Spam-Status: No, score=-2.929 tagged_above=-999 required=5 tests=[AWL=0.048,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 673bdwU3E6Gj for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:26:47 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 570E23A6A50 for <hybi@ietf.org>; Sun,  9 Jan 2011 22:26:47 -0800 (PST)
Received: by qyj19 with SMTP id 19so20576668qyj.10 for <hybi@ietf.org>; Sun, 09 Jan 2011 22:29:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.87.13 with SMTP id u13mr24051358qcl.55.1294640939799; Sun, 09 Jan 2011 22:28:59 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 9 Jan 2011 22:28:59 -0800 (PST)
In-Reply-To: <AANLkTik0dLB_GKeAr8uKnF8QvOG53gETmTdgVWRaAT_s@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <AANLkTikTQ98ORhYJEK8LJCcjs9e4r_eKn1xr858mCnBn@mail.gmail.com> <AANLkTik0dLB_GKeAr8uKnF8QvOG53gETmTdgVWRaAT_s@mail.gmail.com>
Date: Mon, 10 Jan 2011 07:28:59 +0100
X-Google-Sender-Auth: 7DutHklO1eJ6RY9E4mywdB9sMTc
Message-ID: <AANLkTikqzLnjocQ0uMAdW8VVZ0ggPPa_o5_+kkWrrvZM@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Adam Barth <ietf@adambarth.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 06:26:48 -0000

On 10 January 2011 01:46, Adam Barth <ietf@adambarth.com> wrote:
> Thanks for your feedback. =A0I'd encourage you not to implement this
> protocol then.

Check the attitude mate!

From w@1wt.eu  Sun Jan  9 22:34:39 2011
Return-Path: <w@1wt.eu>
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 67B293A6A64 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:34:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.081
X-Spam-Level: 
X-Spam-Status: No, score=-2.081 tagged_above=-999 required=5 tests=[AWL=-0.038, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 GZrJzsyy44jo for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:34:38 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id DDECD3A6A5D for <hybi@ietf.org>; Sun,  9 Jan 2011 22:34:36 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A6akSH011612; Mon, 10 Jan 2011 07:36:46 +0100
Date: Mon, 10 Jan 2011 07:36:46 +0100
From: Willy Tarreau <w@1wt.eu>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Message-ID: <20110110063646.GJ5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 06:34:39 -0000

On Mon, Jan 10, 2011 at 10:21:16AM +0800, Thomson, Martin wrote:
> On 2011-01-10 at 11:09:08, Willy Tarreau wrote:
> > willy@pcw:~/c$ time ./aes-128-ctr-get
> > Found the 'GET\n' pattern on the wire after 1608425803 bytes
> 
> You might also find the collected works of Shakespeare in the byte stream had you waited a little longer.

I know, that's just a matter of defining "a little longer", as none of us
will live long enough for that.

>  I'm not sure what you are hoping to prove by searching.

What I'm just showing is that we have the following points :
  1) it was reported by an experiment that some caching intermediaries
     were waiting for an HTTP request after the HTTP handshake was over

  2) it was speculated that some lazy intermediaries might possibly skip
     over whatever they did not understand to resync on an HTTP request
     they understand and execute it, hence the need for masking the
     stream or payload. Please note that no such intermediary has even
     been remotely detected, and that several people here who have
     already been involved with server code expressed that making them
     capable of doing so would be much more difficult than doing the
     right thing and would not even respect the principle of laziness.

  3) it has been suggested that a simple 32-bit XOR was not enough and
     that stronger cryptography was needed, because after a certain
     number of attempts, the server might get the client to send a
     request that such an intermediary can parse.

  4) it was reported that at least one intermediary (Apache) accepts
     an HTTP/0.9 request as simple as "GET\n".

  5) it was shown that whatever algorithm we used to address the third
     point was not enough to cover the second point for the supposedly
     lazy intermediaries from #2 acting like Apache.

So now, we have a choice :
  - either we agree that #2 above is not that much of a risk such that
    we don't need #3 to address it ;

  - or we agree that #2 is still much of a concern, but as #4 is real,
    then #3 is not a valid solution, as was proven with #5, and we
    must use another one.

But right now we're just complicating the protocol and removing some
possibilities of later extensions without addressing the reason why
we did that in the first place.

Thanks,
Willy


From gregw@intalio.com  Sun Jan  9 22:36:48 2011
Return-Path: <gregw@intalio.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 C19E93A6A5C for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:36:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.929
X-Spam-Level: 
X-Spam-Status: No, score=-2.929 tagged_above=-999 required=5 tests=[AWL=0.048,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 IaAwr-zTQ3JN for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:36:46 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 0FF453A6A53 for <hybi@ietf.org>; Sun,  9 Jan 2011 22:36:45 -0800 (PST)
Received: by qwi2 with SMTP id 2so3731029qwi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 22:38:58 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.214.71 with SMTP id gz7mr13014164qab.349.1294641538734; Sun, 09 Jan 2011 22:38:58 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 9 Jan 2011 22:38:58 -0800 (PST)
In-Reply-To: <4D2A592B.3000404@gmx.de>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTimE-qOhYXO35nBqRWp9ipF-pk_CsO-YrotAjYqX@mail.gmail.com> <20110109230229.GX5743@1wt.eu> <0311EE7A-4A32-4885-BC87-1541AA70A18B@apple.com> <AANLkTinMo8xqhkB08bY8no1y5-7+7isCm97or6icH=r5@mail.gmail.com> <4D2A4738.2000500@gmx.de> <A76D8525-91F2-43E7-96E9-778113FB128C@gbiv.com> <4D2A592B.3000404@gmx.de>
Date: Mon, 10 Jan 2011 07:38:58 +0100
X-Google-Sender-Auth: bQQXemEb5eIr8js3c00ocJbvwm4
Message-ID: <AANLkTim=KwA2Spm5AdS=9prxPQd1Cz8Tw9noN9VYGevt@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Julian Reschke <julian.reschke@gmx.de>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "Roy T. Fielding" <fielding@gbiv.com>, Hybi <hybi@ietf.org>
Subject: Re: [hybi] OPTIONS (was Re: It's time to ship)
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: Mon, 10 Jan 2011 06:36:49 -0000

On 10 January 2011 01:56, Julian Reschke <julian.reschke@gmx.de> wrote:
>
> For simplicity, the best *server* side choice IMHO is to treat Upgrade the
> same way for a given URI, no matter what what request method was.

+1

The client should use another method (eg GET), only if it is prepared
to accept a valid response to that method (or the consequences on the
server of a PUT/POST/etc.) if the upgrade is not accepted (or is
discarded by an intermediary).

WS will be used in situations where fall back transports (eg long
polling) will be used if ws is not supported.  To avoid extra round
trips it is desirable that a failed WS handshake be able to be used as
part of the initiation of such a fallback prototocol.

I fully understand that such a fallback would need support in the
browser API, an that will not be coming any time soon, but that is no
reason to deny this approach in the protocol for the future or for non
browser clients.

cheers

From w@1wt.eu  Sun Jan  9 22:37:24 2011
Return-Path: <w@1wt.eu>
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 A2BA33A6A53 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:37:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.08
X-Spam-Level: 
X-Spam-Status: No, score=-2.08 tagged_above=-999 required=5 tests=[AWL=-0.037,  BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 aQ2CyhOz3Cq1 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:37:22 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id BC9193A6A5C for <hybi@ietf.org>; Sun,  9 Jan 2011 22:37:21 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A6dU7o011637; Mon, 10 Jan 2011 07:39:30 +0100
Date: Mon, 10 Jan 2011 07:39:30 +0100
From: Willy Tarreau <w@1wt.eu>
To: Bruce Atherton <bruce@callenish.com>
Message-ID: <20110110063930.GK5743@1wt.eu>
References: <4D2A4FFE.6000503@callenish.com> <4D2A6FB9.1030005@callenish.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D2A6FB9.1030005@callenish.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] Summary of issues concerning the default masking algorithm
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: Mon, 10 Jan 2011 06:37:24 -0000

On Sun, Jan 09, 2011 at 06:32:25PM -0800, Bruce Atherton wrote:
> The cost of losing the ability to decode streams is, to me, extremely 
> high. It is beyond that, it is painful. When I have to debug a network 
> issue in a customer's environment, a problem that would take me a few 
> hours with a decoded stream jumps to days or even weeks. What is worse 
> is that it is often difficult if not impossible to demonstrate to the 
> customer when the issue is not with my application. Although I can 
> create multitudes of logs that show all the bits my application receives 
> and sends, the customer has no way of knowing whether there are bits 
> that are not logged because they are dealt with via another code path.

+1, that's an experience I share all the day too the other way around,
proving from network captures that the application is faulty, despite
how expensive it was !

Willy


From ietf@adambarth.com  Sun Jan  9 22:42:44 2011
Return-Path: <ietf@adambarth.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 373063A6A5C for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:42:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.891
X-Spam-Level: 
X-Spam-Status: No, score=-3.891 tagged_above=-999 required=5 tests=[AWL=-0.914, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 0pfwhRx3maD2 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:42:39 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id AD2CB3A6934 for <hybi@ietf.org>; Sun,  9 Jan 2011 22:42:39 -0800 (PST)
Received: by gyd12 with SMTP id 12so8150196gyd.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 22:44:52 -0800 (PST)
Received: by 10.236.109.12 with SMTP id r12mr11979682yhg.32.1294641892351; Sun, 09 Jan 2011 22:44:52 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id i60sm16995307yhj.17.2011.01.09.22.44.50 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 22:44:51 -0800 (PST)
Received: by iyi42 with SMTP id 42so19087511iyi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 22:44:50 -0800 (PST)
Received: by 10.231.19.138 with SMTP id a10mr12132078ibb.127.1294641889990; Sun, 09 Jan 2011 22:44:49 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 22:44:19 -0800 (PST)
In-Reply-To: <20110110063646.GJ5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com> <20110110063646.GJ5743@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 22:44:19 -0800
Message-ID: <AANLkTintz6hWL1ez0-FnPaZmi1jfBhtZ+NMd60dM=Y=D@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 06:42:44 -0000

Or we could just use AES-128-CTR like everyone else in the known
universe and not worry about whether we've shaved exactly the right
number of hairs off our home-brew pseudo crypto.

Adam


On Sun, Jan 9, 2011 at 10:36 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Mon, Jan 10, 2011 at 10:21:16AM +0800, Thomson, Martin wrote:
>> On 2011-01-10 at 11:09:08, Willy Tarreau wrote:
>> > willy@pcw:~/c$ time ./aes-128-ctr-get
>> > Found the 'GET\n' pattern on the wire after 1608425803 bytes
>>
>> You might also find the collected works of Shakespeare in the byte strea=
m had you waited a little longer.
>
> I know, that's just a matter of defining "a little longer", as none of us
> will live long enough for that.
>
>> =A0I'm not sure what you are hoping to prove by searching.
>
> What I'm just showing is that we have the following points :
> =A01) it was reported by an experiment that some caching intermediaries
> =A0 =A0 were waiting for an HTTP request after the HTTP handshake was ove=
r
>
> =A02) it was speculated that some lazy intermediaries might possibly skip
> =A0 =A0 over whatever they did not understand to resync on an HTTP reques=
t
> =A0 =A0 they understand and execute it, hence the need for masking the
> =A0 =A0 stream or payload. Please note that no such intermediary has even
> =A0 =A0 been remotely detected, and that several people here who have
> =A0 =A0 already been involved with server code expressed that making them
> =A0 =A0 capable of doing so would be much more difficult than doing the
> =A0 =A0 right thing and would not even respect the principle of laziness.
>
> =A03) it has been suggested that a simple 32-bit XOR was not enough and
> =A0 =A0 that stronger cryptography was needed, because after a certain
> =A0 =A0 number of attempts, the server might get the client to send a
> =A0 =A0 request that such an intermediary can parse.
>
> =A04) it was reported that at least one intermediary (Apache) accepts
> =A0 =A0 an HTTP/0.9 request as simple as "GET\n".
>
> =A05) it was shown that whatever algorithm we used to address the third
> =A0 =A0 point was not enough to cover the second point for the supposedly
> =A0 =A0 lazy intermediaries from #2 acting like Apache.
>
> So now, we have a choice :
> =A0- either we agree that #2 above is not that much of a risk such that
> =A0 =A0we don't need #3 to address it ;
>
> =A0- or we agree that #2 is still much of a concern, but as #4 is real,
> =A0 =A0then #3 is not a valid solution, as was proven with #5, and we
> =A0 =A0must use another one.
>
> But right now we're just complicating the protocol and removing some
> possibilities of later extensions without addressing the reason why
> we did that in the first place.
>
> Thanks,
> Willy
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From gregw@intalio.com  Sun Jan  9 22:48:12 2011
Return-Path: <gregw@intalio.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 85A463A693A for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:48:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.93
X-Spam-Level: 
X-Spam-Status: No, score=-2.93 tagged_above=-999 required=5 tests=[AWL=0.047,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 opGRxnocAMCA for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:47:57 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 0FF273A6934 for <hybi@ietf.org>; Sun,  9 Jan 2011 22:47:50 -0800 (PST)
Received: by qwi2 with SMTP id 2so3737149qwi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 22:50:03 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.214.71 with SMTP id gz7mr13023484qab.349.1294642203588; Sun, 09 Jan 2011 22:50:03 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Sun, 9 Jan 2011 22:50:03 -0800 (PST)
In-Reply-To: <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com>
Date: Mon, 10 Jan 2011 07:50:03 +0100
X-Google-Sender-Auth: TWJ4H_3qd3KY6SkR8Kf884IvG2Q
Message-ID: <AANLkTimW59rwjL0H8fFzPXZXyUHCzNYJRECi0MS7mfFc@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: ifette@google.com
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 06:48:15 -0000

2011/1/10 Ian Fette ($B%$%"%s%U%'%C%F%#(B) <ifette@google.com>:
>>  - it has not yet been stated whether only the payload or also the framing
>>    should be masked. Your proposal masks both, which means that it
>> definitely
>>    blocks any possibility of performing multiplexing later. There does not
>>    appear to have been a consensus in this area yet.
>>
>
> I'm not sure why this would block the possibility of multiplexing. I would
> agree that would be a problem if it were the case. However, a number of the
> early proposals for multiplexing included something like a stream-id in the
> frame. This could still be present. Though it would be masked, so would the
> length and other things that a meaningful intermediary would care about, so
> assuming the intermediary was capable of un-masking, is this an issue?

I don't think it makes multiplexing impossible - just more difficult,
more complex and more invasive.

Multiplexing can no longer be just a channel label associated with
each frame in a stream, because a frame stream will only be meaningful
in the context of keys exchanged by a client and a server.
Thus the key exchange will no longer be able to be end to end, and the
multiplexer will need to be then end point of each connection from a
client, so that it can initiate a new shared connection with a server
with a new and different stream key applied to it. You then have to
avoid the  situation where the multiplexer has accepted a WS
connection that the server does not want to accept - argh!

all this for no actual benefit???

From w@1wt.eu  Sun Jan  9 22:53:05 2011
Return-Path: <w@1wt.eu>
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 4429A3A6A53 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:52:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.78
X-Spam-Level: 
X-Spam-Status: No, score=-1.78 tagged_above=-999 required=5 tests=[AWL=-0.337,  BAYES_00=-2.599, HELO_IS_SMALL6=0.556, J_CHICKENPOX_51=0.6]
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 TZ0eD+QxAMKR for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:52:16 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 72DB73A6A5C for <hybi@ietf.org>; Sun,  9 Jan 2011 22:52:15 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A6s87M011718; Mon, 10 Jan 2011 07:54:08 +0100
Date: Mon, 10 Jan 2011 07:54:08 +0100
From: Willy Tarreau <w@1wt.eu>
To: "Ian Fette (????????????????????????)" <ifette@google.com>
Message-ID: <20110110065408.GL5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 06:53:06 -0000

Hello Ian,

On Sun, Jan 09, 2011 at 10:08:13PM -0800, Ian Fette (????????????????????????) wrote:
> >  - you're using the OPTIONS method. The WG's consensus was voted as using
> >    GET. While technically working, OPTIONS limits some possibilities since
> >    no path is sent to the server.
> >
> >
> I agree it is important to be able to identify between various resources on
> a server. E.g. for our use, we will have multiple different websocket
> endpoints, and we want our frontend to be able to dispatch to the
> appropriate backend based on the information in the handshake. That said, I
> think the draft allows for that (Sec-WebSocket-URL), or as pointed out on
> another thread, it appears OPTIONS does allow for a path component. So, I
> think we should be able to resolve that point.

Once again,I'm not opposed at all to this point. I'd even say that would it
not have been accepted as a consensus in the last poll, I'd probably have
voted for it. It's just that it's a change from what was planned till now
and participants need to express their opinion on that point.

> >  - your proposal involves AES-128-CTR. As was discussed here, it seems
> > there
> >    are still export regulations for certain countries eventhough they're
> >    apparently fading out. It could still be a problem for companies who
> > want
> >    to export products to some countries and which never had to put crypto
> > in
> >    them.
> >
> 
> It would be nice to understand if this is actually a hard constraint.
> AES-128-CTR has the benefit of being well understood, as well as fast, as
> demonstrated by Maciej in another thread. That said, I don't care strongly
> one way or another here.

One of my issue with it is that despite being fast, it's a lot slower than
simpler masking. I design software components to be used at the border side
of infrastructures to dispatch the traffic to multiple servers, and I'm
very much concerned by the performance limitations. On a machine which has
normally no issue processing 10 Gbps of HTTP, I could not even process 1 Gbps
of WebSocket with large contents. This is much concerning because it implies
that in order to build the stream analysers we've talked about in the past,
it will become mandatory to install expensive crypto acceleration cards. This
is not logical for a protocol which is supposed to be transferred in clear
(ws:// as opposed to wss://). Checking for forbidden words, dangerous links
or forbidden contents on campus sites will be much more expensive due to this
masking algorithm alone.

> >  - several people on the list asked for the ability to be able to disable
> >    the masking in some well-controlled environments (eg: server-to-server
> >    communications). I see no provisions for this.
> >
> >
> There's nothing that would prevent you from writing an extension that would
> disable the masking, from my understanding.

Adam did not seem favorable to that.

> >  - it has not yet been stated whether only the payload or also the framing
> >    should be masked. Your proposal masks both, which means that it
> > definitely
> >    blocks any possibility of performing multiplexing later. There does not
> >    appear to have been a consensus in this area yet.
> >
> >
> I'm not sure why this would block the possibility of multiplexing. I would
> agree that would be a problem if it were the case. However, a number of the
> early proposals for multiplexing included something like a stream-id in the
> frame. This could still be present. Though it would be masked, so would the
> length and other things that a meaningful intermediary would care about, so
> assuming the intermediary was capable of un-masking, is this an issue?

Yes, and you got the point : if the ID is masked, how to you know which
stream it is in order to pick the right unmask key ? At least the stream
ID will have to be unmasked. If we prepend it before the frame, it means
a new framing format. Till not it was suggested to have it in the frame.

> >  - Greg proposed to replace the MORE bit with a FIN bit so that the first
> >    hello frame from the server starts with a high bit set, thus ensuring
> >    that we can break the connection on non-HTTP compliant intermediaries
> >    which would expect a second response after the 101.
> >
> >
> The draft Adam sent out is based on an intermediate version I had checked
> into SVN, back when it looked like we were gaining speed on CONNECT. I
> didn't yet get around to flipping MORE/FIN, but I don't have any ojbections
> to this.

OK.

> > Those are just a few notes, it's really not easy to changes :-/
> >
> 
> There's a tool on the IETF to diff drafts. I find it quite helpful, that
> said, a lot of text has changed because I had already started to make other
> requested changes (including trying to resolve the HTTP compliance issue, by
> stating the requirements of the handshake rather than stating send X bytes,
> send Y bytes, ...). This makes the diff a bit harder to interpret, for sure.

Ah, OK. Till now I'd only use the automated diffs between incremental drafts,
I did not know that there were other tools.

Regards,
Willy


From w@1wt.eu  Sun Jan  9 22:56:14 2011
Return-Path: <w@1wt.eu>
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 2D3DE3A693A for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:56:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.078
X-Spam-Level: 
X-Spam-Status: No, score=-2.078 tagged_above=-999 required=5 tests=[AWL=-0.035, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 DyUKZ8d9alwo for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 22:56:13 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 3E7593A6935 for <hybi@ietf.org>; Sun,  9 Jan 2011 22:56:12 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A6wMXh011733; Mon, 10 Jan 2011 07:58:22 +0100
Date: Mon, 10 Jan 2011 07:58:22 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110110065822.GM5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com> <20110110063646.GJ5743@1wt.eu> <AANLkTintz6hWL1ez0-FnPaZmi1jfBhtZ+NMd60dM=Y=D@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTintz6hWL1ez0-FnPaZmi1jfBhtZ+NMd60dM=Y=D@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 06:56:14 -0000

On Sun, Jan 09, 2011 at 10:44:19PM -0800, Adam Barth wrote:
> Or we could just use AES-128-CTR like everyone else in the known
> universe and not worry about whether we've shaved exactly the right
> number of hairs off our home-brew pseudo crypto.

Adam, I just explained that AES-128-CTR as you proposed it does not
address the points that were raised which made it appear here.

In fact the real problem we really want to solve is make the CR/LF
bytes disappear from the stream. Those bytes are still present with
AES-128-CTR.

And if the risk suddenly becomes acceptable, then we can fallback
to much simpler masking algorithm which share the same risks for
that matter.

> Adam

Willy
> 
> 
> On Sun, Jan 9, 2011 at 10:36 PM, Willy Tarreau <w@1wt.eu> wrote:
> > On Mon, Jan 10, 2011 at 10:21:16AM +0800, Thomson, Martin wrote:
> >> On 2011-01-10 at 11:09:08, Willy Tarreau wrote:
> >> > willy@pcw:~/c$ time ./aes-128-ctr-get
> >> > Found the 'GET\n' pattern on the wire after 1608425803 bytes
> >>
> >> You might also find the collected works of Shakespeare in the byte stream had you waited a little longer.
> >
> > I know, that's just a matter of defining "a little longer", as none of us
> > will live long enough for that.
> >
> >>  I'm not sure what you are hoping to prove by searching.
> >
> > What I'm just showing is that we have the following points :
> >  1) it was reported by an experiment that some caching intermediaries
> >     were waiting for an HTTP request after the HTTP handshake was over
> >
> >  2) it was speculated that some lazy intermediaries might possibly skip
> >     over whatever they did not understand to resync on an HTTP request
> >     they understand and execute it, hence the need for masking the
> >     stream or payload. Please note that no such intermediary has even
> >     been remotely detected, and that several people here who have
> >     already been involved with server code expressed that making them
> >     capable of doing so would be much more difficult than doing the
> >     right thing and would not even respect the principle of laziness.
> >
> >  3) it has been suggested that a simple 32-bit XOR was not enough and
> >     that stronger cryptography was needed, because after a certain
> >     number of attempts, the server might get the client to send a
> >     request that such an intermediary can parse.
> >
> >  4) it was reported that at least one intermediary (Apache) accepts
> >     an HTTP/0.9 request as simple as "GET\n".
> >
> >  5) it was shown that whatever algorithm we used to address the third
> >     point was not enough to cover the second point for the supposedly
> >     lazy intermediaries from #2 acting like Apache.
> >
> > So now, we have a choice :
> >  - either we agree that #2 above is not that much of a risk such that
> >    we don't need #3 to address it ;
> >
> >  - or we agree that #2 is still much of a concern, but as #4 is real,
> >    then #3 is not a valid solution, as was proven with #5, and we
> >    must use another one.
> >
> > But right now we're just complicating the protocol and removing some
> > possibilities of later extensions without addressing the reason why
> > we did that in the first place.
> >
> > Thanks,
> > Willy
> >
> > _______________________________________________
> > hybi mailing list
> > hybi@ietf.org
> > https://www.ietf.org/mailman/listinfo/hybi
> >

From ietf@adambarth.com  Sun Jan  9 23:01:09 2011
Return-Path: <ietf@adambarth.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 EF7D73A6934 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 23:01:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.885
X-Spam-Level: 
X-Spam-Status: No, score=-3.885 tagged_above=-999 required=5 tests=[AWL=-0.908, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 Obg1DocCFXD8 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 23:01:07 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id ED70C3A6939 for <hybi@ietf.org>; Sun,  9 Jan 2011 23:01:06 -0800 (PST)
Received: by gwj17 with SMTP id 17so10085916gwj.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 23:03:19 -0800 (PST)
Received: by 10.236.108.41 with SMTP id p29mr11171743yhg.68.1294642999317; Sun, 09 Jan 2011 23:03:19 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id 3sm16988458yhl.0.2011.01.09.23.03.17 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 23:03:18 -0800 (PST)
Received: by iyi42 with SMTP id 42so19097403iyi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 23:03:17 -0800 (PST)
Received: by 10.231.199.12 with SMTP id eq12mr28480723ibb.2.1294642997131; Sun, 09 Jan 2011 23:03:17 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 23:02:47 -0800 (PST)
In-Reply-To: <20110110065822.GM5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com> <20110110063646.GJ5743@1wt.eu> <AANLkTintz6hWL1ez0-FnPaZmi1jfBhtZ+NMd60dM=Y=D@mail.gmail.com> <20110110065822.GM5743@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 23:02:47 -0800
Message-ID: <AANLkTinVq9d=fSph8SZiDFrSFCwRQvyJFAiOwBZjnGjA@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Hybi <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 07:01:09 -0000

On Sun, Jan 9, 2011 at 10:58 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 09, 2011 at 10:44:19PM -0800, Adam Barth wrote:
>> Or we could just use AES-128-CTR like everyone else in the known
>> universe and not worry about whether we've shaved exactly the right
>> number of hairs off our home-brew pseudo crypto.
>
> Adam, I just explained that AES-128-CTR as you proposed it does not
> address the points that were raised which made it appear here.
>
> In fact the real problem we really want to solve is make the CR/LF
> bytes disappear from the stream. Those bytes are still present with
> AES-128-CTR.

Fortunately, we don't need to make the CR/LF bytes disappear from the
stream.  What we need to do is prevent the attacker from choosing a
string that can be used to attack an intermediary.  Using AES-128-CTR
makes it so the attacker is forced to choose a pseudo-random sequence
of bytes.  I claim that it is infeasible to attack an intermediary in
this way using a pseudo-random sequence of bytes.

Kind regards,
Adam

From w@1wt.eu  Sun Jan  9 23:06:13 2011
Return-Path: <w@1wt.eu>
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 F16C23A693A for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 23:06:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.077
X-Spam-Level: 
X-Spam-Status: No, score=-2.077 tagged_above=-999 required=5 tests=[AWL=-0.034, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 ju7YXWjVNx8X for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 23:06:11 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id E83EA3A6935 for <hybi@ietf.org>; Sun,  9 Jan 2011 23:06:10 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A78KVq011781; Mon, 10 Jan 2011 08:08:20 +0100
Date: Mon, 10 Jan 2011 08:08:20 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110110070820.GN5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com> <20110110063646.GJ5743@1wt.eu> <AANLkTintz6hWL1ez0-FnPaZmi1jfBhtZ+NMd60dM=Y=D@mail.gmail.com> <20110110065822.GM5743@1wt.eu> <AANLkTinVq9d=fSph8SZiDFrSFCwRQvyJFAiOwBZjnGjA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTinVq9d=fSph8SZiDFrSFCwRQvyJFAiOwBZjnGjA@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 07:06:13 -0000

On Sun, Jan 09, 2011 at 11:02:47PM -0800, Adam Barth wrote:
> On Sun, Jan 9, 2011 at 10:58 PM, Willy Tarreau <w@1wt.eu> wrote:
> > On Sun, Jan 09, 2011 at 10:44:19PM -0800, Adam Barth wrote:
> >> Or we could just use AES-128-CTR like everyone else in the known
> >> universe and not worry about whether we've shaved exactly the right
> >> number of hairs off our home-brew pseudo crypto.
> >
> > Adam, I just explained that AES-128-CTR as you proposed it does not
> > address the points that were raised which made it appear here.
> >
> > In fact the real problem we really want to solve is make the CR/LF
> > bytes disappear from the stream. Those bytes are still present with
> > AES-128-CTR.
> 
> Fortunately, we don't need to make the CR/LF bytes disappear from the
> stream.  What we need to do is prevent the attacker from choosing a
> string that can be used to attack an intermediary.  Using AES-128-CTR
> makes it so the attacker is forced to choose a pseudo-random sequence
> of bytes.  I claim that it is infeasible to attack an intermediary in
> this way using a pseudo-random sequence of bytes.

For short a string lengths accepted by Apache (4 bytes), it *is* feasible
by making the client send an important amount of bytes as I have shown.
If we agree that we don't need to protect against that very unlikely issue,
then the simpler XOR masking is enough because the initial pseudo-random
makes it equally hard for the attacker to guess what the stream will look
like.

Regards,
Willy


From ietf@adambarth.com  Sun Jan  9 23:14:22 2011
Return-Path: <ietf@adambarth.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 A0FAC3A6945 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 23:14:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.879
X-Spam-Level: 
X-Spam-Status: No, score=-3.879 tagged_above=-999 required=5 tests=[AWL=-0.902, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 LKmIPfkbYq7g for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 23:14:21 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id 9078E3A693A for <hybi@ietf.org>; Sun,  9 Jan 2011 23:14:21 -0800 (PST)
Received: by gyd12 with SMTP id 12so8156968gyd.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 23:16:34 -0800 (PST)
Received: by 10.100.112.4 with SMTP id k4mr16830202anc.66.1294643794330; Sun, 09 Jan 2011 23:16:34 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id z12sm5855476anp.19.2011.01.09.23.16.32 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 23:16:33 -0800 (PST)
Received: by iyi42 with SMTP id 42so19104694iyi.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 23:16:32 -0800 (PST)
Received: by 10.231.192.7 with SMTP id do7mr6209741ibb.102.1294643792127; Sun, 09 Jan 2011 23:16:32 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 23:16:01 -0800 (PST)
In-Reply-To: <20110110070820.GN5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com> <20110110063646.GJ5743@1wt.eu> <AANLkTintz6hWL1ez0-FnPaZmi1jfBhtZ+NMd60dM=Y=D@mail.gmail.com> <20110110065822.GM5743@1wt.eu> <AANLkTinVq9d=fSph8SZiDFrSFCwRQvyJFAiOwBZjnGjA@mail.gmail.com> <20110110070820.GN5743@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 23:16:01 -0800
Message-ID: <AANLkTinrhE9SWnPigQxTgPEM-LkugxxRjP++GnppPDnh@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 07:14:22 -0000

On Sun, Jan 9, 2011 at 11:08 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 09, 2011 at 11:02:47PM -0800, Adam Barth wrote:
>> On Sun, Jan 9, 2011 at 10:58 PM, Willy Tarreau <w@1wt.eu> wrote:
>> > On Sun, Jan 09, 2011 at 10:44:19PM -0800, Adam Barth wrote:
>> >> Or we could just use AES-128-CTR like everyone else in the known
>> >> universe and not worry about whether we've shaved exactly the right
>> >> number of hairs off our home-brew pseudo crypto.
>> >
>> > Adam, I just explained that AES-128-CTR as you proposed it does not
>> > address the points that were raised which made it appear here.
>> >
>> > In fact the real problem we really want to solve is make the CR/LF
>> > bytes disappear from the stream. Those bytes are still present with
>> > AES-128-CTR.
>>
>> Fortunately, we don't need to make the CR/LF bytes disappear from the
>> stream. =A0What we need to do is prevent the attacker from choosing a
>> string that can be used to attack an intermediary. =A0Using AES-128-CTR
>> makes it so the attacker is forced to choose a pseudo-random sequence
>> of bytes. =A0I claim that it is infeasible to attack an intermediary in
>> this way using a pseudo-random sequence of bytes.
>
> For short a string lengths accepted by Apache (4 bytes), it *is* feasible
> by making the client send an important amount of bytes as I have shown.
> If we agree that we don't need to protect against that very unlikely issu=
e,
> then the simpler XOR masking is enough because the initial pseudo-random
> makes it equally hard for the attacker to guess what the stream will look
> like.

I stand by my claim that it is infeasible to attack an intermediary in
this way using a pseudo-random sequence of bytes.

Your "attack" of finding the string "GET\n" after 1608425803 bytes
(yes, that's 1.6 gigabytes) is meaningless.  How many bytes do you
think you'd have to examine before finding the string "Willy Tarreau"
?

Kind regards,
Adam

From w@1wt.eu  Sun Jan  9 23:50:07 2011
Return-Path: <w@1wt.eu>
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 E1CCC28C0F2 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 23:50:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.077
X-Spam-Level: 
X-Spam-Status: No, score=-2.077 tagged_above=-999 required=5 tests=[AWL=-0.034, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 tBHU0vVdkkd7 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 23:50:05 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id A382928C0E4 for <hybi@ietf.org>; Sun,  9 Jan 2011 23:50:02 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0A7q8w0011903; Mon, 10 Jan 2011 08:52:08 +0100
Date: Mon, 10 Jan 2011 08:52:08 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110110075208.GO5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com> <20110110063646.GJ5743@1wt.eu> <AANLkTintz6hWL1ez0-FnPaZmi1jfBhtZ+NMd60dM=Y=D@mail.gmail.com> <20110110065822.GM5743@1wt.eu> <AANLkTinVq9d=fSph8SZiDFrSFCwRQvyJFAiOwBZjnGjA@mail.gmail.com> <20110110070820.GN5743@1wt.eu> <AANLkTinrhE9SWnPigQxTgPEM-LkugxxRjP++GnppPDnh@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTinrhE9SWnPigQxTgPEM-LkugxxRjP++GnppPDnh@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 07:50:07 -0000

On Sun, Jan 09, 2011 at 11:16:01PM -0800, Adam Barth wrote:
> On Sun, Jan 9, 2011 at 11:08 PM, Willy Tarreau <w@1wt.eu> wrote:
> > On Sun, Jan 09, 2011 at 11:02:47PM -0800, Adam Barth wrote:
> >> On Sun, Jan 9, 2011 at 10:58 PM, Willy Tarreau <w@1wt.eu> wrote:
> >> > On Sun, Jan 09, 2011 at 10:44:19PM -0800, Adam Barth wrote:
> >> >> Or we could just use AES-128-CTR like everyone else in the known
> >> >> universe and not worry about whether we've shaved exactly the right
> >> >> number of hairs off our home-brew pseudo crypto.
> >> >
> >> > Adam, I just explained that AES-128-CTR as you proposed it does not
> >> > address the points that were raised which made it appear here.
> >> >
> >> > In fact the real problem we really want to solve is make the CR/LF
> >> > bytes disappear from the stream. Those bytes are still present with
> >> > AES-128-CTR.
> >>
> >> Fortunately, we don't need to make the CR/LF bytes disappear from the
> >> stream.  What we need to do is prevent the attacker from choosing a
> >> string that can be used to attack an intermediary.  Using AES-128-CTR
> >> makes it so the attacker is forced to choose a pseudo-random sequence
> >> of bytes.  I claim that it is infeasible to attack an intermediary in
> >> this way using a pseudo-random sequence of bytes.
> >
> > For short a string lengths accepted by Apache (4 bytes), it *is* feasible
> > by making the client send an important amount of bytes as I have shown.
> > If we agree that we don't need to protect against that very unlikely issue,
> > then the simpler XOR masking is enough because the initial pseudo-random
> > makes it equally hard for the attacker to guess what the stream will look
> > like.
> 
> I stand by my claim that it is infeasible to attack an intermediary in
> this way using a pseudo-random sequence of bytes.
> 
> Your "attack" of finding the string "GET\n" after 1608425803 bytes
> (yes, that's 1.6 gigabytes) is meaningless.

Precisely, and it is as much meaningless as finding it after the same
amount of bytes using a simple XOR method with a 32-bit key. That was
the point I wanted to make, because at one point it was speculated
in the 32-bit vs HMAC that it was a concern.

So now we can move on to simpler algorithms and stop cripling the
protocol.

Thanks,
Willy


From ietf@adambarth.com  Sun Jan  9 23:54:11 2011
Return-Path: <ietf@adambarth.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 7C5B13A6A69 for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 23:54:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.873
X-Spam-Level: 
X-Spam-Status: No, score=-3.873 tagged_above=-999 required=5 tests=[AWL=-0.896, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 FW2kFBUr78Uq for <hybi@core3.amsl.com>; Sun,  9 Jan 2011 23:54:10 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 936933A6A64 for <hybi@ietf.org>; Sun,  9 Jan 2011 23:54:10 -0800 (PST)
Received: by yxt33 with SMTP id 33so8389216yxt.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 23:56:23 -0800 (PST)
Received: by 10.151.106.7 with SMTP id i7mr27308201ybm.421.1294646182972; Sun, 09 Jan 2011 23:56:22 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id v6sm1954945ybk.20.2011.01.09.23.56.21 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Jan 2011 23:56:22 -0800 (PST)
Received: by iwn40 with SMTP id 40so20197535iwn.31 for <hybi@ietf.org>; Sun, 09 Jan 2011 23:56:20 -0800 (PST)
Received: by 10.231.192.7 with SMTP id do7mr6239483ibb.102.1294646180674; Sun, 09 Jan 2011 23:56:20 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 9 Jan 2011 23:55:50 -0800 (PST)
In-Reply-To: <20110110075208.GO5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com> <20110110063646.GJ5743@1wt.eu> <AANLkTintz6hWL1ez0-FnPaZmi1jfBhtZ+NMd60dM=Y=D@mail.gmail.com> <20110110065822.GM5743@1wt.eu> <AANLkTinVq9d=fSph8SZiDFrSFCwRQvyJFAiOwBZjnGjA@mail.gmail.com> <20110110070820.GN5743@1wt.eu> <AANLkTinrhE9SWnPigQxTgPEM-LkugxxRjP++GnppPDnh@mail.gmail.com> <20110110075208.GO5743@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 9 Jan 2011 23:55:50 -0800
Message-ID: <AANLkTi=JJquFaa7ReCUVz=5P4ERuGBq=aDrtBy2oDngu@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 07:54:11 -0000

On Sun, Jan 9, 2011 at 11:52 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 09, 2011 at 11:16:01PM -0800, Adam Barth wrote:
>> On Sun, Jan 9, 2011 at 11:08 PM, Willy Tarreau <w@1wt.eu> wrote:
>> > On Sun, Jan 09, 2011 at 11:02:47PM -0800, Adam Barth wrote:
>> >> On Sun, Jan 9, 2011 at 10:58 PM, Willy Tarreau <w@1wt.eu> wrote:
>> >> > On Sun, Jan 09, 2011 at 10:44:19PM -0800, Adam Barth wrote:
>> >> >> Or we could just use AES-128-CTR like everyone else in the known
>> >> >> universe and not worry about whether we've shaved exactly the righ=
t
>> >> >> number of hairs off our home-brew pseudo crypto.
>> >> >
>> >> > Adam, I just explained that AES-128-CTR as you proposed it does not
>> >> > address the points that were raised which made it appear here.
>> >> >
>> >> > In fact the real problem we really want to solve is make the CR/LF
>> >> > bytes disappear from the stream. Those bytes are still present with
>> >> > AES-128-CTR.
>> >>
>> >> Fortunately, we don't need to make the CR/LF bytes disappear from the
>> >> stream. =A0What we need to do is prevent the attacker from choosing a
>> >> string that can be used to attack an intermediary. =A0Using AES-128-C=
TR
>> >> makes it so the attacker is forced to choose a pseudo-random sequence
>> >> of bytes. =A0I claim that it is infeasible to attack an intermediary =
in
>> >> this way using a pseudo-random sequence of bytes.
>> >
>> > For short a string lengths accepted by Apache (4 bytes), it *is* feasi=
ble
>> > by making the client send an important amount of bytes as I have shown=
.
>> > If we agree that we don't need to protect against that very unlikely i=
ssue,
>> > then the simpler XOR masking is enough because the initial pseudo-rand=
om
>> > makes it equally hard for the attacker to guess what the stream will l=
ook
>> > like.
>>
>> I stand by my claim that it is infeasible to attack an intermediary in
>> this way using a pseudo-random sequence of bytes.
>>
>> Your "attack" of finding the string "GET\n" after 1608425803 bytes
>> (yes, that's 1.6 gigabytes) is meaningless.
>
> Precisely, and it is as much meaningless as finding it after the same
> amount of bytes using a simple XOR method with a 32-bit key. That was
> the point I wanted to make, because at one point it was speculated
> in the 32-bit vs HMAC that it was a concern.
>
> So now we can move on to simpler algorithms and stop cripling the
> protocol.

Or we could just use AES-128-CTR like everyone else in the known
universe and not worry about whether we've shaved exactly the right
number of hairs off our home-brew pseudo crypto.

Adam

From gregw@intalio.com  Mon Jan 10 01:05:53 2011
Return-Path: <gregw@intalio.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 BB3DF28C0F6 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 01:05:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.93
X-Spam-Level: 
X-Spam-Status: No, score=-2.93 tagged_above=-999 required=5 tests=[AWL=0.047,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 GRKi9N0kDNDQ for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 01:05:53 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id E720528C0ED for <hybi@ietf.org>; Mon, 10 Jan 2011 01:05:52 -0800 (PST)
Received: by qwi2 with SMTP id 2so3828668qwi.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 01:08:05 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.36.208 with SMTP id u16mr26652569qad.299.1294650485674; Mon, 10 Jan 2011 01:08:05 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Mon, 10 Jan 2011 01:08:05 -0800 (PST)
In-Reply-To: <AANLkTi=y75Pi2TCUd_KS1RbAgUD2OjDLYX_QnRrOXMba@mail.gmail.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <AANLkTi=aHRD5tazXX7TqR3gHo9QWe9SLtvHjDghS1UjW@mail.gmail.com> <AANLkTi=y75Pi2TCUd_KS1RbAgUD2OjDLYX_QnRrOXMba@mail.gmail.com>
Date: Mon, 10 Jan 2011 10:08:05 +0100
X-Google-Sender-Auth: lIIM6SCooT2je6TZiMBS5SMJM74
Message-ID: <AANLkTin2sLa1z=W6TE3tJmg1gJLQHhw6w_91wq4XQzUe@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Mon, 10 Jan 2011 09:05:53 -0000

On 9 January 2011 16:14, Eric Rescorla <ekr@rtfm.com> wrote:
> On Sun, Jan 9, 2011 at 1:43 AM, Greg Wilkins <gregw@webtide.com> wrote:
>>
>
> Wow, I think you have this completely backwards: it's in systems that
> do almost nothing
> that the cost of adding a new, expensive operation is large. In
> systems that are already
> doing a lot of other processing, the marginal cost is comparaitvely
> low even though it may
> occasionally push you over some threshold; Amdahl's law and all that.


Eric,

I did not say system that are "already doing a lot of other
processing", I said systems where parsing is around 5% of the CPU
load.   This may be for a high message rate on a large server or it
may be for a low message rate on a constrained device.   For such
systems, multiplying the CPU work needed to parse a message several
times will have significant impacts.

Besides, it is self evident that adding cryptographic processing to a
protocol puts additional loads on application servers - we need only
look at SSL and the existence of SSL offload devices.

regards

From gregw@intalio.com  Mon Jan 10 01:13:28 2011
Return-Path: <gregw@intalio.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 3CBAA28C11A for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 01:13:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.93
X-Spam-Level: 
X-Spam-Status: No, score=-2.93 tagged_above=-999 required=5 tests=[AWL=0.047,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 j-VD7NddSYUg for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 01:12:57 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 2BEBA28C0ED for <hybi@ietf.org>; Mon, 10 Jan 2011 01:12:56 -0800 (PST)
Received: by qyj19 with SMTP id 19so20682975qyj.10 for <hybi@ietf.org>; Mon, 10 Jan 2011 01:15:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.53.213 with SMTP id n21mr26710032qag.399.1294650905892; Mon, 10 Jan 2011 01:15:05 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Mon, 10 Jan 2011 01:15:05 -0800 (PST)
In-Reply-To: <AANLkTik0dLB_GKeAr8uKnF8QvOG53gETmTdgVWRaAT_s@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <AANLkTikTQ98ORhYJEK8LJCcjs9e4r_eKn1xr858mCnBn@mail.gmail.com> <AANLkTik0dLB_GKeAr8uKnF8QvOG53gETmTdgVWRaAT_s@mail.gmail.com>
Date: Mon, 10 Jan 2011 10:15:05 +0100
X-Google-Sender-Auth: y3kVSJHO1w93OK3eLDToTAR1T3s
Message-ID: <AANLkTi=hceS22=_jZk2G0Se0mtShp8bfPOE03-nNXo_4@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 09:13:28 -0000

On 10 January 2011 01:46, Adam Barth <ietf@adambarth.com> wrote:
> Thanks for your feedback. =A0I'd encourage you not to implement this
> protocol then.

Note also that this discussion is not about implementation.

If browsers implement some protocol, then the servers and
intermediaries will do their best to support it as we have always
done, no matter how ill conceived the ideas or how little the server
side concerns have been considered.

But implementation is entirely different to standardisation, which is
the point of the discussions here.   The get standardisation at the
IETF, you need consensus from all the main constituencies and from the
wider IETF community.  If the browser vendors chose to ignore the
concerns of the intermediaries and server side, that does not make
those concerns go away - they remain and almost certainly means will
be found to address them that will in all probability be proprietary
and/or disparate, thus making the chances of WS becoming an IETF
standard even less likely.

From w@1wt.eu  Mon Jan 10 02:48:39 2011
Return-Path: <w@1wt.eu>
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 7138228C138 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 02:48:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.077
X-Spam-Level: 
X-Spam-Status: No, score=-2.077 tagged_above=-999 required=5 tests=[AWL=-0.034, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 E0VdUrCRfoL6 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 02:48:38 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 678B628C137 for <hybi@ietf.org>; Mon, 10 Jan 2011 02:48:37 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0AAoiBj012431; Mon, 10 Jan 2011 11:50:44 +0100
Date: Mon, 10 Jan 2011 11:50:44 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110110105044.GA12428@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com> <20110110063646.GJ5743@1wt.eu> <AANLkTintz6hWL1ez0-FnPaZmi1jfBhtZ+NMd60dM=Y=D@mail.gmail.com> <20110110065822.GM5743@1wt.eu> <AANLkTinVq9d=fSph8SZiDFrSFCwRQvyJFAiOwBZjnGjA@mail.gmail.com> <20110110070820.GN5743@1wt.eu> <AANLkTinrhE9SWnPigQxTgPEM-LkugxxRjP++GnppPDnh@mail.gmail.com> <20110110075208.GO5743@1wt.eu> <AANLkTi=JJquFaa7ReCUVz=5P4ERuGBq=aDrtBy2oDngu@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTi=JJquFaa7ReCUVz=5P4ERuGBq=aDrtBy2oDngu@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 10:48:39 -0000

On Sun, Jan 09, 2011 at 11:55:50PM -0800, Adam Barth wrote:
> Or we could just use AES-128-CTR like everyone else in the known
> universe and not worry about whether we've shaved exactly the right
> number of hairs off our home-brew pseudo crypto.

To the best of my knowledge, HTTP itself does not make use of AES-128-CTR
when posting data, nor when using PUT to send a file, despite some
implementations not being aware of this method.

Willy


From dave@cridland.net  Mon Jan 10 04:35:34 2011
Return-Path: <dave@cridland.net>
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 1FB5E28C148 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 04:35:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.533
X-Spam-Level: 
X-Spam-Status: No, score=-2.533 tagged_above=-999 required=5 tests=[AWL=0.066,  BAYES_00=-2.599]
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 E9e34SfgijGq for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 04:35:32 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 1E9BA28C133 for <hybi@ietf.org>; Mon, 10 Jan 2011 04:35:32 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 9E24C116811D; Mon, 10 Jan 2011 12:37:44 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id InOcFfoV4a9R; Mon, 10 Jan 2011 12:37:40 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id CAE6411680FB; Mon, 10 Jan 2011 12:37:39 +0000 (GMT)
References: <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <AANLkTinQADv+iq50=dsvK13cu1YdS5sb+xHvDZnfdOjB@mail.gmail.com> <20110107061043.GJ28367@1wt.eu> <AANLkTikHXQza-gx=tqD7jZ+ueQZTXa9acRVG+bBfdApG@mail.gmail.com> <20110107063854.GN28367@1wt.eu> <4D26D20C.8030906@warmcat.com> <10468.1294391783.740346@puncture> <20110107100313.GO28367@1wt.eu> <10468.1294398928.011152@puncture> <4D28AE05.4070500@callenish.com>
In-Reply-To: <4D28AE05.4070500@callenish.com>
MIME-Version: 1.0
Message-Id: <2948.1294663059.826493@puncture>
Date: Mon, 10 Jan 2011 12:37:39 +0000
From: Dave Cridland <dave@cridland.net>
To: Bruce Atherton <bruce@callenish.com>, Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] A bit of pragmatism / intermediary triage
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: Mon, 10 Jan 2011 12:35:34 -0000

On Sat Jan  8 18:33:41 2011, Bruce Atherton wrote:
> On 07/01/2011 3:15 AM, Dave Cridland wrote:
>> 
>> Would the working group consider masking in this parallel  
>> universe? Of course not, because that would be silly.
> 
> I disagree. I think an argument can be made for masking even in the  
> absence of a known attack. Call me silly if you want to.
> 
> 
Given you've granted me permission, then, yes. You're being silly.

> The question is how much are we willing to pay for a benefit that  
> we can't quantify and that may never appear. Hopefully, if there  
> were no cost at all to masking you would not have an issue with it.  
> As the cost goes up, we start seeing more and more people decide  
> that the price is too high for a risk that is so nebulous. So there  
> is a real incentive to keeeping the cost of masking low, to me.
> 
> The other question is whether we can eliminate that cost altogether  
> in situations where we can guarantee via other means that attackers  
> are not controlling the bits.
> 
> 
This is all reasonable.

>>  intermediaries that are already vulnerable to attacks of the form  
>> we're trying to protect against by using Flash or Java.
> 
> I keep seeing comparisons of Websockets to Flash and Java. These  
> are not even close to being the same situation.
> 
> Browser vendors do not develop Flash or Java plugins. They do not  
> ship with them. Many environments forbid the installation of any  
> plugins for exactly the reason that Flash and Java are security  
> risks. When a user installs the plugin, they have to take  
> responsibility for doing so, and any bugs or security issues are  
> directed to Adobe or Oracle or whoever developed the plugin.
> 
> Websockets is different. Websockets is going to be part of the  
> browser. The browser vendors are going to ship their own code. That  
> means that they are responsible for Websockets, as they are not  
> responsible for Flash and Java. It also means that browsers will  
> always have an implementation of Websockets installed in all  
> environments, including the ones that don't allow plugins (although  
> they may be configured to turn it off).
> 
> 
What this is saying is that the reasoning for masking is *not*  
technical, but political.

 From a technical standpoint, Flash and Java both allow the attack  
against the intermediaries to be mounted with a far higher degree of  
success.


>> (And, maybe, ActiveX?) One assumes that, therefore, these will be  
>> fixed, and not just due to websockets, but due to the far more  
>> widely used rich content technologies of today.
> 
> That seems to be false given that they haven't been fixed to date.  
> I doubt that any browser vendor wants to take the risk and assume  
> they will be fixed, only to see themselves labeled "Insecure" by  
> people who don't understand where the real security vulnerability  
> was.
> 
> 
I think it's far too early to be considered false. It'll only take  
one widely publicised case and a testing tool, and the vast majority  
of intermediaries will be fixed. The widely publicised case is far  
more likely to be Flash based than anything else, too.


> This is a known vulnerability. No major browser vendor is going to  
> ship a Websockets implementation that is exposed to it. They have  
> all said so on this list. Let's move on.

Well, as responsible browser vendors, they could just ship with a  
built-in test tool which checked for a vulnerable intermediary on  
startup and disable WebSockets if one is found - it'd only take a  
couple of seconds to test at worst. But instead they seem to want to  
ship with a truly bizarre overhead of questionable merit.

Since this is no longer a technical argument, I'll refrain from  
attempting to apply technical reasoning, though.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From dave@cridland.net  Mon Jan 10 04:48:26 2011
Return-Path: <dave@cridland.net>
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 06CB728C142 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 04:48:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.535
X-Spam-Level: 
X-Spam-Status: No, score=-2.535 tagged_above=-999 required=5 tests=[AWL=0.064,  BAYES_00=-2.599]
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 Ea-6q2UUm4ZN for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 04:48:25 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id A3B2628C156 for <hybi@ietf.org>; Mon, 10 Jan 2011 04:48:24 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 8D45E1168117; Mon, 10 Jan 2011 12:50:36 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L2mxl3uPQPEQ; Mon, 10 Jan 2011 12:50:32 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 3C86A11680FB; Mon, 10 Jan 2011 12:50:32 +0000 (GMT)
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu> <BDA504E6-A722-4513-A660-467E22140958@apple.com>
In-Reply-To: <BDA504E6-A722-4513-A660-467E22140958@apple.com>
MIME-Version: 1.0
Message-Id: <2948.1294663832.250014@puncture>
Date: Mon, 10 Jan 2011 12:50:32 +0000
From: Dave Cridland <dave@cridland.net>
To: Maciej Stachowiak <mjs@apple.com>, Server-Initiated HTTP <hybi@ietf.org>, Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Mon, 10 Jan 2011 12:48:26 -0000

On Sun Jan  9 19:44:45 2011, Maciej Stachowiak wrote:
> I remember that being said, but I am skeptical. My understanding of  
> US crypto export regulations is that merely using existing crypto  
> facilities from the operating system or from separate components is  
> not subject to export limitations. AES-CTR is in libcrypto which is  
> widely available all over the world. I'm skeptical that there is  
> any place in the world where you can easily use SHA1 HMAC but not  
> AES-CTR. So if anyone wants to claim that use of AES-CTR would  
> cause problems with export regulations, I would ask them to  
> substantiate that claim.
> 
> 
I can only repeat that in the UK, we must ship software such that  
high-grade encryption algorithm support can be disabled, by  
government regulations. Using AES-CTR as a masking algorithm would  
prevent us from shipping with WebSocket support.


> Even if the export considerations do turn out to be real, AES-CTR  
> has better security properties and considerably better performance  
> than HMAC. I don't think we should let the legal regime around  
> crypto limit the quality of the protocol.

Perhaps not, but it would affect the deployment.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From gregw@intalio.com  Mon Jan 10 06:05:37 2011
Return-Path: <gregw@intalio.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 D591F3A69A0 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 06:05:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.93
X-Spam-Level: 
X-Spam-Status: No, score=-2.93 tagged_above=-999 required=5 tests=[AWL=0.047,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 a4VbMe2XO-cq for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 06:05:37 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id DDBF33A6834 for <hybi@ietf.org>; Mon, 10 Jan 2011 06:05:36 -0800 (PST)
Received: by qwi2 with SMTP id 2so4095494qwi.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 06:07:50 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.36.208 with SMTP id u16mr26913826qad.299.1294668470387; Mon, 10 Jan 2011 06:07:50 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Mon, 10 Jan 2011 06:07:50 -0800 (PST)
In-Reply-To: <4D2A4FFE.6000503@callenish.com>
References: <4D2A4FFE.6000503@callenish.com>
Date: Mon, 10 Jan 2011 15:07:50 +0100
X-Google-Sender-Auth: CEBjSrFhZta1zMoRDEZHZsKnBWM
Message-ID: <AANLkTikb+YHt9=6C+Q=8wSy89zCp_3RhDiq9qosxVy9=@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Summary of issues concerning the default masking algorithm
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: Mon, 10 Jan 2011 14:05:37 -0000

IMNSHO:

> a) The client nonce should influence the mask

PROS: None that I can think of over a good random mask
CONS: Makes the mask stream dependent, preventing debugging of partial
streams.  If masking is applied to framing, this make multiplexing and
debugging significantly more complex.

> b) The server nonce should influence the mask

same as a)


> c) The mask should be kept off the wire by generating the mask using a
> shared secret

same as a)


> d) The attacker should not only be prevented from controlling the bits, but
> also the pattern of bits

Not sure what this means?  If it is referring to using and algorithm
such that the a mask pattern does not repeat

PROS: Increases the data that must be sent to achieve some plain text
from a huge amount to a humongous amount.
CONS: Only increases the data that must be sent and does not actually
prevent any clear text data.


> e) masking the framing as well as the payload.

PROS: none that I can think of
CONS: makes decoding framing more complex.  Means that all WS aware
code must implement the specific masking algorithm, which effectively
means that it will never be able to be turned off.


> f) making masking use the current frame extension mechanism

PROS: Puts masking inside the frame, so avoids CONS of e).   Validates
the extension mechanism. Allows intermediaries that do not care about
payload to ignore masking.
CONS: None that I can think of.


> g) make masking be a negotiated extension (either to turn it on or off)

PROS: Allows crypto agility. Allows no masking deployments.
CONS: An extension negotiation mechanism will need to be implemented.
Slightly more verbose handshake.

From ekr@rtfm.com  Mon Jan 10 07:37:04 2011
Return-Path: <ekr@rtfm.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 2380D3A67ED for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 07:37:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.648
X-Spam-Level: 
X-Spam-Status: No, score=-102.648 tagged_above=-999 required=5 tests=[AWL=0.329, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 G5jZbnXwxTIV for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 07:37:02 -0800 (PST)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by core3.amsl.com (Postfix) with ESMTP id B555528C10C for <hybi@ietf.org>; Mon, 10 Jan 2011 07:37:02 -0800 (PST)
Received: by gxk28 with SMTP id 28so9004786gxk.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 07:39:16 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.64.2 with SMTP id r2mr6320880agk.133.1294673955918; Mon, 10 Jan 2011 07:39:15 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Mon, 10 Jan 2011 07:39:14 -0800 (PST)
In-Reply-To: <AANLkTi=mobwinB_+oxznk4cpnQstBHjHb-9orpeVS8Wo@mail.gmail.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <4D26DE2D.5040901@ericsson.com> <AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com> <B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com> <AANLkTi=mobwinB_+oxznk4cpnQstBHjHb-9orpeVS8Wo@mail.gmail.com>
Date: Mon, 10 Jan 2011 07:39:14 -0800
Message-ID: <AANLkTi=7dB-cFiyBwCkv03hd++d7ufBdnHP63_TOzwrK@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Brodie Thiesfield <brodie@jellycan.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Mon, 10 Jan 2011 15:37:04 -0000

On Sun, Jan 9, 2011 at 7:00 PM, Brodie Thiesfield <brodie@jellycan.com> wrote:
> Where clients aren't behind NAT a direct connection can be used, when
> they are then a central hub relay.

A better approach is to actually do hole punching. Seriously, there is
already IETF work
being spun up in this area. It will be informed by this WG, but it's a
different set of problems.

Given that it's out of scope for this WG, we really should not be
considering it.

-Ekr


More complex schemes could be added
> later, however simply trying for a direct connection and falling back
> to a central relay is possible with the existing protocol.
>
> However this problem is solved though, we will still have a client is
> acting as a server and (I am assuming) that client will still want to
> send masked data too. In the case of direct connection, where no
> central server can modify the data stream, the client on the other end
> must unmask the data coming from the server. So the most basic support
> for p2p with the current protocol maintaining security guarantees
> would only require a client to be able to accept either masked or
> unmasked responses from the server.
>
> The security paranoid could then also optionally configure a server to
> send masked responses (if supported).
>
> Regards,
> Brodie
>
>
> On Mon, Jan 10, 2011 at 11:39 AM, Eric Rescorla <ekr@rtfm.com> wrote:
>> Not really. Meaningful p2p operation requires nat traversal
>>
>> Ekr
>>
>> On Jan 9, 2011, at 17:02, Brodie Thiesfield <brodie@jellycan.com> wrote:
>>
>>> I understand that this can be addressed later, however supporting peer
>>> to peer in the protocol appears to only require a client to also
>>> support the optional masking of the server responses.
>>>
>>> In the case of a browser acting as the server, it will need to
>>> implement the server side of things like handshake and unmasking
>>> client messages. However, given that it is really also a client (with
>>> the same unknown intermediataries, etc), I assume that it would be
>>> desirable to have the same security protections as a simple client,
>>> and so it would also want to send messages using masking.
>>>
>>> As long as simple clients can also receive messages from a server with
>>> masking enabled, then there appears to be no reason that peer to peer
>>> wouldn't work with the same security guarantees (for the protocol)
>>> that client->server does.
>>>
>>> i.e.
>>> client -> server = masked
>>> server -> client = cleartext | masked
>>>
>>> How the server notifies the client that it is going to send masked
>>> responses remains unspecified.
>>>
>>> Regards,
>>> Brodie
>>>
>>>
>>> On Fri, Jan 7, 2011 at 7:34 PM, Salvatore Loreto
>>> <salvatore.loreto@ericsson.com> wrote:
>>>> On 1/7/11 2:23 AM, John Tamplin wrote:
>>>>
>>>> On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <bruce@callenish.com> wrote:
>>>>>
>>>>> So far it appears that Greg, Brodie, Jerod, and I favour including
>>>>> peer-to-peer design considerations in the spec. I am not sure, but it sounds
>>>>> like John considers it out of scope and Scott considers it in scope. What
>>>>> about the rest of you?
>>>>
>>>> I am not opposed to it exactly, but given how long everything has taken I am
>>>> keen to keep the base protocol minimal so we can actually get something out
>>>> the door.
>>>>
>>>> I agree with John,
>>>> lets keep the base protocol minimal at moment.
>>>> Once we have reached consensus on the minimal base protocol we can
>>>> start to add other stuff on top of the minimal base.
>>>>
>>>> If there is consensus in doing something in the future we can track it in
>>>> the issue tracker
>>>> so we won't forget.
>>>>
>>>>
>>>> cheers
>>>> /Sal
>>>>
>>>> --
>>>> Salvatore Loreto
>>>> www.sloreto.com
>>>>
>>>> _______________________________________________
>>>> hybi mailing list
>>>> hybi@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/hybi
>>>>
>>>>
>>> _______________________________________________
>>> hybi mailing list
>>> hybi@ietf.org
>>> https://www.ietf.org/mailman/listinfo/hybi
>>
>

From ekr@rtfm.com  Mon Jan 10 07:38:19 2011
Return-Path: <ekr@rtfm.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 5B13528C10C for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 07:38:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.6
X-Spam-Level: 
X-Spam-Status: No, score=-102.6 tagged_above=-999 required=5 tests=[AWL=0.377,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 rsa5FWoLzDqZ for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 07:38:18 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 4C3A828B56A for <hybi@ietf.org>; Mon, 10 Jan 2011 07:38:18 -0800 (PST)
Received: by gwj17 with SMTP id 17so10240029gwj.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 07:40:32 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.64.2 with SMTP id r2mr6322093agk.133.1294674032018; Mon, 10 Jan 2011 07:40:32 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Mon, 10 Jan 2011 07:40:31 -0800 (PST)
In-Reply-To: <AANLkTin2sLa1z=W6TE3tJmg1gJLQHhw6w_91wq4XQzUe@mail.gmail.com>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <AANLkTi=aHRD5tazXX7TqR3gHo9QWe9SLtvHjDghS1UjW@mail.gmail.com> <AANLkTi=y75Pi2TCUd_KS1RbAgUD2OjDLYX_QnRrOXMba@mail.gmail.com> <AANLkTin2sLa1z=W6TE3tJmg1gJLQHhw6w_91wq4XQzUe@mail.gmail.com>
Date: Mon, 10 Jan 2011 07:40:31 -0800
Message-ID: <AANLkTimBdKAQbabznaPWSuUSdntjsWq2CEpxn8rjN7gV@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Masking overhead with measurements and code
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: Mon, 10 Jan 2011 15:38:19 -0000

On Mon, Jan 10, 2011 at 1:08 AM, Greg Wilkins <gregw@webtide.com> wrote:
> On 9 January 2011 16:14, Eric Rescorla <ekr@rtfm.com> wrote:
>> On Sun, Jan 9, 2011 at 1:43 AM, Greg Wilkins <gregw@webtide.com> wrote:
>>>
>>
>> Wow, I think you have this completely backwards: it's in systems that
>> do almost nothing
>> that the cost of adding a new, expensive operation is large. In
>> systems that are already
>> doing a lot of other processing, the marginal cost is comparaitvely
>> low even though it may
>> occasionally push you over some threshold; Amdahl's law and all that.
>
>
> Eric,
>
> I did not say system that are "already doing a lot of other
> processing", I said systems where parsing is around 5% of the CPU
> load. =A0 This may be for a high message rate on a large server or it
> may be for a low message rate on a constrained device. =A0 For such
> systems, multiplying the CPU work needed to parse a message several
> times will have significant impacts.
>
> Besides, it is self evident that adding cryptographic processing to a
> protocol puts additional loads on application servers - we need only
> look at SSL and the existence of SSL offload devices.

Funny you should mention that: all measurements show that the dominant cost
of TLS is the RSA key exchange, which is why it's such a common strategy no=
t
to accelerate the symmetric cryptography at all.

-Ekr

From ekr@rtfm.com  Mon Jan 10 07:40:41 2011
Return-Path: <ekr@rtfm.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 BDAC03A67FC for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 07:40:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.651
X-Spam-Level: 
X-Spam-Status: No, score=-102.651 tagged_above=-999 required=5 tests=[AWL=0.326, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 9JSkdi+q255p for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 07:40:41 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id E7A643A67ED for <hybi@ietf.org>; Mon, 10 Jan 2011 07:40:40 -0800 (PST)
Received: by yie19 with SMTP id 19so6255318yie.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 07:42:54 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.26.24 with SMTP id d24mr6362976agj.160.1294674174656; Mon, 10 Jan 2011 07:42:54 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Mon, 10 Jan 2011 07:42:54 -0800 (PST)
In-Reply-To: <2948.1294663832.250014@puncture>
References: <20110108111632.GI2479@1wt.eu> <1294531527.7650.535.camel@ds9.ducksong.com> <56F80FB9-DAAD-40CA-92E8-21390546851B@apple.com> <20110109143423.GM5743@1wt.eu> <BDA504E6-A722-4513-A660-467E22140958@apple.com> <2948.1294663832.250014@puncture>
Date: Mon, 10 Jan 2011 07:42:54 -0800
Message-ID: <AANLkTik-JCmOJAUWFdMwwh_zsKZ9q26Diq7Nv9pzFbSY@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Dave Cridland <dave@cridland.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] AES-CTR is darned fast (was Re: Masking overhead with measurements and code)
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: Mon, 10 Jan 2011 15:40:41 -0000

On Mon, Jan 10, 2011 at 4:50 AM, Dave Cridland <dave@cridland.net> wrote:
> On Sun Jan =A09 19:44:45 2011, Maciej Stachowiak wrote:
>>
>> I remember that being said, but I am skeptical. My understanding of US
>> crypto export regulations is that merely using existing crypto facilitie=
s
>> from the operating system or from separate components is not subject to
>> export limitations. AES-CTR is in libcrypto which is widely available al=
l
>> over the world. I'm skeptical that there is any place in the world where=
 you
>> can easily use SHA1 HMAC but not AES-CTR. So if anyone wants to claim th=
at
>> use of AES-CTR would cause problems with export regulations, I would ask
>> them to substantiate that claim.
>>
>>
> I can only repeat that in the UK, we must ship software such that high-gr=
ade
> encryption algorithm support can be disabled, by government regulations.

I don't mean to be flat-out contradictory, but I'd like to see a legal
opinion on this point,
because at least in the US, the use to which you are putting
encryption matters, and
this use would be fine.

-Ekr

From ekr@rtfm.com  Mon Jan 10 07:41:38 2011
Return-Path: <ekr@rtfm.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 399E33A67FC for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 07:41:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.655
X-Spam-Level: 
X-Spam-Status: No, score=-102.655 tagged_above=-999 required=5 tests=[AWL=0.322, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 3zl1pRj91Ot1 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 07:41:37 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 603633A67ED for <hybi@ietf.org>; Mon, 10 Jan 2011 07:41:37 -0800 (PST)
Received: by yxt33 with SMTP id 33so8534493yxt.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 07:43:51 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.83.18 with SMTP id k18mr6263131agl.79.1294674231077; Mon, 10 Jan 2011 07:43:51 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Mon, 10 Jan 2011 07:43:50 -0800 (PST)
In-Reply-To: <20110110063930.GK5743@1wt.eu>
References: <4D2A4FFE.6000503@callenish.com> <4D2A6FB9.1030005@callenish.com> <20110110063930.GK5743@1wt.eu>
Date: Mon, 10 Jan 2011 07:43:50 -0800
Message-ID: <AANLkTikXQB+B5VKPMrUm6jCu5EpPsS1+mwp90+1TdG93@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi@ietf.org
Subject: Re: [hybi] Summary of issues concerning the default masking algorithm
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: Mon, 10 Jan 2011 15:41:38 -0000

On Sun, Jan 9, 2011 at 10:39 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 09, 2011 at 06:32:25PM -0800, Bruce Atherton wrote:
>> The cost of losing the ability to decode streams is, to me, extremely
>> high. It is beyond that, it is painful. When I have to debug a network
>> issue in a customer's environment, a problem that would take me a few
>> hours with a decoded stream jumps to days or even weeks. What is worse
>> is that it is often difficult if not impossible to demonstrate to the
>> customer when the issue is not with my application. Although I can
>> create multitudes of logs that show all the bits my application receives
>> and sends, the customer has no way of knowing whether there are bits
>> that are not logged because they are dealt with via another code path.
>
> +1, that's an experience I share all the day too the other way around,
> proving from network captures that the application is faulty, despite
> how expensive it was !

Building tools to process this kind of masked data is trivial. Heck, tools to
decode full SSL aren't even that hard. I know because I've built them.

-Ekr

From ekr@rtfm.com  Mon Jan 10 07:50:39 2011
Return-Path: <ekr@rtfm.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 929453A69A0 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 07:50:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.658
X-Spam-Level: 
X-Spam-Status: No, score=-102.658 tagged_above=-999 required=5 tests=[AWL=0.319, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 emJpQ+iNV38Z for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 07:50:37 -0800 (PST)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by core3.amsl.com (Postfix) with ESMTP id 9AD3D3A6973 for <hybi@ietf.org>; Mon, 10 Jan 2011 07:50:36 -0800 (PST)
Received: by gxk28 with SMTP id 28so9010487gxk.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 07:52:50 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.67.10 with SMTP id u10mr6305478agk.187.1294674770187; Mon, 10 Jan 2011 07:52:50 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Mon, 10 Jan 2011 07:52:50 -0800 (PST)
In-Reply-To: <20110109175118.GP5743@1wt.eu>
References: <20110109175118.GP5743@1wt.eu>
Date: Mon, 10 Jan 2011 07:52:50 -0800
Message-ID: <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 15:50:39 -0000

On Sun, Jan 9, 2011 at 9:51 AM, Willy Tarreau <w@1wt.eu> wrote:

> The server will check the input stream, looking for the bytes "G" and "E"=
.
> If those bytes do not appear, it will terminate the connection because it
> means this connection will require too many blocks to get the correct val=
ues.

Nice observation.

I haven't gotten too much sleep but...

As I understand your attack, the way this works is that you're
exploiting the fact that
the server gets information about the repeating mask to shut down unproduct=
ive
byte sequences before they have been transmitted over the wire. This makes =
sense
if you think that the network transmission is the rate limiting step.

The obvious countermeasure to this is to ensure that the server
doesn't learn anything
useful prior to receiving the whole packet. This can't be done with a
fixed mask for the
reasons you indicate but can be done with a generated mask, I believe.
Consider the
packet structure (omitting most framing bits)

AES-CTR(K_msg, Payload) || K_msg

In this case, no matter how much information the attacker has about
payload byte i,
he doesn't learn anything useful about expected ciphertext
(transmitted) byte i+1
until the key is received (this is by definitional properties of
AES-CTR). So, the bytestream
on the wire is indistinguishable from random, precluding the attack
you describe.

The major cost is that an ordinary server cannot start processing the
message until the per-msg
key is received at the end, but since we've already disclaimed most
streaming modes
of operation (and the client can't stream anyway because of the need
to commit to the
packet contents), this seems like a relatively minor cost.

This attack seems to me like it makes full-length masking more attractive.

Best,
-Ekr





> The 160-bit mask offers us the ability to find the required pattern a lot
> faster, because in each connections, this fixed mask can in fact be seen =
as 5
> indepedant 32-bit masks. The net effect it that it divides by 5 the numbe=
r of
> required connections to get the expected bytes (in practice, it is possib=
le to
> achieve the same optimization with a smaller mask, it just requires the c=
lient
> to send multiple different patterns). On average, 65536/5 =3D 13107 conne=
ctions
> are required to get a candidate connection.
>
> If the server finds that the XOR mask will make "G" and "E" appear, then =
it
> reads the stream so that the client emits all possible combinations of 3r=
d
> and 4th chars, which means that at most 20*65536 =3D 1.3 Megabytes are re=
quired
> once a candidate connection is found.
>
> The ws-attack program contains both the client and the server code. For t=
he
> sake of simplicity, it does not do any networking, but it is designed wit=
h
> clearly distinct parts which communicate via a sequentially accessed buff=
er,
> so that the roles are more easily identifiable and both could be split if
> required.
>
> Results :
>
> =A0 The program can be downloaded at http://1wt.eu/websocket/ws-attack.c
>
> willy@pcw:~/c$ time ./ws-attack
> Found pattern 'GET\n' at block 172226 after 6615 connections and 1469504 =
bytes sent
>
> real =A0 =A00m0.030s
> user =A0 =A00m0.032s
> sys =A0 =A0 0m0.000s
> willy@pcw:~/c$ time ./ws-attack
> Found pattern 'GET\n' at block 207343 after 16071 connections and 1696448=
 bytes sent
>
> real =A0 =A00m0.069s
> user =A0 =A00m0.068s
> sys =A0 =A0 0m0.000s
> willy@pcw:~/c$ time ./ws-attack
> Found pattern 'GET\n' at block 150470 after 95 connections and 1313024 by=
tes sent
>
> real =A0 =A00m0.003s
> user =A0 =A00m0.000s
> sys =A0 =A0 0m0.004s
> willy@pcw:~/c$ time ./ws-attack
> Found pattern 'GET\n' at block 139582 after 28577 connections and 1996592=
 bytes sent
>
> real =A0 =A00m0.119s
> user =A0 =A00m0.116s
> sys =A0 =A0 0m0.008s
>
>
> Conclusion :
>
> Between 1.3 and 1.9 MB of framing data were required to get the expected
> request the masking method was supposed to prevent from appearing.
>
> A sliding self-regenerating mask would only make it slightly harder for t=
he
> server to decide upon accepting or rejecting the connection, because once=
 it
> gets the seed, it can locally simulate the emitted stream to find whether=
 the
> pattern will appear or not, but the improvement is not significant.
>
> All in all, we see that we still need the client to send megabytes of dat=
a
> to make a short request pop up. It is extremely unlikely that any caching
> intermediary would skip over that amount of data to spot a valid request,=
 and
> it is contrary to the principle of lazyness because implementing such one=
 is
> a lot harder than making it do the right thing. BTW, no such intermediary=
 has
> yet been detected nor identified.
>
> All the issues always converge to the same point : avoiding the LF charac=
ter
> (and possibly the CR) in the WS stream. But that's not easy or it require=
s
> more expensive escaping or encoding (eg: base64).
>
> Proposals :
>
> =A01) keep the XOR-based masking with a simpler key generation algorithm =
to
> =A0 =A0keep the per-frame masking cost low. An improvement might also con=
sist
> =A0 =A0in avoiding the LF character in the key.
>
> =A02) use a more expensive LF-less masking such as base64, but this one m=
ust be
> =A0 =A0optional.
>
> =A03) escape the LF character and define an escape character which must a=
lso be
> =A0 =A0escaped itself. It is cheaper network-wise, but more expensive on =
the
> =A0 =A0client side where the stream must be read once to count the LFs be=
fore
> =A0 =A0being encoded and emitted.
>
> =A04) use Dave Cridland's idea of inserting an invalid HTTP request befor=
e the
> =A0 =A0beginning of the stream. The request should remain simple and shor=
t with
> =A0 =A0the goal to quickly fail.
>
> My personal suggestion would be stay in line with the progress that was d=
one
> and to go for #1.
>
> Regards,
> Willy
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From derhoermi@gmx.net  Mon Jan 10 09:10:22 2011
Return-Path: <derhoermi@gmx.net>
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 817913A6817 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 09:10:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.634
X-Spam-Level: 
X-Spam-Status: No, score=-3.634 tagged_above=-999 required=5 tests=[AWL=-1.035, BAYES_00=-2.599]
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 AtF1owISt+rv for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 09:10:21 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id DC3DB3A67ED for <hybi@ietf.org>; Mon, 10 Jan 2011 09:10:20 -0800 (PST)
Received: (qmail invoked by alias); 10 Jan 2011 17:12:34 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp018) with SMTP; 10 Jan 2011 18:12:34 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX18ap6x9SXcaP4Wnnfgjzl04d0VMogE59kk2lls5yd qBJj8ewb0aCers
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Willy Tarreau <w@1wt.eu>
Date: Mon, 10 Jan 2011 18:12:27 +0100
Message-ID: <nfdmi6p9vslg23h65rsto52plphgumha28@hive.bjoern.hoehrmann.de>
References: <20110109175118.GP5743@1wt.eu>
In-Reply-To: <20110109175118.GP5743@1wt.eu>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 17:10:22 -0000

* Willy Tarreau wrote:
>I found that it was possible to sensibly reduce the difficulty in making
>an intermediary forward a valid HTTP request despite masking. My feeling
>is that the risk remains extremely low as it still requires a substantial
>amount of garbage to be skipped to find a request, and that we have not
>detected any such vulnerable intermediaries. Still I wanted to share my
>experiments.

I think there are a couple of problems with your attack, but while Adam
Barth is evaluating whether we can make progress by sending many mails
without contributing any new information, it seems better to be brief.

As I understand it, you are saying by using many connections you can
reduce the amount of data that needs to be sent to make a pattern appear
on the wire. You can't make as many connections as you seem to need to
make much of a difference, because clients that can be controlled by
untrusted parties will have measures against that to prevent probing
and denial of service attacks.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From ferg@caucho.com  Mon Jan 10 10:05:15 2011
Return-Path: <ferg@caucho.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 85AEF3A6AFF for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:05:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.169
X-Spam-Level: 
X-Spam-Status: No, score=-2.169 tagged_above=-999 required=5 tests=[AWL=0.430,  BAYES_00=-2.599]
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 SYG-GR95KMGP for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:05:14 -0800 (PST)
Received: from nm22-vm0.bullet.mail.sp2.yahoo.com (nm22-vm0.bullet.mail.sp2.yahoo.com [98.139.91.222]) by core3.amsl.com (Postfix) with SMTP id 5E6023A69CC for <hybi@ietf.org>; Mon, 10 Jan 2011 10:05:14 -0800 (PST)
Received: from [98.139.91.62] by nm22.bullet.mail.sp2.yahoo.com with NNFMP; 10 Jan 2011 18:07:28 -0000
Received: from [98.139.91.46] by tm2.bullet.mail.sp2.yahoo.com with NNFMP; 10 Jan 2011 18:07:28 -0000
Received: from [127.0.0.1] by omp1046.mail.sp2.yahoo.com with NNFMP; 10 Jan 2011 18:07:28 -0000
X-Yahoo-Newman-Id: 933451.30954.bm@omp1046.mail.sp2.yahoo.com
Received: (qmail 39632 invoked from network); 10 Jan 2011 18:07:28 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp112.biz.mail.sp1.yahoo.com with SMTP; 10 Jan 2011 10:07:28 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: js.nIrMVM1n.AhzXkZ1M0Fv5r8Q8Pwce23Ct.uZ5voVAQav ZNQ8UyqnbkoIJ4XBjW489lCHsP9AmWmALP7CDSOMQSfGjPhlQVCmW.4tPSnv OoZtxWonpj6Mu9Wtdd9MN6InCWjQNa6o_R3URCpNU8GcmKbg_hGVbyCKz4Vv BIPzSS_mz86ziBsVk0ytzDMP2AMs6IjJwcqy0nbYuN5pY_cTpGzzMUZfQvIe iacXf6oAkoqP9NpTfryK6j4ZQalNawLzpwUou1L_gzQqAaxt5oMjRxg--
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D2B4AD7.80100@caucho.com>
Date: Mon, 10 Jan 2011 10:07:19 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <20110110000908.GD5743@1wt.eu>	<8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com> <20110110063646.GJ5743@1wt.eu>
In-Reply-To: <20110110063646.GJ5743@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 18:05:15 -0000

Willy Tarreau wrote:
>   2) it was speculated that some lazy intermediaries might possibly skip
>      over whatever they did not understand to resync on an HTTP request
>      they understand and execute it....

Has anyone attempted to justify this claim?

It's implicit in the entire discussion about hash algorithms, but I 
haven't seen an argument that any intermediary, lazy or not, has or will 
ever implement any kind of HTTP resyncing.

-- Scott


From dave@cridland.net  Mon Jan 10 10:13:27 2011
Return-Path: <dave@cridland.net>
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 0885A3A6AFF for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:13:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.537
X-Spam-Level: 
X-Spam-Status: No, score=-2.537 tagged_above=-999 required=5 tests=[AWL=0.063,  BAYES_00=-2.599]
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 S7wTtOUAghxn for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:13:26 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id CB3743A6B06 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:13:23 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 8FE2B1168117 for <hybi@ietf.org>; Mon, 10 Jan 2011 18:15:29 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gSwSCedPs+OU for <hybi@ietf.org>; Mon, 10 Jan 2011 18:15:17 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id E27C311680FB for <hybi@ietf.org>; Mon, 10 Jan 2011 18:15:16 +0000 (GMT)
MIME-Version: 1.0
Message-Id: <2948.1294683316.925357@puncture>
Date: Mon, 10 Jan 2011 18:15:16 +0000
From: Dave Cridland <dave@cridland.net>
To: Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: [hybi] Do we need to change the framing again?
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: Mon, 10 Jan 2011 18:13:27 -0000

Much of the design of the framing was in support of being able to  
perform lightweight streaming and sendfile() operations. Many of us  
went along with various very vocal requests for this, leading to a  
63-bit frame size, for example, which is impractical with masking. We  
all, I think, universally assumed a symmetric framing, whereas we  
have now discarded the symmetry anyway.

Given that we now require making, and (as EKR points out in another  
mail), this in turn requires that the per-frame key is transmitted at  
the end of each block, which damages streaming, should we be  
revisisting these early design decisions?

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From ifette@google.com  Mon Jan 10 10:14:00 2011
Return-Path: <ifette@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 9FD723A6B06 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:14:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.76
X-Spam-Level: 
X-Spam-Status: No, score=-103.76 tagged_above=-999 required=5 tests=[AWL=-1.684, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_51=0.6, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 D95lWiQm7RpZ for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:13:59 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 9EBC23A6AFF for <hybi@ietf.org>; Mon, 10 Jan 2011 10:13:58 -0800 (PST)
Received: from kpbe12.cbf.corp.google.com (kpbe12.cbf.corp.google.com [172.25.105.76]) by smtp-out.google.com with ESMTP id p0AIGBtu023858 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:16:11 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294683372; bh=3u9Wz0PqpFQq7nWgsfXq7NlJioQ=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=L7DkdfYIHG2Kw7NqfoE4bBZIDTvD52kr+4NyDGVigfv7IjQHavopKqXt4fHTAayPo qWMOPTdooSDbZXocP3WoQ==
Received: from qwe5 (qwe5.prod.google.com [10.241.194.5]) by kpbe12.cbf.corp.google.com with ESMTP id p0AIEG4T010107 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:16:10 -0800
Received: by qwe5 with SMTP id 5so22151563qwe.26 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:16:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=QkeMrRa2KrXSJ+lLEh0wnOY/PT+uOoGDXqQ4qAPL4Vc=; b=nX6qo+MoND4e09XPcnCD7i57oOl69alVUGeNMM9laXpYHqAqFGOEe/qUZz1GIN88pc H4PtRquMDFLCXm2myJhA==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=XKZq5SA97IvjkoBWg+aQRKqlHi3SzYDGNERZGqnnfV8oOWOO8NtccqbH7xKC3aCL4n znB5czeDgtsxquWDkkHw==
MIME-Version: 1.0
Received: by 10.229.81.11 with SMTP id v11mr4945358qck.152.1294683369704; Mon, 10 Jan 2011 10:16:09 -0800 (PST)
Received: by 10.229.0.137 with HTTP; Mon, 10 Jan 2011 10:16:09 -0800 (PST)
In-Reply-To: <20110110065408.GL5743@1wt.eu>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com> <20110110065408.GL5743@1wt.eu>
Date: Mon, 10 Jan 2011 10:16:09 -0800
Message-ID: <AANLkTimqw7Dri=m_Fj6Jai=KK59xVt_YVEM+AXTczPYq@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=0016364274d9590eb6049981f6ad
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Mon, 10 Jan 2011 18:14:00 -0000

--0016364274d9590eb6049981f6ad
Content-Type: text/plain; charset=UTF-8

On Sun, Jan 9, 2011 at 10:54 PM, Willy Tarreau <w@1wt.eu> wrote:

> Hello Ian,
>
> On Sun, Jan 09, 2011 at 10:08:13PM -0800, Ian Fette
> (????????????????????????) wrote:
> > >  - you're using the OPTIONS method. The WG's consensus was voted as
> using
> > >    GET. While technically working, OPTIONS limits some possibilities
> since
> > >    no path is sent to the server.
> > >
> > >
> > I agree it is important to be able to identify between various resources
> on
> > a server. E.g. for our use, we will have multiple different websocket
> > endpoints, and we want our frontend to be able to dispatch to the
> > appropriate backend based on the information in the handshake. That said,
> I
> > think the draft allows for that (Sec-WebSocket-URL), or as pointed out on
> > another thread, it appears OPTIONS does allow for a path component. So, I
> > think we should be able to resolve that point.
>
> Once again,I'm not opposed at all to this point. I'd even say that would it
> not have been accepted as a consensus in the last poll, I'd probably have
> voted for it. It's just that it's a change from what was planned till now
> and participants need to express their opinion on that point.
>
> > >  - your proposal involves AES-128-CTR. As was discussed here, it seems
> > > there
> > >    are still export regulations for certain countries eventhough
> they're
> > >    apparently fading out. It could still be a problem for companies who
> > > want
> > >    to export products to some countries and which never had to put
> crypto
> > > in
> > >    them.
> > >
> >
> > It would be nice to understand if this is actually a hard constraint.
> > AES-128-CTR has the benefit of being well understood, as well as fast, as
> > demonstrated by Maciej in another thread. That said, I don't care
> strongly
> > one way or another here.
>
> One of my issue with it is that despite being fast, it's a lot slower than
> simpler masking. I design software components to be used at the border side
> of infrastructures to dispatch the traffic to multiple servers, and I'm
> very much concerned by the performance limitations. On a machine which has
> normally no issue processing 10 Gbps of HTTP, I could not even process 1
> Gbps
> of WebSocket with large contents. This is much concerning because it
> implies
> that in order to build the stream analysers we've talked about in the past,
> it will become mandatory to install expensive crypto acceleration cards.
> This
> is not logical for a protocol which is supposed to be transferred in clear
> (ws:// as opposed to wss://). Checking for forbidden words, dangerous links
> or forbidden contents on campus sites will be much more expensive due to
> this
> masking algorithm alone.
>
> > >  - several people on the list asked for the ability to be able to
> disable
> > >    the masking in some well-controlled environments (eg:
> server-to-server
> > >    communications). I see no provisions for this.
> > >
> > >
> > There's nothing that would prevent you from writing an extension that
> would
> > disable the masking, from my understanding.
>
> Adam did not seem favorable to that.
>
> > >  - it has not yet been stated whether only the payload or also the
> framing
> > >    should be masked. Your proposal masks both, which means that it
> > > definitely
> > >    blocks any possibility of performing multiplexing later. There does
> not
> > >    appear to have been a consensus in this area yet.
> > >
> > >
> > I'm not sure why this would block the possibility of multiplexing. I
> would
> > agree that would be a problem if it were the case. However, a number of
> the
> > early proposals for multiplexing included something like a stream-id in
> the
> > frame. This could still be present. Though it would be masked, so would
> the
> > length and other things that a meaningful intermediary would care about,
> so
> > assuming the intermediary was capable of un-masking, is this an issue?
>
> Yes, and you got the point : if the ID is masked, how to you know which
> stream it is in order to pick the right unmask key ? At least the stream
> ID will have to be unmasked. If we prepend it before the frame, it means
> a new framing format. Till not it was suggested to have it in the frame.
>
>
So, you're saying that with the XOR masking where the entire content
required to unmask the frame was included in the frame, it would be easier
for an intermediary to thus examine the frame? I agree that it would be
easier, and that in the AES method it would require an intermediary to be
"active" instead of "passive", e.g. terminate the connection at the
intermediary. I personally think that's a good argument towards XOR, but am
personally not heavily invested either way as I think for our uses, we would
be terminating at the "intermediary" anyways.


> > >  - Greg proposed to replace the MORE bit with a FIN bit so that the
> first
> > >    hello frame from the server starts with a high bit set, thus
> ensuring
> > >    that we can break the connection on non-HTTP compliant
> intermediaries
> > >    which would expect a second response after the 101.
> > >
> > >
> > The draft Adam sent out is based on an intermediate version I had checked
> > into SVN, back when it looked like we were gaining speed on CONNECT. I
> > didn't yet get around to flipping MORE/FIN, but I don't have any
> ojbections
> > to this.
>
> OK.
>
> > > Those are just a few notes, it's really not easy to changes :-/
> > >
> >
> > There's a tool on the IETF to diff drafts. I find it quite helpful, that
> > said, a lot of text has changed because I had already started to make
> other
> > requested changes (including trying to resolve the HTTP compliance issue,
> by
> > stating the requirements of the handshake rather than stating send X
> bytes,
> > send Y bytes, ...). This makes the diff a bit harder to interpret, for
> sure.
>
> Ah, OK. Till now I'd only use the automated diffs between incremental
> drafts,
> I did not know that there were other tools.
>
>
http://tools.ietf.org/rfcdiff :)


> Regards,
> Willy
>
>

--0016364274d9590eb6049981f6ad
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sun, Jan 9, 2011 at 10:54 PM, Willy Tarreau <=
span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wr=
ote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex;">
Hello Ian,<br>
<div class=3D"im"><br>
On Sun, Jan 09, 2011 at 10:08:13PM -0800, Ian Fette (??????????????????????=
??) wrote:<br>
&gt; &gt; =C2=A0- you&#39;re using the OPTIONS method. The WG&#39;s consens=
us was voted as using<br>
&gt; &gt; =C2=A0 =C2=A0GET. While technically working, OPTIONS limits some =
possibilities since<br>
&gt; &gt; =C2=A0 =C2=A0no path is sent to the server.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; I agree it is important to be able to identify between various resourc=
es on<br>
&gt; a server. E.g. for our use, we will have multiple different websocket<=
br>
&gt; endpoints, and we want our frontend to be able to dispatch to the<br>
&gt; appropriate backend based on the information in the handshake. That sa=
id, I<br>
&gt; think the draft allows for that (Sec-WebSocket-URL), or as pointed out=
 on<br>
&gt; another thread, it appears OPTIONS does allow for a path component. So=
, I<br>
&gt; think we should be able to resolve that point.<br>
<br>
</div>Once again,I&#39;m not opposed at all to this point. I&#39;d even say=
 that would it<br>
not have been accepted as a consensus in the last poll, I&#39;d probably ha=
ve<br>
voted for it. It&#39;s just that it&#39;s a change from what was planned ti=
ll now<br>
and participants need to express their opinion on that point.<br>
<div class=3D"im"><br>
&gt; &gt; =C2=A0- your proposal involves AES-128-CTR. As was discussed here=
, it seems<br>
&gt; &gt; there<br>
&gt; &gt; =C2=A0 =C2=A0are still export regulations for certain countries e=
venthough they&#39;re<br>
&gt; &gt; =C2=A0 =C2=A0apparently fading out. It could still be a problem f=
or companies who<br>
&gt; &gt; want<br>
&gt; &gt; =C2=A0 =C2=A0to export products to some countries and which never=
 had to put crypto<br>
&gt; &gt; in<br>
&gt; &gt; =C2=A0 =C2=A0them.<br>
&gt; &gt;<br>
&gt;<br>
&gt; It would be nice to understand if this is actually a hard constraint.<=
br>
&gt; AES-128-CTR has the benefit of being well understood, as well as fast,=
 as<br>
&gt; demonstrated by Maciej in another thread. That said, I don&#39;t care =
strongly<br>
&gt; one way or another here.<br>
<br>
</div>One of my issue with it is that despite being fast, it&#39;s a lot sl=
ower than<br>
simpler masking. I design software components to be used at the border side=
<br>
of infrastructures to dispatch the traffic to multiple servers, and I&#39;m=
<br>
very much concerned by the performance limitations. On a machine which has<=
br>
normally no issue processing 10 Gbps of HTTP, I could not even process 1 Gb=
ps<br>
of WebSocket with large contents. This is much concerning because it implie=
s<br>
that in order to build the stream analysers we&#39;ve talked about in the p=
ast,<br>
it will become mandatory to install expensive crypto acceleration cards. Th=
is<br>
is not logical for a protocol which is supposed to be transferred in clear<=
br>
(ws:// as opposed to wss://). Checking for forbidden words, dangerous links=
<br>
or forbidden contents on campus sites will be much more expensive due to th=
is<br>
masking algorithm alone.<br>
<div class=3D"im"><br>
&gt; &gt; =C2=A0- several people on the list asked for the ability to be ab=
le to disable<br>
&gt; &gt; =C2=A0 =C2=A0the masking in some well-controlled environments (eg=
: server-to-server<br>
&gt; &gt; =C2=A0 =C2=A0communications). I see no provisions for this.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; There&#39;s nothing that would prevent you from writing an extension t=
hat would<br>
&gt; disable the masking, from my understanding.<br>
<br>
</div>Adam did not seem favorable to that.<br>
<div class=3D"im"><br>
&gt; &gt; =C2=A0- it has not yet been stated whether only the payload or al=
so the framing<br>
&gt; &gt; =C2=A0 =C2=A0should be masked. Your proposal masks both, which me=
ans that it<br>
&gt; &gt; definitely<br>
&gt; &gt; =C2=A0 =C2=A0blocks any possibility of performing multiplexing la=
ter. There does not<br>
&gt; &gt; =C2=A0 =C2=A0appear to have been a consensus in this area yet.<br=
>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; I&#39;m not sure why this would block the possibility of multiplexing.=
 I would<br>
&gt; agree that would be a problem if it were the case. However, a number o=
f the<br>
&gt; early proposals for multiplexing included something like a stream-id i=
n the<br>
&gt; frame. This could still be present. Though it would be masked, so woul=
d the<br>
&gt; length and other things that a meaningful intermediary would care abou=
t, so<br>
&gt; assuming the intermediary was capable of un-masking, is this an issue?=
<br>
<br>
</div>Yes, and you got the point : if the ID is masked, how to you know whi=
ch<br>
stream it is in order to pick the right unmask key ? At least the stream<br=
>
ID will have to be unmasked. If we prepend it before the frame, it means<br=
>
a new framing format. Till not it was suggested to have it in the frame.<br=
>
<div class=3D"im"><br></div></blockquote><div><br></div><div>So, you&#39;re=
 saying that with the XOR masking where the entire content required to unma=
sk the frame was included in the frame, it would be easier for an intermedi=
ary to thus examine the frame? I agree that it would be easier, and that in=
 the AES method it would require an intermediary to be &quot;active&quot; i=
nstead of &quot;passive&quot;, e.g. terminate the connection at the interme=
diary. I personally think that&#39;s a good argument towards XOR, but am pe=
rsonally not heavily invested either way as I think for our uses, we would =
be terminating at the &quot;intermediary&quot; anyways.</div>
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex;"><div class=3D"im">
&gt; &gt; =C2=A0- Greg proposed to replace the MORE bit with a FIN bit so t=
hat the first<br>
&gt; &gt; =C2=A0 =C2=A0hello frame from the server starts with a high bit s=
et, thus ensuring<br>
&gt; &gt; =C2=A0 =C2=A0that we can break the connection on non-HTTP complia=
nt intermediaries<br>
&gt; &gt; =C2=A0 =C2=A0which would expect a second response after the 101.<=
br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; The draft Adam sent out is based on an intermediate version I had chec=
ked<br>
&gt; into SVN, back when it looked like we were gaining speed on CONNECT. I=
<br>
&gt; didn&#39;t yet get around to flipping MORE/FIN, but I don&#39;t have a=
ny ojbections<br>
&gt; to this.<br>
<br>
</div>OK.<br>
<div class=3D"im"><br>
&gt; &gt; Those are just a few notes, it&#39;s really not easy to changes :=
-/<br>
&gt; &gt;<br>
&gt;<br>
&gt; There&#39;s a tool on the IETF to diff drafts. I find it quite helpful=
, that<br>
&gt; said, a lot of text has changed because I had already started to make =
other<br>
&gt; requested changes (including trying to resolve the HTTP compliance iss=
ue, by<br>
&gt; stating the requirements of the handshake rather than stating send X b=
ytes,<br>
&gt; send Y bytes, ...). This makes the diff a bit harder to interpret, for=
 sure.<br>
<br>
</div>Ah, OK. Till now I&#39;d only use the automated diffs between increme=
ntal drafts,<br>
I did not know that there were other tools.<br>
<br></blockquote><div><br></div><div><a href=3D"http://tools.ietf.org/rfcdi=
ff">http://tools.ietf.org/rfcdiff</a>=C2=A0:)</div><div>=C2=A0</div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex;">

Regards,<br>
<font color=3D"#888888">Willy<br>
<br>
</font></blockquote></div><br>

--0016364274d9590eb6049981f6ad--

From ifette@google.com  Mon Jan 10 10:16:24 2011
Return-Path: <ifette@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 1D1FF3A6AFF for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:16:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.059
X-Spam-Level: 
X-Spam-Status: No, score=-104.059 tagged_above=-999 required=5 tests=[AWL=-1.383, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 188-8SeyF6kz for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:16:23 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id E0CB23A6B0A for <hybi@ietf.org>; Mon, 10 Jan 2011 10:16:22 -0800 (PST)
Received: from wpaz9.hot.corp.google.com (wpaz9.hot.corp.google.com [172.24.198.73]) by smtp-out.google.com with ESMTP id p0AIIb6H023210 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:18:37 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294683517; bh=srNa8I0dHm3yhqYlNAXpH7/Vkgw=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=cMkIvxdDSlygEuX1qmu9ghauQOqhfGAx0JBt/Rrjlsq3UYOPzFuriwMlgCAtL+hBJ 92n7XehM3zCD+Qt+IXjDw==
Received: from vws7 (vws7.prod.google.com [10.241.21.135]) by wpaz9.hot.corp.google.com with ESMTP id p0AIIZKF021956 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:18:36 -0800
Received: by vws7 with SMTP id 7so8002571vws.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:18:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=QicaNjWmsecs28TWO6Aj2+J8is/TOdUdHICNsfqMU5Y=; b=JKsbZdzwH602LgYJ312brXUzq59QRJtx+s8pdMuwO/X05jd0mO98wBPnuafutZztDP hjgvogeCKGMFSXpSvUeQ==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=p9YQemY07Ru/u2GxOWqLqiSo+lEy3kyXIWbmkISKYkfYAGt8HIMwHNR7vdK/JO530m wrjtWHQSeLv5dVyNx+ZA==
MIME-Version: 1.0
Received: by 10.229.251.137 with SMTP id ms9mr567702qcb.188.1294683515472; Mon, 10 Jan 2011 10:18:35 -0800 (PST)
Received: by 10.229.0.137 with HTTP; Mon, 10 Jan 2011 10:18:35 -0800 (PST)
In-Reply-To: <2948.1294683316.925357@puncture>
References: <2948.1294683316.925357@puncture>
Date: Mon, 10 Jan 2011 10:18:35 -0800
Message-ID: <AANLkTikfRjDX-0A5fyvD0ga_nnQZW6+a-aNggT3Nnq=L@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: Dave Cridland <dave@cridland.net>
Content-Type: multipart/alternative; boundary=00163630feb3094cc6049981ff56
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Do we need to change the framing again?
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Mon, 10 Jan 2011 18:16:24 -0000

--00163630feb3094cc6049981ff56
Content-Type: text/plain; charset=UTF-8

Please god no. We're just now at the point of hopefully getting agreement on
the handshake and being able to ship something, let us not re-open the whole
framing debate or it will be 2012 before we ship anything.

-Ian

On Mon, Jan 10, 2011 at 10:15 AM, Dave Cridland <dave@cridland.net> wrote:

> Much of the design of the framing was in support of being able to perform
> lightweight streaming and sendfile() operations. Many of us went along with
> various very vocal requests for this, leading to a 63-bit frame size, for
> example, which is impractical with masking. We all, I think, universally
> assumed a symmetric framing, whereas we have now discarded the symmetry
> anyway.
>
> Given that we now require making, and (as EKR points out in another mail),
> this in turn requires that the per-frame key is transmitted at the end of
> each block, which damages streaming, should we be revisisting these early
> design decisions?
>
> Dave.
> --
> Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net<xmpp%3Adwd@dave.cridland.net>
>  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
>  - http://dave.cridland.net/
> Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--00163630feb3094cc6049981ff56
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Please god no. We&#39;re just now at the point of hopefully getting agreeme=
nt on the handshake and being able to ship something, let us not re-open th=
e whole framing debate or it will be 2012 before we ship anything.<div><br>
</div><div>-Ian<br><br><div class=3D"gmail_quote">On Mon, Jan 10, 2011 at 1=
0:15 AM, Dave Cridland <span dir=3D"ltr">&lt;<a href=3D"mailto:dave@cridlan=
d.net">dave@cridland.net</a>&gt;</span> wrote:<br><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex;">
Much of the design of the framing was in support of being able to perform l=
ightweight streaming and sendfile() operations. Many of us went along with =
various very vocal requests for this, leading to a 63-bit frame size, for e=
xample, which is impractical with masking. We all, I think, universally ass=
umed a symmetric framing, whereas we have now discarded the symmetry anyway=
.<br>

<br>
Given that we now require making, and (as EKR points out in another mail), =
this in turn requires that the per-frame key is transmitted at the end of e=
ach block, which damages streaming, should we be revisisting these early de=
sign decisions?<br>

<br>
Dave.<br>
-- <br><font color=3D"#888888">
Dave Cridland - mailto:<a href=3D"mailto:dave@cridland.net" target=3D"_blan=
k">dave@cridland.net</a> - <a href=3D"mailto:xmpp%3Adwd@dave.cridland.net" =
target=3D"_blank">xmpp:dwd@dave.cridland.net</a><br>
=C2=A0- acap://<a href=3D"http://acap.dave.cridland.net/byowner/user/dwd/bo=
okmarks/" target=3D"_blank">acap.dave.cridland.net/byowner/user/dwd/bookmar=
ks/</a><br>
=C2=A0- <a href=3D"http://dave.cridland.net/" target=3D"_blank">http://dave=
.cridland.net/</a><br>
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade<br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</font></blockquote></div><br></div>

--00163630feb3094cc6049981ff56--

From ekr@rtfm.com  Mon Jan 10 10:18:12 2011
Return-Path: <ekr@rtfm.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 BFEB23A6B0E for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:18:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.362
X-Spam-Level: 
X-Spam-Status: No, score=-102.362 tagged_above=-999 required=5 tests=[AWL=0.015, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_51=0.6, RCVD_IN_DNSWL_LOW=-1, 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 saBJup4F1R3N for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:18:11 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id 8AA4B3A6B10 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:18:11 -0800 (PST)
Received: by yie19 with SMTP id 19so6321603yie.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:20:25 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.26.24 with SMTP id d24mr6565756agj.160.1294683625438; Mon, 10 Jan 2011 10:20:25 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Mon, 10 Jan 2011 10:20:25 -0800 (PST)
In-Reply-To: <AANLkTimqw7Dri=m_Fj6Jai=KK59xVt_YVEM+AXTczPYq@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com> <20110110065408.GL5743@1wt.eu> <AANLkTimqw7Dri=m_Fj6Jai=KK59xVt_YVEM+AXTczPYq@mail.gmail.com>
Date: Mon, 10 Jan 2011 18:20:25 +0000
Message-ID: <AANLkTinY1V7VvAowmrfoBdSscK7J_BCGkdUSLEB_+wpz@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: ifette@google.com
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 18:18:12 -0000

2011/1/10 Ian Fette ($B%$%"%s%U%'%C%F%#(B) <ifette@google.com>:
> On Sun, Jan 9, 2011 at 10:54 PM, Willy Tarreau <w@1wt.eu> wrote:
>>
>> Hello Ian,
>>
>> On Sun, Jan 09, 2011 at 10:08:13PM -0800, Ian Fette
>> (????????????????????????) wrote:
>> > >  - you're using the OPTIONS method. The WG's consensus was voted as
>> > > using
>> > >    GET. While technically working, OPTIONS limits some possibilities
>> > > since
>> > >    no path is sent to the server.
>> > >
>> > >
>> > I agree it is important to be able to identify between various resources
>> > on
>> > a server. E.g. for our use, we will have multiple different websocket
>> > endpoints, and we want our frontend to be able to dispatch to the
>> > appropriate backend based on the information in the handshake. That
>> > said, I
>> > think the draft allows for that (Sec-WebSocket-URL), or as pointed out
>> > on
>> > another thread, it appears OPTIONS does allow for a path component. So,
>> > I
>> > think we should be able to resolve that point.
>>
>> Once again,I'm not opposed at all to this point. I'd even say that would
>> it
>> not have been accepted as a consensus in the last poll, I'd probably have
>> voted for it. It's just that it's a change from what was planned till now
>> and participants need to express their opinion on that point.
>>
>> > >  - your proposal involves AES-128-CTR. As was discussed here, it seems
>> > > there
>> > >    are still export regulations for certain countries eventhough
>> > > they're
>> > >    apparently fading out. It could still be a problem for companies
>> > > who
>> > > want
>> > >    to export products to some countries and which never had to put
>> > > crypto
>> > > in
>> > >    them.
>> > >
>> >
>> > It would be nice to understand if this is actually a hard constraint.
>> > AES-128-CTR has the benefit of being well understood, as well as fast,
>> > as
>> > demonstrated by Maciej in another thread. That said, I don't care
>> > strongly
>> > one way or another here.
>>
>> One of my issue with it is that despite being fast, it's a lot slower than
>> simpler masking. I design software components to be used at the border
>> side
>> of infrastructures to dispatch the traffic to multiple servers, and I'm
>> very much concerned by the performance limitations. On a machine which has
>> normally no issue processing 10 Gbps of HTTP, I could not even process 1
>> Gbps
>> of WebSocket with large contents. This is much concerning because it
>> implies
>> that in order to build the stream analysers we've talked about in the
>> past,
>> it will become mandatory to install expensive crypto acceleration cards.
>> This
>> is not logical for a protocol which is supposed to be transferred in clear
>> (ws:// as opposed to wss://). Checking for forbidden words, dangerous
>> links
>> or forbidden contents on campus sites will be much more expensive due to
>> this
>> masking algorithm alone.
>>
>> > >  - several people on the list asked for the ability to be able to
>> > > disable
>> > >    the masking in some well-controlled environments (eg:
>> > > server-to-server
>> > >    communications). I see no provisions for this.
>> > >
>> > >
>> > There's nothing that would prevent you from writing an extension that
>> > would
>> > disable the masking, from my understanding.
>>
>> Adam did not seem favorable to that.
>>
>> > >  - it has not yet been stated whether only the payload or also the
>> > > framing
>> > >    should be masked. Your proposal masks both, which means that it
>> > > definitely
>> > >    blocks any possibility of performing multiplexing later. There does
>> > > not
>> > >    appear to have been a consensus in this area yet.
>> > >
>> > >
>> > I'm not sure why this would block the possibility of multiplexing. I
>> > would
>> > agree that would be a problem if it were the case. However, a number of
>> > the
>> > early proposals for multiplexing included something like a stream-id in
>> > the
>> > frame. This could still be present. Though it would be masked, so would
>> > the
>> > length and other things that a meaningful intermediary would care about,
>> > so
>> > assuming the intermediary was capable of un-masking, is this an issue?
>>
>> Yes, and you got the point : if the ID is masked, how to you know which
>> stream it is in order to pick the right unmask key ? At least the stream
>> ID will have to be unmasked. If we prepend it before the frame, it means
>> a new framing format. Till not it was suggested to have it in the frame.
>>
>
> So, you're saying that with the XOR masking where the entire content
> required to unmask the frame was included in the frame, it would be easier
> for an intermediary to thus examine the frame? I agree that it would be
> easier, and that in the AES method it would require an intermediary to be
> "active" instead of "passive", e.g. terminate the connection at the
> intermediary. I personally think that's a good argument towards XOR, but am
> personally not heavily invested either way as I think for our uses, we would
> be terminating at the "intermediary" anyways.
>

Ian,

Im not sure Im following the reasoning here: why does the AES
mechanism (which is,
after all, just an XOR with a long, randomly computed mask) require an
active intermediary?

Thanks,
-Ekr

From gregw@intalio.com  Mon Jan 10 10:22:56 2011
Return-Path: <gregw@intalio.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 92BC628C0DC for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:22:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.931
X-Spam-Level: 
X-Spam-Status: No, score=-2.931 tagged_above=-999 required=5 tests=[AWL=0.046,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 IyKQsywb2P6Q for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:22:55 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 991DB28C0CF for <hybi@ietf.org>; Mon, 10 Jan 2011 10:22:55 -0800 (PST)
Received: by qwi2 with SMTP id 2so4361593qwi.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:25:09 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.235.143 with SMTP id kg15mr24622968qcb.17.1294683909709; Mon, 10 Jan 2011 10:25:09 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Mon, 10 Jan 2011 10:25:09 -0800 (PST)
In-Reply-To: <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com>
References: <20110109175118.GP5743@1wt.eu> <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com>
Date: Mon, 10 Jan 2011 19:25:09 +0100
X-Google-Sender-Auth: irz3j4ThLo7W9uzj8swchl0gku8
Message-ID: <AANLkTi=4kUVHsBzeg_ScB4gRgcZStyK2yYqtmpg9mQiy@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 18:22:56 -0000

Eric,

I'm not opposed to sending the key after the masked data, but I don't
see how that can be done with masked frames.
The receiver will need to see the frame, so they can see the length,
so they can find the key.  If the frame is masked, the you wont be
able to find the key.

But, (pushing my normal barrow), I see no reason why we could not
switch the extension data to be after the payload data in a frame.
With fragmentation, we should always be able to process complete
frames.

From ifette@google.com  Mon Jan 10 10:23:22 2011
Return-Path: <ifette@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 D033F28B23E for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:23:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.687
X-Spam-Level: 
X-Spam-Status: No, score=-103.687 tagged_above=-999 required=5 tests=[AWL=-1.611, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_51=0.6, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 OFnURUzAcnB3 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:23:21 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 8F5293A6B18 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:23:20 -0800 (PST)
Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id p0AIPXvV019105 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:25:34 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294683934; bh=AlfaFBiK9iiN2iN4JIza4+15Z8s=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=pcmFhbJbd3gBr2aawbXJOoGrh9H9DGfVV/zuhvb4O7Je640Jrcu9xhbhMGfoVhSQz +2R4NFaZcE+OF1a+5oq8A==
Received: from vws13 (vws13.prod.google.com [10.241.21.141]) by wpaz13.hot.corp.google.com with ESMTP id p0AIPWkD014291 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:25:32 -0800
Received: by vws13 with SMTP id 13so7958003vws.25 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:25:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=EIlAtxOeDLUH2OwAhBzy5OMWp+Wa9Oj1GNGMndzFy+c=; b=ZtGSbGNO8Jq6hjk1VHwx0a1XHqvjDLn/MCZ9yW7Xe/GEeKUwP8uSNZdTGW7JjJbmy7 h8AzGVGRTPqo2LmRyaew==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=gLkj3CBWQ/f6XatSYRAiQuMU3i0XfAwRUHrmIJFaYXuPSqrVcadyXMbUre/ihlDzvZ rFp+cKXm4vyF/qBnvQYw==
MIME-Version: 1.0
Received: by 10.229.229.200 with SMTP id jj8mr15442193qcb.74.1294683931886; Mon, 10 Jan 2011 10:25:31 -0800 (PST)
Received: by 10.229.0.137 with HTTP; Mon, 10 Jan 2011 10:25:31 -0800 (PST)
In-Reply-To: <AANLkTinY1V7VvAowmrfoBdSscK7J_BCGkdUSLEB_+wpz@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com> <20110110065408.GL5743@1wt.eu> <AANLkTimqw7Dri=m_Fj6Jai=KK59xVt_YVEM+AXTczPYq@mail.gmail.com> <AANLkTinY1V7VvAowmrfoBdSscK7J_BCGkdUSLEB_+wpz@mail.gmail.com>
Date: Mon, 10 Jan 2011 10:25:31 -0800
Message-ID: <AANLkTinC=4Vm8W3qW-6+iR8PhXstvsF6rDpJZ_G3X+Lc@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: multipart/alternative; boundary=001485f6cfb4db46b70499821785
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Mon, 10 Jan 2011 18:23:22 -0000

--001485f6cfb4db46b70499821785
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

2011/1/10 Eric Rescorla <ekr@rtfm.com>

> 2011/1/10 Ian Fette (=E3=82=A4=E3=82=A2=E3=83=B3=E3=83=95=E3=82=A7=E3=83=
=83=E3=83=86=E3=82=A3) <ifette@google.com>:
> > On Sun, Jan 9, 2011 at 10:54 PM, Willy Tarreau <w@1wt.eu> wrote:
> >>
> >> Hello Ian,
> >>
> >> On Sun, Jan 09, 2011 at 10:08:13PM -0800, Ian Fette
> >> (????????????????????????) wrote:
> >> > >  - you're using the OPTIONS method. The WG's consensus was voted a=
s
> >> > > using
> >> > >    GET. While technically working, OPTIONS limits some possibiliti=
es
> >> > > since
> >> > >    no path is sent to the server.
> >> > >
> >> > >
> >> > I agree it is important to be able to identify between various
> resources
> >> > on
> >> > a server. E.g. for our use, we will have multiple different websocke=
t
> >> > endpoints, and we want our frontend to be able to dispatch to the
> >> > appropriate backend based on the information in the handshake. That
> >> > said, I
> >> > think the draft allows for that (Sec-WebSocket-URL), or as pointed o=
ut
> >> > on
> >> > another thread, it appears OPTIONS does allow for a path component.
> So,
> >> > I
> >> > think we should be able to resolve that point.
> >>
> >> Once again,I'm not opposed at all to this point. I'd even say that wou=
ld
> >> it
> >> not have been accepted as a consensus in the last poll, I'd probably
> have
> >> voted for it. It's just that it's a change from what was planned till
> now
> >> and participants need to express their opinion on that point.
> >>
> >> > >  - your proposal involves AES-128-CTR. As was discussed here, it
> seems
> >> > > there
> >> > >    are still export regulations for certain countries eventhough
> >> > > they're
> >> > >    apparently fading out. It could still be a problem for companie=
s
> >> > > who
> >> > > want
> >> > >    to export products to some countries and which never had to put
> >> > > crypto
> >> > > in
> >> > >    them.
> >> > >
> >> >
> >> > It would be nice to understand if this is actually a hard constraint=
.
> >> > AES-128-CTR has the benefit of being well understood, as well as fas=
t,
> >> > as
> >> > demonstrated by Maciej in another thread. That said, I don't care
> >> > strongly
> >> > one way or another here.
> >>
> >> One of my issue with it is that despite being fast, it's a lot slower
> than
> >> simpler masking. I design software components to be used at the border
> >> side
> >> of infrastructures to dispatch the traffic to multiple servers, and I'=
m
> >> very much concerned by the performance limitations. On a machine which
> has
> >> normally no issue processing 10 Gbps of HTTP, I could not even process=
 1
> >> Gbps
> >> of WebSocket with large contents. This is much concerning because it
> >> implies
> >> that in order to build the stream analysers we've talked about in the
> >> past,
> >> it will become mandatory to install expensive crypto acceleration card=
s.
> >> This
> >> is not logical for a protocol which is supposed to be transferred in
> clear
> >> (ws:// as opposed to wss://). Checking for forbidden words, dangerous
> >> links
> >> or forbidden contents on campus sites will be much more expensive due =
to
> >> this
> >> masking algorithm alone.
> >>
> >> > >  - several people on the list asked for the ability to be able to
> >> > > disable
> >> > >    the masking in some well-controlled environments (eg:
> >> > > server-to-server
> >> > >    communications). I see no provisions for this.
> >> > >
> >> > >
> >> > There's nothing that would prevent you from writing an extension tha=
t
> >> > would
> >> > disable the masking, from my understanding.
> >>
> >> Adam did not seem favorable to that.
> >>
> >> > >  - it has not yet been stated whether only the payload or also the
> >> > > framing
> >> > >    should be masked. Your proposal masks both, which means that it
> >> > > definitely
> >> > >    blocks any possibility of performing multiplexing later. There
> does
> >> > > not
> >> > >    appear to have been a consensus in this area yet.
> >> > >
> >> > >
> >> > I'm not sure why this would block the possibility of multiplexing. I
> >> > would
> >> > agree that would be a problem if it were the case. However, a number
> of
> >> > the
> >> > early proposals for multiplexing included something like a stream-id
> in
> >> > the
> >> > frame. This could still be present. Though it would be masked, so
> would
> >> > the
> >> > length and other things that a meaningful intermediary would care
> about,
> >> > so
> >> > assuming the intermediary was capable of un-masking, is this an issu=
e?
> >>
> >> Yes, and you got the point : if the ID is masked, how to you know whic=
h
> >> stream it is in order to pick the right unmask key ? At least the stre=
am
> >> ID will have to be unmasked. If we prepend it before the frame, it mea=
ns
> >> a new framing format. Till not it was suggested to have it in the fram=
e.
> >>
> >
> > So, you're saying that with the XOR masking where the entire content
> > required to unmask the frame was included in the frame, it would be
> easier
> > for an intermediary to thus examine the frame? I agree that it would be
> > easier, and that in the AES method it would require an intermediary to =
be
> > "active" instead of "passive", e.g. terminate the connection at the
> > intermediary. I personally think that's a good argument towards XOR, bu=
t
> am
> > personally not heavily invested either way as I think for our uses, we
> would
> > be terminating at the "intermediary" anyways.
> >
>
> Ian,
>
> Im not sure Im following the reasoning here: why does the AES
> mechanism (which is,
> after all, just an XOR with a long, randomly computed mask) require an
> active intermediary?
>
> Thanks,
> -Ekr
>

I guess you're right in that it wouldn't require the intermediary to be
active. It would however require the intermediary to maintain state for eac=
h
connection, correct? (As opposed to XOR where the intermediary could be
mostly stateless as the the "masking key" would be embedded in the frame).
How large is the state that would need to be maintained?

-Ian

--001485f6cfb4db46b70499821785
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">2011/1/10 Eric Rescorla <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:ekr@rtfm.com">ekr@rtfm.com</a>&gt;</span><br><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex;">
<div class=3D"im">2011/1/10 Ian Fette (=E3=82=A4=E3=82=A2=E3=83=B3=E3=83=95=
=E3=82=A7=E3=83=83=E3=83=86=E3=82=A3) &lt;<a href=3D"mailto:ifette@google.c=
om">ifette@google.com</a>&gt;:<br>
</div><div><div></div><div class=3D"h5">&gt; On Sun, Jan 9, 2011 at 10:54 P=
M, Willy Tarreau &lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt; wrote:<br=
>
&gt;&gt;<br>
&gt;&gt; Hello Ian,<br>
&gt;&gt;<br>
&gt;&gt; On Sun, Jan 09, 2011 at 10:08:13PM -0800, Ian Fette<br>
&gt;&gt; (????????????????????????) wrote:<br>
&gt;&gt; &gt; &gt; =C2=A0- you&#39;re using the OPTIONS method. The WG&#39;=
s consensus was voted as<br>
&gt;&gt; &gt; &gt; using<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0GET. While technically working, OPTIONS lim=
its some possibilities<br>
&gt;&gt; &gt; &gt; since<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0no path is sent to the server.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; I agree it is important to be able to identify between variou=
s resources<br>
&gt;&gt; &gt; on<br>
&gt;&gt; &gt; a server. E.g. for our use, we will have multiple different w=
ebsocket<br>
&gt;&gt; &gt; endpoints, and we want our frontend to be able to dispatch to=
 the<br>
&gt;&gt; &gt; appropriate backend based on the information in the handshake=
. That<br>
&gt;&gt; &gt; said, I<br>
&gt;&gt; &gt; think the draft allows for that (Sec-WebSocket-URL), or as po=
inted out<br>
&gt;&gt; &gt; on<br>
&gt;&gt; &gt; another thread, it appears OPTIONS does allow for a path comp=
onent. So,<br>
&gt;&gt; &gt; I<br>
&gt;&gt; &gt; think we should be able to resolve that point.<br>
&gt;&gt;<br>
&gt;&gt; Once again,I&#39;m not opposed at all to this point. I&#39;d even =
say that would<br>
&gt;&gt; it<br>
&gt;&gt; not have been accepted as a consensus in the last poll, I&#39;d pr=
obably have<br>
&gt;&gt; voted for it. It&#39;s just that it&#39;s a change from what was p=
lanned till now<br>
&gt;&gt; and participants need to express their opinion on that point.<br>
&gt;&gt;<br>
&gt;&gt; &gt; &gt; =C2=A0- your proposal involves AES-128-CTR. As was discu=
ssed here, it seems<br>
&gt;&gt; &gt; &gt; there<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0are still export regulations for certain co=
untries eventhough<br>
&gt;&gt; &gt; &gt; they&#39;re<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0apparently fading out. It could still be a =
problem for companies<br>
&gt;&gt; &gt; &gt; who<br>
&gt;&gt; &gt; &gt; want<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0to export products to some countries and wh=
ich never had to put<br>
&gt;&gt; &gt; &gt; crypto<br>
&gt;&gt; &gt; &gt; in<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0them.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; It would be nice to understand if this is actually a hard con=
straint.<br>
&gt;&gt; &gt; AES-128-CTR has the benefit of being well understood, as well=
 as fast,<br>
&gt;&gt; &gt; as<br>
&gt;&gt; &gt; demonstrated by Maciej in another thread. That said, I don&#3=
9;t care<br>
&gt;&gt; &gt; strongly<br>
&gt;&gt; &gt; one way or another here.<br>
&gt;&gt;<br>
&gt;&gt; One of my issue with it is that despite being fast, it&#39;s a lot=
 slower than<br>
&gt;&gt; simpler masking. I design software components to be used at the bo=
rder<br>
&gt;&gt; side<br>
&gt;&gt; of infrastructures to dispatch the traffic to multiple servers, an=
d I&#39;m<br>
&gt;&gt; very much concerned by the performance limitations. On a machine w=
hich has<br>
&gt;&gt; normally no issue processing 10 Gbps of HTTP, I could not even pro=
cess 1<br>
&gt;&gt; Gbps<br>
&gt;&gt; of WebSocket with large contents. This is much concerning because =
it<br>
&gt;&gt; implies<br>
&gt;&gt; that in order to build the stream analysers we&#39;ve talked about=
 in the<br>
&gt;&gt; past,<br>
&gt;&gt; it will become mandatory to install expensive crypto acceleration =
cards.<br>
&gt;&gt; This<br>
&gt;&gt; is not logical for a protocol which is supposed to be transferred =
in clear<br>
&gt;&gt; (ws:// as opposed to wss://). Checking for forbidden words, danger=
ous<br>
&gt;&gt; links<br>
&gt;&gt; or forbidden contents on campus sites will be much more expensive =
due to<br>
&gt;&gt; this<br>
&gt;&gt; masking algorithm alone.<br>
&gt;&gt;<br>
&gt;&gt; &gt; &gt; =C2=A0- several people on the list asked for the ability=
 to be able to<br>
&gt;&gt; &gt; &gt; disable<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0the masking in some well-controlled environ=
ments (eg:<br>
&gt;&gt; &gt; &gt; server-to-server<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0communications). I see no provisions for th=
is.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; There&#39;s nothing that would prevent you from writing an ex=
tension that<br>
&gt;&gt; &gt; would<br>
&gt;&gt; &gt; disable the masking, from my understanding.<br>
&gt;&gt;<br>
&gt;&gt; Adam did not seem favorable to that.<br>
&gt;&gt;<br>
&gt;&gt; &gt; &gt; =C2=A0- it has not yet been stated whether only the payl=
oad or also the<br>
&gt;&gt; &gt; &gt; framing<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0should be masked. Your proposal masks both,=
 which means that it<br>
&gt;&gt; &gt; &gt; definitely<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0blocks any possibility of performing multip=
lexing later. There does<br>
&gt;&gt; &gt; &gt; not<br>
&gt;&gt; &gt; &gt; =C2=A0 =C2=A0appear to have been a consensus in this are=
a yet.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; I&#39;m not sure why this would block the possibility of mult=
iplexing. I<br>
&gt;&gt; &gt; would<br>
&gt;&gt; &gt; agree that would be a problem if it were the case. However, a=
 number of<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; early proposals for multiplexing included something like a st=
ream-id in<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; frame. This could still be present. Though it would be masked=
, so would<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; length and other things that a meaningful intermediary would =
care about,<br>
&gt;&gt; &gt; so<br>
&gt;&gt; &gt; assuming the intermediary was capable of un-masking, is this =
an issue?<br>
&gt;&gt;<br>
&gt;&gt; Yes, and you got the point : if the ID is masked, how to you know =
which<br>
&gt;&gt; stream it is in order to pick the right unmask key ? At least the =
stream<br>
&gt;&gt; ID will have to be unmasked. If we prepend it before the frame, it=
 means<br>
&gt;&gt; a new framing format. Till not it was suggested to have it in the =
frame.<br>
&gt;&gt;<br>
&gt;<br>
&gt; So, you&#39;re saying that with the XOR masking where the entire conte=
nt<br>
&gt; required to unmask the frame was included in the frame, it would be ea=
sier<br>
&gt; for an intermediary to thus examine the frame? I agree that it would b=
e<br>
&gt; easier, and that in the AES method it would require an intermediary to=
 be<br>
&gt; &quot;active&quot; instead of &quot;passive&quot;, e.g. terminate the =
connection at the<br>
&gt; intermediary. I personally think that&#39;s a good argument towards XO=
R, but am<br>
&gt; personally not heavily invested either way as I think for our uses, we=
 would<br>
&gt; be terminating at the &quot;intermediary&quot; anyways.<br>
&gt;<br>
<br>
</div></div>Ian,<br>
<br>
Im not sure Im following the reasoning here: why does the AES<br>
mechanism (which is,<br>
after all, just an XOR with a long, randomly computed mask) require an<br>
active intermediary?<br>
<br>
Thanks,<br>
-Ekr<br>
</blockquote></div><br><div>I guess you&#39;re right in that it wouldn&#39;=
t require the intermediary to be active. It would however require the inter=
mediary to maintain state for each connection, correct? (As opposed to XOR =
where the intermediary could be mostly stateless as the the &quot;masking k=
ey&quot; would be embedded in the frame). How large is the state that would=
 need to be maintained?</div>
<div><br></div><div>-Ian</div>

--001485f6cfb4db46b70499821785--

From bruce@callenish.com  Mon Jan 10 10:42:06 2011
Return-Path: <bruce@callenish.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 16A983A6B04 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:42:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.583
X-Spam-Level: 
X-Spam-Status: No, score=-2.583 tagged_above=-999 required=5 tests=[AWL=0.016,  BAYES_00=-2.599]
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 ONg56eu7i4Zg for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:42:05 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 19C653A67FF for <hybi@ietf.org>; Mon, 10 Jan 2011 10:42:05 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PcMj4-00019v-T5 for hybi@ietf.org; Mon, 10 Jan 2011 10:44:19 -0800
Message-ID: <4D2B5383.7000703@callenish.com>
Date: Mon, 10 Jan 2011 10:44:19 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D2A4FFE.6000503@callenish.com>	<4D2A6FB9.1030005@callenish.com>	<20110110063930.GK5743@1wt.eu> <AANLkTikXQB+B5VKPMrUm6jCu5EpPsS1+mwp90+1TdG93@mail.gmail.com>
In-Reply-To: <AANLkTikXQB+B5VKPMrUm6jCu5EpPsS1+mwp90+1TdG93@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Summary of issues concerning the default masking algorithm
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: Mon, 10 Jan 2011 18:42:06 -0000

On 10/01/2011 7:43 AM, Eric Rescorla wrote:
> Building tools to process this kind of masked data is trivial. Heck, tools to
> decode full SSL aren't even that hard. I know because I've built them.

I don't understand how you can reliably decode the streams with the 
currently proposed masking strategy, but I am ready to be proved wrong.

First, let me more fully flesh out what is required for these debugging 
sessions. Bidirectional protocols tend to be much longer lived than 
others. It is not unusual to get ones that last hours or days or weeks, 
or even ones that only reset when one end or the other does a reboot.

You want to keep your capture logs as short-lived as possible. The 
bigger the capture log is, the more expensive it is to fix the problem. 
They take up time not only in storage space and transfer time, but most 
importantly in time spent analyzing the results. One very common idiom 
for keeping the capture logs short is to identify an action that 
triggers the bug, have a customer start the capture, perform the action, 
give enough time for the bug to manifest, and stop the capture. You 
still may have tens of thousands of sessions to wade through and filter 
as best you can, but at least you can be fairly sure the one you want is 
in there somewhere.

Ok, so given all that, how do we deal with a connection that only sends 
shared secret information at the beginning of the connection when you 
are less likely to be doing a capture?

Well, I guess the shared secret could be repeatedly sent out 
periodically during the life of the connection. But how often? 30 
seconds can be a whole lot of capture on a busy system. Every 2 seconds? 
What does that do to mobile batteries, or the bandwidth usage of mobile 
users?

Then again, you could put the shared secret on every frame. That would 
prevent the mask itself from being on the wire and would allow capture 
tools to decode the stream. But it would also bulk up the data sent with 
every frame, which I think many would find undesirable.

And what would all this data on the wire bring you? A guarantee that 
naively implemented servers couldn't ignore the influence of the server 
nonce on the mask? Have you seen the complexity of the masking being 
proposed? I think we are well past the point where there are going to be 
naively implemented servers. We left simple implementations as a design 
concern in a roadside grave 100 miles back.


From ekr@rtfm.com  Mon Jan 10 10:53:08 2011
Return-Path: <ekr@rtfm.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 847533A69C5 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:53:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.662
X-Spam-Level: 
X-Spam-Status: No, score=-102.662 tagged_above=-999 required=5 tests=[AWL=0.315, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 O+zXMj+uSFnL for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:53:07 -0800 (PST)
Received: from mail-yi0-f66.google.com (mail-yi0-f66.google.com [209.85.218.66]) by core3.amsl.com (Postfix) with ESMTP id B9B903A67D9 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:53:07 -0800 (PST)
Received: by yic24 with SMTP id 24so2874804yic.1 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:55:22 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.232.6 with SMTP id e6mr31419870agh.52.1294685721854; Mon, 10 Jan 2011 10:55:21 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Mon, 10 Jan 2011 10:55:21 -0800 (PST)
In-Reply-To: <AANLkTinC=4Vm8W3qW-6+iR8PhXstvsF6rDpJZ_G3X+Lc@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <20110109224228.GU5743@1wt.eu> <AANLkTikgB+Ju-k0obs9it7TOsy8B1jaCYv8zBpB9dEa_@mail.gmail.com> <20110110065408.GL5743@1wt.eu> <AANLkTimqw7Dri=m_Fj6Jai=KK59xVt_YVEM+AXTczPYq@mail.gmail.com> <AANLkTinY1V7VvAowmrfoBdSscK7J_BCGkdUSLEB_+wpz@mail.gmail.com> <AANLkTinC=4Vm8W3qW-6+iR8PhXstvsF6rDpJZ_G3X+Lc@mail.gmail.com>
Date: Mon, 10 Jan 2011 18:55:21 +0000
Message-ID: <AANLkTikHMHCsBHPY4S4cjqE231qH6rmfbgXdVD34fh5P@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: ifette@google.com
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 18:53:08 -0000

2011/1/10 Ian Fette ($B%$%"%s%U%'%C%F%#(B) <ifette@google.com>:
> I guess you're right in that it wouldn't require the intermediary to be
> active. It would however require the intermediary to maintain state for each
> connection, correct? (As opposed to XOR where the intermediary could be
> mostly stateless as the the "masking key" would be embedded in the frame).
> How large is the state that would need to be maintained?

Basically the AES key schedule, which is pretty small (4k for a
speed-optimized version)
plus as much of the frame as you buffer [the whole thing if the key is
at the end, obviously.]

-Ekr

From ekr@rtfm.com  Mon Jan 10 10:57:40 2011
Return-Path: <ekr@rtfm.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 91B3B3A6B0D for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:57:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.665
X-Spam-Level: 
X-Spam-Status: No, score=-102.665 tagged_above=-999 required=5 tests=[AWL=0.312, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 QtZpPvEGbupr for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 10:57:39 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 934033A6823 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:57:39 -0800 (PST)
Received: by yxt33 with SMTP id 33so8615195yxt.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 10:59:53 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.83.18 with SMTP id k18mr6515065agl.79.1294685992612; Mon, 10 Jan 2011 10:59:52 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Mon, 10 Jan 2011 10:59:52 -0800 (PST)
In-Reply-To: <AANLkTi=4kUVHsBzeg_ScB4gRgcZStyK2yYqtmpg9mQiy@mail.gmail.com>
References: <20110109175118.GP5743@1wt.eu> <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com> <AANLkTi=4kUVHsBzeg_ScB4gRgcZStyK2yYqtmpg9mQiy@mail.gmail.com>
Date: Mon, 10 Jan 2011 18:59:52 +0000
Message-ID: <AANLkTimm8YJJeYqBArA=TGsT60gQ_vFYPjDm0yA4UtQP@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 18:57:40 -0000

I'm not sure precisely what you mean by "masked frames". If I were king, th=
ings
would look like this:

- length
- masked portion
- key

With everything else being packed into the masked portion.

I agree that length should not be masked.

-Ekr



On Mon, Jan 10, 2011 at 6:25 PM, Greg Wilkins <gregw@webtide.com> wrote:
> Eric,
>
> I'm not opposed to sending the key after the masked data, but I don't
> see how that can be done with masked frames.
> The receiver will need to see the frame, so they can see the length,
> so they can find the key. =A0If the frame is masked, the you wont be
> able to find the key.
>
> But, (pushing my normal barrow), I see no reason why we could not
> switch the extension data to be after the payload data in a frame.
> With fragmentation, we should always be able to process complete
> frames.
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From gregw@intalio.com  Mon Jan 10 11:17:40 2011
Return-Path: <gregw@intalio.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 1B9AF3A6B0E for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:17:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.931
X-Spam-Level: 
X-Spam-Status: No, score=-2.931 tagged_above=-999 required=5 tests=[AWL=0.046,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 caJcNKWAc-Z1 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:17:39 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 43C613A6B0C for <hybi@ietf.org>; Mon, 10 Jan 2011 11:17:39 -0800 (PST)
Received: by qyk34 with SMTP id 34so1851003qyk.10 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:19:53 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.36.208 with SMTP id u16mr27150798qad.299.1294687193403; Mon, 10 Jan 2011 11:19:53 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Mon, 10 Jan 2011 11:19:53 -0800 (PST)
In-Reply-To: <AANLkTimm8YJJeYqBArA=TGsT60gQ_vFYPjDm0yA4UtQP@mail.gmail.com>
References: <20110109175118.GP5743@1wt.eu> <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com> <AANLkTi=4kUVHsBzeg_ScB4gRgcZStyK2yYqtmpg9mQiy@mail.gmail.com> <AANLkTimm8YJJeYqBArA=TGsT60gQ_vFYPjDm0yA4UtQP@mail.gmail.com>
Date: Mon, 10 Jan 2011 20:19:53 +0100
X-Google-Sender-Auth: 8HfuSZRGCPRe5Lsfv8eF3wQpTE4
Message-ID: <AANLkTinqjActrQ54YS6pOaOgeEPjNod9DNj42QKQNBTG@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 19:17:40 -0000

On 10 January 2011 19:59, Eric Rescorla <ekr@rtfm.com> wrote:
> I'm not sure precisely what you mean by "masked frames". If I were king, things
> would look like this:
>
> - length
> - masked portion
> - key
>
> With everything else being packed into the masked portion.

Well we are not that far apart, as was proposing

 - flags/opcode
 - length
 - masked portion
 - key (in extension data)

although as pointed out in a separate thread, that ordering makes our
63 bit length a bit of overkill.

As I was an advocate for smaller frames and fragmentation, I'd have no
issue with reducing the max frame size so that the key could be sent
afterwards.   But I see no will to revisit framing, so that leaves us
with:

 - flags/opcode
 - key (in extension data)
 - length
 - masked portion

is that really that far from what you have proposed?

Plus if the masking is an extension then objections to cryptographic
masking are less.

From bruce@callenish.com  Mon Jan 10 11:23:21 2011
Return-Path: <bruce@callenish.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 D727C3A6B1D for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:23:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.584
X-Spam-Level: 
X-Spam-Status: No, score=-2.584 tagged_above=-999 required=5 tests=[AWL=0.015,  BAYES_00=-2.599]
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 g0ziDWklm5BM for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:23:21 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 223FE3A6B1C for <hybi@ietf.org>; Mon, 10 Jan 2011 11:23:21 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PcNN0-0008D4-Pv for hybi@ietf.org; Mon, 10 Jan 2011 11:25:35 -0800
Message-ID: <4D2B5D2F.80503@callenish.com>
Date: Mon, 10 Jan 2011 11:25:35 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Hybi <hybi@ietf.org>
References: <20110110000908.GD5743@1wt.eu>	<8B0A9FCBB9832F43971E38010638454F03F5258EEC@SISPE7MB1.commscope.com>	<20110110063646.GJ5743@1wt.eu>	<AANLkTintz6hWL1ez0-FnPaZmi1jfBhtZ+NMd60dM=Y=D@mail.gmail.com>	<20110110065822.GM5743@1wt.eu>	<AANLkTinVq9d=fSph8SZiDFrSFCwRQvyJFAiOwBZjnGjA@mail.gmail.com>	<20110110070820.GN5743@1wt.eu>	<AANLkTinrhE9SWnPigQxTgPEM-LkugxxRjP++GnppPDnh@mail.gmail.com>	<20110110075208.GO5743@1wt.eu> <AANLkTi=JJquFaa7ReCUVz=5P4ERuGBq=aDrtBy2oDngu@mail.gmail.com>
In-Reply-To: <AANLkTi=JJquFaa7ReCUVz=5P4ERuGBq=aDrtBy2oDngu@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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: Mon, 10 Jan 2011 19:23:22 -0000

On 09/01/2011 11:55 PM, Adam Barth wrote:
> Or we could just use AES-128-CTR like everyone else in the known
> universe and not worry about whether we've shaved exactly the right
> number of hairs off our home-brew pseudo crypto.

I've written applications that use simple XOR masking because 
AES-128-CTR is unnecessarily complex. Does that mean I'm now in an 
unknown universe?

Cool. Do I get to win the lottery in this one?


From jat@google.com  Mon Jan 10 11:29:23 2011
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 B835828C0EF for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:29:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.84
X-Spam-Level: 
X-Spam-Status: No, score=-103.84 tagged_above=-999 required=5 tests=[AWL=-0.863, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 D5D73qv07jop for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:29:22 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id A92ED28B23E for <hybi@ietf.org>; Mon, 10 Jan 2011 11:29:22 -0800 (PST)
Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p0AJVag5002949 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:31:36 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294687896; bh=NMJmnJVKNlBgDeYq+UK6TJgomuQ=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=knC55v3cqDejB/7a+06GYKcFBQ5HddsZwtE/1wDqhPGRagXW6qtK/N6HhY3DXw1JP 1fs+IYJnEtX9wx0vQ9IYA==
Received: from gwb20 (gwb20.prod.google.com [10.200.2.20]) by kpbe14.cbf.corp.google.com with ESMTP id p0AJU0Mr008542 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:31:35 -0800
Received: by gwb20 with SMTP id 20so8895552gwb.1 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:31:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=Hz2LXNoHEyCHqn2+A8QnNhrKpZULhIQvhewHKFHmOGc=; b=bUdwhLoj+dlmnLViPXFcePCHkCDby1zeWKh08Job2vneGZfi6ohJwsfrXJ1vMfMglw 886XOa1JwcV/HqgN+9bw==
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=F60QQbyrpYFGvMOY7b16+CuSfHDV3akzkTR+22BzMldyUL+xMQS6/qO/etuS7pLTDR oJ/chBmTIMHd0i7GN+qQ==
Received: by 10.151.85.10 with SMTP id n10mr28255412ybl.206.1294687895089; Mon, 10 Jan 2011 11:31:35 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Mon, 10 Jan 2011 11:31:14 -0800 (PST)
In-Reply-To: <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com>
References: <20110109175118.GP5743@1wt.eu> <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Mon, 10 Jan 2011 14:31:14 -0500
Message-ID: <AANLkTi=JO9aHknoBzVxqmT6rbKF1+q1MhQmc3_Yxq+7i@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 19:29:23 -0000

On Mon, Jan 10, 2011 at 10:52 AM, Eric Rescorla <ekr@rtfm.com> wrote:
> On Sun, Jan 9, 2011 at 9:51 AM, Willy Tarreau <w@1wt.eu> wrote:
>
>> The server will check the input stream, looking for the bytes "G" and "E".
>> If those bytes do not appear, it will terminate the connection because it
>> means this connection will require too many blocks to get the correct values.
>
> Nice observation.

This issue was raised some weeks ago -- the answer is simply to not
allow the client to alter the message after it has been handed off to
the network layer.  Even if some streaming API were exposed to JS, you
would send a message fragment in its own frame when the buffer filled
up -- the key from that frame would be useless for the attacker for
the next frame.  If one day JS adds the ability to send large byte
buffers, the browser will just have to enforce copy-on-write or some
similar mechanism to avoid letting the JS code change the buffer after
the server might have received some portion of the message.

> The major cost is that an ordinary server cannot start processing the
> message until the per-msg
> key is received at the end, but since we've already disclaimed most
> streaming modes
> of operation (and the client can't stream anyway because of the need
> to commit to the
> packet contents), this seems like a relatively minor cost.

I think this is an unacceptable cost, as the server now must buffer
every frame completely before handing bytes off to the next higher
layer.  Currently, the JS client has no way to modify the message
being sent while the key for that frame is useful.  If it ever does
get that capability, it seems easier to address it there than to
cripple every server implementation.

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

From jat@google.com  Mon Jan 10 11:34:42 2011
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 18D4028C0EF for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:34:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.726
X-Spam-Level: 
X-Spam-Status: No, score=-104.726 tagged_above=-999 required=5 tests=[AWL=-1.749, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 3T9gZ6wm7KAn for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:34:41 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id CF31A28B23E for <hybi@ietf.org>; Mon, 10 Jan 2011 11:34:40 -0800 (PST)
Received: from hpaq14.eem.corp.google.com (hpaq14.eem.corp.google.com [172.25.149.14]) by smtp-out.google.com with ESMTP id p0AJasFx025912 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:36:54 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294688214; bh=3lW/DhNAVmG0rIwli8761Nm2pwc=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=fi9KJGZRwO/0TOMN+nbk9YNLQ4QakxkgCOoH7fSnv4YBW0EnWKwTJK/ohHMLQfGWa DNn9V7XbQXKWO7sHE1IpA==
Received: from ywe10 (ywe10.prod.google.com [10.192.5.10]) by hpaq14.eem.corp.google.com with ESMTP id p0AJaqcO031420 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Mon, 10 Jan 2011 11:36:53 -0800
Received: by ywe10 with SMTP id 10so8552605ywe.38 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:36:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=2vFNNT6+QByyR/wz48vVDeOcscNs/QZDa+5EE908i5M=; b=YcRGJP2mJpVPqaiw2sqhKadSDc/GtXZm7/+3ITmUsHg0bMNlI6Xs+Zd6BRbuooNxJy rH1zf/xFtrdMEUIOZWAg==
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:content-transfer-encoding; b=ZdLzts/3/B4Gmz1xHomNWGDjJP7StfvPrdzG5GvlIO3bvg0G0Rvhq73S01ngLhTyto tYu+tnxj6FFt66MaXl4g==
Received: by 10.151.143.12 with SMTP id v12mr29460467ybn.35.1294688212121; Mon, 10 Jan 2011 11:36:52 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Mon, 10 Jan 2011 11:36:32 -0800 (PST)
In-Reply-To: <AANLkTinqjActrQ54YS6pOaOgeEPjNod9DNj42QKQNBTG@mail.gmail.com>
References: <20110109175118.GP5743@1wt.eu> <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com> <AANLkTi=4kUVHsBzeg_ScB4gRgcZStyK2yYqtmpg9mQiy@mail.gmail.com> <AANLkTimm8YJJeYqBArA=TGsT60gQ_vFYPjDm0yA4UtQP@mail.gmail.com> <AANLkTinqjActrQ54YS6pOaOgeEPjNod9DNj42QKQNBTG@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Mon, 10 Jan 2011 14:36:32 -0500
Message-ID: <AANLkTim6=R8b6oq6PGpOA8-v8eu+fVX2kVoC5w=ASn2M@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 19:34:42 -0000

On Mon, Jan 10, 2011 at 2:19 PM, Greg Wilkins <gregw@webtide.com> wrote:
> On 10 January 2011 19:59, Eric Rescorla <ekr@rtfm.com> wrote:
>> I'm not sure precisely what you mean by "masked frames". If I were king,=
 things
>> would look like this:
>>
>> - length
>> - masked portion
>> - key
>>
>> With everything else being packed into the masked portion.
>
> Well we are not that far apart, as was proposing
>
> =C2=A0- flags/opcode
> =C2=A0- length
> =C2=A0- masked portion
> =C2=A0- key (in extension data)
>
> although as pointed out in a separate thread, that ordering makes our
> 63 bit length a bit of overkill.

Why does moving the key after the payload alter the utility of long lengths=
?

However, this also means that extension data cannot affect
interpretation of the payload data -- personally I am ok with that
because I think the interpretation of the payload data should be
controlled by the opcode, but during our earlier framing discussions
there were several who felt otherwise.  My main objection to putting
the key after the payload is that it requires buffering of every frame
from the client.  Aside from latency issues from the buffering, this
imposes a significant cost on servers handling many connections
simultaneously.

> As I was an advocate for smaller frames and fragmentation, I'd have no
> issue with reducing the max frame size so that the key could be sent
> afterwards. =C2=A0 But I see no will to revisit framing, so that leaves u=
s
> with:
>
> =C2=A0- flags/opcode
> =C2=A0- key (in extension data)
> =C2=A0- length
> =C2=A0- masked portion

The current framing has the length before the extension data.

> Plus if the masking is an extension then objections to cryptographic
> masking are less.

If browsers are going to require it and Dave's statement about UK
crypto restrictions is correct, it would still limit the ability to
deploy infrastructure and server that are compatible with
browser-based clients (which initially will be the 99% case).

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

From dave@cridland.net  Mon Jan 10 11:35:32 2011
Return-Path: <dave@cridland.net>
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 35D9228C0EF for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:35:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.388
X-Spam-Level: 
X-Spam-Status: No, score=-2.388 tagged_above=-999 required=5 tests=[AWL=-0.089, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 BssCDa0gHt1u for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:35:31 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 21E5128B23E for <hybi@ietf.org>; Mon, 10 Jan 2011 11:35:30 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 8EC79116811D; Mon, 10 Jan 2011 19:37:42 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XZmlysjZPJ4u; Mon, 10 Jan 2011 19:37:38 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 3369611680FB; Mon, 10 Jan 2011 19:37:38 +0000 (GMT)
References: <2948.1294683316.925357@puncture> <AANLkTikfRjDX-0A5fyvD0ga_nnQZW6+a-aNggT3Nnq=L@mail.gmail.com>
In-Reply-To: <AANLkTikfRjDX-0A5fyvD0ga_nnQZW6+a-aNggT3Nnq=L@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <2948.1294688258.221233@puncture>
Date: Mon, 10 Jan 2011 19:37:38 +0000
From: Dave Cridland <dave@cridland.net>
To: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>, Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; delsp="yes"; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8Bit
Subject: Re: [hybi] Do we need to change the framing again?
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: Mon, 10 Jan 2011 19:35:32 -0000

On Mon Jan 10 18:18:35 2011, Ian Fette (ã‚¤ã‚¢ãƒ³ãƒ•ã‚§ãƒƒãƒ†ã‚£)  
wrote:
> Please god no. We're just now at the point of hopefully getting  
> agreement on
> the handshake and being able to ship something, let us not re-open  
> the whole
> framing debate or it will be 2012 before we ship anything.

Well, indeed, but given EKR's recent message, I feel it's rather too  
late to do anything but, unfortunately. EKR's already suggesting a  
length|payload|key framing, after all, and there's little point in  
having the length twice.

But note that during the masking debate, any requirements which ran  
contrary to masking were discarded, so many of the requirements we  
based this framing design on are no longer in force anyway.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From jat@google.com  Mon Jan 10 11:44:10 2011
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 1004F28C0FC for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:44:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.7
X-Spam-Level: 
X-Spam-Status: No, score=-104.7 tagged_above=-999 required=5 tests=[AWL=-1.723, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 5Y658054+HHw for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:44:09 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id BC8CD28C0F1 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:44:08 -0800 (PST)
Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p0AJkMpH031760 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:46:22 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294688782; bh=wWg6LVrAJ2U8yPbiSGXS5gNF+WY=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=CoQ5++yUnFIYqvbGNL4oSiP80894ipNCa0HjXPYCEFrxmyWDbDZWQ5Sg45S4vrtCK KZKsbCq4uvGp2PUzFTrag==
Received: from ywi6 (ywi6.prod.google.com [10.192.9.6]) by kpbe14.cbf.corp.google.com with ESMTP id p0AJjABQ026979 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Mon, 10 Jan 2011 11:46:20 -0800
Received: by ywi6 with SMTP id 6so8021364ywi.6 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:46:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=Ciyms2rD6+gUsi8pSBOXsLDNW6hyizJYaZqU+RZyhY0=; b=tHeB98ztSIFs8l5OTl4cd/UWm3VG29sXPtvZydObenvyOVieoPRiMib3BSLLyZC3zG B9O5n6xa3NDIOrgtP5sA==
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=nFmzOy6MDDNOs0/sC86+WczRLQtUVU2Kqg+afrcYljtpFhVWqzHJupkMQcvytEJJBB 2nAvYRK7vrhR6mI9hC1A==
Received: by 10.150.91.18 with SMTP id o18mr29442950ybb.92.1294688780550; Mon, 10 Jan 2011 11:46:20 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Mon, 10 Jan 2011 11:46:00 -0800 (PST)
In-Reply-To: <2948.1294683316.925357@puncture>
References: <2948.1294683316.925357@puncture>
From: John Tamplin <jat@google.com>
Date: Mon, 10 Jan 2011 14:46:00 -0500
Message-ID: <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com>
To: Dave Cridland <dave@cridland.net>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Do we need to change the framing again?
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: Mon, 10 Jan 2011 19:44:10 -0000

On Mon, Jan 10, 2011 at 1:15 PM, Dave Cridland <dave@cridland.net> wrote:
> Much of the design of the framing was in support of being able to perform
> lightweight streaming and sendfile() operations. Many of us went along with
> various very vocal requests for this, leading to a 63-bit frame size, for
> example, which is impractical with masking. We all, I think, universally
> assumed a symmetric framing, whereas we have now discarded the symmetry
> anyway.

Why is a 63-bit frame size impractical with masking?  As long as the
masking key is before the payload that is masked, you can apply it as
you go with minimal cost.  The server->client connection isn't masked,
and the proponents of sendfile() compatibility were talking about the
server, so that hasn't changed either.

> Given that we now require making, and (as EKR points out in another mail),
> this in turn requires that the per-frame key is transmitted at the end of
> each block, which damages streaming, should we be revisisting these early
> design decisions?

I do not believe it is necessary or desirable to place the key at the
end of the frame.  What is required is that the client can't alter the
payload of a frame while it is in progress.  For a streaming
application, I would expect the typical application to have a buffer
and to write a fragment when the buffer is full or the message is
terminated - which doesn't allow the client to alter the message after
the server might have received the key.  The one case which might be a
problem in the future, is when JS supports a byte buffer API -- the
browser would just have to make sure that the JS code can't modify the
byte buffer while the message is being written to the network.

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

From mcmanus@ducksong.com  Mon Jan 10 11:46:36 2011
Return-Path: <mcmanus@ducksong.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 83D2628C106 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:46:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.511
X-Spam-Level: 
X-Spam-Status: No, score=-2.511 tagged_above=-999 required=5 tests=[AWL=0.088,  BAYES_00=-2.599]
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 f8BEUY+H5V9G for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:46:35 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 78A2228C0FF for <hybi@ietf.org>; Mon, 10 Jan 2011 11:46:35 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id A3BB610300; Mon, 10 Jan 2011 14:48:49 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id C400910305; Mon, 10 Jan 2011 14:48:42 -0500 (EST)
From: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
To: John Tamplin <jat@google.com>
In-Reply-To: <AANLkTi=JO9aHknoBzVxqmT6rbKF1+q1MhQmc3_Yxq+7i@mail.gmail.com>
References: <20110109175118.GP5743@1wt.eu> <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com> <AANLkTi=JO9aHknoBzVxqmT6rbKF1+q1MhQmc3_Yxq+7i@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Date: Mon, 10 Jan 2011 14:48:29 -0500
Message-ID: <1294688909.7650.693.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 19:46:36 -0000

Breaking streaming by placing the key after the message is a cost out of
proportion to the benefit I see.

Heretofore masking has been a marginal cpu tax in exchange for a small
reduction in risk, but placing the key at the end of the message
sacrifices an important property of websockets. We should work to keep
that in place.

-- 
http://www.getfirefox.com/



From gregw@intalio.com  Mon Jan 10 11:50:32 2011
Return-Path: <gregw@intalio.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 D192228C0E4 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:50:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.931
X-Spam-Level: 
X-Spam-Status: No, score=-2.931 tagged_above=-999 required=5 tests=[AWL=0.046,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 lLZk-fAgM3s7 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:50:32 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id D9DB828C0F4 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:50:31 -0800 (PST)
Received: by qwi2 with SMTP id 2so4449770qwi.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:52:46 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.36.208 with SMTP id u16mr27178032qad.299.1294689165984; Mon, 10 Jan 2011 11:52:45 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Mon, 10 Jan 2011 11:52:45 -0800 (PST)
In-Reply-To: <AANLkTim6=R8b6oq6PGpOA8-v8eu+fVX2kVoC5w=ASn2M@mail.gmail.com>
References: <20110109175118.GP5743@1wt.eu> <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com> <AANLkTi=4kUVHsBzeg_ScB4gRgcZStyK2yYqtmpg9mQiy@mail.gmail.com> <AANLkTimm8YJJeYqBArA=TGsT60gQ_vFYPjDm0yA4UtQP@mail.gmail.com> <AANLkTinqjActrQ54YS6pOaOgeEPjNod9DNj42QKQNBTG@mail.gmail.com> <AANLkTim6=R8b6oq6PGpOA8-v8eu+fVX2kVoC5w=ASn2M@mail.gmail.com>
Date: Mon, 10 Jan 2011 20:52:45 +0100
X-Google-Sender-Auth: ljZEE8LFiSWsKt2QTwecBk1GrkI
Message-ID: <AANLkTi=5dhuKzeKZ=f1J6J-ahr7vzhR+N_7iD-=4V8FO@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 19:50:32 -0000

On 10 January 2011 20:36, John Tamplin <jat@google.com> wrote:
> Why does moving the key after the payload alter the utility of long lengt=
hs?

because you have to hold 2^63 bytes of data before you get the key
which you need to decode the data.
So you can't process the data as you go.



>> =A0- flags/opcode
>> =A0- key (in extension data)
>> =A0- length
>> =A0- masked portion
>
> The current framing has the length before the extension data.

oops yes.. but it's essentially the same.

From ifette@google.com  Mon Jan 10 12:16:19 2011
Return-Path: <ifette@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 F390A28C0E5 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 12:16:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.001
X-Spam-Level: 
X-Spam-Status: No, score=-104.001 tagged_above=-999 required=5 tests=[AWL=-1.325, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 AnEyJE59MnmM for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 12:16:18 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id C37FA28C0F9 for <hybi@ietf.org>; Mon, 10 Jan 2011 12:16:17 -0800 (PST)
Received: from hpaq11.eem.corp.google.com (hpaq11.eem.corp.google.com [172.25.149.11]) by smtp-out.google.com with ESMTP id p0AKIVtM025471 for <hybi@ietf.org>; Mon, 10 Jan 2011 12:18:31 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294690712; bh=53wJvmhK6kvSxdOsoj6HEgCtzdM=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=B64/YRSna/59C5LK8h1lao44PsST0Xa92wzMGWcFC0AXpoznmYqyh9meYMR5K7oko ebs7WtFeJV2WZAZmoDZtg==
Received: from qyk1 (qyk1.prod.google.com [10.241.83.129]) by hpaq11.eem.corp.google.com with ESMTP id p0AKGMKi005925 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Mon, 10 Jan 2011 12:18:30 -0800
Received: by qyk1 with SMTP id 1so1797077qyk.18 for <hybi@ietf.org>; Mon, 10 Jan 2011 12:18:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Mgwfpt+2vMI9PNlvqkXyvd8woIeILka7oKiPN7qh0kA=; b=Fh7xVojDOpPx6sa1McQIXkPF5ikpNMR5NBmR5bknnf9YwbuFy4D0xpRwTQlmHyiqE3 ZjyrUfqeE5mWEJH37v9g==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=tOc+GMVysMCdrq83/ul1uvGUfkv8ywgRTIvjX7GpCLyVjZjaikeCGt07PTzYM1ABBd 4/ZlAEe5cnMJJuBoB6VQ==
MIME-Version: 1.0
Received: by 10.229.242.83 with SMTP id lh19mr25531736qcb.226.1294690708627; Mon, 10 Jan 2011 12:18:28 -0800 (PST)
Received: by 10.229.0.137 with HTTP; Mon, 10 Jan 2011 12:18:28 -0800 (PST)
In-Reply-To: <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com>
References: <2948.1294683316.925357@puncture> <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com>
Date: Mon, 10 Jan 2011 12:18:28 -0800
Message-ID: <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: John Tamplin <jat@google.com>
Content-Type: multipart/alternative; boundary=0016363b8e7ac822f8049983ab61
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Do we need to change the framing again?
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Mon, 10 Jan 2011 20:16:19 -0000

--0016363b8e7ac822f8049983ab61
Content-Type: text/plain; charset=UTF-8

On Mon, Jan 10, 2011 at 11:46 AM, John Tamplin <jat@google.com> wrote:

> On Mon, Jan 10, 2011 at 1:15 PM, Dave Cridland <dave@cridland.net> wrote:
> > Much of the design of the framing was in support of being able to perform
> > lightweight streaming and sendfile() operations. Many of us went along
> with
> > various very vocal requests for this, leading to a 63-bit frame size, for
> > example, which is impractical with masking. We all, I think, universally
> > assumed a symmetric framing, whereas we have now discarded the symmetry
> > anyway.
>
> Why is a 63-bit frame size impractical with masking?  As long as the
> masking key is before the payload that is masked, you can apply it as
> you go with minimal cost.  The server->client connection isn't masked,
> and the proponents of sendfile() compatibility were talking about the
> server, so that hasn't changed either.
>
> > Given that we now require making, and (as EKR points out in another
> mail),
> > this in turn requires that the per-frame key is transmitted at the end of
> > each block, which damages streaming, should we be revisisting these early
> > design decisions?
>
> I do not believe it is necessary or desirable to place the key at the
> end of the frame.  What is required is that the client can't alter the
> payload of a frame while it is in progress.  For a streaming
> application, I would expect the typical application to have a buffer
> and to write a fragment when the buffer is full or the message is
> terminated - which doesn't allow the client to alter the message after
> the server might have received the key.  The one case which might be a
> problem in the future, is when JS supports a byte buffer API -- the
> browser would just have to make sure that the JS code can't modify the
> byte buffer while the message is being written to the network.
>
>
I would personally agree that I don't want to see the key at the end. It
makes it impossible to do anything useful with it until we have all the
data, which seems tragic.

-Ian


> --
> John A. Tamplin
> Software Engineer (GWT), Google
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--0016363b8e7ac822f8049983ab61
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Mon, Jan 10, 2011 at 11:46 AM, John Tamplin <=
span dir=3D"ltr">&lt;<a href=3D"mailto:jat@google.com">jat@google.com</a>&g=
t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Mon, Jan 10, 2011 at 1:15 PM, Dave Cridland &lt;<a hre=
f=3D"mailto:dave@cridland.net">dave@cridland.net</a>&gt; wrote:<br>
&gt; Much of the design of the framing was in support of being able to perf=
orm<br>
&gt; lightweight streaming and sendfile() operations. Many of us went along=
 with<br>
&gt; various very vocal requests for this, leading to a 63-bit frame size, =
for<br>
&gt; example, which is impractical with masking. We all, I think, universal=
ly<br>
&gt; assumed a symmetric framing, whereas we have now discarded the symmetr=
y<br>
&gt; anyway.<br>
<br>
</div>Why is a 63-bit frame size impractical with masking? =C2=A0As long as=
 the<br>
masking key is before the payload that is masked, you can apply it as<br>
you go with minimal cost. =C2=A0The server-&gt;client connection isn&#39;t =
masked,<br>
and the proponents of sendfile() compatibility were talking about the<br>
server, so that hasn&#39;t changed either.<br>
<div class=3D"im"><br>
&gt; Given that we now require making, and (as EKR points out in another ma=
il),<br>
&gt; this in turn requires that the per-frame key is transmitted at the end=
 of<br>
&gt; each block, which damages streaming, should we be revisisting these ea=
rly<br>
&gt; design decisions?<br>
<br>
</div>I do not believe it is necessary or desirable to place the key at the=
<br>
end of the frame. =C2=A0What is required is that the client can&#39;t alter=
 the<br>
payload of a frame while it is in progress. =C2=A0For a streaming<br>
application, I would expect the typical application to have a buffer<br>
and to write a fragment when the buffer is full or the message is<br>
terminated - which doesn&#39;t allow the client to alter the message after<=
br>
the server might have received the key. =C2=A0The one case which might be a=
<br>
problem in the future, is when JS supports a byte buffer API -- the<br>
browser would just have to make sure that the JS code can&#39;t modify the<=
br>
byte buffer while the message is being written to the network.<br>
<font color=3D"#888888"><br></font></blockquote><div><br></div><div>I would=
 personally agree that I don&#39;t want to see the key at the end. It makes=
 it impossible to do anything useful with it until we have all the data, wh=
ich seems tragic.=C2=A0</div>
<div><br></div><div>-Ian</div><div>=C2=A0</div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x;"><font color=3D"#888888">
--<br>
John A. Tamplin<br>
Software Engineer (GWT), Google<br>
</font><div><div></div><div class=3D"h5">__________________________________=
_____________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br>

--0016363b8e7ac822f8049983ab61--

From gregw@intalio.com  Mon Jan 10 12:51:44 2011
Return-Path: <gregw@intalio.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 554DD3A6768 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 12:51:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.932
X-Spam-Level: 
X-Spam-Status: No, score=-2.932 tagged_above=-999 required=5 tests=[AWL=0.045,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 XYcGHn6mL-tB for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 12:51:43 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id E156C3A672E for <hybi@ietf.org>; Mon, 10 Jan 2011 12:51:42 -0800 (PST)
Received: by qwi2 with SMTP id 2so4511646qwi.31 for <hybi@ietf.org>; Mon, 10 Jan 2011 12:53:57 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.236.134 with SMTP id kk6mr24052392qcb.93.1294692837257; Mon, 10 Jan 2011 12:53:57 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.160.12 with HTTP; Mon, 10 Jan 2011 12:53:57 -0800 (PST)
In-Reply-To: <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com>
References: <2948.1294683316.925357@puncture> <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com> <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com>
Date: Mon, 10 Jan 2011 21:53:57 +0100
X-Google-Sender-Auth: Iz1bJDiLbNgjC0CmGV1ahYHoxIc
Message-ID: <AANLkTi=pzWMFymjjY0n2LRtOgzHkoSGp4qzT70wJ-Ry=@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: hybi@ietf.org
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] Do we need to change the framing again?
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: Mon, 10 Jan 2011 20:51:44 -0000

2011/1/10 Ian Fette ($B%$%"%s%U%'%C%F%#(B) <ifette@google.com>:
> I would personally agree that I don't want to see the key at the end. It
> makes it impossible to do anything useful with it until we have all the
> data, which seems tragic.

I'm neutral on the key before / key after issue (as I'm not a fan of
streaming and would have been happy with a 16 bit length).

But it is good to see that an advocate of strong masking are prepared
to accept unmasked framing in the form of

   length
   data
   key

as that is only a few short step to

  opcode
  length
  key
  data

and then we can keep our framing as is.

From dave@cridland.net  Mon Jan 10 13:04:53 2011
Return-Path: <dave@cridland.net>
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 B527D3A6778 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:04:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.536
X-Spam-Level: 
X-Spam-Status: No, score=-2.536 tagged_above=-999 required=5 tests=[AWL=0.063,  BAYES_00=-2.599]
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 OyisQLk5gJEr for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:04:52 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 771C33A6767 for <hybi@ietf.org>; Mon, 10 Jan 2011 13:04:52 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id E4C4A116811F; Mon, 10 Jan 2011 21:07:05 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k9iNHJ8IfVlA; Mon, 10 Jan 2011 21:07:01 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id B65F111680FB; Mon, 10 Jan 2011 21:07:01 +0000 (GMT)
References: <2948.1294683316.925357@puncture> <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com> <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com> <AANLkTi=pzWMFymjjY0n2LRtOgzHkoSGp4qzT70wJ-Ry=@mail.gmail.com>
In-Reply-To: <AANLkTi=pzWMFymjjY0n2LRtOgzHkoSGp4qzT70wJ-Ry=@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <2948.1294693621.741254@puncture>
Date: Mon, 10 Jan 2011 21:07:01 +0000
From: Dave Cridland <dave@cridland.net>
To: Greg Wilkins <gregw@webtide.com>, Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; delsp="yes"; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8Bit
Subject: Re: [hybi] Do we need to change the framing again?
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: Mon, 10 Jan 2011 21:04:53 -0000

On Mon Jan 10 20:53:57 2011, Greg Wilkins wrote:
> 2011/1/10 Ian Fette (ã‚¤ã‚¢ãƒ³ãƒ•ã‚§ãƒƒãƒ†ã‚£) <ifette@google.com>:
> > I would personally agree that I don't want to see the key at the  
> end. It
> > makes it impossible to do anything useful with it until we have  
> all the
> > data, which seems tragic.
> 
> I'm neutral on the key before / key after issue (as I'm not a fan of
> streaming and would have been happy with a 16 bit length).
> 
> But it is good to see that an advocate of strong masking are  
> prepared
> to accept unmasked framing in the form of
> 
>    length
>    data
>    key
> 
> as that is only a few short step to
> 
>   opcode
>   length
>   key
>   data
> 
> and then we can keep our framing as is.

Well, you can't have the length at the front of the frame, obviously.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From dave@cridland.net  Mon Jan 10 13:11:58 2011
Return-Path: <dave@cridland.net>
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 EA4E63A67E1 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:11:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.537
X-Spam-Level: 
X-Spam-Status: No, score=-2.537 tagged_above=-999 required=5 tests=[AWL=0.062,  BAYES_00=-2.599]
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 dZzBVfH+OsrX for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:11:56 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 5EE4B3A67DA for <hybi@ietf.org>; Mon, 10 Jan 2011 13:11:56 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id E61F7116811E; Mon, 10 Jan 2011 21:14:09 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3T6KUtJeuzzz; Mon, 10 Jan 2011 21:14:05 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id C138D11680FB; Mon, 10 Jan 2011 21:14:05 +0000 (GMT)
References: <2948.1294683316.925357@puncture> <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com> <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com> <AANLkTi=pzWMFymjjY0n2LRtOgzHkoSGp4qzT70wJ-Ry=@mail.gmail.com> <2948.1294693621.096557@puncture>
In-Reply-To: <2948.1294693621.096557@puncture>
MIME-Version: 1.0
Message-Id: <2948.1294694045.801094@puncture>
Date: Mon, 10 Jan 2011 21:14:05 +0000
From: Dave Cridland <dave@cridland.net>
To: Dave Cridland <dave@cridland.net>, Greg Wilkins <gregw@webtide.com>, Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] Do we need to change the framing again?
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: Mon, 10 Jan 2011 21:11:58 -0000

On Mon Jan 10 21:07:01 2011, Dave Cridland wrote:
> Well, you can't have the length at the front of the frame,  
> obviously.

Well, maybe not so obvious - a length of between 5135603447290989056  
and 5135603447290989311 inclusive encodes as a string of 'GET / \r\n'  
followed by a junk octet. As a 63-bit length, this would be valid if  
we assume a 64-bit length field.

Same problem - an attacker controls the bits on the wire, only this  
time they're controlling the ideal bits on the wire to mount their  
attack.

I don't think, for a moment, that an attacker within a browser's  
sandbox is likely to be able to coerce WebSocket into sending such a  
frame, given it's pushing 4.5 petabytes, but I suppose a browser  
might have some length overflow/underflow case that's exploitable in  
this way.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From fenix@google.com  Mon Jan 10 13:24:28 2011
Return-Path: <fenix@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 EC1AD3A6816 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:24:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.014
X-Spam-Level: 
X-Spam-Status: No, score=-104.014 tagged_above=-999 required=5 tests=[AWL=-2.791, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_BASE64_TEXT=1.753, RCVD_IN_DNSWL_LOW=-1, 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 pFHOCLgtMzCa for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:24:27 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 9ABCF3A6801 for <hybi@ietf.org>; Mon, 10 Jan 2011 13:24:26 -0800 (PST)
Received: from wpaz9.hot.corp.google.com (wpaz9.hot.corp.google.com [172.24.198.73]) by smtp-out.google.com with ESMTP id p0ALQerV005374 for <hybi@ietf.org>; Mon, 10 Jan 2011 13:26:40 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294694800; bh=PXByOdfph4tPRTkgkZuSmohUCpI=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=csYXmLidNwm9GI74TQRn4/Bus/Ox7blp0RjRMv3H6tG/TrNzLKOmwbEhnzruqIlBu DBTyjegnAf0BS0NUHPcyg==
Received: from gwj21 (gwj21.prod.google.com [10.200.10.21]) by wpaz9.hot.corp.google.com with ESMTP id p0ALQc3K017935 for <hybi@ietf.org>; Mon, 10 Jan 2011 13:26:39 -0800
Received: by gwj21 with SMTP id 21so9312562gwj.41 for <hybi@ietf.org>; Mon, 10 Jan 2011 13:26:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=ieH80ws3WJoeKf4GKOY9kpO87SB4sUP08z00kNlqNLo=; b=boCcGskRsGqOYE/QP7yDq1/7Gf05vZEm2Aefg8sQmi8+aymL4CYhdwcAzMfI/RmYeX xRm7UXidM+4nYxnt5+3A==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=hVuJiHhoOwMTgsPcXlUg52eMgfmP/BmIvJQooTg4rpT55myABC6VH/kEnnRfll62Yb J5wih8wilIkcx5BlFWzA==
MIME-Version: 1.0
Received: by 10.150.185.2 with SMTP id i2mr28471497ybf.155.1294694797806; Mon, 10 Jan 2011 13:26:37 -0800 (PST)
Received: by 10.151.116.9 with HTTP; Mon, 10 Jan 2011 13:26:37 -0800 (PST)
In-Reply-To: <AANLkTi=pzWMFymjjY0n2LRtOgzHkoSGp4qzT70wJ-Ry=@mail.gmail.com>
References: <2948.1294683316.925357@puncture> <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com> <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com> <AANLkTi=pzWMFymjjY0n2LRtOgzHkoSGp4qzT70wJ-Ry=@mail.gmail.com>
Date: Mon, 10 Jan 2011 13:26:37 -0800
Message-ID: <AANLkTimQ0S_7L8=Qh-5fmWTGVBcKB8wjhFZOor5=ZkLg@mail.gmail.com>
From: Roberto Peon <fenix@google.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: multipart/alternative; boundary=000e0cd47d1a84129b0499849ff2
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Do we need to change the framing again?
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: Mon, 10 Jan 2011 21:24:28 -0000

--000e0cd47d1a84129b0499849ff2
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

Having the mask-key at the end makes it hard to do the right thing quickly
(low latency), or efficiently (low memory) for medium to large sized
messages assuming no fragmentation.
I do prefer having the frame include the key (e.g. as Greg proposes) in the
initial framing data.

I don't believe that the length bits are an interesting attack vector as the
browser would need something that size before it could encode that length.
Or are we assuming that the browser will send the header before it has all
of the data for the message? That'd be bizzare.
-=R


On Mon, Jan 10, 2011 at 12:53 PM, Greg Wilkins <gregw@webtide.com> wrote:

> 2011/1/10 Ian Fette ($B%$%"%s%U%'%C%F%#(B) <ifette@google.com>:
> > I would personally agree that I don't want to see the key at the end. It
> > makes it impossible to do anything useful with it until we have all the
> > data, which seems tragic.
>
> I'm neutral on the key before / key after issue (as I'm not a fan of
> streaming and would have been happy with a 16 bit length).
>
> But it is good to see that an advocate of strong masking are prepared
> to accept unmasked framing in the form of
>
>   length
>   data
>   key
>
> as that is only a few short step to
>
>  opcode
>  length
>  key
>  data
>
> and then we can keep our framing as is.
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--000e0cd47d1a84129b0499849ff2
Content-Type: text/html; charset=ISO-2022-JP
Content-Transfer-Encoding: base64

SGF2aW5nIHRoZSBtYXNrLWtleSBhdCB0aGUgZW5kIG1ha2VzIGl0IGhhcmQgdG8gZG8gdGhlIHJp
Z2h0IHRoaW5nIHF1aWNrbHkgKGxvdyBsYXRlbmN5KSwgb3IgZWZmaWNpZW50bHkgKGxvdyBtZW1v
cnkpIGZvciBtZWRpdW0gdG8gbGFyZ2Ugc2l6ZWQgbWVzc2FnZXMgYXNzdW1pbmcgbm8gZnJhZ21l
bnRhdGlvbi48ZGl2PkkgZG8gcHJlZmVyIGhhdmluZyB0aGUgZnJhbWUgaW5jbHVkZSB0aGUga2V5
IChlLmcuIGFzIEdyZWcgcHJvcG9zZXMpIGluIHRoZSBpbml0aWFsIGZyYW1pbmcgZGF0YS48L2Rp
dj4KPGRpdj48YnI+PC9kaXY+PGRpdj5JIGRvbiYjMzk7dCBiZWxpZXZlIHRoYXQgdGhlIGxlbmd0
aCBiaXRzIGFyZSBhbiBpbnRlcmVzdGluZyBhdHRhY2sgdmVjdG9yIGFzIHRoZSBicm93c2VyIHdv
dWxkIG5lZWQgc29tZXRoaW5nIHRoYXQgc2l6ZSBiZWZvcmUgaXQgY291bGQgZW5jb2RlIHRoYXQg
bGVuZ3RoLjwvZGl2PjxkaXY+T3IgYXJlIHdlIGFzc3VtaW5nIHRoYXQgdGhlIGJyb3dzZXIgd2ls
bCBzZW5kIHRoZSBoZWFkZXIgYmVmb3JlIGl0IGhhcyBhbGwgb2YgdGhlIGRhdGEgZm9yIHRoZSBt
ZXNzYWdlPyBUaGF0JiMzOTtkIGJlIGJpenphcmUuPC9kaXY+CjxkaXY+LT1SPC9kaXY+PGRpdj48
ZGl2Pjxicj48L2Rpdj48ZGl2Pjxicj48ZGl2IGNsYXNzPSJnbWFpbF9xdW90ZSI+T24gTW9uLCBK
YW4gMTAsIDIwMTEgYXQgMTI6NTMgUE0sIEdyZWcgV2lsa2lucyA8c3BhbiBkaXI9Imx0ciI+Jmx0
OzxhIGhyZWY9Im1haWx0bzpncmVnd0B3ZWJ0aWRlLmNvbSI+Z3JlZ3dAd2VidGlkZS5jb208L2E+
Jmd0Ozwvc3Bhbj4gd3JvdGU6PGJyPjxibG9ja3F1b3RlIGNsYXNzPSJnbWFpbF9xdW90ZSIgc3R5
bGU9Im1hcmdpbjowIDAgMCAuOGV4O2JvcmRlci1sZWZ0OjFweCAjY2NjIHNvbGlkO3BhZGRpbmct
bGVmdDoxZXg7Ij4KMjAxMS8xLzEwIElhbiBGZXR0ZSAoGyRCJSQlIiVzJVUlJyVDJUYlIxsoQikg
Jmx0OzxhIGhyZWY9Im1haWx0bzppZmV0dGVAZ29vZ2xlLmNvbSI+aWZldHRlQGdvb2dsZS5jb208
L2E+Jmd0Ozo8YnI+CjxkaXYgY2xhc3M9ImltIj4mZ3Q7IEkgd291bGQgcGVyc29uYWxseSBhZ3Jl
ZSB0aGF0IEkgZG9uJiMzOTt0IHdhbnQgdG8gc2VlIHRoZSBrZXkgYXQgdGhlIGVuZC4gSXQ8YnI+
CiZndDsgbWFrZXMgaXQgaW1wb3NzaWJsZSB0byBkbyBhbnl0aGluZyB1c2VmdWwgd2l0aCBpdCB1
bnRpbCB3ZSBoYXZlIGFsbCB0aGU8YnI+CiZndDsgZGF0YSwgd2hpY2ggc2VlbXMgdHJhZ2ljLjxi
cj4KPGJyPgo8L2Rpdj5JJiMzOTttIG5ldXRyYWwgb24gdGhlIGtleSBiZWZvcmUgLyBrZXkgYWZ0
ZXIgaXNzdWUgKGFzIEkmIzM5O20gbm90IGEgZmFuIG9mPGJyPgpzdHJlYW1pbmcgYW5kIHdvdWxk
IGhhdmUgYmVlbiBoYXBweSB3aXRoIGEgMTYgYml0IGxlbmd0aCkuPGJyPgo8YnI+CkJ1dCBpdCBp
cyBnb29kIHRvIHNlZSB0aGF0IGFuIGFkdm9jYXRlIG9mIHN0cm9uZyBtYXNraW5nIGFyZSBwcmVw
YXJlZDxicj4KdG8gYWNjZXB0IHVubWFza2VkIGZyYW1pbmcgaW4gdGhlIGZvcm0gb2Y8YnI+Cjxi
cj4KICZuYnNwOyBsZW5ndGg8YnI+CiAmbmJzcDsgZGF0YTxicj4KICZuYnNwOyBrZXk8YnI+Cjxi
cj4KYXMgdGhhdCBpcyBvbmx5IGEgZmV3IHNob3J0IHN0ZXAgdG88YnI+Cjxicj4KICZuYnNwO29w
Y29kZTxicj4KICZuYnNwO2xlbmd0aDxicj4KICZuYnNwO2tleTxicj4KICZuYnNwO2RhdGE8YnI+
Cjxicj4KYW5kIHRoZW4gd2UgY2FuIGtlZXAgb3VyIGZyYW1pbmcgYXMgaXMuPGJyPgo8ZGl2Pjxk
aXY+PC9kaXY+PGRpdiBjbGFzcz0iaDUiPl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fPGJyPgpoeWJpIG1haWxpbmcgbGlzdDxicj4KPGEgaHJlZj0ibWFpbHRv
Omh5YmlAaWV0Zi5vcmciPmh5YmlAaWV0Zi5vcmc8L2E+PGJyPgo8YSBocmVmPSJodHRwczovL3d3
dy5pZXRmLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2h5YmkiIHRhcmdldD0iX2JsYW5rIj5odHRwczov
L3d3dy5pZXRmLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2h5Ymk8L2E+PGJyPgo8L2Rpdj48L2Rpdj48
L2Jsb2NrcXVvdGU+PC9kaXY+PGJyPjwvZGl2PjwvZGl2Pgo=
--000e0cd47d1a84129b0499849ff2--

From bruce@callenish.com  Mon Jan 10 13:30:11 2011
Return-Path: <bruce@callenish.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 CB13C3A681E for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:30:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.584
X-Spam-Level: 
X-Spam-Status: No, score=-2.584 tagged_above=-999 required=5 tests=[AWL=0.015,  BAYES_00=-2.599]
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 jOteSbiPOtoD for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:30:10 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 7C2733A67F4 for <hybi@ietf.org>; Mon, 10 Jan 2011 13:30:10 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PcPLk-0006xC-B7 for hybi@ietf.org; Mon, 10 Jan 2011 13:32:24 -0800
Message-ID: <4D2B7AE9.2050101@callenish.com>
Date: Mon, 10 Jan 2011 13:32:25 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Hybi <hybi@ietf.org>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>	<AANLkTikTQ98ORhYJEK8LJCcjs9e4r_eKn1xr858mCnBn@mail.gmail.com> <AANLkTik0dLB_GKeAr8uKnF8QvOG53gETmTdgVWRaAT_s@mail.gmail.com>
In-Reply-To: <AANLkTik0dLB_GKeAr8uKnF8QvOG53gETmTdgVWRaAT_s@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] It's time to ship
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: Mon, 10 Jan 2011 21:30:11 -0000

Adam,

I've read over your protocol spec. I've carefully considered it, and 
I've decided I will not use it in any application I design. There are 
always alternatives. I will use something that is better suited to my needs.

I'd offer more constructive feedback but I am convinced I will be ignored.

I wish you all the best with shipping your protocol. I am sure many 
people will be very interested in it.

Sincerely, Bruce.

On 09/01/2011 4:46 PM, Adam Barth wrote:
> On Sun, Jan 9, 2011 at 4:39 PM, Greg Wilkins<gregw@webtide.com>  wrote:
>> On 9 January 2011 23:21, Adam Barth<ietf@adambarth.com>  wrote:
>>> Gentle people of hybi,
>>>
>>> There's been a lot of good discussion in this working group gathering
>>> consensus around the data framing and the handshake.  At some point we
>>> need to declare victory and ship the protocol, otherwise proprietary
>>> solutions will continue to eat our lunch.
>>>
>>> I've written up a more formal version of Pat's proposal based on the
>>> recent straw poll and subsequent discussion.  This protocol is by no
>>> means perfect, but it's good enough:
>>>
>>> http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
>> I cannot agree this proposal.
> Thanks for your feedback.  I'd encourage you not to implement this
> protocol then.
>
> Kind regards,
> Adam
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


From dave@cridland.net  Mon Jan 10 13:36:17 2011
Return-Path: <dave@cridland.net>
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 BDFBE3A680C for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:36:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.54
X-Spam-Level: 
X-Spam-Status: No, score=-2.54 tagged_above=-999 required=5 tests=[AWL=0.059,  BAYES_00=-2.599]
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 mMwMLgyuMxmK for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:36:16 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 88FA73A67DA for <hybi@ietf.org>; Mon, 10 Jan 2011 13:36:16 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 1925B116811D; Mon, 10 Jan 2011 21:38:30 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hYVtGXXQzV+b; Mon, 10 Jan 2011 21:38:26 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id F0C5711680FB; Mon, 10 Jan 2011 21:38:25 +0000 (GMT)
References: <2948.1294683316.925357@puncture> <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com> <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com> <AANLkTi=pzWMFymjjY0n2LRtOgzHkoSGp4qzT70wJ-Ry=@mail.gmail.com> <AANLkTimQ0S_7L8=Qh-5fmWTGVBcKB8wjhFZOor5=ZkLg@mail.gmail.com>
In-Reply-To: <AANLkTimQ0S_7L8=Qh-5fmWTGVBcKB8wjhFZOor5=ZkLg@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <2948.1294695505.996045@puncture>
Date: Mon, 10 Jan 2011 21:38:25 +0000
From: Dave Cridland <dave@cridland.net>
To: Roberto Peon <fenix@google.com>, Server-Initiated HTTP <hybi@ietf.org>, Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] Do we need to change the framing again?
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: Mon, 10 Jan 2011 21:36:17 -0000

On Mon Jan 10 21:26:37 2011, Roberto Peon wrote:
> I don't believe that the length bits are an interesting attack  
> vector as the
> browser would need something that size before it could encode that  
> length.
> Or are we assuming that the browser will send the header before it  
> has all
> of the data for the message? That'd be bizzare.

Well, I don't believe that the attacks mitigated by the masking are  
an interesting attack vector, but we're still protecting against it.

If such a vulnerability in the length encoding were exploited, I'd  
expect it to be exploited by a bug in the length calculation of the  
browser's framing implementation, and not by actually trying to send  
that much data. But given the working group's attitude to protecting  
against theoretical bugs in the intermediaries and servers, I figured  
I ought to raise this possibility at least.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From fenix@google.com  Mon Jan 10 13:37:50 2011
Return-Path: <fenix@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 8A63A3A6827 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:37:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.192
X-Spam-Level: 
X-Spam-Status: No, score=-104.192 tagged_above=-999 required=5 tests=[AWL=-1.216, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 n3EhoqvjbT30 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 13:37: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 5B51C3A680C for <hybi@ietf.org>; Mon, 10 Jan 2011 13:37:49 -0800 (PST)
Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [172.25.149.12]) by smtp-out.google.com with ESMTP id p0ALe3gb002891 for <hybi@ietf.org>; Mon, 10 Jan 2011 13:40:03 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294695603; bh=n5aTtqPL0TBZAm/J3wIuJd1cwP0=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=xQnml6wZ0xRI03MsUD4IAloEkZ2xeDCdFshpaNIB93f3tDcG0hrIhehr0I/NwSWRJ KrK9Gn+G4QReG2KzQNXwg==
Received: from yxi11 (yxi11.prod.google.com [10.190.3.11]) by hpaq12.eem.corp.google.com with ESMTP id p0ALe1dE009149 for <hybi@ietf.org>; Mon, 10 Jan 2011 13:40:02 -0800
Received: by yxi11 with SMTP id 11so10055199yxi.2 for <hybi@ietf.org>; Mon, 10 Jan 2011 13:40:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=wFbyy5Nm2TgM7dGNaaAHgJVIARUlRsbDHd1k9xDdtHQ=; b=InVpal9q4fL+hFMigop1PyptRYMHGuxrKbHZwgOheb8pXnT1Lc2gPKnnFvsXfIx08n fQQ2pu3hZjkWIZA45GVw==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=RfJTqVoltljhd+oJdA/qIyPVJblXfKVEFyj3KP6UNAcwP8PcEtgub8FmOOjl/h3872 EFAZ7ekvxt/FxpWXBU2w==
MIME-Version: 1.0
Received: by 10.151.101.14 with SMTP id d14mr7228292ybm.326.1294695601291; Mon, 10 Jan 2011 13:40:01 -0800 (PST)
Received: by 10.151.116.9 with HTTP; Mon, 10 Jan 2011 13:40:00 -0800 (PST)
In-Reply-To: <2948.1294695505.996045@puncture>
References: <2948.1294683316.925357@puncture> <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com> <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com> <AANLkTi=pzWMFymjjY0n2LRtOgzHkoSGp4qzT70wJ-Ry=@mail.gmail.com> <AANLkTimQ0S_7L8=Qh-5fmWTGVBcKB8wjhFZOor5=ZkLg@mail.gmail.com> <2948.1294695505.996045@puncture>
Date: Mon, 10 Jan 2011 13:40:00 -0800
Message-ID: <AANLkTi=4vTM0--0YiDXyON0B_wbptGLJVS6XruU-Ppq2@mail.gmail.com>
From: Roberto Peon <fenix@google.com>
To: Dave Cridland <dave@cridland.net>
Content-Type: multipart/alternative; boundary=00151751149e684462049984cfe7
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Do we need to change the framing again?
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: Mon, 10 Jan 2011 21:37:50 -0000

--00151751149e684462049984cfe7
Content-Type: text/plain; charset=ISO-8859-1

Okdokie, thanks for the explanation!
-=R

On Mon, Jan 10, 2011 at 1:38 PM, Dave Cridland <dave@cridland.net> wrote:

> On Mon Jan 10 21:26:37 2011, Roberto Peon wrote:
>
>> I don't believe that the length bits are an interesting attack vector as
>> the
>> browser would need something that size before it could encode that length.
>> Or are we assuming that the browser will send the header before it has all
>> of the data for the message? That'd be bizzare.
>>
>
> Well, I don't believe that the attacks mitigated by the masking are an
> interesting attack vector, but we're still protecting against it.
>
> If such a vulnerability in the length encoding were exploited, I'd expect
> it to be exploited by a bug in the length calculation of the browser's
> framing implementation, and not by actually trying to send that much data.
> But given the working group's attitude to protecting against theoretical
> bugs in the intermediaries and servers, I figured I ought to raise this
> possibility at least.
>
>
> Dave.
> --
> Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net<xmpp%3Adwd@dave.cridland.net>
>  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
>  - http://dave.cridland.net/
> Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade
>

--00151751149e684462049984cfe7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Okdokie, thanks for the explanation!<div>-=3DR<br><br><div class=3D"gmail_q=
uote">On Mon, Jan 10, 2011 at 1:38 PM, Dave Cridland <span dir=3D"ltr">&lt;=
<a href=3D"mailto:dave@cridland.net">dave@cridland.net</a>&gt;</span> wrote=
:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div class=3D"im">On Mon Jan 10 21:26:37 20=
11, Roberto Peon wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
I don&#39;t believe that the length bits are an interesting attack vector a=
s the<br>
browser would need something that size before it could encode that length.<=
br>
Or are we assuming that the browser will send the header before it has all<=
br>
of the data for the message? That&#39;d be bizzare.<br>
</blockquote>
<br></div>
Well, I don&#39;t believe that the attacks mitigated by the masking are an =
interesting attack vector, but we&#39;re still protecting against it.<br>
<br>
If such a vulnerability in the length encoding were exploited, I&#39;d expe=
ct it to be exploited by a bug in the length calculation of the browser&#39=
;s framing implementation, and not by actually trying to send that much dat=
a. But given the working group&#39;s attitude to protecting against theoret=
ical bugs in the intermediaries and servers, I figured I ought to raise thi=
s possibility at least.<div>
<div></div><div class=3D"h5"><br>
<br>
Dave.<br>
-- <br>
Dave Cridland - mailto:<a href=3D"mailto:dave@cridland.net" target=3D"_blan=
k">dave@cridland.net</a> - <a href=3D"mailto:xmpp%3Adwd@dave.cridland.net" =
target=3D"_blank">xmpp:dwd@dave.cridland.net</a><br>
=A0- acap://<a href=3D"http://acap.dave.cridland.net/byowner/user/dwd/bookm=
arks/" target=3D"_blank">acap.dave.cridland.net/byowner/user/dwd/bookmarks/=
</a><br>
=A0- <a href=3D"http://dave.cridland.net/" target=3D"_blank">http://dave.cr=
idland.net/</a><br>
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade<br>
</div></div></blockquote></div><br></div>

--00151751149e684462049984cfe7--

From salvatore.loreto@ericsson.com  Mon Jan 10 14:38:39 2011
Return-Path: <salvatore.loreto@ericsson.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 A44F928C0E1 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 14:38:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.552
X-Spam-Level: 
X-Spam-Status: No, score=-106.552 tagged_above=-999 required=5 tests=[AWL=0.047, BAYES_00=-2.599, 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 2Pc-9X87gaMQ for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 14:38:38 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id A190228C106 for <hybi@ietf.org>; Mon, 10 Jan 2011 14:38:22 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-27-4d2b8ae39bd5
Received: from esessmw0191.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id 60.C2.23694.3EA8B2D4; Mon, 10 Jan 2011 23:40:36 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0191.eemea.ericsson.se (153.88.115.85) with Microsoft SMTP Server id 8.2.234.1; Mon, 10 Jan 2011 23:40:35 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 9D898251F; Tue, 11 Jan 2011 00:40:35 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 6117C50547; Tue, 11 Jan 2011 00:40:35 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id BA03E50546; Tue, 11 Jan 2011 00:40:34 +0200 (EET)
Message-ID: <4D2B8AE2.30207@ericsson.com>
Date: Mon, 10 Jan 2011 23:40:34 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, =?UTF-8?B?IklhbiBGZXR0ZSAo?=
Subject: [hybi] GET+Upgrade+XOR in 04 version
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: Mon, 10 Jan 2011 22:38:39 -0000

Hi there,


Joe and I, as chairs, would like to see a -04 version of the 
draft-ietf-hybi-thewebsocketprotocol
that reflect both the consensus we reached based on the poll and what's 
been discussed the most:

"GET+Upgrade and XOR".


However because because there are still on going discussions on how to 
mask and
OPTIONS has been recently proposed as an alternative to GET

we have decided to hold, after the 04 version will be released, two 
separate polls

1) OPTIONS vs GET
2) a straw poll to resolve the question of masking

the -05 version will then be based on the result of those polls.

cheers
/Sal

-- 
Salvatore Loreto
www.sloreto.com


From w@1wt.eu  Mon Jan 10 15:02:25 2011
Return-Path: <w@1wt.eu>
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 1409B3A672F for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 15:02:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.077
X-Spam-Level: 
X-Spam-Status: No, score=-2.077 tagged_above=-999 required=5 tests=[AWL=-0.034, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 iEje3JTp0TH1 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 15:02:24 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id BDCB53A6403 for <hybi@ietf.org>; Mon, 10 Jan 2011 15:02:23 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0AN4U9t016315; Tue, 11 Jan 2011 00:04:30 +0100
Date: Tue, 11 Jan 2011 00:04:30 +0100
From: Willy Tarreau <w@1wt.eu>
To: "Ian Fette (????????????????????????)" <ifette@google.com>
Message-ID: <20110110230430.GA16301@1wt.eu>
References: <2948.1294683316.925357@puncture> <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com> <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Do we need to change the framing again?
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: Mon, 10 Jan 2011 23:02:25 -0000

On Mon, Jan 10, 2011 at 12:18:28PM -0800, Ian Fette (????????????????????????) wrote:
> On Mon, Jan 10, 2011 at 11:46 AM, John Tamplin <jat@google.com> wrote:
> 
> > On Mon, Jan 10, 2011 at 1:15 PM, Dave Cridland <dave@cridland.net> wrote:
> > > Much of the design of the framing was in support of being able to perform
> > > lightweight streaming and sendfile() operations. Many of us went along
> > with
> > > various very vocal requests for this, leading to a 63-bit frame size, for
> > > example, which is impractical with masking. We all, I think, universally
> > > assumed a symmetric framing, whereas we have now discarded the symmetry
> > > anyway.
> >
> > Why is a 63-bit frame size impractical with masking?  As long as the
> > masking key is before the payload that is masked, you can apply it as
> > you go with minimal cost.  The server->client connection isn't masked,
> > and the proponents of sendfile() compatibility were talking about the
> > server, so that hasn't changed either.
> >
> > > Given that we now require making, and (as EKR points out in another
> > mail),
> > > this in turn requires that the per-frame key is transmitted at the end of
> > > each block, which damages streaming, should we be revisisting these early
> > > design decisions?
> >
> > I do not believe it is necessary or desirable to place the key at the
> > end of the frame.  What is required is that the client can't alter the
> > payload of a frame while it is in progress.  For a streaming
> > application, I would expect the typical application to have a buffer
> > and to write a fragment when the buffer is full or the message is
> > terminated - which doesn't allow the client to alter the message after
> > the server might have received the key.  The one case which might be a
> > problem in the future, is when JS supports a byte buffer API -- the
> > browser would just have to make sure that the JS code can't modify the
> > byte buffer while the message is being written to the network.
> >
> >
> I would personally agree that I don't want to see the key at the end. It
> makes it impossible to do anything useful with it until we have all the
> data, which seems tragic.

indeed, and it would also make it impossible to send large frames. Right
now we support lengths up to 63 bit, but anything more than a few tens
of kB is going to be painful on some components, especially those which
are designed to support vast amounts of concurrent connections.

Willy
> 
> -Ian
> 
> 
> > --
> > John A. Tamplin
> > Software Engineer (GWT), Google
> > _______________________________________________
> > hybi mailing list
> > hybi@ietf.org
> > https://www.ietf.org/mailman/listinfo/hybi
> >

> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


From w@1wt.eu  Mon Jan 10 15:07:42 2011
Return-Path: <w@1wt.eu>
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 B2CC33A657C for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 15:07:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.076
X-Spam-Level: 
X-Spam-Status: No, score=-2.076 tagged_above=-999 required=5 tests=[AWL=-0.033, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 9tlb29H3Ahu9 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 15:07:41 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 686183A6403 for <hybi@ietf.org>; Mon, 10 Jan 2011 15:07:41 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0AN9t06016336; Tue, 11 Jan 2011 00:09:55 +0100
Date: Tue, 11 Jan 2011 00:09:55 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110110230955.GB16301@1wt.eu>
References: <20110109175118.GP5743@1wt.eu> <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 23:07:42 -0000

Hi Eric,

On Mon, Jan 10, 2011 at 07:52:50AM -0800, Eric Rescorla wrote:
> On Sun, Jan 9, 2011 at 9:51 AM, Willy Tarreau <w@1wt.eu> wrote:
> 
> > The server will check the input stream, looking for the bytes "G" and "E".
> > If those bytes do not appear, it will terminate the connection because it
> > means this connection will require too many blocks to get the correct values.
> 
> Nice observation.
> 
> I haven't gotten too much sleep but...
> 
> As I understand your attack, the way this works is that you're
> exploiting the fact that
> the server gets information about the repeating mask to shut down unproductive
> byte sequences before they have been transmitted over the wire. This makes sense
> if you think that the network transmission is the rate limiting step.

Yes that was the asumption.

> The obvious countermeasure to this is to ensure that the server
> doesn't learn anything
> useful prior to receiving the whole packet. This can't be done with a
> fixed mask for the
> reasons you indicate but can be done with a generated mask, I believe.
> Consider the
> packet structure (omitting most framing bits)
> 
> AES-CTR(K_msg, Payload) || K_msg
> 
> In this case, no matter how much information the attacker has about
> payload byte i,
> he doesn't learn anything useful about expected ciphertext
> (transmitted) byte i+1
> until the key is received (this is by definitional properties of
> AES-CTR). So, the bytestream
> on the wire is indistinguishable from random, precluding the attack
> you describe.

I also thought about that possibility, but it's clearly unusable on
large frames due to the need to buffer everything before taking the
simplest decision. Also, many intermediaries will have to receive a
whole frame before forwarding it, adding up the serialization delays
for each hop. And the emitter would receive no indication of any
possible start of receipt which can be particularly annoying when
sending large frames (eg: user uploading a photo in a rich application).
Or we would have to define a new frame-based masking on top of current
framing which would not permit large frames at all and which would
always indicate all the information needed to parse and take decision.

This becomes quite complex and counter-efficient for what it tries to
solve :-/

Willy


From brofield@gmail.com  Mon Jan 10 16:09:55 2011
Return-Path: <brofield@gmail.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 114623A6828 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 16:09:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.691
X-Spam-Level: 
X-Spam-Status: No, score=-2.691 tagged_above=-999 required=5 tests=[AWL=0.286,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 py9ftswDUsbL for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 16:09:53 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 80AF93A681D for <hybi@ietf.org>; Mon, 10 Jan 2011 16:09:53 -0800 (PST)
Received: by qyk34 with SMTP id 34so2113587qyk.10 for <hybi@ietf.org>; Mon, 10 Jan 2011 16:12:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=jBqQAeGDeXC71vUXR2PkitG5GefNsGFLXfX+g9bMosg=; b=WDwRAoXw/XTjwEbdFZ+6T6W/grd5pIGFWt+HL0YoHJQpIHwUhvnUqhtp/68STbtKBT 3lCjRaNlk6p8yuCM0DaVm6evDwxrX7OFLccPieAbopTEDbKe09V/AA41Vc7zH0VoxhCd c5hv2t+ya/r/PgupkWIawTRvAZTuHyLyaC7Ik=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=uNSGIff227HxjaMm+T9Nuypiqma1i1SkoJxanhr6ouWTinuNK0gPUOVmE/fcdK9l5h rcd2qhxFMYcatNHQpZA1qo8v03HOnMvOCmnYf8sHYINpbYeE/h2lcDkGVxuLb9B2tfjb QDG5If00I/v9Afj/LAhPGE6yObyfEMEJhEeMQ=
MIME-Version: 1.0
Received: by 10.229.250.9 with SMTP id mm9mr25231971qcb.264.1294704728052; Mon, 10 Jan 2011 16:12:08 -0800 (PST)
Sender: brofield@gmail.com
Received: by 10.229.84.66 with HTTP; Mon, 10 Jan 2011 16:12:07 -0800 (PST)
In-Reply-To: <AANLkTi=7dB-cFiyBwCkv03hd++d7ufBdnHP63_TOzwrK@mail.gmail.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <4D26DE2D.5040901@ericsson.com> <AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com> <B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com> <AANLkTi=mobwinB_+oxznk4cpnQstBHjHb-9orpeVS8Wo@mail.gmail.com> <AANLkTi=7dB-cFiyBwCkv03hd++d7ufBdnHP63_TOzwrK@mail.gmail.com>
Date: Tue, 11 Jan 2011 09:12:07 +0900
X-Google-Sender-Auth: N80VyKpgXnfE7utZ2LPzNi73i_U
Message-ID: <AANLkTin+OPV5mrKnyTOD+R1QZmbczyKB-RGQ0c0cfA2R@mail.gmail.com>
From: Brodie Thiesfield <brodie@jellycan.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Tue, 11 Jan 2011 00:09:55 -0000

On Tue, Jan 11, 2011 at 12:39 AM, Eric Rescorla <ekr@rtfm.com> wrote:
> On Sun, Jan 9, 2011 at 7:00 PM, Brodie Thiesfield <brodie@jellycan.com> wrote:
>> Where clients aren't behind NAT a direct connection can be used, when
>> they are then a central hub relay.
>
> A better approach is to actually do hole punching. Seriously, there is
> already IETF work
> being spun up in this area. It will be informed by this WG, but it's a
> different set of problems.
>
> Given that it's out of scope for this WG, we really should not be
> considering it.

Yes, I agree that hole punching would be better, and when the work is
done it can be used. I'm not asking the WG to design p2p into the
protocol. I'm suggesting that the protocol have a flexibility that
would permit a basic p2p usage, rather than precluding it by design.

The essential points are:
* basic direct + central hub p2p is almost possible with the current protocol
* since both client and server are browsers, both client and server
will be wanting to send masked data
* therefore the client needs to be able to receive and decode masked frames

All that is required to enable simple p2p then is for the masking to
be designed such that the recipient can detect that it is being used
and unmask the data.

To do this, either the client must be informed out of band by the
server that masking will be used for the server->client channel too,
OR a frame must be self-describing with the masking details
(extensions, reserved bits). The current push for masking to be placed
into the extension data would do this.

Regards,
Brodie



> More complex schemes could be added
>> later, however simply trying for a direct connection and falling back
>> to a central relay is possible with the existing protocol.
>>
>> However this problem is solved though, we will still have a client is
>> acting as a server and (I am assuming) that client will still want to
>> send masked data too. In the case of direct connection, where no
>> central server can modify the data stream, the client on the other end
>> must unmask the data coming from the server. So the most basic support
>> for p2p with the current protocol maintaining security guarantees
>> would only require a client to be able to accept either masked or
>> unmasked responses from the server.
>>
>> The security paranoid could then also optionally configure a server to
>> send masked responses (if supported).
>>
>> Regards,
>> Brodie
>>
>>
>> On Mon, Jan 10, 2011 at 11:39 AM, Eric Rescorla <ekr@rtfm.com> wrote:
>>> Not really. Meaningful p2p operation requires nat traversal
>>>
>>> Ekr
>>>
>>> On Jan 9, 2011, at 17:02, Brodie Thiesfield <brodie@jellycan.com> wrote:
>>>
>>>> I understand that this can be addressed later, however supporting peer
>>>> to peer in the protocol appears to only require a client to also
>>>> support the optional masking of the server responses.
>>>>
>>>> In the case of a browser acting as the server, it will need to
>>>> implement the server side of things like handshake and unmasking
>>>> client messages. However, given that it is really also a client (with
>>>> the same unknown intermediataries, etc), I assume that it would be
>>>> desirable to have the same security protections as a simple client,
>>>> and so it would also want to send messages using masking.
>>>>
>>>> As long as simple clients can also receive messages from a server with
>>>> masking enabled, then there appears to be no reason that peer to peer
>>>> wouldn't work with the same security guarantees (for the protocol)
>>>> that client->server does.
>>>>
>>>> i.e.
>>>> client -> server = masked
>>>> server -> client = cleartext | masked
>>>>
>>>> How the server notifies the client that it is going to send masked
>>>> responses remains unspecified.
>>>>
>>>> Regards,
>>>> Brodie
>>>>
>>>>
>>>> On Fri, Jan 7, 2011 at 7:34 PM, Salvatore Loreto
>>>> <salvatore.loreto@ericsson.com> wrote:
>>>>> On 1/7/11 2:23 AM, John Tamplin wrote:
>>>>>
>>>>> On Thu, Jan 6, 2011 at 7:37 PM, Bruce Atherton <bruce@callenish.com> wrote:
>>>>>>
>>>>>> So far it appears that Greg, Brodie, Jerod, and I favour including
>>>>>> peer-to-peer design considerations in the spec. I am not sure, but it sounds
>>>>>> like John considers it out of scope and Scott considers it in scope. What
>>>>>> about the rest of you?
>>>>>
>>>>> I am not opposed to it exactly, but given how long everything has taken I am
>>>>> keen to keep the base protocol minimal so we can actually get something out
>>>>> the door.
>>>>>
>>>>> I agree with John,
>>>>> lets keep the base protocol minimal at moment.
>>>>> Once we have reached consensus on the minimal base protocol we can
>>>>> start to add other stuff on top of the minimal base.
>>>>>
>>>>> If there is consensus in doing something in the future we can track it in
>>>>> the issue tracker
>>>>> so we won't forget.
>>>>>
>>>>>
>>>>> cheers
>>>>> /Sal
>>>>>
>>>>> --
>>>>> Salvatore Loreto
>>>>> www.sloreto.com
>>>>>
>>>>> _______________________________________________
>>>>> hybi mailing list
>>>>> hybi@ietf.org
>>>>> https://www.ietf.org/mailman/listinfo/hybi
>>>>>
>>>>>
>>>> _______________________________________________
>>>> hybi mailing list
>>>> hybi@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/hybi
>>>
>>
>

From duerst@it.aoyama.ac.jp  Mon Jan 10 16:55:56 2011
Return-Path: <duerst@it.aoyama.ac.jp>
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 17B4E3A682E for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 16:55:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -100.357
X-Spam-Level: 
X-Spam-Status: No, score=-100.357 tagged_above=-999 required=5 tests=[AWL=-0.567, BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265, MIME_8BIT_HEADER=0.3, 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 UHqdf7L5393U for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 16:55:55 -0800 (PST)
Received: from scintmta01.scbb.aoyama.ac.jp (scintmta01.scbb.aoyama.ac.jp [133.2.253.33]) by core3.amsl.com (Postfix) with ESMTP id DF0463A67D6 for <hybi@ietf.org>; Mon, 10 Jan 2011 16:55:54 -0800 (PST)
Received: from scmse02.scbb.aoyama.ac.jp ([133.2.253.231]) by scintmta01.scbb.aoyama.ac.jp (secret/secret) with SMTP id p0B0w8Od019676 for <hybi@ietf.org>; Tue, 11 Jan 2011 09:58:08 +0900
Received: from (unknown [133.2.206.133]) by scmse02.scbb.aoyama.ac.jp with smtp id 740f_50de_db2a0da8_1d1d_11e0_8d8b_001d096c5782; Tue, 11 Jan 2011 09:58:08 +0900
Received: from [IPv6:::1] ([133.2.210.1]:36160) by itmail.it.aoyama.ac.jp with [XMail 1.22 ESMTP Server] id <S14B1743> for <hybi@ietf.org> from <duerst@it.aoyama.ac.jp>; Tue, 11 Jan 2011 09:58:08 +0900
Message-ID: <4D2BAB1F.2030307@it.aoyama.ac.jp>
Date: Tue, 11 Jan 2011 09:58:07 +0900
From: =?UTF-8?B?Ik1hcnRpbiBKLiBEw7xyc3Qi?= <duerst@it.aoyama.ac.jp>
Organization: Aoyama Gakuin University
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: Roberto Peon <fenix@google.com>
References: <2948.1294683316.925357@puncture>	<AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com>	<AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com>	<AANLkTi=pzWMFymjjY0n2LRtOgzHkoSGp4qzT70wJ-Ry=@mail.gmail.com> <AANLkTimQ0S_7L8=Qh-5fmWTGVBcKB8wjhFZOor5=ZkLg@mail.gmail.com>
In-Reply-To: <AANLkTimQ0S_7L8=Qh-5fmWTGVBcKB8wjhFZOor5=ZkLg@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Cc: hybi@ietf.org
Subject: Re: [hybi] Do we need to change the framing again?
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: Tue, 11 Jan 2011 00:55:56 -0000

On 2011/01/11 6:26, Roberto Peon wrote:

> I don't believe that the length bits are an interesting attack vector as the
> browser would need something that size before it could encode that length.
> Or are we assuming that the browser will send the header before it has all
> of the data for the message? That'd be bizzare.

That's not only bizzare, it would also be a security risk, in that the 
server and the client could exchange data about the masking key(stream) 
in a side channel, allowing the client to create data that it knows what 
it will look after masking. This is a security concern that we have to 
warn against in the security section.

Regards,   Martin.

-- 
#-# Martin J. DÃ¼rst, Professor, Aoyama Gakuin University
#-# http://www.sw.it.aoyama.ac.jp   mailto:duerst@it.aoyama.ac.jp

From jat@google.com  Mon Jan 10 18:10:04 2011
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 B806C3A691E for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 18:10:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.825
X-Spam-Level: 
X-Spam-Status: No, score=-103.825 tagged_above=-999 required=5 tests=[AWL=-0.848, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 5ASVoQw7wTGe for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 18:10:04 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id C9CAC3A691C for <hybi@ietf.org>; Mon, 10 Jan 2011 18:10:03 -0800 (PST)
Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id p0B2CIIl022517 for <hybi@ietf.org>; Mon, 10 Jan 2011 18:12:18 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294711938; bh=QfXRtou6o3KCgjSQoKst0GphzY4=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=U5Yt/sruFYXy/Fw8Mb7yRqwntbSfDmStN/6Raa4y8VcGiTFUi1ObSDq4H6GucxcND Z69QKzgrKLf1pmRBfMudw==
Received: from gwj20 (gwj20.prod.google.com [10.200.10.20]) by wpaz1.hot.corp.google.com with ESMTP id p0B2CGx7016680 for <hybi@ietf.org>; Mon, 10 Jan 2011 18:12:17 -0800
Received: by gwj20 with SMTP id 20so8273608gwj.33 for <hybi@ietf.org>; Mon, 10 Jan 2011 18:12:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=yTrd9VfNRch9KtypTAejhJXHbluiliAr51tRQ2OV6mU=; b=rVS8IDG/FFOwte1d9h4qwngbcUO6132mvoMSUtB2mT1V3OOCKxo0qSPCTaEG6lMG9a z9CDI3a/Nqa7fOUa8e+w==
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=Hk80LySVOwityzr15uOC5kGw6NW9DH5myZEu4NEJof8CDbuRFlon5SSzecpqyCaHPz r/Kb0rGqd53qfbqAvNtg==
Received: by 10.151.85.10 with SMTP id n10mr28716130ybl.206.1294711936789; Mon, 10 Jan 2011 18:12:16 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Mon, 10 Jan 2011 18:11:56 -0800 (PST)
In-Reply-To: <AANLkTin+OPV5mrKnyTOD+R1QZmbczyKB-RGQ0c0cfA2R@mail.gmail.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <4D26DE2D.5040901@ericsson.com> <AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com> <B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com> <AANLkTi=mobwinB_+oxznk4cpnQstBHjHb-9orpeVS8Wo@mail.gmail.com> <AANLkTi=7dB-cFiyBwCkv03hd++d7ufBdnHP63_TOzwrK@mail.gmail.com> <AANLkTin+OPV5mrKnyTOD+R1QZmbczyKB-RGQ0c0cfA2R@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Mon, 10 Jan 2011 21:11:56 -0500
Message-ID: <AANLkTikveY-iMw4iFW51c1N1nyVB2j4Qzm8w0oxL2Mca@mail.gmail.com>
To: Brodie Thiesfield <brodie@jellycan.com>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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: Tue, 11 Jan 2011 02:10:04 -0000

On Mon, Jan 10, 2011 at 7:12 PM, Brodie Thiesfield <brodie@jellycan.com> wrote:
> The essential points are:
> * basic direct + central hub p2p is almost possible with the current protocol
> * since both client and server are browsers, both client and server
> will be wanting to send masked data
> * therefore the client needs to be able to receive and decode masked frames
>
> All that is required to enable simple p2p then is for the masking to
> be designed such that the recipient can detect that it is being used
> and unmask the data.
>
> To do this, either the client must be informed out of band by the
> server that masking will be used for the server->client channel too,
> OR a frame must be self-describing with the masking details
> (extensions, reserved bits). The current push for masking to be placed
> into the extension data would do this.

It seems to me to be totally separate as to how the masking is
actually applied -- you could easily define an extension "servermask"
which specifies that server->client frames will be masked (probably
the same mechanism as client->server, but it doesn't have to be), and
then if that extension is negotiated then you proceed with masking in
both directions.

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

From Internet-Drafts@ietf.org  Tue Jan 11 10:45:03 2011
Return-Path: <Internet-Drafts@ietf.org>
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 004A528C2F1; Tue, 11 Jan 2011 10:45:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.513
X-Spam-Level: 
X-Spam-Status: No, score=-102.513 tagged_above=-999 required=5 tests=[AWL=0.086, BAYES_00=-2.599, 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 f1EH45qt2ovR; Tue, 11 Jan 2011 10:45:02 -0800 (PST)
Received: from [127.0.0.1] (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 3B38B3A6A7E; Tue, 11 Jan 2011 10:45:02 -0800 (PST)
MIME-Version: 1.0
Content-Type: Multipart/Mixed; Boundary="NextPart"
From: Internet-Drafts@ietf.org
To: i-d-announce@ietf.org
X-Test-IDTracker: no
X-IETF-IDTracker: 3.10
Message-ID: <20110111184502.30771.57773.idtracker@localhost>
Date: Tue, 11 Jan 2011 10:45:02 -0800
Cc: hybi@ietf.org
Subject: [hybi] I-D Action:draft-ietf-hybi-thewebsocketprotocol-04.txt
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: Tue, 11 Jan 2011 18:45:03 -0000

--NextPart

A New Internet-Draft is available from the on-line Internet-Drafts directories.
This draft is a work item of the BiDirectional or Server-Initiated HTTP Working Group of the IETF.


	Title           : The WebSocket protocol
	Author(s)       : I. Fette
	Filename        : draft-ietf-hybi-thewebsocketprotocol-04.txt
	Pages           : 49
	Date            : 2011-01-11

The WebSocket protocol enables two-way communication between a user
agent running untrusted code running in a controlled environment to a
remote host that has opted-in to communications from that code.  The
security model used for this is the Origin-based security model
commonly used by Web browsers.  The protocol consists of an initial
handshake followed by basic message framing, layered over TCP.  The
goal of this technology is to provide a mechanism for browser-based
applications that need two-way communication with servers that does
not rely on opening multiple HTTP connections (e.g. using
XMLHttpRequest or <iframe>s and long polling).

Please send feedback to the hybi@ietf.org mailing list.

A URL for this Internet-Draft is:
http://www.ietf.org/internet-drafts/draft-ietf-hybi-thewebsocketprotocol-04.txt

Internet-Drafts are also available by anonymous FTP at:
ftp://ftp.ietf.org/internet-drafts/

Below is the data which will enable a MIME compliant mail reader
implementation to automatically retrieve the ASCII version of the
Internet-Draft.

--NextPart
Content-Type: Message/External-body;
	name="draft-ietf-hybi-thewebsocketprotocol-04.txt";
	site="ftp.ietf.org"; access-type="anon-ftp";
	directory="internet-drafts"

Content-Type: text/plain
Content-ID: <2011-01-11103152.I-D@ietf.org>


--NextPart--

From mcmanus@ducksong.com  Tue Jan 11 12:04:40 2011
Return-Path: <mcmanus@ducksong.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 5C0E03A6A9B for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 12:04:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.518
X-Spam-Level: 
X-Spam-Status: No, score=-2.518 tagged_above=-999 required=5 tests=[AWL=0.081,  BAYES_00=-2.599]
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 u+BXM2OkBG1k for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 12:04:39 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 236D73A6A77 for <hybi@ietf.org>; Tue, 11 Jan 2011 12:04:39 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id A5D4C10305; Tue, 11 Jan 2011 15:06:55 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id DA84810157 for <hybi@ietf.org>; Tue, 11 Jan 2011 15:06:50 -0500 (EST)
From: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
To: hybi <hybi@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Date: Tue, 11 Jan 2011 15:06:36 -0500
Message-ID: <1294776396.7650.829.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Subject: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 20:04:40 -0000

Hi all - awesome to see -04 out. Bedside reading tonight!

Mozilla sponsored some time for me to speak with a lawyer versed in
legal cryptography issues so I could ask him what he thought of AES as a
mask. He is a lawyer, but IANAL and I'm the one writing this email - so
please consider it just layman's background information.

Broadly speaking - in the USA normal use of AES in an exported
implementation would be subject to some registration rules that would
probably require legal help but are not that big of a deal, the details
of which depend on just how the implementation is done. As I understand
it, Open source implementations can more or less fall under a blanket
existing provision and don't need to go through explicit registration.

Also broadly speaking, and I don't have any more insight into this
sentence than what I am writing, his opinion was that a number of other
jurisdictions (UK, France, etc..) have similar regulations.

However, as pointed out here, the proposed masking use of AES is not a
normal crypto use. There is a no secret - all keys are transported in
plain text. The lawyer thought it was fair to consider whether or not
this use of the algorithm constituted cryptography - if it did not, then
the concerns about export regulations would not apply.

I hope to seek (and share) an official opinion on that question if AES
continues to be seriously considered, but the wheels of lawyers and the
government don't always churn as fast as we would like. As far as I'm
concerned, its an open question right now.

The discussion did not touch on non AES approaches.

My inclination at this point in time is that AES certainly carries some
baggage and while it might in the end be workable, we should avoid
exclusive use of it in favor of other workable schemes. I suppose we
could allow a negotiation between hmac-sha1 vs aes (with hmac-sha1 a
required LCD, as neither would be insecure) so implementors could trade
off between speed and regulations - but my gut says that's just
un-necessary complication of websockets.

-- 
http://www.getfirefox.com/



From mjs@apple.com  Tue Jan 11 12:23:41 2011
Return-Path: <mjs@apple.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 2DB7128C117 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 12:23:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.544
X-Spam-Level: 
X-Spam-Status: No, score=-106.544 tagged_above=-999 required=5 tests=[AWL=0.055, BAYES_00=-2.599, 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 MJl2glhGebwf for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 12:23:40 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 547DC28C113 for <hybi@ietf.org>; Tue, 11 Jan 2011 12:23:40 -0800 (PST)
Received: from relay16.apple.com (relay16.apple.com [17.128.113.55]) by mail-out3.apple.com (Postfix) with ESMTP id ADA7DC6703B7 for <hybi@ietf.org>; Tue, 11 Jan 2011 12:25:57 -0800 (PST)
X-AuditID: 11807137-b7bfaae000004d31-9d-4d2cbcd5a7d0
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay16.apple.com (Apple SCV relay) with SMTP id DF.81.19761.5DCBC2D4; Tue, 11 Jan 2011 12:25:57 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.48.96] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEV0069AKR9KV10@et.apple.com> for hybi@ietf.org; Tue, 11 Jan 2011 12:25:57 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <1294776396.7650.829.camel@ds9.ducksong.com>
Date: Tue, 11 Jan 2011 12:25:57 -0800
Message-id: <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com>
To: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 20:23:41 -0000

On Jan 11, 2011, at 12:06 PM, Pat McManus @Mozilla wrote:

> Hi all - awesome to see -04 out. Bedside reading tonight!
> 
> Mozilla sponsored some time for me to speak with a lawyer versed in
> legal cryptography issues so I could ask him what he thought of AES as a
> mask. He is a lawyer, but IANAL and I'm the one writing this email - so
> please consider it just layman's background information.
> 
> Broadly speaking - in the USA normal use of AES in an exported
> implementation would be subject to some registration rules that would
> probably require legal help but are not that big of a deal, the details
> of which depend on just how the implementation is done. As I understand
> it, Open source implementations can more or less fall under a blanket
> existing provision and don't need to go through explicit registration.
> 
> Also broadly speaking, and I don't have any more insight into this
> sentence than what I am writing, his opinion was that a number of other
> jurisdictions (UK, France, etc..) have similar regulations.
> 
> However, as pointed out here, the proposed masking use of AES is not a
> normal crypto use. There is a no secret - all keys are transported in
> plain text. The lawyer thought it was fair to consider whether or not
> this use of the algorithm constituted cryptography - if it did not, then
> the concerns about export regulations would not apply.
> 
> I hope to seek (and share) an official opinion on that question if AES
> continues to be seriously considered, but the wheels of lawyers and the
> government don't always churn as fast as we would like. As far as I'm
> concerned, its an open question right now.
> 
> The discussion did not touch on non AES approaches.
> 
> My inclination at this point in time is that AES certainly carries some
> baggage and while it might in the end be workable, we should avoid
> exclusive use of it in favor of other workable schemes. I suppose we
> could allow a negotiation between hmac-sha1 vs aes (with hmac-sha1 a
> required LCD, as neither would be insecure) so implementors could trade
> off between speed and regulations - but my gut says that's just
> un-necessary complication of websockets.

I'm not sure how this conclusion follows from your previous statements. It seems as if the lawyer's comments say:

A) If regulatory registration is required, it's not a big deal.
B) Registration might not even be required at all for this use.

Thus, it seems like crypto regulations are not an argument against using AES-CTR.

Regards,
Maciej


From godjonez@codepad.info  Mon Jan 10 11:09:58 2011
Return-Path: <godjonez@codepad.info>
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 399EC3A6839 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:09:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
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 Z-BWvS-2xnI6 for <hybi@core3.amsl.com>; Mon, 10 Jan 2011 11:09:57 -0800 (PST)
Received: from smtpout.kotinet.com (smtpout.kotinet.com [212.50.215.77]) by core3.amsl.com (Postfix) with ESMTP id 056743A6837 for <hybi@ietf.org>; Mon, 10 Jan 2011 11:09:56 -0800 (PST)
Received: from codepad.info (codepad.info [62.240.71.135]) by smtpout.kotinet.com (Postfix) with ESMTP id A808A47718; Mon, 10 Jan 2011 21:11:59 +0200 (EET)
Received: from overwatchnexus.combinet (overwatchnexus.combinet [192.168.2.7]) by codepad.info (Postfix) with ESMTPSA id EB25EF44003; Mon, 10 Jan 2011 21:11:58 +0200 (EET)
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
To: "Eric Rescorla" <ekr@rtfm.com>
References: <20110109175118.GP5743@1wt.eu> <AANLkTimaTiOJGYgKvNAE0+NKKeT9txixhK-kyCoy6Roc@mail.gmail.com> <AANLkTi=4kUVHsBzeg_ScB4gRgcZStyK2yYqtmpg9mQiy@mail.gmail.com> <AANLkTimm8YJJeYqBArA=TGsT60gQ_vFYPjDm0yA4UtQP@mail.gmail.com>
Date: Mon, 10 Jan 2011 21:12:01 +0200
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: "Joonas Lehtolahti" <godjonez@codepad.info>
Message-ID: <op.vo3wybctuykfxw@overwatchnexus.combinet>
In-Reply-To: <AANLkTimm8YJJeYqBArA=TGsT60gQ_vFYPjDm0yA4UtQP@mail.gmail.com>
User-Agent: Opera Mail/11.01 (Win32)
X-Mailman-Approved-At: Tue, 11 Jan 2011 12:31:23 -0800
Cc: hybi@ietf.org
Subject: Re: [hybi] Limitations of the XOR-based masking
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: Mon, 10 Jan 2011 19:10:32 -0000

On Mon, 10 Jan 2011 20:59:52 +0200, Eric Rescorla <ekr@rtfm.com> wrote:

> I'm not sure precisely what you mean by "masked frames". If I were king,  
> things
> would look like this:
>
> - length
> - masked portion
> - key
>
> With everything else being packed into the masked portion.
>
> I agree that length should not be masked.
>
> -Ekr

How would the length be represented in the message? As a hypothetical  
example if the length is agreed to be big-endian 32-bit integer, then  
message length 1195725834 would be 'GET\n' if interpreted as series of  
ASCII characters.

Just as a little snack for thought.

- Joonas

>
> On Mon, Jan 10, 2011 at 6:25 PM, Greg Wilkins <gregw@webtide.com> wrote:
>> Eric,
>>
>> I'm not opposed to sending the key after the masked data, but I don't
>> see how that can be done with masked frames.
>> The receiver will need to see the frame, so they can see the length,
>> so they can find the key.  If the frame is masked, the you wont be
>> able to find the key.
>>
>> But, (pushing my normal barrow), I see no reason why we could not
>> switch the extension data to be after the payload data in a frame.
>> With fragmentation, we should always be able to process complete
>> frames.
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi

From mcmanus@ducksong.com  Tue Jan 11 12:36:05 2011
Return-Path: <mcmanus@ducksong.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 542F328C13C for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 12:36:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.523
X-Spam-Level: 
X-Spam-Status: No, score=-2.523 tagged_above=-999 required=5 tests=[AWL=0.076,  BAYES_00=-2.599]
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 fB0vju9aYBca for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 12:36:02 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id B707C28C0F9 for <hybi@ietf.org>; Tue, 11 Jan 2011 12:36:02 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id A63FC10307; Tue, 11 Jan 2011 15:38:19 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 40EC510157; Tue, 11 Jan 2011 15:38:15 -0500 (EST)
From: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
To: Maciej Stachowiak <mjs@apple.com>
In-Reply-To: <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com>
Content-Type: text/plain; charset="UTF-8"
Date: Tue, 11 Jan 2011 15:38:01 -0500
Message-ID: <1294778281.7650.842.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 20:36:05 -0000

On Tue, 2011-01-11 at 12:25 -0800, Maciej Stachowiak wrote:

> A) If regulatory registration is required, it's not a big deal.

a better way I should have expressed it:
s/not a big deal/require specific regulatory knowledge (presumably a
lawyer) but is not insurmountable/

> B) Registration might not even be required at all for this use.
> 
> Thus, it seems like crypto regulations are not an argument against using AES-CTR.
> 

I guess that depends on what your pain threshold for this kind of
complication is for a mandatory provision in an open standard on an open
web. I think it should be implementable by both large and small parties
who may or may not even have legal counsel unless there is a very
compelling marginal good.

your mileage may reasonably vary.

-- 
http://www.getfirefox.com/



From mjs@apple.com  Tue Jan 11 12:45:56 2011
Return-Path: <mjs@apple.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 86FDE28C0F9 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 12:45:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.549
X-Spam-Level: 
X-Spam-Status: No, score=-106.549 tagged_above=-999 required=5 tests=[AWL=0.050, BAYES_00=-2.599, 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 hXu7JfwPxPDV for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 12:45:55 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 95A7C28C125 for <hybi@ietf.org>; Tue, 11 Jan 2011 12:45:55 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out3.apple.com (Postfix) with ESMTP id 4CCE1C6716AD for <hybi@ietf.org>; Tue, 11 Jan 2011 12:48:13 -0800 (PST)
X-AuditID: 11807136-b7bf8ae00000244a-36-4d2cc20d6887
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay15.apple.com (Apple SCV relay) with SMTP id 7A.0C.09290.D02CC2D4; Tue, 11 Jan 2011 12:48:13 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.48.96] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEV00362LSC0R60@elliott.apple.com> for hybi@ietf.org; Tue, 11 Jan 2011 12:48:13 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <1294778281.7650.842.camel@ds9.ducksong.com>
Date: Tue, 11 Jan 2011 12:48:12 -0800
Message-id: <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com>
To: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 20:45:56 -0000

On Jan 11, 2011, at 12:38 PM, Pat McManus @Mozilla wrote:

> On Tue, 2011-01-11 at 12:25 -0800, Maciej Stachowiak wrote:
> 
>> A) If regulatory registration is required, it's not a big deal.
> 
> a better way I should have expressed it:
> s/not a big deal/require specific regulatory knowledge (presumably a
> lawyer) but is not insurmountable/
> 
>> B) Registration might not even be required at all for this use.
>> 
>> Thus, it seems like crypto regulations are not an argument against using AES-CTR.
>> 
> 
> I guess that depends on what your pain threshold for this kind of
> complication is for a mandatory provision in an open standard on an open
> web. I think it should be implementable by both large and small parties
> who may or may not even have legal counsel unless there is a very
> compelling marginal good.
> 
> your mileage may reasonably vary.


Other network protocols that use crypto are in practice available everywhere from a wide variety of vendors. This includes TLS, DNSSec and IPSec. If we get that kind of mileage, I'll be completely satisfied.

And the tradeoff is not only security but also better performance. AES-CTR is more than twice as fast as computing a SHA1 HMAC and XORing, at least for small messages. So while you may be right that export regulations create extra hassle, I don't think they are a good reason to avoid the use of crypto in protocol design. I think it's fair to list the export regulations as a con, but I don't think they are a showstopper.

Regards,
Maciej


From w@1wt.eu  Tue Jan 11 12:53:37 2011
Return-Path: <w@1wt.eu>
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 E615428C129 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 12:53:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.076
X-Spam-Level: 
X-Spam-Status: No, score=-2.076 tagged_above=-999 required=5 tests=[AWL=-0.033, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 OeArwxMpKRHW for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 12:53:35 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 3A0A128C125 for <hybi@ietf.org>; Tue, 11 Jan 2011 12:53:35 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0BKtkYP022115; Tue, 11 Jan 2011 21:55:46 +0100
Date: Tue, 11 Jan 2011 21:55:45 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110111205545.GB21915@1wt.eu>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 20:53:37 -0000

Hi Maciej,

On Tue, Jan 11, 2011 at 12:48:12PM -0800, Maciej Stachowiak wrote:
> And the tradeoff is not only security but also better performance. AES-CTR is more than twice as fast as computing a SHA1 HMAC and XORing, at least for small messages. So while you may be right that export regulations create extra hassle, I don't think they are a good reason to avoid the use of crypto in protocol design. I think it's fair to list the export regulations as a con, but I don't think they are a showstopper.

We just keep in mind that while implementing crypto in a protocol can look
appealing, nothing has yet justified its use in WebSocket.

I'd even add that the concerns about export regulation are more serious
than the one about the vulnerabilities that this crypto should avoid !

Regards,
Willy


From mjs@apple.com  Tue Jan 11 13:32:59 2011
Return-Path: <mjs@apple.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 4A8CA3A67C3 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 13:32:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.553
X-Spam-Level: 
X-Spam-Status: No, score=-106.553 tagged_above=-999 required=5 tests=[AWL=0.046, BAYES_00=-2.599, 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 dNXJBMr5lyBm for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 13:32:58 -0800 (PST)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 694E93A635F for <hybi@ietf.org>; Tue, 11 Jan 2011 13:32:58 -0800 (PST)
Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out4.apple.com (Postfix) with ESMTP id CAFDCCAE698D for <hybi@ietf.org>; Tue, 11 Jan 2011 13:35:15 -0800 (PST)
X-AuditID: 11807134-b7cfdae000001831-18-4d2ccd13ecdf
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay14.apple.com (Apple SCV relay) with SMTP id 7A.69.06193.31DCC2D4; Tue, 11 Jan 2011 13:35:15 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.48.96] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEV003FMNYR0R70@elliott.apple.com> for hybi@ietf.org; Tue, 11 Jan 2011 13:35:15 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110111205545.GB21915@1wt.eu>
Date: Tue, 11 Jan 2011 13:35:14 -0800
Message-id: <77B6CAA1-FAF8-4B31-A7BD-014AF0B9676D@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 21:32:59 -0000

On Jan 11, 2011, at 12:55 PM, Willy Tarreau wrote:

> Hi Maciej,
> 
> On Tue, Jan 11, 2011 at 12:48:12PM -0800, Maciej Stachowiak wrote:
>> And the tradeoff is not only security but also better performance. AES-CTR is more than twice as fast as computing a SHA1 HMAC and XORing, at least for small messages. So while you may be right that export regulations create extra hassle, I don't think they are a good reason to avoid the use of crypto in protocol design. I think it's fair to list the export regulations as a con, but I don't think they are a showstopper.
> 
> We just keep in mind that while implementing crypto in a protocol can look
> appealing, nothing has yet justified its use in WebSocket.
> 
> I'd even add that the concerns about export regulation are more serious
> than the one about the vulnerabilities that this crypto should avoid !

I don't think anyone has demonstrated that export regulations are a practical problem in any way. Do software implementations of other IETF protocols that use crypto get restricted in practice? Is there any software product that has been unable to ship? Any number of commercial vendors and open source projects ship strong crypto all over the world, so I simply don't believe there is a real problem here. Can you cite any instance where it has created a real problem?

Regards,
Maciej


From ekr@rtfm.com  Tue Jan 11 13:58:09 2011
Return-Path: <ekr@rtfm.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 8DFF63A67EB for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 13:58:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.668
X-Spam-Level: 
X-Spam-Status: No, score=-102.668 tagged_above=-999 required=5 tests=[AWL=0.309, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 z8IX4jMXWXxy for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 13:58:08 -0800 (PST)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by core3.amsl.com (Postfix) with ESMTP id 6C0F53A6822 for <hybi@ietf.org>; Tue, 11 Jan 2011 13:58:08 -0800 (PST)
Received: by gxk28 with SMTP id 28so9606587gxk.31 for <hybi@ietf.org>; Tue, 11 Jan 2011 14:00:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.232.6 with SMTP id e6mr730643agh.52.1294783225845; Tue, 11 Jan 2011 14:00:25 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Tue, 11 Jan 2011 14:00:25 -0800 (PST)
In-Reply-To: <20110111205545.GB21915@1wt.eu>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu>
Date: Tue, 11 Jan 2011 22:00:25 +0000
Message-ID: <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 21:58:09 -0000

On Tue, Jan 11, 2011 at 8:55 PM, Willy Tarreau <w@1wt.eu> wrote:
> Hi Maciej,
>
> On Tue, Jan 11, 2011 at 12:48:12PM -0800, Maciej Stachowiak wrote:
>> And the tradeoff is not only security but also better performance. AES-C=
TR is more than twice as fast as computing a SHA1 HMAC and XORing, at least=
 for small messages. So while you may be right that export regulations crea=
te extra hassle, I don't think they are a good reason to avoid the use of c=
rypto in protocol design. I think it's fair to list the export regulations =
as a con, but I don't think they are a showstopper.
>
> We just keep in mind that while implementing crypto in a protocol can loo=
k
> appealing, nothing has yet justified its use in WebSocket.


This is at best a matter of opinion.

-Ekr

From bruce@callenish.com  Tue Jan 11 14:19:05 2011
Return-Path: <bruce@callenish.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 A31343A6AA5 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:19:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.584
X-Spam-Level: 
X-Spam-Status: No, score=-2.584 tagged_above=-999 required=5 tests=[AWL=0.015,  BAYES_00=-2.599]
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 0k-0OTq+hI5u for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:19:04 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id D554F3A687E for <hybi@ietf.org>; Tue, 11 Jan 2011 14:19:04 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pcmaf-00055x-Lh for hybi@ietf.org; Tue, 11 Jan 2011 14:21:21 -0800
Message-ID: <4D2CD7E6.8040703@callenish.com>
Date: Tue, 11 Jan 2011 14:21:26 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi <hybi@ietf.org>
References: <1294776396.7650.829.camel@ds9.ducksong.com>	<02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com>	<1294778281.7650.842.camel@ds9.ducksong.com>	<484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com>	<20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com>
In-Reply-To: <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 22:19:05 -0000

On 11/01/2011 2:00 PM, Eric Rescorla wrote:
>
>> We just keep in mind that while implementing crypto in a protocol can look
>> appealing, nothing has yet justified its use in WebSocket.
>
> This is at best a matter of opinion.

I'm willing to consider changing my opinion if only someone will explain 
why. I've asked you directly, Eric, and gotten no answer. I've started a 
thread on the subject and gotten no explanations about the benefits of 
this approach. I'm at a loss as to how to get someone to give some real 
reasons why this is in any way justified.

For secure web sockets, all of this security makes perfect sense. For 
ordinary websockets, where the tradeoff is intended to largely be 
simplicity over security, I can't understand what justifies it. I want 
to, but until somebody helps me out this requirement is from Mars.

At this point, when the vote on the masking algorithm comes I'll be 
voting for randomly generated frame keys that are transmitted on the 
wire and used as the mask.


From salvatore.loreto@ericsson.com  Tue Jan 11 14:21:36 2011
Return-Path: <salvatore.loreto@ericsson.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 5BD3F3A6AA5 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:21:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.544
X-Spam-Level: 
X-Spam-Status: No, score=-105.544 tagged_above=-999 required=5 tests=[AWL=-0.965, BAYES_00=-2.599, LOCALPART_IN_SUBJECT=2.02, 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 80vM-lULmkHd for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:21:35 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 520E83A6405 for <hybi@ietf.org>; Tue, 11 Jan 2011 14:21:35 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-86-4d2cd877ad0f
Received: from esessmw0197.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id 59.23.13987.778DC2D4; Tue, 11 Jan 2011 23:23:52 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0197.eemea.ericsson.se (153.88.115.88) with Microsoft SMTP Server id 8.2.234.1; Tue, 11 Jan 2011 23:23:51 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id A7BCE2533	for <hybi@ietf.org>; Wed, 12 Jan 2011 00:23:51 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 6063C5056E	for <hybi@ietf.org>; Wed, 12 Jan 2011 00:23:51 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id E569E5047D	for <hybi@ietf.org>; Wed, 12 Jan 2011 00:23:50 +0200 (EET)
Message-ID: <4D2CD876.5040907@ericsson.com>
Date: Tue, 11 Jan 2011 23:23:50 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: [hybi] hybi - New Meeting Session Request for IETF 80
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: Tue, 11 Jan 2011 22:21:36 -0000

Hi there,

I have just requested a 2 hours slot
for an official face to face HyBi wg meeting during the next IETF 
meeting in Prague.

The IETF meeting will be in Prague (Czech Republic) in the week March 27 
- April 1, 2011
for more information http://www.ietf.org/meeting/80/index.html

cheers
/Sal

From ferg@caucho.com  Tue Jan 11 14:34:30 2011
Return-Path: <ferg@caucho.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 AC8DD3A67C1 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:34:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.184
X-Spam-Level: 
X-Spam-Status: No, score=-2.184 tagged_above=-999 required=5 tests=[AWL=0.415,  BAYES_00=-2.599]
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 yUY3fLG1hZEw for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:34:29 -0800 (PST)
Received: from nm30-vm0.bullet.mail.ac4.yahoo.com (nm30-vm0.bullet.mail.ac4.yahoo.com [98.139.52.250]) by core3.amsl.com (Postfix) with SMTP id C6B173A659C for <hybi@ietf.org>; Tue, 11 Jan 2011 14:34:29 -0800 (PST)
Received: from [98.139.52.191] by nm30.bullet.mail.ac4.yahoo.com with NNFMP; 11 Jan 2011 22:36:47 -0000
Received: from [98.139.52.134] by tm4.bullet.mail.ac4.yahoo.com with NNFMP; 11 Jan 2011 22:36:47 -0000
Received: from [127.0.0.1] by omp1017.mail.ac4.yahoo.com with NNFMP; 11 Jan 2011 22:36:47 -0000
X-Yahoo-Newman-Id: 506319.68199.bm@omp1017.mail.ac4.yahoo.com
Received: (qmail 13520 invoked from network); 11 Jan 2011 22:36:46 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp114.biz.mail.mud.yahoo.com with SMTP; 11 Jan 2011 14:36:46 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: tAiE3R4VM1ldKeDv34XF_TbFygyHuoY8flELiWIyWJb7931 lh67xyRawE57JmkIobBcbryt654o_HoCcFlIE0P7U9fnBvaTtvyRx5fabI6s Kfdstslcw7p57NDj6wS_xPNXe.yCHaPoVc9JSx1p33ELdzaO8o8o2mdFaDDt Se875ADDy5ApxKGFUqBjRLpjftvygwSilD4cvzrXXyaupJmeoRpDj7Tk_3HR XOcjatDilzY3IwIvpszCvI.YEGoR7iHOM5y97XJnU8lRchUysvPKGhXZiZK6 gFAY65AIX3DGzSL1s_Fj612fEXdtlb5pLCoupnRf7JsCv9C8DmmC0ZgTNOKm WRc8rniWfQe.arNCkz1DPnPN272KqMUT7BEpa
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D2CDB7E.5030003@caucho.com>
Date: Tue, 11 Jan 2011 14:36:46 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Eric Rescorla <ekr@rtfm.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com>	<02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com>	<1294778281.7650.842.camel@ds9.ducksong.com>	<484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com>	<20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com>
In-Reply-To: <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 22:34:30 -0000

Eric Rescorla wrote:
> On Tue, Jan 11, 2011 at 8:55 PM, Willy Tarreau <w@1wt.eu> wrote:
>   
>> Hi Maciej,
>>
>> On Tue, Jan 11, 2011 at 12:48:12PM -0800, Maciej Stachowiak wrote:
>>     
>>> And the tradeoff is not only security but also better performance. AES-CTR is more than twice as fast as computing a SHA1 HMAC and XORing, at least for small messages. So while you may be right that export regulations create extra hassle, I don't think they are a good reason to avoid the use of crypto in protocol design. I think it's fair to list the export regulations as a con, but I don't think they are a showstopper.
>>>       
>> We just keep in mind that while implementing crypto in a protocol can look
>> appealing, nothing has yet justified its use in WebSocket.
>>     
>
>
> This is at best a matter of opinion.
>   

No, Eric, a missing justification is not a matter of opinion.

-- Scott


From ekr@rtfm.com  Tue Jan 11 14:34:53 2011
Return-Path: <ekr@rtfm.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 A1B4128C10A for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:34:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.671
X-Spam-Level: 
X-Spam-Status: No, score=-102.671 tagged_above=-999 required=5 tests=[AWL=0.306, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 I-woOInappqP for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:34:52 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id 87D993A659C for <hybi@ietf.org>; Tue, 11 Jan 2011 14:34:52 -0800 (PST)
Received: by gyd12 with SMTP id 12so8920428gyd.31 for <hybi@ietf.org>; Tue, 11 Jan 2011 14:37:10 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.64.2 with SMTP id r2mr756620agk.133.1294785428438; Tue, 11 Jan 2011 14:37:08 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Tue, 11 Jan 2011 14:37:08 -0800 (PST)
In-Reply-To: <4D2CD7E6.8040703@callenish.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CD7E6.8040703@callenish.com>
Date: Tue, 11 Jan 2011 22:37:08 +0000
Message-ID: <AANLkTikxvXA60SapGGYRSywsx-kpOnkyADTtqKTuq18x@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 22:34:53 -0000

On Tue, Jan 11, 2011 at 10:21 PM, Bruce Atherton <bruce@callenish.com> wrote:
> On 11/01/2011 2:00 PM, Eric Rescorla wrote:
>>
>>> We just keep in mind that while implementing crypto in a protocol can
>>> look
>>> appealing, nothing has yet justified its use in WebSocket.
>>
>> This is at best a matter of opinion.
>
> I'm willing to consider changing my opinion if only someone will explain
> why. I've asked you directly, Eric, and gotten no answer.

I'm sorry you feel that way, but I don't agree with that interpretation. I think
I've been fairly clear on why I think this is an improvement. I appreciate that
you're not convinced, but that's exactly the point I was making to Willy;
this is a matter of opinion.


> For secure web sockets, all of this security makes perfect sense. For
> ordinary websockets, where the tradeoff is intended to largely be simplicity
> over security, I can't understand what justifies it.

I don't really see the relevance of secure (wss:) versus insecure (ws:) here.
That question is a matter of the security properties provided to legitimate
clients and legitimate servers. The question here is about the side effects when
a client visits malicious servers.


> I want to, but until
> somebody helps me out this requirement is from Mars.

... in your opinion.

-Ekr


> At this point, when the vote on the masking algorithm comes I'll be voting
> for randomly generated frame keys that are transmitted on the wire and used
> as the mask.
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From ekr@rtfm.com  Tue Jan 11 14:35:39 2011
Return-Path: <ekr@rtfm.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 157A53A6AAB for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:35:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.619
X-Spam-Level: 
X-Spam-Status: No, score=-102.619 tagged_above=-999 required=5 tests=[AWL=0.358, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 MDwPLm2AggGv for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:35:38 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 0C8EC3A659C for <hybi@ietf.org>; Tue, 11 Jan 2011 14:35:37 -0800 (PST)
Received: by gwj17 with SMTP id 17so10853936gwj.31 for <hybi@ietf.org>; Tue, 11 Jan 2011 14:37:55 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.64.2 with SMTP id r2mr757669agk.133.1294785475583; Tue, 11 Jan 2011 14:37:55 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Tue, 11 Jan 2011 14:37:55 -0800 (PST)
In-Reply-To: <4D2CDB7E.5030003@caucho.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com>
Date: Tue, 11 Jan 2011 22:37:55 +0000
Message-ID: <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Scott Ferguson <ferg@caucho.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 22:35:39 -0000

On Tue, Jan 11, 2011 at 10:36 PM, Scott Ferguson <ferg@caucho.com> wrote:
> Eric Rescorla wrote:
>>
>> On Tue, Jan 11, 2011 at 8:55 PM, Willy Tarreau <w@1wt.eu> wrote:
>>
>>>
>>> Hi Maciej,
>>>
>>> On Tue, Jan 11, 2011 at 12:48:12PM -0800, Maciej Stachowiak wrote:
>>>
>>>>
>>>> And the tradeoff is not only security but also better performance.
>>>> AES-CTR is more than twice as fast as computing a SHA1 HMAC and XORing, at
>>>> least for small messages. So while you may be right that export regulations
>>>> create extra hassle, I don't think they are a good reason to avoid the use
>>>> of crypto in protocol design. I think it's fair to list the export
>>>> regulations as a con, but I don't think they are a showstopper.
>>>>
>>>
>>> We just keep in mind that while implementing crypto in a protocol can
>>> look
>>> appealing, nothing has yet justified its use in WebSocket.
>>>
>>
>>
>> This is at best a matter of opinion.
>>
>
> No, Eric, a missing justification is not a matter of opinion.

As I said to Bruce, I'm sorry you feel that I haven't justified this.
Obviously, others
feel differently, as do I, and I don't really see a point in repeating myself.

-Ekr

From ferg@caucho.com  Tue Jan 11 14:52:48 2011
Return-Path: <ferg@caucho.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 588083A6AC1 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:52:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.399
X-Spam-Level: 
X-Spam-Status: No, score=-2.399 tagged_above=-999 required=5 tests=[AWL=0.200,  BAYES_00=-2.599]
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 WYOYVeDKbwot for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 14:52:47 -0800 (PST)
Received: from nm15.bullet.mail.ne1.yahoo.com (nm15.bullet.mail.ne1.yahoo.com [98.138.90.78]) by core3.amsl.com (Postfix) with SMTP id 10DDB3A6AB9 for <hybi@ietf.org>; Tue, 11 Jan 2011 14:52:46 -0800 (PST)
Received: from [98.138.90.53] by nm15.bullet.mail.ne1.yahoo.com with NNFMP; 11 Jan 2011 22:55:01 -0000
Received: from [98.138.89.166] by tm6.bullet.mail.ne1.yahoo.com with NNFMP; 11 Jan 2011 22:55:01 -0000
Received: from [127.0.0.1] by omp1022.mail.ne1.yahoo.com with NNFMP; 11 Jan 2011 22:55:01 -0000
X-Yahoo-Newman-Id: 925969.74591.bm@omp1022.mail.ne1.yahoo.com
Received: (qmail 13871 invoked from network); 11 Jan 2011 22:55:01 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp115.biz.mail.mud.yahoo.com with SMTP; 11 Jan 2011 14:55:01 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: AZxWBNAVM1n08epD74_oKhV0dPwbLcOGTk5l2DV1zkyiu0I kkZs58kxzeDe3t62OnzZp481KIL.tQ2UpjEMp0iesodNSZGhoNNP4CbhzejO 0QleR90fBPqx5KgqIoQkOYqInruJAY95OPJ2qMJ.nZDUGCxle9ZwtS5yr0nH v_17fgKaNHUsc44rAajsMcRXCH4SOU40HPdz.GvovuudQEdr04gk.eZbChOC Vg4Mi02NvWSbZu7KrP5fT9oBY5w_PpOu8jOGnYeXb4s8bJ9V_GN4i6pXrP8V u.kem0raleMyt4.lEf1vfaRJfPWQZLtOwEteXbpZtB2d0jinVOKeyvtFmwKF mFzGN9lnFFPgLWKujYG5wKr8sGXJuRlCXcuYA30fC
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D2CDFC4.1020407@caucho.com>
Date: Tue, 11 Jan 2011 14:55:00 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Eric Rescorla <ekr@rtfm.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com>	<02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com>	<1294778281.7650.842.camel@ds9.ducksong.com>	<484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com>	<20110111205545.GB21915@1wt.eu>	<AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com>	<4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com>
In-Reply-To: <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 22:52:48 -0000

Eric Rescorla wrote:
> As I said to Bruce, I'm sorry you feel that I haven't justified this.
> Obviously, others
> feel differently, as do I, and I don't really see a point in repeating myself.
>
>   

 From your earlier response:

> >> My objective is to make the bits that appear on the wire indistinguishable
> >> from random from the attacker's perspective. I think it's clear that this is the
> >> strongest form of masking available, and the method I proposed does that.

This is not the problem that needs to be solved for websockets, and 
there's no justification in that response for switching to your new 
objective.

-- Scott


From ietf@adambarth.com  Tue Jan 11 15:38:45 2011
Return-Path: <ietf@adambarth.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 EFE943A6784 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 15:38:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.867
X-Spam-Level: 
X-Spam-Status: No, score=-3.867 tagged_above=-999 required=5 tests=[AWL=-0.890, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 1TMjZo5Hix7e for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 15:38:45 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 2DA733A67E5 for <hybi@ietf.org>; Tue, 11 Jan 2011 15:38:45 -0800 (PST)
Received: by vws7 with SMTP id 7so2256vws.31 for <hybi@ietf.org>; Tue, 11 Jan 2011 15:41:02 -0800 (PST)
Received: by 10.220.186.11 with SMTP id cq11mr61324vcb.159.1294789262591; Tue, 11 Jan 2011 15:41:02 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id r20sm6884218vcf.10.2011.01.11.15.41.00 (version=SSLv3 cipher=RC4-MD5); Tue, 11 Jan 2011 15:41:01 -0800 (PST)
Received: by iwn40 with SMTP id 40so22037405iwn.31 for <hybi@ietf.org>; Tue, 11 Jan 2011 15:40:59 -0800 (PST)
Received: by 10.231.147.149 with SMTP id l21mr239709ibv.152.1294789259721; Tue, 11 Jan 2011 15:40:59 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Tue, 11 Jan 2011 15:40:28 -0800 (PST)
In-Reply-To: <4D2CDFC4.1020407@caucho.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com>
From: Adam Barth <ietf@adambarth.com>
Date: Tue, 11 Jan 2011 15:40:28 -0800
Message-ID: <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com>
To: Scott Ferguson <ferg@caucho.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Tue, 11 Jan 2011 23:38:46 -0000

On Tue, Jan 11, 2011 at 2:55 PM, Scott Ferguson <ferg@caucho.com> wrote:
> Eric Rescorla wrote:
>> As I said to Bruce, I'm sorry you feel that I haven't justified this.
>> Obviously, others
>> feel differently, as do I, and I don't really see a point in repeating
>> myself.
>
> From your earlier response:
>
>> >> My objective is to make the bits that appear on the wire
>> >> indistinguishable
>> >> from random from the attacker's perspective. I think it's clear that
>> >> this is the
>> >> strongest form of masking available, and the method I proposed does
>> >> that.
>
> This is not the problem that needs to be solved for websockets, and there's
> no justification in that response for switching to your new objective.

One way to think about the justification is what kinds of assumptions
we need to make about the world in order to convince ourselves that
the protocol meets its security objectives.  In this case, having the
on-the-wire bytes appears to be distributed uniformly at random makes
it easier for us to convince ourselves that the protocol meets its
security objectives.

This is a very common technique in designing secure protocols.

Adam

From bruce@callenish.com  Tue Jan 11 16:27:55 2011
Return-Path: <bruce@callenish.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 4A3343A67D1 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 16:27:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.585
X-Spam-Level: 
X-Spam-Status: No, score=-2.585 tagged_above=-999 required=5 tests=[AWL=0.014,  BAYES_00=-2.599]
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 6ASFPyMzmPeG for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 16:27:53 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id B34E23A672F for <hybi@ietf.org>; Tue, 11 Jan 2011 16:27:53 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PcobK-0002Lk-Hn for hybi@ietf.org; Tue, 11 Jan 2011 16:30:10 -0800
Message-ID: <4D2CF617.5080503@callenish.com>
Date: Tue, 11 Jan 2011 16:30:15 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <1294776396.7650.829.camel@ds9.ducksong.com>	<02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com>	<1294778281.7650.842.camel@ds9.ducksong.com>	<484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com>	<20110111205545.GB21915@1wt.eu>	<AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com>	<4D2CDB7E.5030003@caucho.com>	<AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com>	<4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com>
In-Reply-To: <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 00:27:55 -0000

On 11/01/2011 3:40 PM, Adam Barth wrote:
> One way to think about the justification is what kinds of assumptions
> we need to make about the world in order to convince ourselves that
> the protocol meets its security objectives.  In this case, having the
> on-the-wire bytes appears to be distributed uniformly at random makes
> it easier for us to convince ourselves that the protocol meets its
> security objectives.

That is fair. But there are other design considerations that have been 
identified as desirable with Websockets than security. Simplicity of 
implementation is one. Efficiency is another. Minimizing inconvenience 
to users yet another.

When two goals come into conflict, one has to find a balance between 
them. If Websockets were the only protocol on the Internet, it could be 
arguable that security should come before all other goals. Even if 
Websockets were the only way to create a Javascript-controlled 
connection from the browser it may make sense to argue that.

But there is already the ability to create HTTP connections via 
XMLHttpRequest. Once Websockets is more secure than that, the benefit to 
making it more secure dwindles. At that point, other design goals should 
be given a much more equal weight.

I had thought that you had a reason that I wasn't understanding for 
wanting the added security. If your only reason is that it is more 
secure in the abstract, then personally I'm going to give preference to 
those other more concrete design considerations.


From brofield@gmail.com  Tue Jan 11 16:52:33 2011
Return-Path: <brofield@gmail.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 79D3C3A6801 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 16:52:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.727
X-Spam-Level: 
X-Spam-Status: No, score=-2.727 tagged_above=-999 required=5 tests=[AWL=0.250,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 Tvwf6mdo+hTU for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 16:52:32 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 757EC3A67F4 for <hybi@ietf.org>; Tue, 11 Jan 2011 16:52:32 -0800 (PST)
Received: by qyk34 with SMTP id 34so3338938qyk.10 for <hybi@ietf.org>; Tue, 11 Jan 2011 16:54:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=igFZPHFiTm2LBNFvqNL+WTlAzv6bIYzRmhU6IdPobj0=; b=KDOOztwHkv8wnKLy8WbH3FPEVXhmW2wHtXYkuhpb5HnRHPp4UlHuhNFfbqh0g0Meq7 AAfC0Gozq8wdUkz/LGiXC9YVvs7JkrK7k87P4OKNt66icFfX+o8vY2OKvHhDf99WR+Rr i+0vjWp7pcFtji8Y/nsiI302xTwkjt4wIQt0Q=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=potoX6fqxi+WnrsCNT49jS6aoGiuhDZLiQowkfV0DrWaQzxfIvbBEwqH367xCDJiLx MWOxOxHEHFQnqZBuSW24HYLI8occ/BHSHnomvlZShnaPiIUHt0NRQpEbxkrLigYnSkZj EgzmjPTHA1q3AMzRhghTopFz6xKGOe/E+he2I=
MIME-Version: 1.0
Received: by 10.229.250.9 with SMTP id mm9mr238916qcb.264.1294793690162; Tue, 11 Jan 2011 16:54:50 -0800 (PST)
Sender: brofield@gmail.com
Received: by 10.229.84.66 with HTTP; Tue, 11 Jan 2011 16:54:49 -0800 (PST)
In-Reply-To: <AANLkTikveY-iMw4iFW51c1N1nyVB2j4Qzm8w0oxL2Mca@mail.gmail.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <4D26DE2D.5040901@ericsson.com> <AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com> <B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com> <AANLkTi=mobwinB_+oxznk4cpnQstBHjHb-9orpeVS8Wo@mail.gmail.com> <AANLkTi=7dB-cFiyBwCkv03hd++d7ufBdnHP63_TOzwrK@mail.gmail.com> <AANLkTin+OPV5mrKnyTOD+R1QZmbczyKB-RGQ0c0cfA2R@mail.gmail.com> <AANLkTikveY-iMw4iFW51c1N1nyVB2j4Qzm8w0oxL2Mca@mail.gmail.com>
Date: Wed, 12 Jan 2011 09:54:49 +0900
X-Google-Sender-Auth: brWHdyi8__IXyIOqWNxLVL60YuM
Message-ID: <AANLkTimFdhE__3vAfnLfurnCmX1-eumQgc88u8Ud57HP@mail.gmail.com>
From: Brodie Thiesfield <brodie@jellycan.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 12 Jan 2011 00:52:33 -0000

On Tue, Jan 11, 2011 at 11:11 AM, John Tamplin <jat@google.com> wrote:
> On Mon, Jan 10, 2011 at 7:12 PM, Brodie Thiesfield <brodie@jellycan.com> wrote:
>> The essential points are:
>> * basic direct + central hub p2p is almost possible with the current protocol
>> * since both client and server are browsers, both client and server
>> will be wanting to send masked data
>> * therefore the client needs to be able to receive and decode masked frames
>>
> It seems to me to be totally separate as to how the masking is
> actually applied -- you could easily define an extension "servermask"
> which specifies that server->client frames will be masked (probably
> the same mechanism as client->server, but it doesn't have to be), and
> then if that extension is negotiated then you proceed with masking in
> both directions.

In the current protocol there is no mechanism that allows the server
to inform the client of a required extension. Currently, the server
can only respond with a subset of the extensions that the client has
offered (and according to the /extensions/ paragraph, only a single
item may be selected). This appears to be an oversight as there server
should have a way of requiring extensions from the client, however at
the moment there isn't, which precludes the "servermask" method from
working.

Alternatively, if the masking was made part of the framing or an
extension using the reserved bits whereby the presence or absence
could be simply determined by examining the frame, then the server
could just send the masked frames and the client could detect and
decode them.

Regards,
Brodie

From ferg@caucho.com  Tue Jan 11 17:05:09 2011
Return-Path: <ferg@caucho.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 EF2783A6802 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 17:05:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.198
X-Spam-Level: 
X-Spam-Status: No, score=-2.198 tagged_above=-999 required=5 tests=[AWL=0.402,  BAYES_00=-2.599]
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 G+Oicovdvsmj for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 17:05:07 -0800 (PST)
Received: from nm10-vm0.bullet.mail.sp2.yahoo.com (nm10-vm0.bullet.mail.sp2.yahoo.com [98.139.91.198]) by core3.amsl.com (Postfix) with SMTP id 499A43A6801 for <hybi@ietf.org>; Tue, 11 Jan 2011 17:05:07 -0800 (PST)
Received: from [98.139.91.63] by nm10.bullet.mail.sp2.yahoo.com with NNFMP; 12 Jan 2011 01:07:22 -0000
Received: from [98.139.91.45] by tm3.bullet.mail.sp2.yahoo.com with NNFMP; 12 Jan 2011 01:07:22 -0000
Received: from [127.0.0.1] by omp1045.mail.sp2.yahoo.com with NNFMP; 12 Jan 2011 01:07:22 -0000
X-Yahoo-Newman-Id: 727731.35488.bm@omp1045.mail.sp2.yahoo.com
Received: (qmail 51728 invoked from network); 12 Jan 2011 01:07:22 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp115.biz.mail.mud.yahoo.com with SMTP; 11 Jan 2011 17:07:22 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: kHIn40sVM1kDKCsmYnS3x.wgWzeGr.AAvAtKNz4rE0JgvKK v3_YDyQUvj6xzR_gKuwtJSp4a1xGohN.hnY7L3BotRVGwW2.9hLITHJG4n.M j2Vm8UEcwxKcEInMghLSamHBctVZiCOCD4jUhh0IwecwFoUn9KBWKbzPtbvb OsKwRZGKwBx1iBpgENzRkFCmFPoKXDWblrTwPHGHHpBN9jCZNGR1T0yqVmXy 4PL_ZV1TET5CojoQanadKqKvBH4097xF0gTLknrhAx8mPiU9QLmC1wWLPxUp rr8gpLUzMfjlKzP8CmKIVlnEY0_zH_FWfQKjTiDHANASs5nhnL1T62KhEv3V oO08k.CAu6LBOsqYsjTyVtegwai0yanzZ7poFKgkYtQ--
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D2CFEC9.4080609@caucho.com>
Date: Tue, 11 Jan 2011 17:07:21 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Adam Barth <ietf@adambarth.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com>
In-Reply-To: <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 01:05:09 -0000

Adam Barth wrote:
> On Tue, Jan 11, 2011 at 2:55 PM, Scott Ferguson <ferg@caucho.com> wrote:
>   
>>
>> This is not the problem that needs to be solved for websockets, and there's
>> no justification in that response for switching to your new objective.
>>     
>
> One way to think about the justification is what kinds of assumptions
> we need to make about the world in order to convince ourselves that
> the protocol meets its security objectives.  In this case, having the
> on-the-wire bytes appears to be distributed uniformly at random makes
> it easier for us to convince ourselves that the protocol meets its
> security objectives.
>
> This is a very common technique in designing secure protocols.
>   

Looking under the streetlight for your keys because it's well lit there 
is not an effective technique.

It's important to solve the actual problem, not a different problem that 
you're more comfortable with which happens to be well-lit. You need to 
justify changing the problem. In this case, there has been no 
justification that Eric's streetlight is the same problem as websockets.

Eric is making the implicit claim (without defense) for the following 
sequence:

  C1: GET /websocket HTTP/1.1
  C1: Upgrade: websocket
  C1: ...

  S2: HTTP/1.1 101 ...
  S2: ...

  C3: %x8F <cnonce-3> <m-bytes of garbage>
       ...
  Cn: <cnonce-n> <reverse-masked content producing: "GET ...">

Claims:

  1. That an intermediate proxy will skip the garbage bytes between C3 
and Cn and execute the "GET" request (as Willy has repeatedly pointed 
out, because of framing, a proxy cannot behave like this.)

  2. That a reverse-masked Cn can even be produced.

Since no-one has attempted to justify claim #1, instead handwaving over 
it, and skipping over to more comfortable discussion of cryptography, it 
looks to me like Willy's points about #1 aren't even understood by the 
people arguing for strong crypto.

Making the garbage bytes look even more garbage-like doesn't actually 
make the protocol more secure; it's just political theater.

-- Scott


 
> Adam
>
>
>
>   


From ietf@adambarth.com  Tue Jan 11 17:15:43 2011
Return-Path: <ietf@adambarth.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 82F773A6828 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 17:15:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.862
X-Spam-Level: 
X-Spam-Status: No, score=-3.862 tagged_above=-999 required=5 tests=[AWL=-0.885, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 EWbGz+hTSEA1 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 17:15:42 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id ABFD63A6827 for <hybi@ietf.org>; Tue, 11 Jan 2011 17:15:37 -0800 (PST)
Received: by vws7 with SMTP id 7so40119vws.31 for <hybi@ietf.org>; Tue, 11 Jan 2011 17:17:55 -0800 (PST)
Received: by 10.220.195.12 with SMTP id ea12mr102272vcb.7.1294795075428; Tue, 11 Jan 2011 17:17:55 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id y4sm6934506vch.35.2011.01.11.17.17.53 (version=SSLv3 cipher=RC4-MD5); Tue, 11 Jan 2011 17:17:54 -0800 (PST)
Received: by iwn40 with SMTP id 40so46253iwn.31 for <hybi@ietf.org>; Tue, 11 Jan 2011 17:17:53 -0800 (PST)
Received: by 10.231.19.138 with SMTP id a10mr325877ibb.127.1294795073011; Tue, 11 Jan 2011 17:17:53 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Tue, 11 Jan 2011 17:17:22 -0800 (PST)
In-Reply-To: <4D2CFEC9.4080609@caucho.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CFEC9.4080609@caucho.com>
From: Adam Barth <ietf@adambarth.com>
Date: Tue, 11 Jan 2011 17:17:22 -0800
Message-ID: <AANLkTi=hV3T=Vme6LF2UaKGxjjMjkJr3ZaB2jwwDWT=+@mail.gmail.com>
To: Scott Ferguson <ferg@caucho.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 01:15:43 -0000

On Tue, Jan 11, 2011 at 5:07 PM, Scott Ferguson <ferg@caucho.com> wrote:
> Adam Barth wrote:
>> On Tue, Jan 11, 2011 at 2:55 PM, Scott Ferguson <ferg@caucho.com> wrote:
>>> This is not the problem that needs to be solved for websockets, and
>>> there's
>>> no justification in that response for switching to your new objective.
>>>
>>
>> One way to think about the justification is what kinds of assumptions
>> we need to make about the world in order to convince ourselves that
>> the protocol meets its security objectives. =A0In this case, having the
>> on-the-wire bytes appears to be distributed uniformly at random makes
>> it easier for us to convince ourselves that the protocol meets its
>> security objectives.
>>
>> This is a very common technique in designing secure protocols.
>>
>
> Looking under the streetlight for your keys because it's well lit there i=
s
> not an effective technique.
>
> It's important to solve the actual problem, not a different problem that
> you're more comfortable with which happens to be well-lit. You need to
> justify changing the problem. In this case, there has been no justificati=
on
> that Eric's streetlight is the same problem as websockets.
>
> Eric is making the implicit claim (without defense) for the following
> sequence:
>
> =A0C1: GET /websocket HTTP/1.1
> =A0C1: Upgrade: websocket
> =A0C1: ...
>
> =A0S2: HTTP/1.1 101 ...
> =A0S2: ...
>
> =A0C3: %x8F <cnonce-3> <m-bytes of garbage>
> =A0 =A0 =A0...
> =A0Cn: <cnonce-n> <reverse-masked content producing: "GET ...">
>
> Claims:
>
> =A01. That an intermediate proxy will skip the garbage bytes between C3 a=
nd Cn
> and execute the "GET" request (as Willy has repeatedly pointed out, becau=
se
> of framing, a proxy cannot behave like this.)
>
> =A02. That a reverse-masked Cn can even be produced.
>
> Since no-one has attempted to justify claim #1, instead handwaving over i=
t,
> and skipping over to more comfortable discussion of cryptography, it look=
s
> to me like Willy's points about #1 aren't even understood by the people
> arguing for strong crypto.

I understand Willy's points, however they require me to make more
assumptions about the world in order to conclude that the protocol is
secure.  Those additional assumptions could either be correct or
incorrect, and we could invest in figuring that out, or we could just
use an approach that doesn't require us to make those assumptions in
the first place.

> Making the garbage bytes look even more garbage-like doesn't actually mak=
e
> the protocol more secure; it's just political theater.

I respectfully disagree.  It's much easier to reason about the
security of pure randomness.  That doesn't mean I have an attack on
Willy's design.  That means we have more reason to believe the
AES-128-CTR design is secure.  This is how security works.

Adam

From mjs@apple.com  Tue Jan 11 17:16:01 2011
Return-Path: <mjs@apple.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 9F3D53A6ACD for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 17:16:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.556
X-Spam-Level: 
X-Spam-Status: No, score=-106.556 tagged_above=-999 required=5 tests=[AWL=0.043, BAYES_00=-2.599, 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 Z-BTgbMgWY-V for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 17:16:00 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id B79273A6AC6 for <hybi@ietf.org>; Tue, 11 Jan 2011 17:16:00 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out4.apple.com (Postfix) with ESMTP id ECD42CAF1647 for <hybi@ietf.org>; Tue, 11 Jan 2011 17:18:18 -0800 (PST)
X-AuditID: 11807136-b7bf8ae00000244a-f3-4d2d015a2ee7
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay15.apple.com (Apple SCV relay) with SMTP id AC.50.09290.A510D2D4; Tue, 11 Jan 2011 17:18:18 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.48.96] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEV00ABWYADVO10@et.apple.com> for hybi@ietf.org; Tue, 11 Jan 2011 17:18:18 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D2CF617.5080503@callenish.com>
Date: Tue, 11 Jan 2011 17:18:12 -0800
Message-id: <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com>
To: Bruce Atherton <bruce@callenish.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 01:16:01 -0000

On Jan 11, 2011, at 4:30 PM, Bruce Atherton wrote:

> On 11/01/2011 3:40 PM, Adam Barth wrote:
>> One way to think about the justification is what kinds of assumptions
>> we need to make about the world in order to convince ourselves that
>> the protocol meets its security objectives.  In this case, having the
>> on-the-wire bytes appears to be distributed uniformly at random makes
>> it easier for us to convince ourselves that the protocol meets its
>> security objectives.
> 
> That is fair. But there are other design considerations that have been identified as desirable with Websockets than security. Simplicity of implementation is one. Efficiency is another. Minimizing inconvenience to users yet another.

AES-CTR is performant, widely available, and easy to use through popular libraries. It's also more performant than the more secure XOR approach..

> 
> When two goals come into conflict, one has to find a balance between them. If Websockets were the only protocol on the Internet, it could be arguable that security should come before all other goals. Even if Websockets were the only way to create a Javascript-controlled connection from the browser it may make sense to argue that.
> 
> But there is already the ability to create HTTP connections via XMLHttpRequest. Once Websockets is more secure than that, the benefit to making it more secure dwindles. At that point, other design goals should be given a much more equal weight.

There is no way (other than WebSocket) to use browser APIs to make a full duplex connection. Browser implementors have a goal of not increasing security attack surface, even if the vulnerabilities might be in some theoretical sense someone else's fault. Since WebSocket has capabilities that HTTP does not, it needs greater restrictions than HTTP. HTTP also has legacy constraints that WebSocket does not. When designing security for WebSocket, we can get it right in the first place, and not be saddled with a problematic legacy design later.

Regards,
Maciej



From jat@google.com  Tue Jan 11 17:20:39 2011
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 CA78C3A6827 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 17:20:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.674
X-Spam-Level: 
X-Spam-Status: No, score=-104.674 tagged_above=-999 required=5 tests=[AWL=-1.697, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 OBv6+zMH-d4f for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 17:20:38 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id BBD043A680F for <hybi@ietf.org>; Tue, 11 Jan 2011 17:20:37 -0800 (PST)
Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id p0C1Msid001795 for <hybi@ietf.org>; Tue, 11 Jan 2011 17:22:54 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294795375; bh=LS7ZL5zQMkpGH3ccNRKVOE1dJTU=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ItLg94ZA87nhC8ghZXkHVvIaev4eplV3+8CnzKU2lgSaDUt8sk9TInkR5yvtH2208 wz5Fewh1oLPeYbQ0hHKHQ==
Received: from yxh35 (yxh35.prod.google.com [10.190.2.227]) by wpaz21.hot.corp.google.com with ESMTP id p0C1MIN7017841 for <hybi@ietf.org>; Tue, 11 Jan 2011 17:22:53 -0800
Received: by yxh35 with SMTP id 35so32123yxh.27 for <hybi@ietf.org>; Tue, 11 Jan 2011 17:22:53 -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=GNk8K8Akj5QpAx52+mZlEABlMgQZ5PnsHlBFXTe8ius=; b=j2+DfhQWwIeB5VT0dDNx5UZiTV2yUauvbz3auP/08boAgbzOPqePQsVXshyb9wLPFq ONdBX2PF7Ep0rlT4L71A==
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=elAHYwGOArbgDaXI8sw5m5owdX5aermExl6+6ikk8S3+NQq+iU003G15xtzoymzrUf xza4Jd+P8qK4SUzquafQ==
Received: by 10.150.192.12 with SMTP id p12mr1124331ybf.263.1294795373129; Tue, 11 Jan 2011 17:22:53 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Tue, 11 Jan 2011 17:22:31 -0800 (PST)
In-Reply-To: <AANLkTimFdhE__3vAfnLfurnCmX1-eumQgc88u8Ud57HP@mail.gmail.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <4D26DE2D.5040901@ericsson.com> <AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com> <B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com> <AANLkTi=mobwinB_+oxznk4cpnQstBHjHb-9orpeVS8Wo@mail.gmail.com> <AANLkTi=7dB-cFiyBwCkv03hd++d7ufBdnHP63_TOzwrK@mail.gmail.com> <AANLkTin+OPV5mrKnyTOD+R1QZmbczyKB-RGQ0c0cfA2R@mail.gmail.com> <AANLkTikveY-iMw4iFW51c1N1nyVB2j4Qzm8w0oxL2Mca@mail.gmail.com> <AANLkTimFdhE__3vAfnLfurnCmX1-eumQgc88u8Ud57HP@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Tue, 11 Jan 2011 20:22:31 -0500
Message-ID: <AANLkTimbYgj4LUZFzMJMYbs+hFT_KriHJo54D2Ht76nc@mail.gmail.com>
To: Brodie Thiesfield <brodie@jellycan.com>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 12 Jan 2011 01:20:39 -0000

On Tue, Jan 11, 2011 at 7:54 PM, Brodie Thiesfield <brodie@jellycan.com> wrote:
> In the current protocol there is no mechanism that allows the server
> to inform the client of a required extension. Currently, the server
> can only respond with a subset of the extensions that the client has
> offered (and according to the /extensions/ paragraph, only a single
> item may be selected). This appears to be an oversight as there server
> should have a way of requiring extensions from the client, however at
> the moment there isn't, which precludes the "servermask" method from
> working.

Allowing the server to request an extension would require an extra
round-trip.  However, in this case, the client can't possible receive
the masked server frames if it doesn't know about it, so a client
which implements this extension simply advertises it.  Most servers do
not accept the servermask extension (by default, since they don't know
about it).

> Alternatively, if the masking was made part of the framing or an
> extension using the reserved bits whereby the presence or absence
> could be simply determined by examining the frame, then the server
> could just send the masked frames and the client could detect and
> decode them.

One objection is that is using one of our precious reserved bits for
something which is generally going to be always on (for the client) or
always off (for the server) -- that doesn't seem like a good use of
resources.  I believe others also raised the objection that it
shouldn't be optional at all for particular classes of client/servers,
so again it is allocating a bit in every frame for something known to
be constant.

I think the existing extension negotiation mechanism suits this case
fine already.

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

From bruce@callenish.com  Tue Jan 11 18:56:59 2011
Return-Path: <bruce@callenish.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 531543A6862 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 18:56:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.585
X-Spam-Level: 
X-Spam-Status: No, score=-2.585 tagged_above=-999 required=5 tests=[AWL=0.014,  BAYES_00=-2.599]
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 eqQCwSvubCJF for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 18:56:58 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 409EF3A6853 for <hybi@ietf.org>; Tue, 11 Jan 2011 18:56:58 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pcqva-00069L-VX for hybi@ietf.org; Tue, 11 Jan 2011 18:59:15 -0800
Message-ID: <4D2D1908.1040306@callenish.com>
Date: Tue, 11 Jan 2011 18:59:20 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com>
In-Reply-To: <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 02:56:59 -0000

On 11/01/2011 5:18 PM, Maciej Stachowiak wrote:
>>
>> That is fair. But there are other design considerations that have been identified as desirable with Websockets than security. Simplicity of implementation is one. Efficiency is another. Minimizing inconvenience to users yet another.
> AES-CTR is performant, widely available, and easy to use through popular libraries. It's also more performant than the more secure XOR approach..

Sorry, but even a little concrete complexity in implementation for 
totally abstract security benefits that might, some day in some way no 
one can figure out, be beneficial seems like a bad deal to me. It 
strikes me as a huge assumption that there will be AES-CTR libraries on 
all the platforms that people want to deploy Websocket clients and 
servers to, as well.

Leaving aside whether plain XOR of random frame-key based masking is 
more efficient, there is also the efficiency issue of intermediaries 
being forced to unmask and remask when they otherwise wouldn't have to.

As for inconvenience, it doesn't strike me as worth a single hour of a 
single user's time in a government or lawyer's office, let alone giving 
up the ability to efficiently analyze decoded streams.

Eric is right, though, that is just my opinion. If you think the vague 
possibility it may be beneficial someday is worth making others suffer 
like that, so be it.

>> But there is already the ability to create HTTP connections via XMLHttpRequest. Once Websockets is more secure than that, the benefit to making it more secure dwindles. At that point, other design goals should be given a much more equal weight.
> There is no way (other than WebSocket) to use browser APIs to make a full duplex connection.

People misuse HTTP to do it all the time.

>   Browser implementors have a goal of not increasing security attack surface, even if the vulnerabilities might be in some theoretical sense someone else's fault.

Yes, I get this. I have argued the point myself on several occasions. 
And browser implementors are an important constituency. They are not the 
only constituency, though. If only their issues are taken into 
consideration in the design, then Websockets will well and truly suck as 
a protocol for those who use it.

I don't understand how this issue affects browser implementors, though. 
The difference between Websockets and long polled HTTP connections is 
that Websockets is by design a bidirectional protocol, rather than a 
hack to achieve the same behaviour on a request/response protocol. How 
exactly does that change the security attack surface in any way that can 
justify the costs?

>   Since WebSocket has capabilities that HTTP does not, it needs greater restrictions than HTTP.

Which capabilities are you referring to that are relevant to this issue?

>   HTTP also has legacy constraints that WebSocket does not. When designing security for WebSocket, we can get it right in the first place, and not be saddled with a problematic legacy design later.

Sorry, but you are saddled with legacy design. HTTP isn't going 
anywhere. XMLHttpRequest isn't going anywhere.

Making Websockets the gold standard in secure protocols while you toss 
all the other requirements out the window is useless because HTTP will 
always provide an attack surface. Websockets doesn't have to outrun the 
bear, it only has to outrun its friend HTTP.


From bruce@callenish.com  Tue Jan 11 20:03:12 2011
Return-Path: <bruce@callenish.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 8401C3A689F for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 20:03:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.585
X-Spam-Level: 
X-Spam-Status: No, score=-2.585 tagged_above=-999 required=5 tests=[AWL=0.014,  BAYES_00=-2.599]
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 yQaHxhXx-uEA for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 20:03:11 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id B86FC3A6895 for <hybi@ietf.org>; Tue, 11 Jan 2011 20:03:11 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pcrxg-0005WI-Pc for hybi@ietf.org; Tue, 11 Jan 2011 20:05:28 -0800
Message-ID: <4D2D288D.7090103@callenish.com>
Date: Tue, 11 Jan 2011 20:05:33 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <1294776396.7650.829.camel@ds9.ducksong.com>	<02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com>	<1294778281.7650.842.camel@ds9.ducksong.com>	<484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com>	<20110111205545.GB21915@1wt.eu>	<AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com>	<4D2CDB7E.5030003@caucho.com>	<AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com>	<4D2CDFC4.1020407@caucho.com>	<AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com>	<4D2CF617.5080503@callenish.com>	<13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com>
In-Reply-To: <4D2D1908.1040306@callenish.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 04:03:12 -0000

On 11/01/2011 6:59 PM, Bruce Atherton wrote:
>
> I don't understand how this issue affects browser implementors, 
> though. The difference between Websockets and long polled HTTP 
> connections is that Websockets is by design a bidirectional protocol, 
> rather than a hack to achieve the same behaviour on a request/response 
> protocol. How exactly does that change the security attack surface in 
> any way that can justify the costs?

Let me retract this portion of my statement. I am not a browser 
implementor or a specialist on security. If you tell me that it affects 
the attack surface, I believe you.

But given that the enhanced cryptography does not address even a 
hypothetical attack, nor is there any indication it would have any 
bearing on these new types of attacks that Websockets might expose, I 
still don't believe they are worth giving up even one concrete benefit.


From mjs@apple.com  Tue Jan 11 20:35:59 2011
Return-Path: <mjs@apple.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 86CF23A68CD for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 20:35:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.559
X-Spam-Level: 
X-Spam-Status: No, score=-106.559 tagged_above=-999 required=5 tests=[AWL=0.040, BAYES_00=-2.599, 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 WTTmRweC4EI3 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 20:35:58 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 8323B3A68CC for <hybi@ietf.org>; Tue, 11 Jan 2011 20:35:58 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out4.apple.com (Postfix) with ESMTP id 13284CAFB741 for <hybi@ietf.org>; Tue, 11 Jan 2011 20:38:17 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-ee-4d2d3038e7bd
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay11.apple.com (Apple SCV relay) with SMTP id D1.E9.04151.8303D2D4; Tue, 11 Jan 2011 20:38:16 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.98.218] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEW00CA27JQA020@elliott.apple.com> for hybi@ietf.org; Tue, 11 Jan 2011 20:38:16 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D2D1908.1040306@callenish.com>
Date: Tue, 11 Jan 2011 20:38:14 -0800
Message-id: <B98CB176-7810-4EC4-BBAD-2434979B5C9D@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com>
To: Bruce Atherton <bruce@callenish.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 04:35:59 -0000

On Jan 11, 2011, at 6:59 PM, Bruce Atherton wrote:

> On 11/01/2011 5:18 PM, Maciej Stachowiak wrote:
>>> 
>>> That is fair. But there are other design considerations that have been identified as desirable with Websockets than security. Simplicity of implementation is one. Efficiency is another. Minimizing inconvenience to users yet another.
>> AES-CTR is performant, widely available, and easy to use through popular libraries. It's also more performant than the more secure XOR approach..
> 
> Sorry, but even a little concrete complexity in implementation for totally abstract security benefits that might, some day in some way no one can figure out, be beneficial seems like a bad deal to me. It strikes me as a huge assumption that there will be AES-CTR libraries on all the platforms that people want to deploy Websocket clients and servers to, as well.

The additional complexity is essentially 0. AES-CTR is implemented in libcrypto, which is part of OpenSSL, which is available everywhere. It came out of the box on my OS and took me all of 10 minutes to figure out.

> 
> Leaving aside whether plain XOR of random frame-key based masking is more efficient, there is also the efficiency issue of intermediaries being forced to unmask and remask when they otherwise wouldn't have to.

Not a difference between XOR and AES.

> 
> As for inconvenience, it doesn't strike me as worth a single hour of a single user's time in a government or lawyer's office, let alone giving up the ability to efficiently analyze decoded streams.

Also not a difference between XOR and AES.

> 
> Eric is right, though, that is just my opinion. If you think the vague possibility it may be beneficial someday is worth making others suffer like that, so be it.

Your objections seem to be baed on false assumptions

> 
>>> But there is already the ability to create HTTP connections via XMLHttpRequest. Once Websockets is more secure than that, the benefit to making it more secure dwindles. At that point, other design goals should be given a much more equal weight.
>> There is no way (other than WebSocket) to use browser APIs to make a full duplex connection.
> 
> People misuse HTTP to do it all the time.

There's no way you can use any HTTP API in the browser to create an actual full duplex connection.

> 
>>  Browser implementors have a goal of not increasing security attack surface, even if the vulnerabilities might be in some theoretical sense someone else's fault.
> 
> Yes, I get this. I have argued the point myself on several occasions. And browser implementors are an important constituency. They are not the only constituency, though. If only their issues are taken into consideration in the design, then Websockets will well and truly suck as a protocol for those who use it.

I'm not asking you to take only those concerns into consideration. I'm asking you not to reject them just because they are not as important to you personally.

> 
> I don't understand how this issue affects browser implementors, though. The difference between Websockets and long polled HTTP connections is that Websockets is by design a bidirectional protocol, rather than a hack to achieve the same behaviour on a request/response protocol. How exactly does that change the security attack surface in any way that can justify the costs?

See Adam and Eric's paper for one example of how it makes a difference.

> 
>>  Since WebSocket has capabilities that HTTP does not, it needs greater restrictions than HTTP.
> 
> Which capabilities are you referring to that are relevant to this issue?

Two would be:
- Full duplex messaging.
- Ability to connect to non-same-origin servers without the same restrictions as HTTP.

If WebSocket didn't have any new capabilities, there would be no point to doing it.

> 
>>  HTTP also has legacy constraints that WebSocket does not. When designing security for WebSocket, we can get it right in the first place, and not be saddled with a problematic legacy design later.
> 
> Sorry, but you are saddled with legacy design. HTTP isn't going anywhere. XMLHttpRequest isn't going anywhere.
> 
> Making Websockets the gold standard in secure protocols while you toss all the other requirements out the window is useless because HTTP will always provide an attack surface. Websockets doesn't have to outrun the bear, it only has to outrun its friend HTTP.

Past mistakes are no excuse for shoddy design.

Regards,
Maciej


From mjs@apple.com  Tue Jan 11 20:48:12 2011
Return-Path: <mjs@apple.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 554F23A68F2 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 20:48:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.561
X-Spam-Level: 
X-Spam-Status: No, score=-106.561 tagged_above=-999 required=5 tests=[AWL=0.038, BAYES_00=-2.599, 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 Fb-2556tEIQd for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 20:48:11 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 6837F3A68F1 for <hybi@ietf.org>; Tue, 11 Jan 2011 20:48:11 -0800 (PST)
Received: from relay13.apple.com (relay13.apple.com [17.128.113.29]) by mail-out3.apple.com (Postfix) with ESMTP id 2B621C68BEE5 for <hybi@ietf.org>; Tue, 11 Jan 2011 20:50:30 -0800 (PST)
X-AuditID: 1180711d-b7c30ae0000055b4-eb-4d2d33154b07
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay13.apple.com (Apple SCV relay) with SMTP id 61.8F.21940.5133D2D4; Tue, 11 Jan 2011 20:50:30 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.98.218] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEW007NX840UI50@gertie.apple.com> for hybi@ietf.org; Tue, 11 Jan 2011 20:50:29 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D2D288D.7090103@callenish.com>
Date: Tue, 11 Jan 2011 20:50:23 -0800
Message-id: <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com>
To: Bruce Atherton <bruce@callenish.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 04:48:12 -0000

On Jan 11, 2011, at 8:05 PM, Bruce Atherton wrote:

> On 11/01/2011 6:59 PM, Bruce Atherton wrote:
>> 
>> I don't understand how this issue affects browser implementors, though. The difference between Websockets and long polled HTTP connections is that Websockets is by design a bidirectional protocol, rather than a hack to achieve the same behaviour on a request/response protocol. How exactly does that change the security attack surface in any way that can justify the costs?
> 
> Let me retract this portion of my statement. I am not a browser implementor or a specialist on security. If you tell me that it affects the attack surface, I believe you.
> 
> But given that the enhanced cryptography does not address even a hypothetical attack, nor is there any indication it would have any bearing on these new types of attacks that Websockets might expose, I still don't believe they are worth giving up even one concrete benefit.

We really have three options being considered, not two. Here are the pros and cons:

1) XOR using a mask entirely in the frame.

Pro:
- Fastest option.
- No per-connection state.
- Trivial to implement by hand.

Con:
- Does not provide protection in the "use HTTP to attack a WebSocket server" scenario.
- Creates obvious correlations between bytes in messages. This makes security analysis weaker.

2) XOR using a mask computed using HMAC from server and client nonces and a per-frame key

Pro:
- Provides protection in the "use HTTP to attack a WebSocket server" scenario.
- Widely available in popular libraries (but you have to implement the XOR part yourself).

Con:
- Slowest option.
- Requires a small amount of per-connection state to decode.
- Creates somewhat less obvious correlations between bytes in messages. This makes security analysis weaker.

3) AES-CTR, using a key computed using HMAC from client and server nonces and random counter per frame

Pro:
- Makes output indistinguishable from random. This has the best provable security properties.
- Provides protection in the "use HTTP to attack a WebSocket server" scenario.
- Second-fastest option.
- Widely available in popular libraries.

Con:
- Requires a small amount of per-connection state to decode.
- Uses a crypto algorithm, though for non-crypto purposes; may be subject to export regulations.


I consider #1 a nonstarter, because it does not defend against all the threat models that masking can help with. Between 2 and 3, 3 is clearly technically superior. The only argument against it, relative to #2, is the non-technical argument from export regulations.


The recently published -04 draft includes a variant on #2 (except that it uses plain SHA1 instead of HMAC to compute the mask for some reason).

Regards,
Maciej


From Martin.Thomson@andrew.com  Tue Jan 11 21:23:02 2011
Return-Path: <Martin.Thomson@andrew.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 404DD28C0E4 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 21:23:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.644
X-Spam-Level: 
X-Spam-Status: No, score=-1.644 tagged_above=-999 required=5 tests=[AWL=-0.845, BAYES_00=-2.599, J_CHICKENPOX_41=0.6, J_CHICKENPOX_43=0.6, J_CHICKENPOX_71=0.6]
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 8H5AX1QDAyCf for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 21:23:01 -0800 (PST)
Received: from csmailgw1.commscope.com (csmailgw1.commscope.com [198.135.207.244]) by core3.amsl.com (Postfix) with ESMTP id 551C628C0E0 for <hybi@ietf.org>; Tue, 11 Jan 2011 21:23:01 -0800 (PST)
Received: from [10.86.20.103] ([10.86.20.103]:28089 "EHLO ACDCE7HC2.commscope.com") by csmailgw1.commscope.com with ESMTP id S41189187Ab1ALFZR (ORCPT <rfc822;hybi@ietf.org>); Tue, 11 Jan 2011 23:25:17 -0600
Received: from SISPE7HC1.commscope.com (10.97.4.12) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.3.137.0; Tue, 11 Jan 2011 23:24:56 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC1.commscope.com ([fe80::8a9:4724:f6bb:3cdf%10]) with mapi; Wed, 12 Jan 2011 13:24:54 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Maciej Stachowiak <mjs@apple.com>, Bruce Atherton <bruce@callenish.com>
Date: Wed, 12 Jan 2011 13:24:51 +0800
Thread-Topic: [hybi] on applicability of AES
Thread-Index: AcuyFEBlO9X7+4WCRiOiq3sjcSDm2QAAyjSg
Message-ID: <8B0A9FCBB9832F43971E38010638454F03F5259269@SISPE7MB1.commscope.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
In-Reply-To: <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw1.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 05:23:02 -0000

SSdtIG5vdCBzdXJlIHRoYXQgeW91J3ZlIGJlZW4gY2xlYXIgZW5vdWdoIGluIGRlZmluaW5nIGhv
dyAyIHdvcmtzLiAgT3RoZXJ3aXNlLCBhIGdvb2Qgc3VtbWFyeS4NCg0KT24gMjAxMS0wMS0xMiBh
dCAxNTo1MDoyMywgTWFjaWVqIFN0YWNob3dpYWsgd3JvdGU6DQo+IDEpIFhPUiB1c2luZyBhIG1h
c2sgZW50aXJlbHkgaW4gdGhlIGZyYW1lLg0KDQpJIGFzc3VtZSB0aGF0IHlvdSBtZWFuIHNvbWV0
aGluZyBsaWtlOg0KDQogICBmb3IgKGludCBpID0gMDsgaSA8IGZyYW1lLmxlbmd0aDsgKytpKSB7
DQogICAgICBkYXRhICs9IHJlYWQoKSBeIGZyYW1lLm1hc2tbaSAlIE1BU0tfTEVOR1RIXTsNCiAg
IH0NCg0KPiAyKSBYT1IgdXNpbmcgYSBtYXNrIGNvbXB1dGVkIHVzaW5nIEhNQUMgZnJvbSBzZXJ2
ZXIgYW5kIGNsaWVudCBub25jZXMNCj4gYW5kIGEgcGVyLWZyYW1lIGtleQ0KDQpJcyB0aGlzIHRo
ZSBtZXRob2QgdGhhdCBJIHNhdyB0aGF0IGdlbmVyYXRlcyBhIHBzZXVkb3JhbmRvbSBzZXF1ZW5j
ZSB1c2luZyBITUFDPyANCg0KQSkgIHNlc3Npb25LZXkgPSBITUFDLVNIQTEodWlkLCBjbGllbnQt
bm9uY2UgfHwgc2VydmVyLW5vbmNlKTsNCiAgIC4uLg0KICAgZm9yIChpbnQgYmxvY2tTdGFydCA9
IDA7IGJsb2NrU3RhcnQgPCByZW1haW5pbmdMZW5ndGg7IGJsb2NrU3RhcnQgKz0gMjApIHsNCiAg
ICAgIG1hc2sgPSBITUFDLVNIQTEoc2Vzc2lvbktleSwgcGVyLWZyYW1lLWtleSB8fCBibG9ja1N0
YXJ0KTsNCiAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgMjAgJiYgYmxvY2tTdGFydCArIGkgPCBy
ZW1haW5pbmdMZW5ndGg7ICsraSkgew0KICAgICAgICAgcmVtYWluaW5nUGF5bG9hZFtibG9ja1N0
YXJ0ICsgaV0gXj0gbWFza1tpXTsNCiAgICAgIH0NCiAgIH0NCg0KT3IgdGhlIGN1dC1kb3duIHZl
cnNpb24gb2YgdGhlIHNhbWUgdGhhdCBpcyBjbG9zZXIgdG8gb3B0aW9uIDEgaW4gcGVyZm9ybWFu
Y2UgKGNvbXB1dGF0aW9uYWwgb3ZlcmhlYWQgaXMgdGhlIHNhbWUpOg0KDQpCKSBzZXNzaW9uS2V5
ID0gSE1BQyh1aWQsIGNsaWVudC1ub25jZSB8fCBzZXJ2ZXItbm9uY2UpOw0KICAgLi4uDQogICBt
YXNrID0gSE1BQyhzZXNzaW9uS2V5LCBwZXItZnJhbWUta2V5KTsNCiAgIGZvciAoaW50IGkgPSAw
OyBpIDwgbGVuZ3RoOyArK2kpIHsNCiAgICAgIHBheWxvYWRbaSAlIEhNQUNfTEVOXSBePSBtYXNr
W2kgJSBITUFDX0xFTl07DQogICB9DQoNCkkgY291bGRuJ3Qgd29yayB0aGlzIG91dCBiZWNhdXNl
IHlvdSBzZWVtIHRvIGJlIGNsYWltaW5nIHRoZSBkcmF3YmFja3Mgb2YgYm90aCAoY29tcHV0YXRp
b25hbCBvdmVyaGVhZCBhbmQgY29ycmVsYXRpb24gcHJvYmxlbXMpLiAgVGhlIGZpcnN0IGhhcyB0
aGUgY29tcHV0YXRpb25hbCBjb3N0LCB0aGUgc2Vjb25kIGhhcyB0aGUgY29ycmVsYXRpb24gcHJv
YmxlbXMuDQoNCj4gMykgQUVTLUNUUiwgdXNpbmcgYSBrZXkgY29tcHV0ZWQgdXNpbmcgSE1BQyBm
cm9tIGNsaWVudCBhbmQgc2VydmVyDQo+IG5vbmNlcyBhbmQgcmFuZG9tIGNvdW50ZXIgcGVyIGZy
YW1lDQoNCi4uLnVzaW5nIGEga2V5IGdlbmVyYXRlZCBieSBITUFDIG9mIGNsaWVudCBhbmQgc2Vy
dmVyIG5vbmNlcyBhbmQgYSByYW5kb20gX0lWXyBvbiBlYWNoIGZyYW1lLg0KDQpUaGUgc3RhdGUg
dGhhdCAyIGFuZCAzIG1haW50YWluIGFyZSBhIHNlc3Npb24ga2V5LiAgVGhleSBhbHNvIG1haW50
YWluIHRoZSBBRVMgb3IgSE1BQyBzdGF0ZSB3aGlsZSB0aGV5IGFyZSByZWNlaXZpbmcgYSBtZXNz
YWdlLCBidXQgdGhhdCdzIHBpdGlmdWxseSBzbWFsbCBpbiBjb21wYXJpc29uIHRvIHRoZSBvdGhl
ciBzdHVmZiB0aGV5IGhhdmUgdG8gaG9sZCwgbGlrZSBhIHR5cGljYWwgcmVjZWl2ZSBidWZmZXIu
DQoNCi0tTWFydGluDQo=

From jat@google.com  Tue Jan 11 21:45:15 2011
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 AD7C63A6956 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 21:45:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.649
X-Spam-Level: 
X-Spam-Status: No, score=-104.649 tagged_above=-999 required=5 tests=[AWL=-1.672, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 axtySu4nTn1S for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 21:45:14 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 076783A68DD for <hybi@ietf.org>; Tue, 11 Jan 2011 21:45:13 -0800 (PST)
Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p0C5lUIO010300 for <hybi@ietf.org>; Tue, 11 Jan 2011 21:47:31 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294811251; bh=6GQ9fLFaGX2YR0XukZqfgg3yj8Y=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=WmFpLoU+bmTf4ADCc0UJfSCsZwBgXChD8HZ8cqoHqtpjMqzDCN6ORW0Nw/4aroJKE O0/q4Ko+XoX44SCRSUCug==
Received: from yxm34 (yxm34.prod.google.com [10.190.4.34]) by kpbe14.cbf.corp.google.com with ESMTP id p0C5lTla010517 for <hybi@ietf.org>; Tue, 11 Jan 2011 21:47:29 -0800
Received: by yxm34 with SMTP id 34so117514yxm.11 for <hybi@ietf.org>; Tue, 11 Jan 2011 21:47:29 -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:content-transfer-encoding; bh=YyoGCuQwDPkDAC5dXeMHURAQmlQWDlNNlbD/hjVc1Cw=; b=O2fYm/DP138DNX+Au9zZabijTWIjV5V+mR2H2HP7/gaj067eCFPUfBOAK5y4vPArH+ PeHgt2dOa/3XoVa7CNDg==
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:content-transfer-encoding; b=XIT01Y3R9oVHi3VeWOcR4WaHd/MB9QDmUzVUmo1Y6tnCTcpm2wNMcj4VBcFc4/q9Ns MMUX2w1ugr3zhzjUk6+A==
Received: by 10.151.158.12 with SMTP id k12mr1290571ybo.377.1294811249090; Tue, 11 Jan 2011 21:47:29 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Tue, 11 Jan 2011 21:47:07 -0800 (PST)
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03F5259269@SISPE7MB1.commscope.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <8B0A9FCBB9832F43971E38010638454F03F5259269@SISPE7MB1.commscope.com>
From: John Tamplin <jat@google.com>
Date: Wed, 12 Jan 2011 00:47:07 -0500
Message-ID: <AANLkTi=jPwUMKyj5eD1j3Ju9rUfmX=8CtagmPhtm5Rja@mail.gmail.com>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 05:45:15 -0000

On Wed, Jan 12, 2011 at 12:24 AM, Thomson, Martin
<Martin.Thomson@andrew.com> wrote:
> The state that 2 and 3 maintain are a session key. =C2=A0They also mainta=
in the AES or HMAC state while they are receiving a message, but that's pit=
ifully small in comparison to the other stuff they have to hold, like a typ=
ical receive buffer.

To do it fast, I think in at least the HMAC case you want to hold the
HMAC state after having applied the client/server nonces to make it
faster.

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

From w@1wt.eu  Tue Jan 11 22:21:08 2011
Return-Path: <w@1wt.eu>
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 848223A67A3 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 22:21:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.076
X-Spam-Level: 
X-Spam-Status: No, score=-2.076 tagged_above=-999 required=5 tests=[AWL=-0.033, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 xxgQQD0DS41Q for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 22:21:07 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 50EDA3A698F for <hybi@ietf.org>; Tue, 11 Jan 2011 22:21:07 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0C6NKXj024136; Wed, 12 Jan 2011 07:23:20 +0100
Date: Wed, 12 Jan 2011 07:23:19 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110112062319.GC21915@1wt.eu>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <77B6CAA1-FAF8-4B31-A7BD-014AF0B9676D@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <77B6CAA1-FAF8-4B31-A7BD-014AF0B9676D@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 06:21:08 -0000

On Tue, Jan 11, 2011 at 01:35:14PM -0800, Maciej Stachowiak wrote:
> 
> On Jan 11, 2011, at 12:55 PM, Willy Tarreau wrote:
> 
> > Hi Maciej,
> > 
> > On Tue, Jan 11, 2011 at 12:48:12PM -0800, Maciej Stachowiak wrote:
> >> And the tradeoff is not only security but also better performance. AES-CTR is more than twice as fast as computing a SHA1 HMAC and XORing, at least for small messages. So while you may be right that export regulations create extra hassle, I don't think they are a good reason to avoid the use of crypto in protocol design. I think it's fair to list the export regulations as a con, but I don't think they are a showstopper.
> > 
> > We just keep in mind that while implementing crypto in a protocol can look
> > appealing, nothing has yet justified its use in WebSocket.
> > 
> > I'd even add that the concerns about export regulation are more serious
> > than the one about the vulnerabilities that this crypto should avoid !
> 
> I don't think anyone has demonstrated that export regulations are a practical problem in any way. Do software implementations of other IETF protocols that use crypto get restricted in practice? Is there any software product that has been unable to ship?

I have no idea however I think that the simple fact we're discussing it here
indicates that some implementers will also raise the concern when it becomes
their turn.

> Any number of commercial vendors and open source projects ship strong crypto all over the world,

That's a gratuitous statement, you don't necessarily know what products are
shipped where and with what options. It is possible that in some countries,
such products are required to have a check box to turn the crypto off.

> so I simply don't believe there is a real problem here. Can you cite any instance where it has created a real problem?

I can't, but I'm basing my reasoning on what's written :
  - there are regulations related to crypto exportation, eventhough we believe
    they can be relaxed in some situations or for some usages such as ours ;

  - we have absolutely no need for crypto, we're adding that in order to ensure
    that someone who's able to make a browser emit tens of thousands of
    connections and many megabytes of data will not be caught sending
    something that looks like an HTTP request nobody cares about. Instead,
    with crypto we'd like it to only be able to send that request after a
    few gigabytes of data.

Also, can you cite an example where a data posted after some garbage has created
a problem with an HTTP intermediary ?

Willy


From w@1wt.eu  Tue Jan 11 22:33:41 2011
Return-Path: <w@1wt.eu>
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 905EF3A6AF0 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 22:33:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.076
X-Spam-Level: 
X-Spam-Status: No, score=-2.076 tagged_above=-999 required=5 tests=[AWL=-0.033, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 kvd5UdleuLXK for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 22:33:40 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 610953A698D for <hybi@ietf.org>; Tue, 11 Jan 2011 22:33:39 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0C6ZtFI024188; Wed, 12 Jan 2011 07:35:55 +0100
Date: Wed, 12 Jan 2011 07:35:55 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110112063555.GD21915@1wt.eu>
References: <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CFEC9.4080609@caucho.com> <AANLkTi=hV3T=Vme6LF2UaKGxjjMjkJr3ZaB2jwwDWT=+@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTi=hV3T=Vme6LF2UaKGxjjMjkJr3ZaB2jwwDWT=+@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 06:33:41 -0000

Hi Adam,

On Tue, Jan 11, 2011 at 05:17:22PM -0800, Adam Barth wrote:
> > Making the garbage bytes look even more garbage-like doesn't actually make
> > the protocol more secure; it's just political theater.
> 
> I respectfully disagree.  It's much easier to reason about the
> security of pure randomness.  That doesn't mean I have an attack on
> Willy's design.  That means we have more reason to believe the
> AES-128-CTR design is secure.  This is how security works.

In order for AES-128-CTR to be more secure, we'd need to show that
intermediaries that are vulnerable to the simpler XOR-based masking
aren't vulnerable to the AES-128-CTR based masking.

I've shown that by sending tens ouf thousands of connections and a
few megabytes of data, we could make one 32-bit pattern looking like
and HTTP request for a known proxy (Apache). I've shown that we can
get the same pattern with AES-128-CTR without knowing the key after
a few gigabytes of data on a single connection.

I see no justification as to why if some proxy is vulnerable to the
first one, it's not to the second one.

However, if a proxy is not vulnerable to the first one, it's not to
the second one either. No proxies are known to be vulnerable to the
first one at all (and specs would make that very difficult).

So we have all elements to think that both are equally safe with
regards to the issue raised since the attacker does not control
the emitted stream. So unless someone can demonstrate the case
above, I'd really like that we stay on the simpler and less
expensive 32-bit key XOR-based masking, acceptably a changing
key if that makes one feel more comfortable.

Thanks,
Willy


From w@1wt.eu  Tue Jan 11 22:43:47 2011
Return-Path: <w@1wt.eu>
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 92F303A69A2 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 22:43:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.076
X-Spam-Level: 
X-Spam-Status: No, score=-2.076 tagged_above=-999 required=5 tests=[AWL=-0.033, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 PKXq4oHcU82W for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 22:43:46 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 2DB6A3A6AF5 for <hybi@ietf.org>; Tue, 11 Jan 2011 22:43:46 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0C6jx5m024238; Wed, 12 Jan 2011 07:45:59 +0100
Date: Wed, 12 Jan 2011 07:45:59 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110112064559.GE21915@1wt.eu>
References: <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 06:43:47 -0000

On Tue, Jan 11, 2011 at 08:50:23PM -0800, Maciej Stachowiak wrote:
> We really have three options being considered, not two. Here are the pros and cons:
> 
> 1) XOR using a mask entirely in the frame.
> 
> Pro:
> - Fastest option.
> - No per-connection state.
> - Trivial to implement by hand.
> 
> Con:
> - Does not provide protection in the "use HTTP to attack a WebSocket server" scenario.

This one is not related at all. If you can manipulate your crypto API to send
the Sec-* headers and manipulate the stream, then you have all is needed to
build a valid WS client and nothing blocks you from using the other algos as
well.

Also, the Sec-* headers were used for that purpose, so if you think they're
useless here, it should be raised as a separate concern, maybe we should get
rid of them then (though I think they're cheap).

> - Creates obvious correlations between bytes in messages. This makes security analysis weaker.
> 
> 2) XOR using a mask computed using HMAC from server and client nonces and a per-frame key
> 
> Pro:
> - Provides protection in the "use HTTP to attack a WebSocket server" scenario.

I disagree (see above)

> - Widely available in popular libraries (but you have to implement the XOR part yourself).
> 
> Con:
> - Slowest option.
> - Requires a small amount of per-connection state to decode.
> - Creates somewhat less obvious correlations between bytes in messages. This makes security analysis weaker.
> 
> 3) AES-CTR, using a key computed using HMAC from client and server nonces and random counter per frame
> 
> Pro:
> - Makes output indistinguishable from random. This has the best provable security properties.
> - Provides protection in the "use HTTP to attack a WebSocket server" scenario.

I disagree (see above)

> - Second-fastest option.
> - Widely available in popular libraries.
> 
> Con:
> - Requires a small amount of per-connection state to decode.
> - Uses a crypto algorithm, though for non-crypto purposes; may be subject to export regulations.

- quite CPU-intensive for simple stream facing components which will have to
  handle multiple streams.

Willy


From derhoermi@gmx.net  Tue Jan 11 22:52:43 2011
Return-Path: <derhoermi@gmx.net>
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 33B4F3A6998 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 22:52:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.607
X-Spam-Level: 
X-Spam-Status: No, score=-3.607 tagged_above=-999 required=5 tests=[AWL=-1.007, BAYES_00=-2.599]
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 KMqnz4QKZBDV for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 22:52:41 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 124AF3A69AE for <hybi@ietf.org>; Tue, 11 Jan 2011 22:52:40 -0800 (PST)
Received: (qmail invoked by alias); 12 Jan 2011 06:54:58 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp044) with SMTP; 12 Jan 2011 07:54:58 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1849718iV44r5+LcbLeo+Q8aaTpWsno2vOan99W73 1fCJJTeuY9Zf6T
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Maciej Stachowiak <mjs@apple.com>
Date: Wed, 12 Jan 2011 07:54:53 +0100
Message-ID: <epgqi6hc9o0c00fbgk2bla5l40d4k908i7@hive.bjoern.hoehrmann.de>
References: <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
In-Reply-To: <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 06:52:43 -0000

* Maciej Stachowiak wrote:
>1) XOR using a mask entirely in the frame.

>Con:
>- Does not provide protection in the "use HTTP to attack a WebSocket server" scenario.

>2) XOR using a mask computed using HMAC from server and client nonces and a per-frame key
>
>Pro:
>- Provides protection in the "use HTTP to attack a WebSocket server" scenario.

You are assuming an attacker has enough control over a HTTP client to
convince the server it actually is a Websocket client, and send data
after the server agreed to switch protocols, but not enough control to
set the client nonce and read out the server nonce.

The server needs the client nonce in order to complete the handshake
during normal operation; you might say it's buggy and defaults to zero
if there is no client nonce, but that can happen either way. So it seems
the attacker would know or could infer or find out the client nonce.

So mix the frame key with something derived from the server nonce and
all your three options are the same as far as this point is concerned.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From alex@noemax.com  Tue Jan 11 23:13:05 2011
Return-Path: <alex@noemax.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 45ECE3A6AF2 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 23:13:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  BAYES_00=-2.599]
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 oH2IFov6NCrA for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 23:13:04 -0800 (PST)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by core3.amsl.com (Postfix) with ESMTP id 514233A6AED for <hybi@ietf.org>; Tue, 11 Jan 2011 23:13:04 -0800 (PST)
Received: from HPdv73190ev by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id VIB72329; Wed, 12 Jan 2011 09:15:29 +0200
From: "Alexander Philippou" <alex@noemax.com>
To: "'Brodie Thiesfield'" <brodie@jellycan.com>
References: <4D26605B.1090409@callenish.com>	<AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>	<4D26DE2D.5040901@ericsson.com>	<AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com>	<B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com>	<AANLkTi=mobwinB_+oxznk4cpnQstBHjHb-9orpeVS8Wo@mail.gmail.com>	<AANLkTi=7dB-cFiyBwCkv03hd++d7ufBdnHP63_TOzwrK@mail.gmail.com>	<AANLkTin+OPV5mrKnyTOD+R1QZmbczyKB-RGQ0c0cfA2R@mail.gmail.com>	<AANLkTikveY-iMw4iFW51c1N1nyVB2j4Qzm8w0oxL2Mca@mail.gmail.com> <AANLkTimFdhE__3vAfnLfurnCmX1-eumQgc88u8Ud57HP@mail.gmail.com>
In-Reply-To: <AANLkTimFdhE__3vAfnLfurnCmX1-eumQgc88u8Ud57HP@mail.gmail.com>
Date: Wed, 12 Jan 2011 09:15:04 +0200
Message-ID: <003201cbb228$738d09d0$5aa71d70$@com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Office Outlook 12.0
thread-index: Acux81kWEWB95xZCTzKLMwZFkuv3fAAMsnZQ
Content-Language: en-us
Cc: hybi@ietf.org
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is	Upgrade...?
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, 12 Jan 2011 07:13:05 -0000

> Currently, the server can only respond with a subset of the extensions =
that the client has offered (and according to the /extensions/ =
paragraph, only a single item may be selected). This appears to be an =
oversight as there server should have a way of requiring extensions from =
the client, however at the moment there isn't, which precludes the =
"servermask" method from working.

I believe that it does permit multiple extensions, but you are right =
that it may be read otherwise too. May I suggest a minor change to the =
text:

1 /extensions/
2    A (possibly empty) list representing the protocol-level
3    extensions the server is ready to use.  If the server supports
4    multiple extensions, then the value of each extension should be
5    derived from the client's handshake and match exactly one of the
6    values in the "Sec-WebSocket-Extensions" field.  The absence
7    of such a field is equivalent to the null value.  The empty
8    string is not the same as the null value for these purposes.

The changes are in lines 4 and 5.

Alexander


From salvatore.loreto@ericsson.com  Tue Jan 11 23:21:53 2011
Return-Path: <salvatore.loreto@ericsson.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 04CD73A6AF9 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 23:21:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.536
X-Spam-Level: 
X-Spam-Status: No, score=-106.536 tagged_above=-999 required=5 tests=[AWL=0.063, BAYES_00=-2.599, 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 FdNYdkniQBmj for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 23:21:51 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 7C3063A6AF5 for <hybi@ietf.org>; Tue, 11 Jan 2011 23:21:51 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-d4-4d2d57195d8a
Received: from esessmw0237.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id 28.5B.13987.9175D2D4; Wed, 12 Jan 2011 08:24:09 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0237.eemea.ericsson.se (153.88.115.91) with Microsoft SMTP Server id 8.2.234.1; Wed, 12 Jan 2011 08:24:08 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id D348B2A87	for <hybi@ietf.org>; Wed, 12 Jan 2011 09:24:08 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 9A19250571	for <hybi@ietf.org>; Wed, 12 Jan 2011 09:24:08 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 258764FE6D	for <hybi@ietf.org>; Wed, 12 Jan 2011 09:24:08 +0200 (EET)
Message-ID: <4D2D5717.4000105@ericsson.com>
Date: Wed, 12 Jan 2011 08:24:07 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D26605B.1090409@callenish.com>	<AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com>	<4D26DE2D.5040901@ericsson.com>	<AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com>	<B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com>	<AANLkTi=mobwinB_+oxznk4cpnQstBHjHb-9orpeVS8Wo@mail.gmail.com>	<AANLkTi=7dB-cFiyBwCkv03hd++d7ufBdnHP63_TOzwrK@mail.gmail.com>	<AANLkTin+OPV5mrKnyTOD+R1QZmbczyKB-RGQ0c0cfA2R@mail.gmail.com>	<AANLkTikveY-iMw4iFW51c1N1nyVB2j4Qzm8w0oxL2Mca@mail.gmail.com>	<AANLkTimFdhE__3vAfnLfurnCmX1-eumQgc88u8Ud57HP@mail.gmail.com> <AANLkTimbYgj4LUZFzMJMYbs+hFT_KriHJo54D2Ht76nc@mail.gmail.com>
In-Reply-To: <AANLkTimbYgj4LUZFzMJMYbs+hFT_KriHJo54D2Ht76nc@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 12 Jan 2011 07:21:53 -0000

On 1/12/11 2:22 AM, John Tamplin wrote:
> On Tue, Jan 11, 2011 at 7:54 PM, Brodie Thiesfield<brodie@jellycan.com>  wrote:
>> In the current protocol there is no mechanism that allows the server
>> to inform the client of a required extension. Currently, the server
>> can only respond with a subset of the extensions that the client has
>> offered (and according to the /extensions/ paragraph, only a single
>> item may be selected). This appears to be an oversight as there server
>> should have a way of requiring extensions from the client, however at
>> the moment there isn't, which precludes the "servermask" method from
>> working.
> Allowing the server to request an extension would require an extra
> round-trip.  However, in this case, the client can't possible receive
> the masked server frames if it doesn't know about it, so a client
> which implements this extension simply advertises it.  Most servers do
> not accept the servermask extension (by default, since they don't know
> about it).
I fully agree with John here:
we do not need to complicate the extensions negotiation part.
Based on the 04, in the case we want the client be able to unmask
(or if you prefer the server to mask)
the client, willing to receive masked frames, has to advertise
that it supports this particular extension during the handshake.

cheers
/Sal


-- 
Salvatore Loreto
www.sloreto.com


>> Alternatively, if the masking was made part of the framing or an
>> extension using the reserved bits whereby the presence or absence
>> could be simply determined by examining the frame, then the server
>> could just send the masked frames and the client could detect and
>> decode them.
> One objection is that is using one of our precious reserved bits for
> something which is generally going to be always on (for the client) or
> always off (for the server) -- that doesn't seem like a good use of
> resources.  I believe others also raised the objection that it
> shouldn't be optional at all for particular classes of client/servers,
> so again it is allocating a bit in every frame for something known to
> be constant.
>
> I think the existing extension negotiation mechanism suits this case
> fine already.
>



From mjs@apple.com  Tue Jan 11 23:27:05 2011
Return-Path: <mjs@apple.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 9E7C23A6AFD for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 23:27:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.564
X-Spam-Level: 
X-Spam-Status: No, score=-106.564 tagged_above=-999 required=5 tests=[AWL=0.035, BAYES_00=-2.599, 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 roxaFONzMOm5 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 23:27:04 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 40C183A6AFA for <hybi@ietf.org>; Tue, 11 Jan 2011 23:27:04 -0800 (PST)
Received: from relay13.apple.com (relay13.apple.com [17.128.113.29]) by mail-out4.apple.com (Postfix) with ESMTP id 2ACD7CB022CE for <hybi@ietf.org>; Tue, 11 Jan 2011 23:29:23 -0800 (PST)
X-AuditID: 1180711d-b7c30ae0000055b4-30-4d2d585272a1
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay13.apple.com (Apple SCV relay) with SMTP id 1A.44.21940.2585D2D4; Tue, 11 Jan 2011 23:29:23 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.97.44] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEW00BPTFGXXY10@gertie.apple.com> for hybi@ietf.org; Tue, 11 Jan 2011 23:29:22 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <epgqi6hc9o0c00fbgk2bla5l40d4k908i7@hive.bjoern.hoehrmann.de>
Date: Tue, 11 Jan 2011 23:29:20 -0800
Message-id: <181849A3-DE53-4C26-8B56-3D41FD8DDAB5@apple.com>
References: <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <epgqi6hc9o0c00fbgk2bla5l40d4k908i7@hive.bjoern.hoehrmann.de>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 07:27:05 -0000

On Jan 11, 2011, at 10:54 PM, Bjoern Hoehrmann wrote:

> * Maciej Stachowiak wrote:
>> 1) XOR using a mask entirely in the frame.
> 
>> Con:
>> - Does not provide protection in the "use HTTP to attack a WebSocket server" scenario.
> 
>> 2) XOR using a mask computed using HMAC from server and client nonces and a per-frame key
>> 
>> Pro:
>> - Provides protection in the "use HTTP to attack a WebSocket server" scenario.
> 
> You are assuming an attacker has enough control over a HTTP client to
> convince the server it actually is a Websocket client, and send data
> after the server agreed to switch protocols, but not enough control to
> set the client nonce and read out the server nonce.
> 
> The server needs the client nonce in order to complete the handshake
> during normal operation; you might say it's buggy and defaults to zero
> if there is no client nonce, but that can happen either way. So it seems
> the attacker would know or could infer or find out the client nonce.
> 
> So mix the frame key with something derived from the server nonce and
> all your three options are the same as far as this point is concerned.

I agree that mixing the frame key with something derived from the server nonce is sufficient. I can see how to apply this to options 2 and 3, but in option 1 it doesn't happen, by definition. Perhaps someone cares to make a proposal that uses a different algorithm for mixing.

Regards,
Maciej



From mjs@apple.com  Tue Jan 11 23:43:10 2011
Return-Path: <mjs@apple.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 6C2AB3A6B0C for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 23:43:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.666
X-Spam-Level: 
X-Spam-Status: No, score=-105.666 tagged_above=-999 required=5 tests=[AWL=-0.867, BAYES_00=-2.599, J_CHICKENPOX_41=0.6, J_CHICKENPOX_43=0.6, J_CHICKENPOX_71=0.6, 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 pNfTAeLiCT16 for <hybi@core3.amsl.com>; Tue, 11 Jan 2011 23:43:09 -0800 (PST)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 79C913A6B0B for <hybi@ietf.org>; Tue, 11 Jan 2011 23:43:09 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out4.apple.com (Postfix) with ESMTP id 9BBB8CB02A7A for <hybi@ietf.org>; Tue, 11 Jan 2011 23:45:28 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-a3-4d2d5c1857d5
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay11.apple.com (Apple SCV relay) with SMTP id EC.C5.04151.81C5D2D4; Tue, 11 Jan 2011 23:45:28 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.97.44] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEW00FQDG7PKM20@et.apple.com> for hybi@ietf.org; Tue, 11 Jan 2011 23:45:28 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <8B0A9FCBB9832F43971E38010638454F03F5259269@SISPE7MB1.commscope.com>
Date: Tue, 11 Jan 2011 23:45:25 -0800
Message-id: <E9A7368C-3EF7-4E2D-945F-E0AD6977C504@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <8B0A9FCBB9832F43971E38010638454F03F5259269@SISPE7MB1.commscope.com>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 07:43:10 -0000

On Jan 11, 2011, at 9:24 PM, Thomson, Martin wrote:

> I'm not sure that you've been clear enough in defining how 2 works.  Otherwise, a good summary.
> 
> On 2011-01-12 at 15:50:23, Maciej Stachowiak wrote:
>> 1) XOR using a mask entirely in the frame.
> 
> I assume that you mean something like:
> 
>   for (int i = 0; i < frame.length; ++i) {
>      data += read() ^ frame.mask[i % MASK_LENGTH];
>   }

Something like that.

> 
>> 2) XOR using a mask computed using HMAC from server and client nonces
>> and a per-frame key
> 
> Is this the method that I saw that generates a pseudorandom sequence using HMAC? 
> 
> A)  sessionKey = HMAC-SHA1(uid, client-nonce || server-nonce);
>   ...
>   for (int blockStart = 0; blockStart < remainingLength; blockStart += 20) {
>      mask = HMAC-SHA1(sessionKey, per-frame-key || blockStart);
>      for (int i = 0; i < 20 && blockStart + i < remainingLength; ++i) {
>         remainingPayload[blockStart + i] ^= mask[i];
>      }
>   }
> 
> Or the cut-down version of the same that is closer to option 1 in performance (computational overhead is the same):
> 
> B) sessionKey = HMAC(uid, client-nonce || server-nonce);
>   ...
>   mask = HMAC(sessionKey, per-frame-key);
>   for (int i = 0; i < length; ++i) {
>      payload[i % HMAC_LEN] ^= mask[i % HMAC_LEN];
>   }
> 
> I couldn't work this out because you seem to be claiming the drawbacks of both (computational overhead and correlation problems).  The first has the computational cost, the second has the correlation problems.

I meant (B). It does have measurably more computational overhead than the others, as shown by the testing various people did. Computing one HMAC per frame is pretty expensive when you have many small frames. (A) would have more overhead for large frames, but indeed, would not have the correlation problem. I didn't think that had been proposed.

> 
>> 3) AES-CTR, using a key computed using HMAC from client and server
>> nonces and random counter per frame
> 
> ...using a key generated by HMAC of client and server nonces and a random _IV_ on each frame.
> 
> The state that 2 and 3 maintain are a session key.  They also maintain the AES or HMAC state while they are receiving a message, but that's pitifully small in comparison to the other stuff they have to hold, like a typical receive buffer.

Indeed.

Regards,
Maciej


From yutak@google.com  Wed Jan 12 00:54:14 2011
Return-Path: <yutak@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 8A1CD3A69E5 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 00:54:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.976
X-Spam-Level: 
X-Spam-Status: No, score=-102.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 thdsEFhehbTk for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 00:54:13 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 7E0993A681B for <hybi@ietf.org>; Wed, 12 Jan 2011 00:54:12 -0800 (PST)
Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id p0C8uUtw028394 for <hybi@ietf.org>; Wed, 12 Jan 2011 00:56:30 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294822591; bh=wK400SdVK6UXTUItTpngVcQfR6M=; h=MIME-Version:Sender:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=qw95yuTlrsfafDvvQsdoQavCylrbefk8zRRpZtuCWCQVWCkEOVKI+ziBsOaNuQ94h XHEWrJ5iRkh85XfB1x66w==
Received: from gwaa12 (gwaa12.prod.google.com [10.200.27.12]) by wpaz1.hot.corp.google.com with ESMTP id p0C8uSR0030526 for <hybi@ietf.org>; Wed, 12 Jan 2011 00:56:29 -0800
Received: by gwaa12 with SMTP id a12so135759gwa.20 for <hybi@ietf.org>; Wed, 12 Jan 2011 00:56:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=RgRLgjge2lfRYQqDD6IQxE3a/dQyJnmwd6XTRkXdKbs=; b=g1wlzN4v7KMOAy9sR5pabN5FfhHIED7DJRnHTc97YVTsV7iFiDk6XlP3a+h8tbSkxa 8WHyyYrbkJFoYU8LBOeA==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=VmDPDTKrMQPTgdin23ficWXPRQkLE7rNTwKIMY7zqNRj/m4iNf7LZ7lcwx36GrEYrV 8dp+G1M0Hl5jHZukZvYg==
MIME-Version: 1.0
Received: by 10.90.51.12 with SMTP id y12mr1258629agy.198.1294822588833; Wed, 12 Jan 2011 00:56:28 -0800 (PST)
Sender: yutak@google.com
Received: by 10.91.220.19 with HTTP; Wed, 12 Jan 2011 00:56:28 -0800 (PST)
In-Reply-To: <20110110000908.GD5743@1wt.eu>
References: <20110110000908.GD5743@1wt.eu>
Date: Wed, 12 Jan 2011 17:56:28 +0900
X-Google-Sender-Auth: IIRCietxRusbEm2n72BcH76y6vQ
Message-ID: <AANLkTi=LBeH6RReypRb1BoH=2-jw-_qxRsaqQCT13MNA@mail.gmail.com>
From: Yuta Kitamura <yutak@chromium.org>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=00163630f261745fae0499a2600c
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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, 12 Jan 2011 08:54:14 -0000

--00163630f261745fae0499a2600c
Content-Type: text/plain; charset=ISO-8859-1

Hi,

On Mon, Jan 10, 2011 at 9:09 AM, Willy Tarreau <w@1wt.eu> wrote:

> willy@pcw:~/c$ time ./aes-128-ctr-get
> Found the 'GET\n' pattern on the wire after 1608425803 bytes
>
>
The probability that you get some four-byte data from a random byte sequence
is 1/(256^4) = 1/4294967296 for each byte. Please note that the order of
256^4 is almost same as the above number. This means that, statistically,
it's quite possible to find a four-byte 'GET\n' sequence (and any other
four-byte sequence) in a few gigabytes of random bytes.

I think your experiment has just shown that the output of AES-128-CTR is
random enough.

I'm sorry if I'm missing your point.

Thanks,
Yuta

--00163630f261745fae0499a2600c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,<div><br></div><div><div class=3D"gmail_quote">On Mon, Jan 10, 2011 at 9=
:09 AM, Willy Tarreau <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1=
wt.eu</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
willy@pcw:~/c$ time ./aes-128-ctr-get<br>
Found the &#39;GET\n&#39; pattern on the wire after 1608425803 bytes<br><br=
></blockquote><div><br></div><div>The probability that you get some four-by=
te data from a random byte sequence is 1/(256^4) =3D 1/4294967296 for each =
byte. Please note that the order of 256^4 is almost same as the above numbe=
r. This means that, statistically, it&#39;s quite possible to find a four-b=
yte &#39;GET\n&#39; sequence (and any other four-byte sequence) in a few gi=
gabytes of random bytes.</div>
<div><br></div><div>I think your experiment has just shown that the output =
of AES-128-CTR is random enough.</div><div><br></div><div>I&#39;m sorry if =
I&#39;m missing your point.</div><div><br></div><div>Thanks,</div><div>
Yuta</div></div></div>

--00163630f261745fae0499a2600c--

From w@1wt.eu  Wed Jan 12 01:39:32 2011
Return-Path: <w@1wt.eu>
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 379F428C0F7 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 01:39:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.075
X-Spam-Level: 
X-Spam-Status: No, score=-2.075 tagged_above=-999 required=5 tests=[AWL=-0.032, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 jbW8UNyfqfOS for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 01:39:31 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 3000028C0E9 for <hybi@ietf.org>; Wed, 12 Jan 2011 01:39:30 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0C9flTT024802; Wed, 12 Jan 2011 10:41:47 +0100
Date: Wed, 12 Jan 2011 10:41:47 +0100
From: Willy Tarreau <w@1wt.eu>
To: Yuta Kitamura <yutak@chromium.org>
Message-ID: <20110112094147.GB24790@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <AANLkTi=LBeH6RReypRb1BoH=2-jw-_qxRsaqQCT13MNA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTi=LBeH6RReypRb1BoH=2-jw-_qxRsaqQCT13MNA@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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, 12 Jan 2011 09:39:32 -0000

On Wed, Jan 12, 2011 at 05:56:28PM +0900, Yuta Kitamura wrote:
> Hi,
> 
> On Mon, Jan 10, 2011 at 9:09 AM, Willy Tarreau <w@1wt.eu> wrote:
> 
> > willy@pcw:~/c$ time ./aes-128-ctr-get
> > Found the 'GET\n' pattern on the wire after 1608425803 bytes
> >
> >
> The probability that you get some four-byte data from a random byte sequence
> is 1/(256^4) = 1/4294967296 for each byte. Please note that the order of
> 256^4 is almost same as the above number. This means that, statistically,
> it's quite possible to find a four-byte 'GET\n' sequence (and any other
> four-byte sequence) in a few gigabytes of random bytes.

That's what I've been explaining from the beginning !

> I think your experiment has just shown that the output of AES-128-CTR is
> random enough.

I agree it's random enough, just as the simple 32-bit random XOR is ! And
that was my point : there is no vulnerability that would remain with the 
simple XOR that the AES would solve since in the end, we're down to just
a 32-bit randomness.

Willy


From dave@cridland.net  Wed Jan 12 02:29:37 2011
Return-Path: <dave@cridland.net>
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 ADFE928C0FE for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 02:29:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.542
X-Spam-Level: 
X-Spam-Status: No, score=-2.542 tagged_above=-999 required=5 tests=[AWL=0.057,  BAYES_00=-2.599]
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 sv7dqbvMyNV9 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 02:29:36 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id B3B1828C0E9 for <hybi@ietf.org>; Wed, 12 Jan 2011 02:29:35 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id C05781168117; Wed, 12 Jan 2011 10:31:52 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7wY1Wu-ADk8P; Wed, 12 Jan 2011 10:31:47 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id B96A611680FB; Wed, 12 Jan 2011 10:31:47 +0000 (GMT)
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <77B6CAA1-FAF8-4B31-A7BD-014AF0B9676D@apple.com>
In-Reply-To: <77B6CAA1-FAF8-4B31-A7BD-014AF0B9676D@apple.com>
MIME-Version: 1.0
Message-Id: <22648.1294828307.755564@puncture>
Date: Wed, 12 Jan 2011 10:31:47 +0000
From: Dave Cridland <dave@cridland.net>
To: Maciej Stachowiak <mjs@apple.com>, Server-Initiated HTTP <hybi@ietf.org>, Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; delsp="yes"; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8Bit
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 10:29:37 -0000

On Tue Jan 11 21:35:14 2011, Maciej Stachowiak wrote:
> I don't think anyone has demonstrated that export regulations are a  
> practical problem in any way. Do software implementations of other  
> IETF protocols that use crypto get restricted in practice? 

Those protocols actually require crypto for more than just politics,  
but yes, we need to restrict them (or restrict their export). They  
count as Dual-Use items, and are under export controls for any EU  
member state, including the UK, as I understand things.

So we can (and do) ship TLS anywhere, but we must (and do) restrict  
it. Similarly for other cryptographic protocols, like X.500, SASL,  
etc.

> Is there any software product that has been unable to ship?

We certainly have to ship with a licensing system which allows us to  
ship without strong cryptography (including AES) enabled, and it must  
be disabled by default, and we are unable to ship a license which  
isn't node-locked and has high-grade cryptography on, as I understand  
things. I think most of these decisions were made for the avoidance  
of doubt, mind - but in any case, we are unable to ship the licenses  
enabling "high grade cryptography" everywhere.

Now, whether this particular case consistutes cryptography, and  
whether we could convince the ECO that this case is exempt, is  
another matter.

I'd note that the actual regulation that covers the EU says this (in  
its definitions of dual-use technology and software, this is  
5A002.a.1 of Council Regulation 1334/2000):

"""
1. designed or modified to use â€˜cryptographyâ€™ employing
digital techniques performing any cryptographic
function other than authentication or digital signature
having any of the following:

Technical notes:

1. Authentication and digital signature functions
include their associated key management function.

2. Authentication includes all aspects of access control
where there is no encryption of files or text except
as directly related to the protection of passwords,
Personal Identification Numbers (PINs) or similar
data to prevent unauthorised access.

3. â€˜Cryptographyâ€™ does not include â€˜fixedâ€™ data
compression or coding techniques.

[...]

a. a â€˜symmetric algorithmâ€™ employing a key length
      in excess of 56 bits; or

[...]
"""

Now the point (3) in the technical note might apply - the rest  
certainly don't - because 'Fixed' is defined as:

"""
â€˜Fixedâ€™ (5) means that the coding or compression algorithm cannot  
accept
externally supplied parameters (e.g., cryptographic or key variables)  
and cannot
be modified by the user.
"""

But the keying *can* be influenced by the user, by, from our  
perspective, controlling the browser's nonce selection. From the  
browser implementor's viewpoint, the server's nonce can modify the  
key. In addition, the plaintext (as I understand things) would also  
influence the keying.

It seems reasonable, to me, to suppose that this means we could could  
use AES-CTR based masking, but only if the keying were in some way  
fixed, which rather disables the point. Arguably, we can't actually  
use any symmetric algorithm (including XOR) with a key length greater  
than 56 bits. Stating the bleeding obvious, that's 7 octets mask  
length. This suggests that if we have to have masking - and I remain  
in much doubt that this is the best solution - then a 32-bit XOR is a  
more sensible choice - especially given Willy's argument that this is  
sufficient.

Of course, it goes without saying that I'm no lawyer - in fact, I'd  
much rather this weren't the case, and we could ship crypto  
everywhere without constraint (it'd reduce my support load  
substantially). Neither am I willing to risk the export license my  
employer has, however, so I'm cautious in my reading of this.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From dave@cridland.net  Wed Jan 12 02:48:24 2011
Return-Path: <dave@cridland.net>
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 2BF943A6A12 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 02:48:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.543
X-Spam-Level: 
X-Spam-Status: No, score=-2.543 tagged_above=-999 required=5 tests=[AWL=0.056,  BAYES_00=-2.599]
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 eBRLiwoPRXzi for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 02:48:23 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id AF72E3A6A0B for <hybi@ietf.org>; Wed, 12 Jan 2011 02:48:22 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 921C81168117; Wed, 12 Jan 2011 10:50:40 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gkjA8Fxrp9A7; Wed, 12 Jan 2011 10:50:36 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 860CE11680FB; Wed, 12 Jan 2011 10:50:36 +0000 (GMT)
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <77B6CAA1-FAF8-4B31-A7BD-014AF0B9676D@apple.com> <20110112062319.GC21915@1wt.eu>
In-Reply-To: <20110112062319.GC21915@1wt.eu>
MIME-Version: 1.0
Message-Id: <22648.1294829436.547490@puncture>
Date: Wed, 12 Jan 2011 10:50:36 +0000
From: Dave Cridland <dave@cridland.net>
To: Willy Tarreau <w@1wt.eu>, Server-Initiated HTTP <hybi@ietf.org>, Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 10:48:24 -0000

On Wed Jan 12 06:23:19 2011, Willy Tarreau wrote:
> Also, can you cite an example where a data posted after some  
> garbage has created
> a problem with an HTTP intermediary ?

You're not in the spirit of this, you know.

The intermediaries the working group has apparently chosen to protect  
from the naughty browsers are more broken than any we can conceive  
of. Since, when reading these words, we know and understand them, it  
follows that such an intermediary must either exist in reality *and*  
our understanding, or else it exists solely in our understanding -  
yet to be more broken than that which we can conceive it must exist  
in reality, since otherwise we could conceive of something more  
broken. Therefore, the broken intermediaries exist.

I'm surprised you even question such watertight logic.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From derhoermi@gmx.net  Wed Jan 12 02:55:30 2011
Return-Path: <derhoermi@gmx.net>
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 961543A6A24 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 02:55:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.581
X-Spam-Level: 
X-Spam-Status: No, score=-3.581 tagged_above=-999 required=5 tests=[AWL=-0.982, BAYES_00=-2.599]
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 zICcm6DVreIC for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 02:55:29 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 0337D3A6A22 for <hybi@ietf.org>; Wed, 12 Jan 2011 02:55:28 -0800 (PST)
Received: (qmail invoked by alias); 12 Jan 2011 10:57:46 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp014) with SMTP; 12 Jan 2011 11:57:46 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX19ygqJKkfpyoplgTfSN/C+VlOyfDY4SqEhQpa/ORj qE83ow/VWJN0Wx
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Maciej Stachowiak <mjs@apple.com>
Date: Wed, 12 Jan 2011 11:57:42 +0100
Message-ID: <k1rqi6d3v8bmv8l9033ejqe120v9eospl8@hive.bjoern.hoehrmann.de>
References: <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <epgqi6hc9o0c00fbgk2bla5l40d4k908i7@hive.bjoern.hoehrmann.de> <181849A3-DE53-4C26-8B56-3D41FD8DDAB5@apple.com>
In-Reply-To: <181849A3-DE53-4C26-8B56-3D41FD8DDAB5@apple.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 10:55:30 -0000

* Maciej Stachowiak wrote:
>I agree that mixing the frame key with something derived from the server
>nonce is sufficient. I can see how to apply this to options 2 and 3, but
>in option 1 it doesn't happen, by definition. Perhaps someone cares to
>make a proposal that uses a different algorithm for mixing.

If you think your hypothetical setup is something that must be addressed
then you should propose a requirement to that end. We can then find some
consensus around the proposed requirements and design a protocol that
addresses them. With protecting intermediaries we've gone from "Surely
that would be a bug in the proxy" to "let's do this trivial thing to
maybe throw off proxies" to "let's do this more elaborate thing to throw
off proxies" to "let's prevent the attacker from controlling the bytes"
to "but that doesn't make the protocol look like entirely random noise!"
so making proposal after proposal does not seem like a good way to make
progress.

Your scenario assumes that some of the components involved have bugs. I
could now say use this algorithm to reduce the server nonce to the size
of the frame key and this other algorithm to mix the two for each frame.
Then someone will point out the nonce X will compute to something that
makes the mixing have no effect, so servers will use that to avoid the
overhead. And then someone will propose browser's reject X as nonce, or 
propose different algorithms where the odds of someone finding X are
worse, and then someone might respond, if other X values are found they
could just be added in browser updates, and so on. Without an agreement
that the initial setup is something we should worry about to begin with.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From w@1wt.eu  Wed Jan 12 02:56:57 2011
Return-Path: <w@1wt.eu>
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 C2ED23A6A22 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 02:56:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.075
X-Spam-Level: 
X-Spam-Status: No, score=-2.075 tagged_above=-999 required=5 tests=[AWL=-0.032, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 bUc3Me6oNpq4 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 02:56:57 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id A19943A69F8 for <hybi@ietf.org>; Wed, 12 Jan 2011 02:56:56 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0CAxBrq024971; Wed, 12 Jan 2011 11:59:11 +0100
Date: Wed, 12 Jan 2011 11:59:11 +0100
From: Willy Tarreau <w@1wt.eu>
To: Dave Cridland <dave@cridland.net>
Message-ID: <20110112105911.GC24790@1wt.eu>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <77B6CAA1-FAF8-4B31-A7BD-014AF0B9676D@apple.com> <20110112062319.GC21915@1wt.eu> <22648.1294829436.547490@puncture>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <22648.1294829436.547490@puncture>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 10:56:57 -0000

On Wed, Jan 12, 2011 at 10:50:36AM +0000, Dave Cridland wrote:
> On Wed Jan 12 06:23:19 2011, Willy Tarreau wrote:
> >Also, can you cite an example where a data posted after some  
> >garbage has created
> >a problem with an HTTP intermediary ?
> 
> You're not in the spirit of this, you know.
> 
> The intermediaries the working group has apparently chosen to protect  
> from the naughty browsers are more broken than any we can conceive  
> of. Since, when reading these words, we know and understand them, it  
> follows that such an intermediary must either exist in reality *and*  
> our understanding, or else it exists solely in our understanding -  
> yet to be more broken than that which we can conceive it must exist  
> in reality, since otherwise we could conceive of something more  
> broken. Therefore, the broken intermediaries exist.

Then care to explain me why we agree they are vulnerable to several
megs of garbage but not to one gig of garbage ?

What drives me nuts is that we first choose a crypto algo then find
what type of imaginary intermediary might be vulnerable to something
just below our level of protection but not above.

If we identify a vulnerability, then we must offer real protection
even if we don't like it (eg: base64 encoding), but not something
slightly better but far more complex.

I'm clearly not for using base64 because I'm certain the supposed
vulnerability does not exist at all. For the same reason, I'm much
convinced that your proposed workaround with the CONNECT at the
beggining is far more than enough. But if we decide the vulnerability
exists, then we must address it to the level we imagine it. That
means : no CR/LF in the stream. Period.

Regards,
Willy


From brofield@gmail.com  Wed Jan 12 03:11:03 2011
Return-Path: <brofield@gmail.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 0064528C10C for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 03:11:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.755
X-Spam-Level: 
X-Spam-Status: No, score=-2.755 tagged_above=-999 required=5 tests=[AWL=0.222,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 wp3RlkAXNOGI for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 03:10:56 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 533D628C0D8 for <hybi@ietf.org>; Wed, 12 Jan 2011 03:10:54 -0800 (PST)
Received: by qyj19 with SMTP id 19so494009qyj.10 for <hybi@ietf.org>; Wed, 12 Jan 2011 03:13:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=XNpg54Zf6PiwppdOYQOdyaMYnM+gRxvGq8ANzJ9Oae4=; b=gNiV/vi+kLDuAtMj0UkkxhtmfV3KX3GSvDlX+ooBB6ifJVePZZVTMJcrpT4pvup8ip q2/FQs5EYA8bpwNdB34zJS5qTkdMZQhjFx/zh4X1oVx4nn/kz63foA3LfuXnjjAmSJDm ouw6sLJIqFMwq4/7OJnyJJpyCKfbuuzPlpGQg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=aobTX1xahnXasJDgkGFOHPa+OLTuxCcWK8tD5e5c9iuQsx50b4F8Nl5ZyA2c19mBb7 Gu8HYjNY4Go638zMTQ9CvsRB1KT80IT2H0XXs2Q9m+KWUG9NfojWTg4diRvVlfwcSveX B7Yq0t39I44STD2gAkWH2sL3kmFdd1sZQPjBo=
MIME-Version: 1.0
Received: by 10.229.250.9 with SMTP id mm9mr701206qcb.264.1294830792522; Wed, 12 Jan 2011 03:13:12 -0800 (PST)
Sender: brofield@gmail.com
Received: by 10.229.84.66 with HTTP; Wed, 12 Jan 2011 03:13:12 -0800 (PST)
In-Reply-To: <AANLkTimbYgj4LUZFzMJMYbs+hFT_KriHJo54D2Ht76nc@mail.gmail.com>
References: <4D26605B.1090409@callenish.com> <AANLkTikrsO8ePsjhgRNhM5n1gxMEYbjDa8DhCpqajtun@mail.gmail.com> <4D26DE2D.5040901@ericsson.com> <AANLkTinpkbJU_mYLq3O8d9W58pBKEi6=K9fV=4C=5ODv@mail.gmail.com> <B45868F2-DF57-49C6-B2C4-9F3AC36646BD@rtfm.com> <AANLkTi=mobwinB_+oxznk4cpnQstBHjHb-9orpeVS8Wo@mail.gmail.com> <AANLkTi=7dB-cFiyBwCkv03hd++d7ufBdnHP63_TOzwrK@mail.gmail.com> <AANLkTin+OPV5mrKnyTOD+R1QZmbczyKB-RGQ0c0cfA2R@mail.gmail.com> <AANLkTikveY-iMw4iFW51c1N1nyVB2j4Qzm8w0oxL2Mca@mail.gmail.com> <AANLkTimFdhE__3vAfnLfurnCmX1-eumQgc88u8Ud57HP@mail.gmail.com> <AANLkTimbYgj4LUZFzMJMYbs+hFT_KriHJo54D2Ht76nc@mail.gmail.com>
Date: Wed, 12 Jan 2011 20:13:12 +0900
X-Google-Sender-Auth: 0h_fnQfaBPA4LZLlIvssk6093vw
Message-ID: <AANLkTikF1eWiN2Rr-0ya6ObovXsHmXUYzEbsCf06TkdB@mail.gmail.com>
From: Brodie Thiesfield <brodie@jellycan.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Can Websockets be used peer to peer? Was Straw Poll: is Upgrade...?
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, 12 Jan 2011 11:11:05 -0000

On Wed, Jan 12, 2011 at 10:22 AM, John Tamplin <jat@google.com> wrote:
> On Tue, Jan 11, 2011 at 7:54 PM, Brodie Thiesfield <brodie@jellycan.com> =
wrote:
> Allowing the server to request an extension would require an extra
> round-trip. =A0However, in this case, the client can't possible receive
> the masked server frames if it doesn't know about it, so a client
> which implements this extension simply advertises it. =A0Most servers do
> not accept the servermask extension (by default, since they don't know
> about it).

That makes sense and fits with the HTTP model of Accept headers.

> I think the existing extension negotiation mechanism suits this case
> fine already.

Yes, I agree.

So to support this basic level of p2p, a well known extension (i.e.
"servermask") would need to be defined, and the client would need to
be able to handle server masked frames.

Regards,
Brodie

From trac@tools.ietf.org  Wed Jan 12 06:53:41 2011
Return-Path: <trac@tools.ietf.org>
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 1F7B428C12E for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 06:53:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.586
X-Spam-Level: 
X-Spam-Status: No, score=-102.586 tagged_above=-999 required=5 tests=[AWL=0.014, BAYES_00=-2.599, NO_RELAYS=-0.001, 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 k1K-H5iBaReQ for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 06:53:37 -0800 (PST)
Received: from zinfandel.tools.ietf.org (unknown [IPv6:2001:1890:1112:1::2a]) by core3.amsl.com (Postfix) with ESMTP id D41A628C108 for <hybi@ietf.org>; Wed, 12 Jan 2011 06:53:37 -0800 (PST)
Received: from localhost ([::1] helo=zinfandel.tools.ietf.org) by zinfandel.tools.ietf.org with esmtp (Exim 4.72) (envelope-from <trac@tools.ietf.org>) id 1Pd27A-0000sv-0r; Wed, 12 Jan 2011 06:55:56 -0800
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
From: "hybi issue tracker" <trac@tools.ietf.org>
X-Trac-Version: 0.11.7
Precedence: bulk
Auto-Submitted: auto-generated
X-Mailer: Trac 0.11.7, by Edgewall Software
To: salvatore.loreto@ericsson.com
X-Trac-Project: hybi
Date: Wed, 12 Jan 2011 14:55:55 -0000
X-URL: http://tools.ietf.org/hybi/
X-Trac-Ticket-URL: http://trac.tools.ietf.org/wg/hybi/trac/ticket/39
Message-ID: <068.36490524d935945394c51f239c8e5ca3@tools.ietf.org>
X-Trac-Ticket-ID: 39
X-SA-Exim-Connect-IP: ::1
X-SA-Exim-Rcpt-To: salvatore.loreto@ericsson.com, hybi@ietf.org
X-SA-Exim-Mail-From: trac@tools.ietf.org
X-SA-Exim-Scanned: No (on zinfandel.tools.ietf.org); SAEximRunCond expanded to false
Cc: hybi@ietf.org
Subject: [hybi] thewebsocketprotocol #39 (new): multiple extensions selection in the server side handshake
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
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, 12 Jan 2011 14:53:41 -0000

#39: multiple extensions selection in the  server side handshake

 the fact that the server can select more then one extension, among the
 ones that client has offered, is not clear in the current version (04).

 in order to clarify that,
 the following minor change to the text has been proposed by Alexander:

 1 /extensions/
 2   A (possibly empty) list representing the protocol-level
 3   extensions the server is ready to use.  If the server supports
 4   multiple extensions, then the value of each extension should be
 5   derived from the client's handshake and match exactly one of the
 6   values in the "Sec-WebSocket-Extensions" field.  The absence
 7   of such a field is equivalent to the null value.  The empty
 8    string is not the same as the null value for these purposes.

 The changes are in lines 4 and 5.

 see: http://www.ietf.org/mail-archive/web/hybi/current/msg05851.html

-- 
-------------------------------------------+--------------------------------
 Reporter:  salvatore.loreto@â€¦             |       Owner:     
     Type:  enhancement                    |      Status:  new
 Priority:  minor                          |   Milestone:     
Component:  thewebsocketprotocol           |     Version:     
 Severity:  -                              |    Keywords:     
-------------------------------------------+--------------------------------

Ticket URL: <http://trac.tools.ietf.org/wg/hybi/trac/ticket/39>
hybi <http://tools.ietf.org/hybi/>
The Hypertext-Bidirectional (HyBi) working group will seek
standardization of one approach to maintain bidirectional
communications between the HTTP client, server and intermediate
entities, which will provide more efficiency compared to the current
use of hanging requests.

From mcmanus@ducksong.com  Wed Jan 12 07:22:34 2011
Return-Path: <mcmanus@ducksong.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 32C1728C122 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 07:22:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.528
X-Spam-Level: 
X-Spam-Status: No, score=-2.528 tagged_above=-999 required=5 tests=[AWL=0.071,  BAYES_00=-2.599]
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 3eeZxfDNsILb for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 07:22:33 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 400BB28C107 for <hybi@ietf.org>; Wed, 12 Jan 2011 07:22:33 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id C047810300; Wed, 12 Jan 2011 10:24:52 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 69CBA10157; Wed, 12 Jan 2011 10:24:48 -0500 (EST)
From: Patrick McManus <mcmanus@ducksong.com>
To: Willy Tarreau <w@1wt.eu>
In-Reply-To: <20110112063555.GD21915@1wt.eu>
References: <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CFEC9.4080609@caucho.com> <AANLkTi=hV3T=Vme6LF2UaKGxjjMjkJr3ZaB2jwwDWT=+@mail.gmail.com> <20110112063555.GD21915@1wt.eu>
Content-Type: text/plain; charset="UTF-8"
Date: Wed, 12 Jan 2011 10:24:33 -0500
Message-ID: <1294845873.7650.899.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 15:22:34 -0000

>  one 32-bit pattern looking like
> and HTTP request for a known proxy (Apache).

I don't understand why "GET\n" is interesting in a proxy scenario.
Without a host header exactly what host is the server going to be able
to spoof in the cache? The paper that this is all based on discusses
mismatches between host headers and ip addresses of the connection.

The only thing I can figure is you are saying that a "GET\n" might
translate into "GET / HTTP/1.0\r\nhost: previous-request" but that would
require inserting the previous request as well.

what am I missing?




From dave@cridland.net  Wed Jan 12 07:27:46 2011
Return-Path: <dave@cridland.net>
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 7854C28C107 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 07:27:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.544
X-Spam-Level: 
X-Spam-Status: No, score=-2.544 tagged_above=-999 required=5 tests=[AWL=0.055,  BAYES_00=-2.599]
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 1B2wuk4QFbsw for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 07:27:44 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 29DCF28C136 for <hybi@ietf.org>; Wed, 12 Jan 2011 07:27:44 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 3B20B116811D; Wed, 12 Jan 2011 15:30:02 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TT-3XlTvNxk7; Wed, 12 Jan 2011 15:29:58 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 1342911680FB; Wed, 12 Jan 2011 15:29:58 +0000 (GMT)
References: <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CFEC9.4080609@caucho.com> <AANLkTi=hV3T=Vme6LF2UaKGxjjMjkJr3ZaB2jwwDWT=+@mail.gmail.com> <20110112063555.GD21915@1wt.eu> <1294845873.7650.899.camel@ds9.ducksong.com>
In-Reply-To: <1294845873.7650.899.camel@ds9.ducksong.com>
MIME-Version: 1.0
Message-Id: <22648.1294846198.086812@puncture>
Date: Wed, 12 Jan 2011 15:29:58 +0000
From: Dave Cridland <dave@cridland.net>
To: "Pat McManus \@Mozilla" <mcmanus@ducksong.com>, Server-Initiated HTTP <hybi@ietf.org>, Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 15:27:47 -0000

On Wed Jan 12 15:24:33 2011, Patrick McManus wrote:
> 
> >  one 32-bit pattern looking like
> > and HTTP request for a known proxy (Apache).
> 
> I don't understand why "GET\n" is interesting in a proxy scenario.
> Without a host header exactly what host is the server going to be  
> able
> to spoof in the cache? The paper that this is all based on discusses
> mismatches between host headers and ip addresses of the connection.
> 
> 
That's not the reasoning for the masking, though. The masking is  
proposed as a panacea for any attack based on a proxy interpreting  
the data as HTTP traffic.

Merely stopping these can be achieved by the means described (and  
tested) in the paper.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From neonux@gmail.com  Wed Jan 12 07:57:24 2011
Return-Path: <neonux@gmail.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 990243A69ED for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 07:57:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.902
X-Spam-Level: 
X-Spam-Status: No, score=-2.902 tagged_above=-999 required=5 tests=[AWL=0.075,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 TLRc0JMTF+pm for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 07:57:23 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 9CDCA3A67D8 for <hybi@ietf.org>; Wed, 12 Jan 2011 07:57:23 -0800 (PST)
Received: by wwa36 with SMTP id 36so676324wwa.13 for <hybi@ietf.org>; Wed, 12 Jan 2011 07:59:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=jGvX/e8VoUo33pfpNe9cwKDmISToS1W9/GBu3o3Qjfo=; b=UyLPpgJED9tTEGnfWFTaSDLWQFo0RfAgmClWzepVkYgNJTDZezJOqJdtQDt8qhrvep Zm97Xi17hPsealwMeq/sx82Xy+9NV9i4zbpmiepuyNvLf36XMoUNUN0D4gJHgctP8ihm SUkQr75unmWoRP54Pjss6e60g9lnA4Z4mnXwc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=Xhj0SO5WWBmAN+H+IXqjwOpCv+TFemJLfaRNhakFWjMg+5RIfvtDjL3jOLMfuclkOs ygOxQPcivW8e7m5Jw50T003r8VTULWXh8Ckk0y0l2iCKzxqlDC8wgCBtdsO5QD/vBUr4 ybmO2egZbAslrHNxpfoYeCtxa6837l1Ui7jF8=
Received: by 10.227.132.77 with SMTP id a13mr1136413wbt.127.1294847982696; Wed, 12 Jan 2011 07:59:42 -0800 (PST)
MIME-Version: 1.0
Sender: neonux@gmail.com
Received: by 10.227.3.19 with HTTP; Wed, 12 Jan 2011 07:58:57 -0800 (PST)
In-Reply-To: <20110112094147.GB24790@1wt.eu>
References: <20110110000908.GD5743@1wt.eu> <AANLkTi=LBeH6RReypRb1BoH=2-jw-_qxRsaqQCT13MNA@mail.gmail.com> <20110112094147.GB24790@1wt.eu>
From: Cedric Vivier <cedricv@neonux.com>
Date: Wed, 12 Jan 2011 23:58:57 +0800
X-Google-Sender-Auth: QE2MA3lTXw9TnRDuQkUEb5wLc_A
Message-ID: <AANLkTi=GOyehATLpPHgbHOLtEbQ1819hNJzP4wMaVbkT@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=UTF-8
Cc: Hybi <hybi@ietf.org>, Yuta Kitamura <yutak@chromium.org>
Subject: Re: [hybi] AES-128-CTR not much safer, but not fast either
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, 12 Jan 2011 15:57:24 -0000

On Wed, Jan 12, 2011 at 17:41, Willy Tarreau <w@1wt.eu> wrote:
> I agree it's random enough, just as the simple 32-bit random XOR is ! And
> that was my point : there is no vulnerability that would remain with the
> simple XOR that the AES would solve since in the end, we're down to just
> a 32-bit randomness.

+1
If there really has to be masking (to protect against potential
intermediaries broken beyond reason), AES cannot protect those 4 bytes
any more than a simple XOR on a 32-bit key.

It is faster to process and simplifies development. Sure, you can link
to OpenSSL or your favorite crypto library from C/C++, it still adds
unnecessary bloat/complexity while also limiting possibility of using
other programming languages to write small/prototype/test WebSocket
servers without installing crypto bindings... (think Lua, Python [AES
not in standard library], ...).

Regards,

From w@1wt.eu  Wed Jan 12 08:07:51 2011
Return-Path: <w@1wt.eu>
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 861B628C107 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 08:07:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.075
X-Spam-Level: 
X-Spam-Status: No, score=-2.075 tagged_above=-999 required=5 tests=[AWL=-0.032, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 w+yd2GsTB3En for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 08:07:50 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 5D7453A6B36 for <hybi@ietf.org>; Wed, 12 Jan 2011 08:07:49 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0CGA3RY026249; Wed, 12 Jan 2011 17:10:03 +0100
Date: Wed, 12 Jan 2011 17:10:03 +0100
From: Willy Tarreau <w@1wt.eu>
To: Patrick McManus <mcmanus@ducksong.com>
Message-ID: <20110112161003.GC25018@1wt.eu>
References: <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CFEC9.4080609@caucho.com> <AANLkTi=hV3T=Vme6LF2UaKGxjjMjkJr3ZaB2jwwDWT=+@mail.gmail.com> <20110112063555.GD21915@1wt.eu> <1294845873.7650.899.camel@ds9.ducksong.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1294845873.7650.899.camel@ds9.ducksong.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 16:07:51 -0000

On Wed, Jan 12, 2011 at 10:24:33AM -0500, Patrick McManus wrote:
> 
> >  one 32-bit pattern looking like
> > and HTTP request for a known proxy (Apache).
> 
> I don't understand why "GET\n" is interesting in a proxy scenario.
> Without a host header exactly what host is the server going to be able
> to spoof in the cache?

The proxy's default host. For example, the hosting provider's site
or default site. Since it worked on my Apache reverse proxy, I don't
see why we should dismiss it as a valid case. What Apache does is
rewrite the request as a complete one with a real Host header.

> The paper that this is all based on discusses
> mismatches between host headers and ip addresses of the connection.
> 
> The only thing I can figure is you are saying that a "GET\n" might
> translate into "GET / HTTP/1.0\r\nhost: previous-request" but that would
> require inserting the previous request as well.

No, it sets "GET / HTTP/1.1\r\nHost: <default-host>\r\n\r\n".

Regards,
Willy


From bruce@callenish.com  Wed Jan 12 09:50:05 2011
Return-Path: <bruce@callenish.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 6EDB03A6A60 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 09:50:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.586
X-Spam-Level: 
X-Spam-Status: No, score=-2.586 tagged_above=-999 required=5 tests=[AWL=0.013,  BAYES_00=-2.599]
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 Of578amkHc39 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 09:50:03 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 77CB33A69B7 for <hybi@ietf.org>; Wed, 12 Jan 2011 09:50:03 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pd4ru-0007Wb-Gw for hybi@ietf.org; Wed, 12 Jan 2011 09:52:22 -0800
Message-ID: <4D2DEA53.6080901@callenish.com>
Date: Wed, 12 Jan 2011 09:52:19 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
In-Reply-To: <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 17:50:05 -0000

On 11/01/2011 8:50 PM, Maciej Stachowiak wrote:
> We really have three options being considered, not two. Here are the pros and cons:
>
> 1) XOR using a mask entirely in the frame.
>
> Pro:
> - Fastest option.
> - No per-connection state.
> - Trivial to implement by hand.
>
> Con:
> - Does not provide protection in the "use HTTP to attack a WebSocket server" scenario.
> - Creates obvious correlations between bytes in messages. This makes security analysis weaker.
>

As I said in another thread, the con about protecting against an HTTP 
attack requires the feature that the mask is influenced by the server 
nonce. But that can be done by generating the mask of the first frame 
based on the server nonce. Or, if you prefer, to combine the client 
nonce and the server nonce. Make it a requirement in the spec that the 
server check the frame key of the first frame to ensure it is so influenced.

The downside to this approach is that you lose the ability to force the 
server to check that the mask is influenced by the server nonce. You 
could use another method to force that check if it was truly needed, but 
doing so would introduce a bit more complexity so if it could be avoided 
altogether it would be best. The upside is that people can decode 
streams without having to be capturing them from the beginning. To me, 
that is a huge benefit that outweighs the small but real cost.

Yes, you do lose a bit on the abstract security guarantees. But as I 
said, I'll take a concrete benefit over an abstract cost every time.

> 2) XOR using a mask computed using HMAC from server and client nonces and a per-frame key
>
> Pro:
> - Provides protection in the "use HTTP to attack a WebSocket server" scenario.
> - Widely available in popular libraries (but you have to implement the XOR part yourself).
>
> Con:
> - Slowest option.
> - Requires a small amount of per-connection state to decode.
> - Creates somewhat less obvious correlations between bytes in messages. This makes security analysis weaker.
>

It is not the amount of state that it is the problem, it is the timing 
of it. Since the state is only transmitted at the beginning of the 
connection, you lose the ability to capture anything once the connection 
is created. This is a pain point.

> 3) AES-CTR, using a key computed using HMAC from client and server nonces and random counter per frame
>
> Pro:
> - Makes output indistinguishable from random. This has the best provable security properties.
> - Provides protection in the "use HTTP to attack a WebSocket server" scenario.
> - Second-fastest option.
> - Widely available in popular libraries.
>
> Con:
> - Requires a small amount of per-connection state to decode.
> - Uses a crypto algorithm, though for non-crypto purposes; may be subject to export regulations.
>

I think you forgot the con - "Not universally available in all languages 
in a library". To me, that is pretty big one. It is going to slow 
adoption of Websockets if the barrier to entry is having a fully 
functional AES-CTR implementation available.

> I consider #1 a nonstarter, because it does not defend against all the threat models that masking can help with. Between 2 and 3, 3 is clearly technically superior. The only argument against it, relative to #2, is the non-technical argument from export regulations.
>

I think it is wrong to rule out a requirement on the basis that it is 
non-technical. Lots of requirements are non-technical. The issue of 
export regulations falls under the rubric of the requirement to keep 
barriers to adoption of Websockets as low as possible. Export 
regulations can impinge on that requirement.

Imagine if export regulations in all countries required that every 
company pay hundreds of thousands of dollars to export any AES-CTR 
application. Would you still claim that it was a "non-technical argument"?


From mjs@apple.com  Wed Jan 12 11:26:39 2011
Return-Path: <mjs@apple.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 38C283A6A7E for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 11:26:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.52
X-Spam-Level: 
X-Spam-Status: No, score=-106.52 tagged_above=-999 required=5 tests=[AWL=0.079, BAYES_00=-2.599, 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 fEnE-KOpyXjQ for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 11:26:37 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id E7E823A6A80 for <hybi@ietf.org>; Wed, 12 Jan 2011 11:26:36 -0800 (PST)
Received: from relay16.apple.com (relay16.apple.com [17.128.113.55]) by mail-out3.apple.com (Postfix) with ESMTP id EE2AFC6B4CCB for <hybi@ietf.org>; Wed, 12 Jan 2011 11:28:56 -0800 (PST)
X-AuditID: 11807137-b7bfaae000004d31-e9-4d2e00f87deb
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay16.apple.com (Apple SCV relay) with SMTP id DC.52.19761.8F00E2D4; Wed, 12 Jan 2011 11:28:56 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.98.78] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEX00L1PCRZOL30@gertie.apple.com> for hybi@ietf.org; Wed, 12 Jan 2011 11:28:56 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D2DEA53.6080901@callenish.com>
Date: Wed, 12 Jan 2011 11:28:47 -0800
Message-id: <343AAA15-A0A1-4326-947F-6853F521350A@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com>
To: Bruce Atherton <bruce@callenish.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 19:26:39 -0000

On Jan 12, 2011, at 9:52 AM, Bruce Atherton wrote:

> On 11/01/2011 8:50 PM, Maciej Stachowiak wrote:
>> We really have three options being considered, not two. Here are the pros and cons:
>> 
>> 1) XOR using a mask entirely in the frame.
>> 
>> Pro:
>> - Fastest option.
>> - No per-connection state.
>> - Trivial to implement by hand.
>> 
>> Con:
>> - Does not provide protection in the "use HTTP to attack a WebSocket server" scenario.
>> - Creates obvious correlations between bytes in messages. This makes security analysis weaker.
>> 
> 
> As I said in another thread, the con about protecting against an HTTP attack requires the feature that the mask is influenced by the server nonce. But that can be done by generating the mask of the first frame based on the server nonce. Or, if you prefer, to combine the client nonce and the server nonce. Make it a requirement in the spec that the server check the frame key of the first frame to ensure it is so influenced.

How are you supposed to check that the client nonce was "influenced" by the server nonce, when the client nonce is random and mixed with the server nonce using a one-way hash, when you only get the output and not the client nonce? Your suggestion is mathematically impossible.

> 
> The downside to this approach is that you lose the ability to force the server to check that the mask is influenced by the server nonce. You could use another method to force that check if it was truly needed, but doing so would introduce a bit more complexity so if it could be avoided altogether it would be best. The upside is that people can decode streams without having to be capturing them from the beginning. To me, that is a huge benefit that outweighs the small but real cost.
> 
> Yes, you do lose a bit on the abstract security guarantees. But as I said, I'll take a concrete benefit over an abstract cost every time.

I think your suggestion removes all the benefit from using the server nonce as part of the masking key. You need to send the raw per-frame nonce but mask using a mix that includes the server key, to see any improvement.

> 
>> 2) XOR using a mask computed using HMAC from server and client nonces and a per-frame key
>> 
>> Pro:
>> - Provides protection in the "use HTTP to attack a WebSocket server" scenario.
>> - Widely available in popular libraries (but you have to implement the XOR part yourself).
>> 
>> Con:
>> - Slowest option.
>> - Requires a small amount of per-connection state to decode.
>> - Creates somewhat less obvious correlations between bytes in messages. This makes security analysis weaker.
>> 
> 
> It is not the amount of state that it is the problem, it is the timing of it. Since the state is only transmitted at the beginning of the connection, you lose the ability to capture anything once the connection is created. This is a pain point.

Sure, I understand that per-connection state is a downside even if there is not much of it. That is why I listed it as a "con".

> 
>> 3) AES-CTR, using a key computed using HMAC from client and server nonces and random counter per frame
>> 
>> Pro:
>> - Makes output indistinguishable from random. This has the best provable security properties.
>> - Provides protection in the "use HTTP to attack a WebSocket server" scenario.
>> - Second-fastest option.
>> - Widely available in popular libraries.
>> 
>> Con:
>> - Requires a small amount of per-connection state to decode.
>> - Uses a crypto algorithm, though for non-crypto purposes; may be subject to export regulations.
>> 
> 
> I think you forgot the con - "Not universally available in all languages in a library". To me, that is pretty big one. It is going to slow adoption of Websockets if the barrier to entry is having a fully functional AES-CTR implementation available.

I think it's widely available enough that this is not a serious disadvantage, certainly not compared to HMAC.

> 
>> I consider #1 a nonstarter, because it does not defend against all the threat models that masking can help with. Between 2 and 3, 3 is clearly technically superior. The only argument against it, relative to #2, is the non-technical argument from export regulations.
>> 
> 
> I think it is wrong to rule out a requirement on the basis that it is non-technical. Lots of requirements are non-technical. The issue of export regulations falls under the rubric of the requirement to keep barriers to adoption of Websockets as low as possible. Export regulations can impinge on that requirement.
> 
> Imagine if export regulations in all countries required that every company pay hundreds of thousands of dollars to export any AES-CTR application. Would you still claim that it was a "non-technical argument"?

I didn't claim that non-technical arguments are ruled out. I'm just pointing out that the technical arguments all go the other way. I think it would not be in line with IETF best practices to make a technically inferior choice based on the restrictive legal regimes in some countries. But you are right that at some point policy issues could outweigh technical issues.

Regards,
Maciej




From jat@google.com  Wed Jan 12 11:37:50 2011
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 488C83A6B3B for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 11:37:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.624
X-Spam-Level: 
X-Spam-Status: No, score=-104.624 tagged_above=-999 required=5 tests=[AWL=-1.648, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 zMzkTloUQVGh for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 11:37: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 387A53A6AA7 for <hybi@ietf.org>; Wed, 12 Jan 2011 11:37:49 -0800 (PST)
Received: from kpbe13.cbf.corp.google.com (kpbe13.cbf.corp.google.com [172.25.105.77]) by smtp-out.google.com with ESMTP id p0CJe7Su003019 for <hybi@ietf.org>; Wed, 12 Jan 2011 11:40:08 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294861208; bh=abDmnn0NqjU10QI0ydL96G5XVoc=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=PQlBlY44tBXSzq6QvIsPH4xWnxdQB+9EvoFCKk/IryZXcF5jSCMD2kYK/jkJm+Yqd etEi2U2HyFv3S8/RECTTA==
Received: from yic24 (yic24.prod.google.com [10.243.65.152]) by kpbe13.cbf.corp.google.com with ESMTP id p0CJda1A004436 for <hybi@ietf.org>; Wed, 12 Jan 2011 11:40:01 -0800
Received: by yic24 with SMTP id 24so439298yic.11 for <hybi@ietf.org>; Wed, 12 Jan 2011 11:40:00 -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=pOXsRR/htT0UHiyc1RV8gPV8/sk7fNg/maccIUik6jU=; b=QGeJvR7hrlNYnsZ8oxuq+th+JIhOm10w4Jl9rp/AHTQziltpgL26UBpz2XAViOQV45 r1Wx3Ign3Sr0wwFAs+tg==
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=ZflBrg/5wlnLSUZKx2nAVLkvFI0tRJ0bheXpDwkLc6TIMjyPd5A14PlER3Lf58f/bT 9Ot8dT1z3NY+RQngwnoA==
Received: by 10.151.85.10 with SMTP id n10mr2439447ybl.206.1294861200548; Wed, 12 Jan 2011 11:40:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 12 Jan 2011 11:39:40 -0800 (PST)
In-Reply-To: <343AAA15-A0A1-4326-947F-6853F521350A@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com>
From: John Tamplin <jat@google.com>
Date: Wed, 12 Jan 2011 14:39:40 -0500
Message-ID: <AANLkTik-G0BYBj6fqabpRyfot7iAufQ9Df2yh5dOBUJq@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: multipart/alternative; boundary=000e0cd56944e466fb0499ab5de7
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 19:37:50 -0000

--000e0cd56944e466fb0499ab5de7
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 12, 2011 at 2:28 PM, Maciej Stachowiak <mjs@apple.com> wrote:

> How are you supposed to check that the client nonce was "influenced" by the
> server nonce, when the client nonce is random and mixed with the server
> nonce using a one-way hash, when you only get the output and not the client
> nonce? Your suggestion is mathematically impossible.
>

You could check that the server-nonce was used by the client only during the
handshake, such as in a Hello frame.  Wouldn't that still address your
concern, since pre-canned attack frames could only be used once a connection
was successfully established?

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

--000e0cd56944e466fb0499ab5de7
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 12, 2011 at 2:28 PM, Maciej Stachowi=
ak <span dir=3D"ltr">&lt;<a href=3D"mailto:mjs@apple.com">mjs@apple.com</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">How are you supposed to check that the client nonce was &=
quot;influenced&quot; by the server nonce, when the client nonce is random =
and mixed with the server nonce using a one-way hash, when you only get the=
 output and not the client nonce? Your suggestion is mathematically impossi=
ble.</div>

</blockquote><div><br></div><div>You could check that the server-nonce was =
used by the client only during the handshake, such as in a Hello frame. =C2=
=A0Wouldn&#39;t that still address your concern, since pre-canned attack fr=
ames could only be used once a connection was successfully established?</di=
v>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--000e0cd56944e466fb0499ab5de7--

From bruce@callenish.com  Wed Jan 12 11:41:52 2011
Return-Path: <bruce@callenish.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 942293A6A84 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 11:41:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.586
X-Spam-Level: 
X-Spam-Status: No, score=-2.586 tagged_above=-999 required=5 tests=[AWL=0.013,  BAYES_00=-2.599]
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 emjCmsXEuPpy for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 11:41:51 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id C7F6C3A6A4C for <hybi@ietf.org>; Wed, 12 Jan 2011 11:41:51 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pd6c7-0007jA-64 for hybi@ietf.org; Wed, 12 Jan 2011 11:44:11 -0800
Message-ID: <4D2E048B.1070604@callenish.com>
Date: Wed, 12 Jan 2011 11:44:11 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <20110112064559.GE21915@1wt.eu>
In-Reply-To: <20110112064559.GE21915@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 19:41:52 -0000

On 11/01/2011 10:45 PM, Willy Tarreau wrote:
> On Tue, Jan 11, 2011 at 08:50:23PM -0800, Maciej Stachowiak wrote:
>> Con:
>> - Does not provide protection in the "use HTTP to attack a WebSocket server" scenario.
> This one is not related at all. If you can manipulate your crypto API to send
> the Sec-* headers and manipulate the stream, then you have all is needed to
> build a valid WS client and nothing blocks you from using the other algos as
> well.

I agree, and being unable to send valid Sec- headers from a 
browser-based Javascript implementation of Websockets seems more secure 
to me than relying on masking.

It is true that in Maciej's HTTP attack, my understanding is that the 
server nonce cannot be retrieved directly from the response according to 
http://dev.w3.org/2006/waf/access-control/#simple-response-header. But 
assuming it can't be obtained in some other way seems far riskier than 
simply stopping required headers in the request from being present.

OTOH, I don't think that allowing the server nonce to influence the mask 
is that much of a hardship, so long as the mask is still the frame key.

> Also, the Sec-* headers were used for that purpose, so if you think they're
> useless here, it should be raised as a separate concern, maybe we should get
> rid of them then (though I think they're cheap).

I have to admit, I wonder about that too. What is insecure about denying 
the ability to use Sec-* headers in the request? What should we be 
concerned about?


From salvatore.loreto@ericsson.com  Wed Jan 12 11:58:19 2011
Return-Path: <salvatore.loreto@ericsson.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 ED6A03A69A4 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 11:58:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.537
X-Spam-Level: 
X-Spam-Status: No, score=-106.537 tagged_above=-999 required=5 tests=[AWL=0.062, BAYES_00=-2.599, 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 C-E1HxY6j5g5 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 11:58:17 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 549263A6A8B for <hybi@ietf.org>; Wed, 12 Jan 2011 11:58:17 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-f2-4d2e0864aaf1
Received: from esessmw0197.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id F4.7F.13987.4680E2D4; Wed, 12 Jan 2011 21:00:36 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0197.eemea.ericsson.se (153.88.115.88) with Microsoft SMTP Server id 8.2.234.1; Wed, 12 Jan 2011 21:00:36 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 4933C2533; Wed, 12 Jan 2011 22:00:36 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 1300C50573; Wed, 12 Jan 2011 22:00:36 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 7D1E350127; Wed, 12 Jan 2011 22:00:35 +0200 (EET)
Message-ID: <4D2E0863.2040804@ericsson.com>
Date: Wed, 12 Jan 2011 21:00:35 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>
Subject: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 19:58:19 -0000

Hi all,


Masking from the client to the server
has reached strong consensus within this wg as a mechanism to reduce 
security risks.

However there is disagreement on the actual method for masking.
The technical differences, pro and cons, advantages and disadvantages,
as well as the legal implications of each method have already been 
deeply discussed.

In order to settle the question of masking and find a way forward that 
has a wide acceptance,
Joe and I, as HyBi chairs, want to check where the consensus is
on the following relevant options that have been discussed (and 
summarized at
some point in the mailing list by Eric Rescorla)


1. a fixed mask carried entirely in the packet.

2. A longish repeated mask computed from the packet. For concreteness,
    suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> || 
<packet-key>), but
    obviously there's flexibility here.

3. A fully generated mask (if so specify also what you would like to use 
e.g. AES-CTR or HMAC-SHA).


Please indicate your preference(s) or the one can meet your bar for "I 
could live with that";
In the case you have more then one, please put the choices in a 
preference order.

This poll will run until January 18th.

cheers
/Sal

-- 
Salvatore Loreto
www.sloreto.com


From mjs@apple.com  Wed Jan 12 12:03:21 2011
Return-Path: <mjs@apple.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 B20433A69A4 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 12:03:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.523
X-Spam-Level: 
X-Spam-Status: No, score=-106.523 tagged_above=-999 required=5 tests=[AWL=0.075, BAYES_00=-2.599, 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 0Nsd-WkeoY1C for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 12:03:20 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id F360A3A6A82 for <hybi@ietf.org>; Wed, 12 Jan 2011 12:03:19 -0800 (PST)
Received: from relay16.apple.com (relay16.apple.com [17.128.113.55]) by mail-out3.apple.com (Postfix) with ESMTP id 69106C6B7121 for <hybi@ietf.org>; Wed, 12 Jan 2011 12:05:40 -0800 (PST)
X-AuditID: 11807137-b7bfaae000004d31-8b-4d2e09946418
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay16.apple.com (Apple SCV relay) with SMTP id BF.1E.19761.4990E2D4; Wed, 12 Jan 2011 12:05:40 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_MUl1n0ut8O+GviYYNN3HyQ)"
Received: from [17.153.50.212] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEX0020VEHFWU50@et.apple.com> for hybi@ietf.org; Wed, 12 Jan 2011 12:05:40 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTik-G0BYBj6fqabpRyfot7iAufQ9Df2yh5dOBUJq@mail.gmail.com>
Date: Wed, 12 Jan 2011 12:05:36 -0800
Message-id: <A6C1B68A-BF42-4B9D-8434-BF6F070093DD@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com> <AANLkTik-G0BYBj6fqabpRyfot7iAufQ9Df2yh5dOBUJq@mail.gmail.com>
To: John Tamplin <jat@google.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 20:03:21 -0000

--Boundary_(ID_MUl1n0ut8O+GviYYNN3HyQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 12, 2011, at 11:39 AM, John Tamplin wrote:

> On Wed, Jan 12, 2011 at 2:28 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> How are you supposed to check that the client nonce was "influenced" by the server nonce, when the client nonce is random and mixed with the server nonce using a one-way hash, when you only get the output and not the client nonce? Your suggestion is mathematically impossible.
> 
> You could check that the server-nonce was used by the client only during the handshake, such as in a Hello frame.  Wouldn't that still address your concern, since pre-canned attack frames could only be used once a connection was successfully established?

Your description doesn't have enough detail for me to evaluate it. In what way would the server nonce be used during the handshake, and in what way do you check it?

Regards,
Maciej


--Boundary_(ID_MUl1n0ut8O+GviYYNN3HyQ)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 12, 2011, at 11:39 AM, John Tamplin wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Wed, Jan 12, 2011 at 2:28 PM, Maciej Stachowiak <span dir="ltr">&lt;<a href="mailto:mjs@apple.com">mjs@apple.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">How are you supposed to check that the client nonce was "influenced" by the server nonce, when the client nonce is random and mixed with the server nonce using a one-way hash, when you only get the output and not the client nonce? Your suggestion is mathematically impossible.</div>

</blockquote><div><br></div><div>You could check that the server-nonce was used by the client only during the handshake, such as in a Hello frame. &nbsp;Wouldn't that still address your concern, since pre-canned attack frames could only be used once a connection was successfully established?</div>

</div></blockquote></div><br><div>Your description doesn't have enough detail for me to evaluate it. In what way would the server nonce be used during the handshake, and in what way do you check it?</div><div><br></div><div>Regards,</div><div>Maciej</div><div><br></div></body></html>

--Boundary_(ID_MUl1n0ut8O+GviYYNN3HyQ)--

From jat@google.com  Wed Jan 12 12:06:11 2011
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 DC64728C0F6 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 12:06:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.81
X-Spam-Level: 
X-Spam-Status: No, score=-103.81 tagged_above=-999 required=5 tests=[AWL=-0.834, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 xPRv+uSe-ct9 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 12:06:10 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 6CC9428C0EA for <hybi@ietf.org>; Wed, 12 Jan 2011 12:06:10 -0800 (PST)
Received: from hpaq13.eem.corp.google.com (hpaq13.eem.corp.google.com [172.25.149.13]) by smtp-out.google.com with ESMTP id p0CK8UMQ000521 for <hybi@ietf.org>; Wed, 12 Jan 2011 12:08:30 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294862910; bh=AgtIh1vng5n1R/LsgfugIMpfpwA=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=bF2yk8TvusV7eLqmaCmrcNKA55twP8Z3cPQ2XTFwQl+WAWIWCQrQSY1Un+rcJi6Bt ow1rlfNaNwRB6OXWsRkRg==
Received: from ywo7 (ywo7.prod.google.com [10.192.15.7]) by hpaq13.eem.corp.google.com with ESMTP id p0CK8Qhr018437 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Wed, 12 Jan 2011 12:08:27 -0800
Received: by ywo7 with SMTP id 7so444756ywo.7 for <hybi@ietf.org>; Wed, 12 Jan 2011 12:08:26 -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=SVVPa8hxJMaAPc3z9siCVNju+ct7TMRbMIytoY09S+8=; b=SFph1+IYpPeXi5oLv1Gy/VLDP7N7PzjGiHYkvhb3ro5fsskfPPwZWXo1CLazk1Jpdl 8fLAFJ/KvIBaLCn6WNhA==
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=PqrbH6zgRAOEeTrUnEpH/oRSh9XGK84CVzHZnbUUjNbN+vPuplJbceG+7X14AX/+Ie 1kfgq3hQiLC848A43aww==
Received: by 10.151.158.12 with SMTP id k12mr2459376ybo.377.1294862906518; Wed, 12 Jan 2011 12:08:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 12 Jan 2011 12:08:06 -0800 (PST)
In-Reply-To: <4D2E0863.2040804@ericsson.com>
References: <4D2E0863.2040804@ericsson.com>
From: John Tamplin <jat@google.com>
Date: Wed, 12 Jan 2011 15:08:06 -0500
Message-ID: <AANLkTimCafVsOs4t96_jK0F2rTa34GgJLEBHOrC7D_Zn@mail.gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: multipart/alternative; boundary=00151750dd42937a8a0499abc377
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 20:06:12 -0000

--00151750dd42937a8a0499abc377
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 12, 2011 at 3:00 PM, Salvatore Loreto <
salvatore.loreto@ericsson.com> wrote:

> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce
> security risks.
>
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been deeply
> discussed.
>
> In order to settle the question of masking and find a way forward that has
> a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and summarized
> at
> some point in the mailing list by Eric Rescorla)
>
>
> 1. a fixed mask carried entirely in the packet.
>
> 2. A longish repeated mask computed from the packet. For concreteness,
>   suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> <packet-key>), but
>   obviously there's flexibility here.
>

I assume one operation per frame to generate a mask, and then do the same as
in #1?


> 3. A fully generated mask (if so specify also what you would like to use
> e.g. AES-CTR or HMAC-SHA).
>
> Please indicate your preference(s) or the one can meet your bar for "I
> could live with that";
> In the case you have more then one, please put the choices in a preference
> order.
>

Any of the above are fine with me personally.

I prefer the minimum overhead to satisfy all participants, so my order would
be #1, #2, #3.  In the case of #3, I prefer fewer external dependencies and
export issues, so I would prefer to avoid AES though if it is a lot faster
than HMAC-SHA1 then I could be persuaded.

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

--00151750dd42937a8a0499abc377
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 12, 2011 at 3:00 PM, Salvatore Loret=
o <span dir=3D"ltr">&lt;<a href=3D"mailto:salvatore.loreto@ericsson.com">sa=
lvatore.loreto@ericsson.com</a>&gt;</span> wrote:<br><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex;">

Masking from the client to the server<br>
has reached strong consensus within this wg as a mechanism to reduce securi=
ty risks.<br>
<br>
However there is disagreement on the actual method for masking.<br>
The technical differences, pro and cons, advantages and disadvantages,<br>
as well as the legal implications of each method have already been deeply d=
iscussed.<br>
<br>
In order to settle the question of masking and find a way forward that has =
a wide acceptance,<br>
Joe and I, as HyBi chairs, want to check where the consensus is<br>
on the following relevant options that have been discussed (and summarized =
at<br>
some point in the mailing list by Eric Rescorla)<br>
<br>
<br>
1. a fixed mask carried entirely in the packet.<br>
<br>
2. A longish repeated mask computed from the packet. For concreteness,<br>
 =C2=A0 suppose HMAC-SHA1(&lt;uuid&gt;, &lt;server-conn-key&gt; || &lt;clie=
nt-conn-key&gt; || &lt;packet-key&gt;), but<br>
 =C2=A0 obviously there&#39;s flexibility here.<br></blockquote><div><br></=
div><div>I assume one operation per frame to generate a mask, and then do t=
he same as in #1?</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


3. A fully generated mask (if so specify also what you would like to use e.=
g. AES-CTR or HMAC-SHA).<br>
<br>
Please indicate your preference(s) or the one can meet your bar for &quot;I=
 could live with that&quot;;<br>
In the case you have more then one, please put the choices in a preference =
order.<br></blockquote><div><br></div><div>Any of the above are fine with m=
e personally.</div><div><br></div><div>I prefer the minimum overhead to sat=
isfy all participants, so my order would be #1, #2, #3. =C2=A0In the case o=
f #3, I prefer fewer external dependencies and export issues, so I would pr=
efer to avoid AES though if it is a lot faster than HMAC-SHA1 then I could =
be persuaded.</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--00151750dd42937a8a0499abc377--

From buskanaka@gmail.com  Wed Jan 12 12:18:22 2011
Return-Path: <buskanaka@gmail.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 1EA203A69C5 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 12:18:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level: 
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 91yQ5xCBFCQ1 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 12:18:21 -0800 (PST)
Received: from mail-ew0-f44.google.com (mail-ew0-f44.google.com [209.85.215.44]) by core3.amsl.com (Postfix) with ESMTP id A4BF13A6A8B for <hybi@ietf.org>; Wed, 12 Jan 2011 12:18:20 -0800 (PST)
Received: by ewy8 with SMTP id 8so532506ewy.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 12:20:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type; bh=s+xbTfTH9pECE6SoLW4ZPqMEllDtFZq2xLysBkHBjRY=; b=fmlEWzbOFWPmK7tkIIX5LW2FalC+9WHoi4Wga8Y5WZvEBvIwFo7ge3pDrGhisLmt61 2TSr+ia7zgQEJyrlBIuH/TKD2/uwywqInYq1wiaxE9Q4En5Ny5GnWy1NxxMK8s0w2ZT5 zYytUHcfuiNvieHeut+hX8ecOT2rIidtN6JBc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=ubUleZQV03I+p0zpf8Dh81EV6V7h7jU1c5D7XTzQOzU7emk0TwMJ0BXZtkp9ILkpjt t96u/4HftdGp4gHs2PJIvwebY415W7P2anTwAdSXKstrIfh/Q9CUvhsZQpsZv7CLDhmO 0f2WRHozq5J6V/BN0UGW2o3mK0KGYqkSAxPWk=
Received: by 10.14.47.140 with SMTP id t12mr1093645eeb.19.1294863640179; Wed, 12 Jan 2011 12:20:40 -0800 (PST)
MIME-Version: 1.0
Sender: buskanaka@gmail.com
Received: by 10.14.48.71 with HTTP; Wed, 12 Jan 2011 12:20:20 -0800 (PST)
In-Reply-To: <AANLkTinpcQE4KzcMusz2DxkjChGEXE8KyXK0Q8MhbuDx@mail.gmail.com>
References: <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <20110112064559.GE21915@1wt.eu> <4D2E048B.1070604@callenish.com> <AANLkTinpcQE4KzcMusz2DxkjChGEXE8KyXK0Q8MhbuDx@mail.gmail.com>
From: Joel Martin <hybi@martintribe.org>
Date: Wed, 12 Jan 2011 14:20:20 -0600
X-Google-Sender-Auth: 1N7GTzfV2YZG6VB5LQWEJrLCBt8
Message-ID: <AANLkTimx2ib_kAbBdjMJChGG75ZARwX-BnxTw9h9=Lfj@mail.gmail.com>
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: multipart/alternative; boundary=90e6ba6152684e33dd0499abef6d
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 20:19:30 -0000

--90e6ba6152684e33dd0499abef6d
Content-Type: text/plain; charset=ISO-8859-1

>
> Bruce Atherton wrote:
> I think you forgot the con - "Not universally available in all languages in
> a library". To me, that is pretty big one. It is going to slow adoption of
> Websockets if the barrier to entry is having a fully functional AES-CTR
> implementation available.
>

+1

>
As a maintainer of both client (web-socket-js:
https://github.com/gimite/web-socket-js) and server (wsproxy:
https://github.com/kanaka/noVNC/tree/master/utils) Websockets
implementations, AES-CTR will certainly be a hassle both technically and due
to the legal uncertainty it adds. I think AES-CTR needs to be compelling for
the friction it will add.

>
Joel Martin

--90e6ba6152684e33dd0499abef6d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Bruce Atherton wr=
ote:=A0
<br>I think you forgot the con - &quot;Not universally available in all lan=
guages in a library&quot;. To me, that is pretty big one. It is going to sl=
ow adoption of Websockets if the barrier to entry is having a fully functio=
nal AES-CTR implementation available.<br>


</blockquote><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex">
</blockquote><br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>+1<br><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s=
olid;padding-left:1ex">


</blockquote><br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>As a maintaine=
r of both client (web-socket-js: <a href=3D"https://github.com/gimite/web-s=
ocket-js" target=3D"_blank">https://github.com/gimite/web-socket-js</a>) an=
d server (wsproxy: <a href=3D"https://github.com/kanaka/noVNC/tree/master/u=
tils" target=3D"_blank">https://github.com/kanaka/noVNC/tree/master/utils</=
a>) Websockets implementations, AES-CTR will certainly be a hassle both tec=
hnically and due to the legal uncertainty it adds. I think AES-CTR needs to=
 be compelling for the friction it will add.<br>


<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
</blockquote><br><font color=3D"#888888"><div>Joel Martin</div>
</font></div><br>

--90e6ba6152684e33dd0499abef6d--

From derhoermi@gmx.net  Wed Jan 12 12:26:15 2011
Return-Path: <derhoermi@gmx.net>
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 784213A69CA for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 12:26:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.556
X-Spam-Level: 
X-Spam-Status: No, score=-3.556 tagged_above=-999 required=5 tests=[AWL=-0.957, BAYES_00=-2.599]
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 ll5h1otHo0L7 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 12:26:14 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id B953B3A69A4 for <hybi@ietf.org>; Wed, 12 Jan 2011 12:26:13 -0800 (PST)
Received: (qmail invoked by alias); 12 Jan 2011 20:28:32 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp032) with SMTP; 12 Jan 2011 21:28:32 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1+8cpIsj/e8Vq6NlqxPaqN4CAmPyvZp8N1f0dhwB0 e32qW5+ES4wTm8
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Adam Barth <ietf@adambarth.com>
Date: Wed, 12 Jan 2011 21:28:28 +0100
Message-ID: <sk1si6dvl4s1lmroa5qdt0ra2erd5066ri@hive.bjoern.hoehrmann.de>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>
In-Reply-To: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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, 12 Jan 2011 20:26:15 -0000

* Adam Barth wrote:
>http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt

This says:

  The masked-data is the clear-text frame encrypted under AES-128-CTR
  (see [TODO: Cite AES-128-CTR]) using the masking-key as the key and
  the initial counter value equal to the masking-nonce followed by 28
  zero octets.

  For example, octet i of the masked-data is computed from octet i of
  the clear-text frame as follows:

    initial-counter = masking-nonce << 96
    masked-octet-i = clear-text-octet-i XOR AES_k(initial-counter + i)

  where AES_k is AES keyed with the masking-key.

Could you give a reference for AES-128-CTR and explain the example?
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From jat@google.com  Wed Jan 12 13:00:24 2011
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 3C1193A6A93 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:00:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.601
X-Spam-Level: 
X-Spam-Status: No, score=-104.601 tagged_above=-999 required=5 tests=[AWL=-1.625, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 8CJ47xyAEJzY for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:00:23 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 6AAB53A6A82 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:00:21 -0800 (PST)
Received: from kpbe17.cbf.corp.google.com (kpbe17.cbf.corp.google.com [172.25.105.81]) by smtp-out.google.com with ESMTP id p0CL2ejE015992 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:02:40 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294866160; bh=M1s3E6IO4E01VbE7ZDAwugKbAVE=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=GyCyG/g+O2KYjdY3WNEzg2B56BWvRkgRgp6hx8Pf/3D4rgWGKtVkhkUNr4x2CfmYS 6lmQILpo0jPUboCjnYgeA==
Received: from yie19 (yie19.prod.google.com [10.243.66.19]) by kpbe17.cbf.corp.google.com with ESMTP id p0CL2K5h032551 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:02:38 -0800
Received: by yie19 with SMTP id 19so445129yie.41 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:02:38 -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=EfOGaqKv/Jp80ja+L6BstWyr1y2TKr5DW69VnU17gkc=; b=dAdQRk1txAmXuxd7Ch//eZlvNsDiwQ6cD1vs4ok4MFg8znDbJR5ma9tRYfQqiNgIlO KeqJay8FPTjxvVH70sPA==
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=rglTJyok+Aq4K5UyH7qB3NNSV+GPN2jP/zSJjMgx2h5mBrnfpuYzSF/4XC1OPakoJZ l6dD3HJOS9SAnaoxi+qQ==
Received: by 10.151.85.10 with SMTP id n10mr2567019ybl.206.1294866158213; Wed, 12 Jan 2011 13:02:38 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 12 Jan 2011 13:02:18 -0800 (PST)
In-Reply-To: <A6C1B68A-BF42-4B9D-8434-BF6F070093DD@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com> <AANLkTik-G0BYBj6fqabpRyfot7iAufQ9Df2yh5dOBUJq@mail.gmail.com> <A6C1B68A-BF42-4B9D-8434-BF6F070093DD@apple.com>
From: John Tamplin <jat@google.com>
Date: Wed, 12 Jan 2011 16:02:18 -0500
Message-ID: <AANLkTi=NMZmqyTUqxhhm=+_mpq+O49NJ1UTN62vLx2HR@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: multipart/alternative; boundary=000e0cd56944645c5d0499ac851b
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 21:00:24 -0000

--000e0cd56944645c5d0499ac851b
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 12, 2011 at 3:05 PM, Maciej Stachowiak <mjs@apple.com> wrote:

> Your description doesn't have enough detail for me to evaluate it. In what
> way would the server nonce be used during the handshake, and in what way do
> you check it?
>

If we were to have Hello frames as have been suggested, in the client's
Hello frame it includes a value computed from the server's nonce.  The
server verifies that value to verify that the client processed it.

Granted, a lazy server implementor could skip that step.  But, we discarded
the amateur programmer requirement long ago, and you could equally say that
a lazy client could just use the same masking key every time, which would be
more damaging to secure operations.

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

--000e0cd56944645c5d0499ac851b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 12, 2011 at 3:05 PM, Maciej Stachowi=
ak <span dir=3D"ltr">&lt;<a href=3D"mailto:mjs@apple.com">mjs@apple.com</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style=3D"word-wrap:break-word"><div><div></div><div class=3D"h5">Your =
description doesn&#39;t have enough detail for me to evaluate it. In what w=
ay would the server nonce be used during the handshake, and in what way do =
you check it?</div>

</div></div></blockquote></div><div><br></div>If we were to have Hello fram=
es as have been suggested, in the client&#39;s Hello frame it includes a va=
lue computed from the server&#39;s nonce. =C2=A0The server verifies that va=
lue to verify that the client processed it.<div>

<br></div><div>Granted, a lazy server implementor could skip that step. =C2=
=A0But, we discarded the amateur programmer requirement long ago, and you c=
ould equally say that a lazy client could just use the same masking key eve=
ry time, which would be more damaging to secure operations.<br clear=3D"all=
">

<br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>
</div>

--000e0cd56944645c5d0499ac851b--

From ietf@adambarth.com  Wed Jan 12 13:13:30 2011
Return-Path: <ietf@adambarth.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 17E4F3A6AA0 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:13:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.856
X-Spam-Level: 
X-Spam-Status: No, score=-3.856 tagged_above=-999 required=5 tests=[AWL=-0.879, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 0DTpQmUjhsmi for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:13:29 -0800 (PST)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by core3.amsl.com (Postfix) with ESMTP id BBDC33A6A91 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:13:28 -0800 (PST)
Received: by fxm9 with SMTP id 9so1070785fxm.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:15:48 -0800 (PST)
Received: by 10.223.96.202 with SMTP id i10mr1514319fan.50.1294866948500; Wed, 12 Jan 2011 13:15:48 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id b7sm401846faa.42.2011.01.12.13.15.46 (version=SSLv3 cipher=RC4-MD5); Wed, 12 Jan 2011 13:15:46 -0800 (PST)
Received: by iyi42 with SMTP id 42so998612iyi.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:15:45 -0800 (PST)
Received: by 10.231.156.1 with SMTP id u1mr1588232ibw.52.1294866945240; Wed, 12 Jan 2011 13:15:45 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Wed, 12 Jan 2011 13:15:15 -0800 (PST)
In-Reply-To: <sk1si6dvl4s1lmroa5qdt0ra2erd5066ri@hive.bjoern.hoehrmann.de>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <sk1si6dvl4s1lmroa5qdt0ra2erd5066ri@hive.bjoern.hoehrmann.de>
From: Adam Barth <ietf@adambarth.com>
Date: Wed, 12 Jan 2011 13:15:15 -0800
Message-ID: <AANLkTinBZeMoTLUjPUxjixB7sfhJ4yeHi3REk=oz76FC@mail.gmail.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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, 12 Jan 2011 21:13:30 -0000

On Wed, Jan 12, 2011 at 12:28 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrot=
e:
> * Adam Barth wrote:
>>http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
>
> This says:
>
> =A0The masked-data is the clear-text frame encrypted under AES-128-CTR
> =A0(see [TODO: Cite AES-128-CTR]) using the masking-key as the key and
> =A0the initial counter value equal to the masking-nonce followed by 28
> =A0zero octets.
>
> =A0For example, octet i of the masked-data is computed from octet i of
> =A0the clear-text frame as follows:
>
> =A0 =A0initial-counter =3D masking-nonce << 96
> =A0 =A0masked-octet-i =3D clear-text-octet-i XOR AES_k(initial-counter + =
i)
>
> =A0where AES_k is AES keyed with the masking-key.
>
> Could you give a reference for AES-128-CTR and explain the example?

Here's an example RFC that uses AES-128-CTR

http://www.ietf.org/rfc/rfc4344.txt

I believe it's technically defined by combining
http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf and
http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf, the
later of which contains test vectors.  (Careful readers will notice
that my example is wrong.)

Adam

From ietf@adambarth.com  Wed Jan 12 13:20:57 2011
Return-Path: <ietf@adambarth.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 DF7B03A69C5 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:20:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.85
X-Spam-Level: 
X-Spam-Status: No, score=-3.85 tagged_above=-999 required=5 tests=[AWL=-0.873,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 jIHI4Dt8-8zc for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:20:55 -0800 (PST)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by core3.amsl.com (Postfix) with ESMTP id D48133A6774 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:20:54 -0800 (PST)
Received: by fxm9 with SMTP id 9so1077492fxm.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:23:14 -0800 (PST)
Received: by 10.223.93.140 with SMTP id v12mr1517765fam.96.1294867394526; Wed, 12 Jan 2011 13:23:14 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id r24sm407321fax.3.2011.01.12.13.23.13 (version=SSLv3 cipher=RC4-MD5); Wed, 12 Jan 2011 13:23:13 -0800 (PST)
Received: by iyi42 with SMTP id 42so1005443iyi.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:23:12 -0800 (PST)
Received: by 10.231.192.7 with SMTP id do7mr1570092ibb.102.1294867392045; Wed, 12 Jan 2011 13:23:12 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Wed, 12 Jan 2011 13:22:41 -0800 (PST)
In-Reply-To: <4D2E0863.2040804@ericsson.com>
References: <4D2E0863.2040804@ericsson.com>
From: Adam Barth <ietf@adambarth.com>
Date: Wed, 12 Jan 2011 13:22:41 -0800
Message-ID: <AANLkTi=Jtu+6E8OSqGVQZErTeW35v9_jrc4SfA-Y9QSs@mail.gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 21:20:58 -0000

On Wed, Jan 12, 2011 at 12:00 PM, Salvatore Loreto
<salvatore.loreto@ericsson.com> wrote:
> Hi all,
>
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce
> security risks.
>
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been deeply
> discussed.
>
> In order to settle the question of masking and find a way forward that ha=
s a
> wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and summarize=
d
> at
> some point in the mailing list by Eric Rescorla)
>
> 1. a fixed mask carried entirely in the packet.
>
> 2. A longish repeated mask computed from the packet. For concreteness,
> =A0 suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> <packet-key>), but
> =A0 obviously there's flexibility here.

This option is ok, but less than ideal.

> 3. A fully generated mask (if so specify also what you would like to use
> e.g. AES-CTR or HMAC-SHA).

This is the best option.

> Please indicate your preference(s) or the one can meet your bar for "I co=
uld
> live with that";
> In the case you have more then one, please put the choices in a preferenc=
e
> order.
>
> This poll will run until January 18th.
>
> cheers
> /Sal
>
> --
> Salvatore Loreto
> www.sloreto.com
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From w@1wt.eu  Wed Jan 12 13:39:57 2011
Return-Path: <w@1wt.eu>
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 BE8123A67B0 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:39:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.075
X-Spam-Level: 
X-Spam-Status: No, score=-2.075 tagged_above=-999 required=5 tests=[AWL=-0.032, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 5do8EFKRNP6e for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:39:56 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 906403A63CB for <hybi@ietf.org>; Wed, 12 Jan 2011 13:39:55 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0CLgB6I027900; Wed, 12 Jan 2011 22:42:11 +0100
Date: Wed, 12 Jan 2011 22:42:11 +0100
From: Willy Tarreau <w@1wt.eu>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Message-ID: <20110112214211.GD25018@1wt.eu>
References: <4D2E0863.2040804@ericsson.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D2E0863.2040804@ericsson.com>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 21:39:57 -0000

On Wed, Jan 12, 2011 at 09:00:35PM +0100, Salvatore Loreto wrote:
> In order to settle the question of masking and find a way forward that 
> has a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and 
> summarized at
> some point in the mailing list by Eric Rescorla)
> 
> 
> 1. a fixed mask carried entirely in the packet.

I vote for this one above, which we can improve with a changing mask
so that the attacker cannot know the relations between bytes in advance
if some prefer it..

> 2. A longish repeated mask computed from the packet. For concreteness,
>    suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> || 
> <packet-key>), but
>    obviously there's flexibility here.

Definitely not this one, it's far too slow on small frames.

> 3. A fully generated mask (if so specify also what you would like to use 
> e.g. AES-CTR or HMAC-SHA).

Warning, there were two proposals for this one. The first one which does
not offer better protection than #1, and the second one which requires
servers and intermediaries to *bufferize all the frame* before being
able to decipher it, which is very expensive on medium-sized frames,
and not possible at all for large ones (up to 2^63 bytes).

While I could probably live with the first version, I'd definitely
reject the second proposal which cannot reasonably be implemented
at all.

Regards,
Willy


From bruce@callenish.com  Wed Jan 12 13:43:46 2011
Return-Path: <bruce@callenish.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 0CDC83A67B7 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:43:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.586
X-Spam-Level: 
X-Spam-Status: No, score=-2.586 tagged_above=-999 required=5 tests=[AWL=0.013,  BAYES_00=-2.599]
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 6fT7jj7XiR37 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:43:44 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id DB3983A63CB for <hybi@ietf.org>; Wed, 12 Jan 2011 13:43:44 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pd8W4-0001dq-GA for hybi@ietf.org; Wed, 12 Jan 2011 13:46:04 -0800
Message-ID: <4D2E211D.90007@callenish.com>
Date: Wed, 12 Jan 2011 13:46:05 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com>
In-Reply-To: <343AAA15-A0A1-4326-947F-6853F521350A@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 21:43:46 -0000

On 12/01/2011 11:28 AM, Maciej Stachowiak wrote:
> On Jan 12, 2011, at 9:52 AM, Bruce Atherton wrote:
>
>> As I said in another thread, the con about protecting against an HTTP attack requires the feature that the mask is influenced by the server nonce. But that can be done by generating the mask of the first frame based on the server nonce. Or, if you prefer, to combine the client nonce and the server nonce. Make it a requirement in the spec that the server check the frame key of the first frame to ensure it is so influenced.
> How are you supposed to check that the client nonce was "influenced" by the server nonce, when the client nonce is random and mixed with the server nonce using a one-way hash, when you only get the output and not the client nonce? Your suggestion is mathematically impossible.

Sorry, I think we are talking about different things. Either that or I 
am completely missing the point you are raising.

What I said was that the server nonce could influence the mask, or, if 
you really needed the client nonce to also influence the mask (which 
last time I checked was the SHA1/HMAC behaviour) you could combine the 
server nonce and the client nonce in someway.

So if you just needed the server nonce to influence the mask, one of the 
simplest things you could do would be to just take the first 32 bits of 
it and use that as the first frame key from the client. If that wasn't 
random enough for you, you could hash the nonce in a known way, so that 
the server could check that the hash matched with the frame key it received.

If you wanted to add the client nonce into the mix, you could XOR the 
server nonce with the client nonce and take the first 32 bits, or hash 
the two of them together, and the server could do the same thing at the 
other end and verify that the results matched the frame key.

I don't really see the point of having the client nonce influence the 
mask, but it was part of the previous design so I mentioned it. I also 
don't care how the mask is influenced by the server nonce so long as it 
is repeatable by the server and the mask checked against the server 
result. Assuming you want to avoid this "HTTP emulating a Websocket 
client in Javascript" attack by using masking.

>
> I think your suggestion removes all the benefit from using the server nonce as part of the masking key. You need to send the raw per-frame nonce but mask using a mix that includes the server key, to see any improvement.

Sorry, you've completely lost me here.

>> I think you forgot the con - "Not universally available in all languages in a library". To me, that is pretty big one. It is going to slow adoption of Websockets if the barrier to entry is having a fully functional AES-CTR implementation available.
> I think it's widely available enough that this is not a serious disadvantage, certainly not compared to HMAC.

Fair enough, you are entitled to your opinion. It should still be listed 
as a con, though, if only so you can argue against its importance.

Obviously I do think this is a serious disadvantage. Think about how 
ubiquitous HTTP classes and functions are in standard libraries of 
languages all over the place. I think it would be desirable to have 
Websockets be as ubiquitous, but I think it will be much harder if 
accepting AES-CTR as a standard part of the language is a prerequisite.

As far as HMAC goes, I don't understand why this is necessary either. 
Any standard hashing function that generates a 32 bit key seems like 
plenty, if you don't want to use the raw bits.

>> I think it is wrong to rule out a requirement on the basis that it is non-technical. Lots of requirements are non-technical. The issue of export regulations falls under the rubric of the requirement to keep barriers to adoption of Websockets as low as possible. Export regulations can impinge on that requirement.
>>
>> Imagine if export regulations in all countries required that every company pay hundreds of thousands of dollars to export any AES-CTR application. Would you still claim that it was a "non-technical argument"?
> I didn't claim that non-technical arguments are ruled out. I'm just pointing out that the technical arguments all go the other way. I think it would not be in line with IETF best practices to make a technically inferior choice based on the restrictive legal regimes in some countries. But you are right that at some point policy issues could outweigh technical issues.

No, I think you misunderstand me.

I agree that when discussing how to design solutions, technical 
arguments should typically be given priority over nontechnical ones.

But when it comes to requirements, whether the requirements themselves 
are technical or not is of no importance. They are not all equal, of 
course, and sometimes the balance has to sway towards one requirement 
over another. But whether that requirement is based on a technical issue 
is not the reason to decide which requirement gets priority.

Let me give an example. When discussing framing, it was decided to use a 
63 bit length because Java didn't support 64 bit numbers easily. This 
wasn't technical, as Java could in fact support it with BigDecimal and 
the like. But it would be awkward. What is more, Java represents a 
significant market share of the types of people it would be hoped would 
use Websockets. So this decision about how to design a length field was 
primarily a non-technical one. If there had been a serious technical 
issue to prefer 64 bits over 63 bits, it would have been blown out of 
the water. But there wasn't, so it was allowed.

But when talking about Browser Vendors having to take responsibility for 
issues that are not their fault, minimizing the effect of that is a 
requirement. The fact that it is not a "technical" requirement (whatever 
that means) but is more political does not in any way undermine its 
importance.

I have a hard time differentiating requirements as technical or 
non-technical, btw. I've written a lot of legal software, and legal 
concerns seem pretty technical to me.


From ietf@adambarth.com  Wed Jan 12 13:44:06 2011
Return-Path: <ietf@adambarth.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 7615B3A67C0 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:44:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.845
X-Spam-Level: 
X-Spam-Status: No, score=-3.845 tagged_above=-999 required=5 tests=[AWL=-0.868, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 CSZxdoXixmAP for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:44:05 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 508743A63CB for <hybi@ietf.org>; Wed, 12 Jan 2011 13:44:05 -0800 (PST)
Received: by wyf23 with SMTP id 23so1103052wyf.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:46:25 -0800 (PST)
Received: by 10.216.20.141 with SMTP id p13mr1527866wep.102.1294868784902; Wed, 12 Jan 2011 13:46:24 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id e12sm616727wer.12.2011.01.12.13.46.23 (version=SSLv3 cipher=RC4-MD5); Wed, 12 Jan 2011 13:46:24 -0800 (PST)
Received: by iwn40 with SMTP id 40so1005134iwn.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:46:22 -0800 (PST)
Received: by 10.231.192.7 with SMTP id do7mr1593490ibb.102.1294868782423; Wed, 12 Jan 2011 13:46:22 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Wed, 12 Jan 2011 13:45:52 -0800 (PST)
From: Adam Barth <ietf@adambarth.com>
Date: Wed, 12 Jan 2011 13:45:52 -0800
Message-ID: <AANLkTindd-OQ1tS7WA06p5dEqY1p_XdmK4zGT7PQMDCR@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: [hybi] Clarification on straw poll (was Re: Straw-poll on Masking options)
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, 12 Jan 2011 21:44:06 -0000

On Wed, Jan 12, 2011 at 1:42 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Wed, Jan 12, 2011 at 09:00:35PM +0100, Salvatore Loreto wrote:
>> In order to settle the question of masking and find a way forward that
>> has a wide acceptance,
>> Joe and I, as HyBi chairs, want to check where the consensus is
>> on the following relevant options that have been discussed (and
>> summarized at
>> some point in the mailing list by Eric Rescorla)
>>
>>
>> 1. a fixed mask carried entirely in the packet.
>
> I vote for this one above, which we can improve with a changing mask
> so that the attacker cannot know the relations between bytes in advance
> if some prefer it..
>
>> 2. A longish repeated mask computed from the packet. For concreteness,
>> =A0 =A0suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> =
||
>> <packet-key>), but
>> =A0 =A0obviously there's flexibility here.
>
> Definitely not this one, it's far too slow on small frames.
>
>> 3. A fully generated mask (if so specify also what you would like to use
>> e.g. AES-CTR or HMAC-SHA).
>
> Warning, there were two proposals for this one. The first one which does
> not offer better protection than #1, and the second one which requires
> servers and intermediaries to *bufferize all the frame* before being
> able to decipher it, which is very expensive on medium-sized frames,
> and not possible at all for large ones (up to 2^63 bytes).
>
> While I could probably live with the first version, I'd definitely
> reject the second proposal which cannot reasonably be implemented
> at all.

To be clear, I also find the "key at the end" / "buffer the whole
frame" option unacceptable.  Perhaps we should clarify that this is
not the intent of option (3)?

Adam

From w@1wt.eu  Wed Jan 12 13:51:43 2011
Return-Path: <w@1wt.eu>
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 359AC3A67C3 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:51:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.074
X-Spam-Level: 
X-Spam-Status: No, score=-2.074 tagged_above=-999 required=5 tests=[AWL=-0.031, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 JbUH46SJ5RsY for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:51:39 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 36C1B3A69C5 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:51:39 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0CLrvI1027944; Wed, 12 Jan 2011 22:53:57 +0100
Date: Wed, 12 Jan 2011 22:53:57 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110112215357.GF25018@1wt.eu>
References: <AANLkTindd-OQ1tS7WA06p5dEqY1p_XdmK4zGT7PQMDCR@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTindd-OQ1tS7WA06p5dEqY1p_XdmK4zGT7PQMDCR@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Clarification on straw poll (was Re: Straw-poll on Masking options)
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, 12 Jan 2011 21:51:43 -0000

On Wed, Jan 12, 2011 at 01:45:52PM -0800, Adam Barth wrote:
> To be clear, I also find the "key at the end" / "buffer the whole
> frame" option unacceptable.  Perhaps we should clarify that this is
> not the intent of option (3)?

Yes I think that would help others to make their choices and avoid
any ambiguity later.

Thanks,
Willy


From w@1wt.eu  Wed Jan 12 14:09:48 2011
Return-Path: <w@1wt.eu>
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 9F7063A67E1 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:09:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.074
X-Spam-Level: 
X-Spam-Status: No, score=-2.074 tagged_above=-999 required=5 tests=[AWL=-0.031, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 tZX92sXby7xF for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:09:48 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 90A193A67CC for <hybi@ietf.org>; Wed, 12 Jan 2011 14:09:46 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0CMC6N1028012; Wed, 12 Jan 2011 23:12:06 +0100
Date: Wed, 12 Jan 2011 23:12:06 +0100
From: Willy Tarreau <w@1wt.eu>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Message-ID: <20110112221206.GG25018@1wt.eu>
References: <4D2E0863.2040804@ericsson.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D2E0863.2040804@ericsson.com>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 22:09:48 -0000

On Wed, Jan 12, 2011 at 09:00:35PM +0100, Salvatore Loreto wrote:
> 1. a fixed mask carried entirely in the packet.
> 
> 2. A longish repeated mask computed from the packet. For concreteness,
>    suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> || 
> <packet-key>), but
>    obviously there's flexibility here.
> 
> 3. A fully generated mask (if so specify also what you would like to use 
> e.g. AES-CTR or HMAC-SHA).

BTW Sal, could we list Base64 (or any equivalent CRLF-less masking) that
very few of us have already evocated here ?

It is the only solution to be _certain_ to definitely get rid of the
issue we're talking about, has much less CPU overhead than AES/HMAC,
at the expense of higher network costs (+14-33% for the simplest
versions, even less with escaping).

I'd personally use the fixed mask over base64, but would a lot prefer
base64 over crypto algorithms. I don't know others' opinions, and maybe
in the end the network overhead would not be perceived as much of a
trouble as the downsides of the crypto algos.

Thanks,
Willy


From mjs@apple.com  Wed Jan 12 14:21:19 2011
Return-Path: <mjs@apple.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 5A7CC3A67AF for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:21:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.528
X-Spam-Level: 
X-Spam-Status: No, score=-106.528 tagged_above=-999 required=5 tests=[AWL=0.072, BAYES_00=-2.599, 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 8W6Y-GAQGi2J for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:21:17 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 52BB23A67E1 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:21:17 -0800 (PST)
Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out3.apple.com (Postfix) with ESMTP id D1C9BC6BEB7E for <hybi@ietf.org>; Wed, 12 Jan 2011 14:23:37 -0800 (PST)
X-AuditID: 11807134-b7cfdae000001831-65-4d2e29e95112
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay14.apple.com (Apple SCV relay) with SMTP id AE.75.06193.9E92E2D4; Wed, 12 Jan 2011 14:23:37 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.50.212] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEX00L3GKVDOL80@gertie.apple.com> for hybi@ietf.org; Wed, 12 Jan 2011 14:23:37 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D2E0863.2040804@ericsson.com>
Date: Wed, 12 Jan 2011 14:23:36 -0800
Message-id: <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com>
References: <4D2E0863.2040804@ericsson.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 22:21:19 -0000

On Jan 12, 2011, at 12:00 PM, Salvatore Loreto wrote:

> Hi all,
> 
> 
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce security risks.
> 
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been deeply discussed.
> 
> In order to settle the question of masking and find a way forward that has a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and summarized at
> some point in the mailing list by Eric Rescorla)
> 
> 
> 1. a fixed mask carried entirely in the packet.

I can't live with this option. It does not address the HTTP vs. WebSocket threat model.

> 
> 2. A longish repeated mask computed from the packet. For concreteness,
>   suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> || <packet-key>), but
>   obviously there's flexibility here.

I can live with this option, but it's not my preferred choice. It has worse performance and slightly worse security properties than #3.

> 
> 3. A fully generated mask (if so specify also what you would like to use e.g. AES-CTR or HMAC-SHA).

This is my most preferred option. AES-CTR seems ok. I would also be ok with any well-known stream cipher.

> 
> 
> Please indicate your preference(s) or the one can meet your bar for "I could live with that";
> In the case you have more then one, please put the choices in a preference order.
> 
> This poll will run until January 18th.
> 
> cheers
> /Sal
> 
> -- 
> Salvatore Loreto
> www.sloreto.com
> 
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


From mjs@apple.com  Wed Jan 12 14:22:30 2011
Return-Path: <mjs@apple.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 161F13A67F7 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:22:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.531
X-Spam-Level: 
X-Spam-Status: No, score=-106.531 tagged_above=-999 required=5 tests=[AWL=0.068, BAYES_00=-2.599, 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 pqXjxXmPouXk for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:22:29 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 381193A67AF for <hybi@ietf.org>; Wed, 12 Jan 2011 14:22:29 -0800 (PST)
Received: from relay13.apple.com (relay13.apple.com [17.128.113.29]) by mail-out3.apple.com (Postfix) with ESMTP id 275B5C6BEC67 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:24:50 -0800 (PST)
X-AuditID: 1180711d-b7c30ae0000055b4-b2-4d2e2a310d05
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay13.apple.com (Apple SCV relay) with SMTP id D6.AD.21940.13A2E2D4; Wed, 12 Jan 2011 14:24:50 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.50.212] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEX004UAKXDUH40@elliott.apple.com> for hybi@ietf.org; Wed, 12 Jan 2011 14:24:49 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTindd-OQ1tS7WA06p5dEqY1p_XdmK4zGT7PQMDCR@mail.gmail.com>
Date: Wed, 12 Jan 2011 14:24:41 -0800
Message-id: <93109903-A22B-47EF-8703-3A36720A00EE@apple.com>
References: <AANLkTindd-OQ1tS7WA06p5dEqY1p_XdmK4zGT7PQMDCR@mail.gmail.com>
To: Adam Barth <ietf@adambarth.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Clarification on straw poll (was Re: Straw-poll on Masking options)
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, 12 Jan 2011 22:22:30 -0000

On Jan 12, 2011, at 1:45 PM, Adam Barth wrote:

> On Wed, Jan 12, 2011 at 1:42 PM, Willy Tarreau <w@1wt.eu> wrote:
>> On Wed, Jan 12, 2011 at 09:00:35PM +0100, Salvatore Loreto wrote:
>>> In order to settle the question of masking and find a way forward that
>>> has a wide acceptance,
>>> Joe and I, as HyBi chairs, want to check where the consensus is
>>> on the following relevant options that have been discussed (and
>>> summarized at
>>> some point in the mailing list by Eric Rescorla)
>>> 
>>> 
>>> 1. a fixed mask carried entirely in the packet.
>> 
>> I vote for this one above, which we can improve with a changing mask
>> so that the attacker cannot know the relations between bytes in advance
>> if some prefer it..
>> 
>>> 2. A longish repeated mask computed from the packet. For concreteness,
>>>    suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
>>> <packet-key>), but
>>>    obviously there's flexibility here.
>> 
>> Definitely not this one, it's far too slow on small frames.
>> 
>>> 3. A fully generated mask (if so specify also what you would like to use
>>> e.g. AES-CTR or HMAC-SHA).
>> 
>> Warning, there were two proposals for this one. The first one which does
>> not offer better protection than #1, and the second one which requires
>> servers and intermediaries to *bufferize all the frame* before being
>> able to decipher it, which is very expensive on medium-sized frames,
>> and not possible at all for large ones (up to 2^63 bytes).
>> 
>> While I could probably live with the first version, I'd definitely
>> reject the second proposal which cannot reasonably be implemented
>> at all.
> 
> To be clear, I also find the "key at the end" / "buffer the whole
> frame" option unacceptable.  Perhaps we should clarify that this is
> not the intent of option (3)?

+1

Key at end could be applied to any of these proposals, so if it's still being seriously considered, it should be a separate straw poll.

Regards,
Maciej


From mjs@apple.com  Wed Jan 12 14:25:08 2011
Return-Path: <mjs@apple.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 7F4143A6A82 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:25:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.533
X-Spam-Level: 
X-Spam-Status: No, score=-106.533 tagged_above=-999 required=5 tests=[AWL=0.065, BAYES_00=-2.599, 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 td6HDE-fihMq for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:25:07 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 1A2933A67AF for <hybi@ietf.org>; Wed, 12 Jan 2011 14:25:07 -0800 (PST)
Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out3.apple.com (Postfix) with ESMTP id 0A859C6BEFE3 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:27:28 -0800 (PST)
X-AuditID: 11807134-b7cfdae000001831-7e-4d2e2acfb1fe
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay14.apple.com (Apple SCV relay) with SMTP id 5D.D6.06193.FCA2E2D4; Wed, 12 Jan 2011 14:27:27 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_g1fSAnUBwmM1q0vJLt42iA)"
Received: from [17.153.50.212] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEX004X3L1RUH40@elliott.apple.com> for hybi@ietf.org; Wed, 12 Jan 2011 14:27:27 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTi=NMZmqyTUqxhhm=+_mpq+O49NJ1UTN62vLx2HR@mail.gmail.com>
Date: Wed, 12 Jan 2011 14:27:27 -0800
Message-id: <C0D46A37-4B06-4271-A15D-094162DBF841@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com> <AANLkTik-G0BYBj6fqabpRyfot7iAufQ9Df2yh5dOBUJq@mail.gmail.com> <A6C1B68A-BF42-4B9D-8434-BF6F070093DD@apple.com> <AANLkTi=NMZmqyTUqxhhm=+_mpq+O49NJ1UTN62vLx2HR@mail.gmail.com>
To: John Tamplin <jat@google.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 22:25:08 -0000

--Boundary_(ID_g1fSAnUBwmM1q0vJLt42iA)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 12, 2011, at 1:02 PM, John Tamplin wrote:

> On Wed, Jan 12, 2011 at 3:05 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> Your description doesn't have enough detail for me to evaluate it. In what way would the server nonce be used during the handshake, and in what way do you check it?
> 
> If we were to have Hello frames as have been suggested, in the client's Hello frame it includes a value computed from the server's nonce.  The server verifies that value to verify that the client processed it.
> 
> Granted, a lazy server implementor could skip that step.  But, we discarded the amateur programmer requirement long ago, and you could equally say that a lazy client could just use the same masking key every time, which would be more damaging to secure operations.

OK. The problem with this approach is the same as with other server checks that have no effect on normal operation. If the server's check is buggy, missing, or overly lenient, this won't be noticed in normal operation. Masking can provide better protection than that - if you don't compute the mask correctly, then you will fail in the normal non-attack case. Since there is one and only one way to compute the correct mask, there's no possibility of accidentally being too lenient but still working in the normal case. I think this is a robust design. If we are to use masking anyway, then I think the marginal cost to providing this robustness is low.

Regards,
Maciej


--Boundary_(ID_g1fSAnUBwmM1q0vJLt42iA)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: quoted-printable

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><br><div><div>On Jan 12, 2011, at 1:02 PM, John Tamplin =
wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div class=3D"gmail_quote">On Wed, Jan 12, 2011 at 3:05 =
PM, Maciej Stachowiak <span dir=3D"ltr">&lt;<a =
href=3D"mailto:mjs@apple.com">mjs@apple.com</a>&gt;</span> =
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style=3D"word-wrap:break-word"><div><div></div><div class=3D"h5">Your=
 description doesn't have enough detail for me to evaluate it. In what =
way would the server nonce be used during the handshake, and in what way =
do you check it?</div>

</div></div></blockquote></div><div><br></div>If we were to have Hello =
frames as have been suggested, in the client's Hello frame it includes a =
value computed from the server's nonce. &nbsp;The server verifies that =
value to verify that the client processed it.<div>

<br></div><div>Granted, a lazy server implementor could skip that step. =
&nbsp;But, we discarded the amateur programmer requirement long ago, and =
you could equally say that a lazy client could just use the same masking =
key every time, which would be more damaging to secure operations.<br =
clear=3D"all"></div></blockquote></div><br><div>OK. The problem with =
this approach is the same as with other server checks that have no =
effect on normal operation. If the server's check is buggy, missing, or =
overly lenient, this won't be noticed in normal operation. Masking can =
provide better protection than that - if you don't compute the mask =
correctly, then you will fail in the normal non-attack case. Since there =
is one and only one way to compute the correct mask, there's no =
possibility of accidentally being too lenient but still working in the =
normal case. I think this is a robust design. If we are to use masking =
anyway, then I think the marginal cost to providing this robustness is =
low.</div><div><br></div><div>Regards,</div><div>Maciej</div><div><br></di=
v></body></html>=

--Boundary_(ID_g1fSAnUBwmM1q0vJLt42iA)--

From w@1wt.eu  Wed Jan 12 14:34:21 2011
Return-Path: <w@1wt.eu>
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 DE7673A6810 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:34:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.074
X-Spam-Level: 
X-Spam-Status: No, score=-2.074 tagged_above=-999 required=5 tests=[AWL=-0.031, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 l5nGcSO-pQt1 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:34:19 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 353FD3A6452 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:34:19 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0CMaXTt028125; Wed, 12 Jan 2011 23:36:33 +0100
Date: Wed, 12 Jan 2011 23:36:33 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110112223632.GI25018@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 22:34:21 -0000

On Wed, Jan 12, 2011 at 02:23:36PM -0800, Maciej Stachowiak wrote:
> 
> On Jan 12, 2011, at 12:00 PM, Salvatore Loreto wrote:
> 
> > Hi all,
> > 
> > 
> > Masking from the client to the server
> > has reached strong consensus within this wg as a mechanism to reduce security risks.
> > 
> > However there is disagreement on the actual method for masking.
> > The technical differences, pro and cons, advantages and disadvantages,
> > as well as the legal implications of each method have already been deeply discussed.
> > 
> > In order to settle the question of masking and find a way forward that has a wide acceptance,
> > Joe and I, as HyBi chairs, want to check where the consensus is
> > on the following relevant options that have been discussed (and summarized at
> > some point in the mailing list by Eric Rescorla)
> > 
> > 
> > 1. a fixed mask carried entirely in the packet.
> 
> I can't live with this option. It does not address the HTTP vs. WebSocket threat model.

We should be careful not to conflate issues here. The masking was
never introduced for this purpose, you proposed to make use of it
to *also* address this threat.

But we should address issues one at a time. Right now masking has
been proposed as the solution to prevent a server from making a
client emit a WS stream that could be interpreted by a caching
intermediary as a valid HTTP request.

The HTTP vs WS threat model was addressed a long time ago with the
handshake, but apparently you have discovered issues that were not
discovered by then. Thus we should probably revisit them and see
how to fix them.

Thanks,
Willy


From mjs@apple.com  Wed Jan 12 14:38:37 2011
Return-Path: <mjs@apple.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 2AA713A6810 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:38:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.536
X-Spam-Level: 
X-Spam-Status: No, score=-106.536 tagged_above=-999 required=5 tests=[AWL=0.063, BAYES_00=-2.599, 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 w40dDW6MZN-G for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:38:36 -0800 (PST)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 500BE3A67EB for <hybi@ietf.org>; Wed, 12 Jan 2011 14:38:36 -0800 (PST)
Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out4.apple.com (Postfix) with ESMTP id 1B6AECB2A8A8 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:40:57 -0800 (PST)
X-AuditID: 11807134-b7cfdae000001831-79-4d2e2df8ce72
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay14.apple.com (Apple SCV relay) with SMTP id 6F.6B.06193.8FD2E2D4; Wed, 12 Jan 2011 14:40:57 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.50.212] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEX00237LO8MM00@gertie.apple.com> for hybi@ietf.org; Wed, 12 Jan 2011 14:40:56 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110112223632.GI25018@1wt.eu>
Date: Wed, 12 Jan 2011 14:40:56 -0800
Message-id: <9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com> <20110112223632.GI25018@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 22:38:37 -0000

On Jan 12, 2011, at 2:36 PM, Willy Tarreau wrote:

> On Wed, Jan 12, 2011 at 02:23:36PM -0800, Maciej Stachowiak wrote:
>> 
>> On Jan 12, 2011, at 12:00 PM, Salvatore Loreto wrote:
>> 
>>> Hi all,
>>> 
>>> 
>>> Masking from the client to the server
>>> has reached strong consensus within this wg as a mechanism to reduce security risks.
>>> 
>>> However there is disagreement on the actual method for masking.
>>> The technical differences, pro and cons, advantages and disadvantages,
>>> as well as the legal implications of each method have already been deeply discussed.
>>> 
>>> In order to settle the question of masking and find a way forward that has a wide acceptance,
>>> Joe and I, as HyBi chairs, want to check where the consensus is
>>> on the following relevant options that have been discussed (and summarized at
>>> some point in the mailing list by Eric Rescorla)
>>> 
>>> 
>>> 1. a fixed mask carried entirely in the packet.
>> 
>> I can't live with this option. It does not address the HTTP vs. WebSocket threat model.
> 
> We should be careful not to conflate issues here. The masking was
> never introduced for this purpose, you proposed to make use of it
> to *also* address this threat.
> 
> But we should address issues one at a time. Right now masking has
> been proposed as the solution to prevent a server from making a
> client emit a WS stream that could be interpreted by a caching
> intermediary as a valid HTTP request.

I prefer the design that addresses more distinct attacks. This straw poll is about what masking algorithm to choose, not about how to address one specific attack. The preferences of many WG members will be based on factors that don't relate to security at all. So while you are free to disagree with my reasoning, I don't think it's fair to call it out of bounds for this poll.

Also, I have no desire to cause yet another round of changing the masking. Let's pick the right one this time, and not thrash.

> 
> The HTTP vs WS threat model was addressed a long time ago with the
> handshake, but apparently you have discovered issues that were not
> discovered by then. Thus we should probably revisit them and see
> how to fix them.

I've explained in detail how masking that folds in a server nonce is a more robust defense multiple times, including in the past few days.

Regards,
Maciej


From mjs@apple.com  Wed Jan 12 14:41:19 2011
Return-Path: <mjs@apple.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 E1E133A6830 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:41:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.539
X-Spam-Level: 
X-Spam-Status: No, score=-106.539 tagged_above=-999 required=5 tests=[AWL=0.060, BAYES_00=-2.599, 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 Fvlfvi2qJIpy for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:41:19 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 04C7B3A6810 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:41:19 -0800 (PST)
Received: from relay16.apple.com (relay16.apple.com [17.128.113.55]) by mail-out4.apple.com (Postfix) with ESMTP id EF5C4CB2AA35 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:43:39 -0800 (PST)
X-AuditID: 11807137-b7bfaae000004d31-d2-4d2e2e9b96b2
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay16.apple.com (Apple SCV relay) with SMTP id A1.1F.19761.B9E2E2D4; Wed, 12 Jan 2011 14:43:39 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.50.212] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEX007Y5LSRC300@et.apple.com> for hybi@ietf.org; Wed, 12 Jan 2011 14:43:39 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D2E211D.90007@callenish.com>
Date: Wed, 12 Jan 2011 14:43:39 -0800
Message-id: <2F572D74-9587-4798-91F6-AD313C31EFCA@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com> <4D2E211D.90007@callenish.com>
To: Bruce Atherton <bruce@callenish.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 22:41:20 -0000

On Jan 12, 2011, at 1:46 PM, Bruce Atherton wrote:

> On 12/01/2011 11:28 AM, Maciej Stachowiak wrote:
>> On Jan 12, 2011, at 9:52 AM, Bruce Atherton wrote:
>> 
>>> As I said in another thread, the con about protecting against an HTTP attack requires the feature that the mask is influenced by the server nonce. But that can be done by generating the mask of the first frame based on the server nonce. Or, if you prefer, to combine the client nonce and the server nonce. Make it a requirement in the spec that the server check the frame key of the first frame to ensure it is so influenced.
>> How are you supposed to check that the client nonce was "influenced" by the server nonce, when the client nonce is random and mixed with the server nonce using a one-way hash, when you only get the output and not the client nonce? Your suggestion is mathematically impossible.
> 
> Sorry, I think we are talking about different things. Either that or I am completely missing the point you are raising.
> 
> What I said was that the server nonce could influence the mask, or, if you really needed the client nonce to also influence the mask (which last time I checked was the SHA1/HMAC behaviour) you could combine the server nonce and the client nonce in someway.
> 
> So if you just needed the server nonce to influence the mask, one of the simplest things you could do would be to just take the first 32 bits of it and use that as the first frame key from the client.

That would fail to protect against the intermediary attack - the server (assumed untrusted) can control the client's first mask, so it can choose the plaintext of the first frame.

> If that wasn't random enough for you, you could hash the nonce in a known way, so that the server could check that the hash matched with the frame key it received.

Just hashing the nonce still lets the attacher control the plaintext. They know what the server nonce will hash too.

> 
> If you wanted to add the client nonce into the mix, you could XOR the server nonce with the client nonce and take the first 32 bits,

This is still vulnerable in the case of the intermediary attack. The server can choose its nonce to neutralize the client nonce.

> or hash the two of them together, and the server could do the same thing at the other end and verify that the results matched the frame key.

This is also vulnerable in the case of the intermediary attack. The server can tell client script what the hash of the server and client nonce is, before the client sends its first frame. Then the client knows how to invert the masking to send chosen plaintext.


> 
> I don't really see the point of having the client nonce influence the mask, but it was part of the previous design so I mentioned it. I also don't care how the mask is influenced by the server nonce so long as it is repeatable by the server and the mask checked against the server result. Assuming you want to avoid this "HTTP emulating a Websocket client in Javascript" attack by using masking.

All your proposals end up with a situation where the per-frame nonce doesn't influence the mask for the first frame, thus reintroducing the intermediary vulnerability. 

You need to involve both the server nonce and a per-frame nonce to protect against both the intermediary attack and the HTTP precomputed frame attack. And you need to send the per-frame nonce raw, not combined with the server nonce, so the server can independently redo the computation.

Regards,
Maciej


From jat@google.com  Wed Jan 12 14:42:55 2011
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 C76403A6830 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:42:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.797
X-Spam-Level: 
X-Spam-Status: No, score=-103.797 tagged_above=-999 required=5 tests=[AWL=-0.821, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 Ks0Y1Fw-rEJF for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:42:54 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 964A83A6810 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:42:54 -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 p0CMjEMi005297 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:45:15 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294872315; bh=AsxoHmjWiX5e3niS0X2JVezGs/Y=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=R9jOK0FROR8vGgyq4zpfU8C45aHfhsTTqEbm54xsddD6NhvRKdtIjQOAzrcjOXNAR OBUhNIjjlxG6HIRFKIl6A==
Received: from ywo7 (ywo7.prod.google.com [10.192.15.7]) by wpaz37.hot.corp.google.com with ESMTP id p0CMjA1G016931 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Wed, 12 Jan 2011 14:45:14 -0800
Received: by ywo7 with SMTP id 7so432193ywo.9 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:45:13 -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=Sb/ES+4wN0QtUyiBYP0AKAWFfHJWqVGSSuida/fxIy8=; b=ZZlP2wrgu5ffwHk8jHP0VvYxqoUcX1W4hcB4NHeBUeWOK8xblO6sZc03QpDmOHQZfU yIYwFoRhPwl7IPwXpcwQ==
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=WQ+CvhD+Nw4Y5x2i4RV6GE/SCjS1nI3qikgFiUVo6tOs2U4/k7UD9qFPJdGKk4S2v0 FJSXmjtL+DyXacWOQNiA==
Received: by 10.150.217.14 with SMTP id p14mr2726566ybg.149.1294872313623; Wed, 12 Jan 2011 14:45:13 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 12 Jan 2011 14:44:53 -0800 (PST)
In-Reply-To: <C0D46A37-4B06-4271-A15D-094162DBF841@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com> <AANLkTik-G0BYBj6fqabpRyfot7iAufQ9Df2yh5dOBUJq@mail.gmail.com> <A6C1B68A-BF42-4B9D-8434-BF6F070093DD@apple.com> <AANLkTi=NMZmqyTUqxhhm=+_mpq+O49NJ1UTN62vLx2HR@mail.gmail.com> <C0D46A37-4B06-4271-A15D-094162DBF841@apple.com>
From: John Tamplin <jat@google.com>
Date: Wed, 12 Jan 2011 17:44:53 -0500
Message-ID: <AANLkTi=d47mtFY232xNACWhwsozYBAVfqOBgLXHRhqtk@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: multipart/alternative; boundary=000e0cd4cd4e4876ff0499adf436
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 22:42:55 -0000

--000e0cd4cd4e4876ff0499adf436
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 12, 2011 at 5:27 PM, Maciej Stachowiak <mjs@apple.com> wrote:

> OK. The problem with this approach is the same as with other server checks
> that have no effect on normal operation. If the server's check is buggy,
> missing, or overly lenient, this won't be noticed in normal operation.
> Masking can provide better protection than that - if you don't compute the
> mask correctly, then you will fail in the normal non-attack case. Since
> there is one and only one way to compute the correct mask, there's no
> possibility of accidentally being too lenient but still working in the
> normal case. I think this is a robust design. If we are to use masking
> anyway, then I think the marginal cost to providing this robustness is low.
>

Others don't agree, as it means you can't interpret a frame without state
from the handshake, and introduces a much higher cost.

If we are worrying about poorly written servers, should we be worried about
poorly written clients that will just use a constant or incrementing counter
for the frame key?  What if the server doesn't actually verify the Origin
(which seems like a much bigger issue to me) -- we aren't doing anything
about that.

It still seems like we can get the property you want during the handshake
and using a less expensive mechanism on every frame.  For example, what if
we have Hello frames and they are encoded as you propose for every frame --
a server that doesn't use the values properly won't be able to issue a Hello
response, and the connection never gets initialized so the attack you are
worried about can never take place.

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

--000e0cd4cd4e4876ff0499adf436
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 12, 2011 at 5:27 PM, Maciej Stachowi=
ak <span dir=3D"ltr">&lt;<a href=3D"mailto:mjs@apple.com">mjs@apple.com</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style=3D"word-wrap:break-word"><div><div></div><div class=3D"h5">OK. T=
he problem with this approach is the same as with other server checks that =
have no effect on normal operation. If the server&#39;s check is buggy, mis=
sing, or overly lenient, this won&#39;t be noticed in normal operation. Mas=
king can provide better protection than that - if you don&#39;t compute the=
 mask correctly, then you will fail in the normal non-attack case. Since th=
ere is one and only one way to compute the correct mask, there&#39;s no pos=
sibility of accidentally being too lenient but still working in the normal =
case. I think this is a robust design. If we are to use masking anyway, the=
n I think the marginal cost to providing this robustness is low.</div>

</div></div></blockquote></div><div><br></div>Others don&#39;t agree, as it=
 means you can&#39;t interpret a frame without state from the handshake, an=
d introduces a much higher cost.<div><br></div><div>If we are worrying abou=
t poorly written servers, should we be worried about poorly written clients=
 that will just use a constant or incrementing counter for the frame key? =
=C2=A0What if the server doesn&#39;t actually verify the Origin (which seem=
s like a much bigger issue to me) -- we aren&#39;t doing anything about tha=
t.</div>

<div><br></div><div>It still seems like we can get the property you want du=
ring the handshake and using a less expensive mechanism on every frame. =C2=
=A0For example, what if we have Hello frames and they are encoded as you pr=
opose for every frame -- a server that doesn&#39;t use the values properly =
won&#39;t be able to issue a Hello response, and the connection never gets =
initialized so the attack you are worried about can never take place.<br cl=
ear=3D"all">

<br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>
</div>

--000e0cd4cd4e4876ff0499adf436--

From mjs@apple.com  Wed Jan 12 14:53:13 2011
Return-Path: <mjs@apple.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 09BB33A67EC for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:53:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.541
X-Spam-Level: 
X-Spam-Status: No, score=-106.541 tagged_above=-999 required=5 tests=[AWL=0.057, BAYES_00=-2.599, 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 ox2KxsUWWwOa for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:53:11 -0800 (PST)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id C08E33A67C1 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:53:11 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out4.apple.com (Postfix) with ESMTP id 995D9CB2B599 for <hybi@ietf.org>; Wed, 12 Jan 2011 14:55:32 -0800 (PST)
X-AuditID: 11807136-b7bf8ae00000244a-3b-4d2e3164e61b
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay15.apple.com (Apple SCV relay) with SMTP id E5.E0.09290.4613E2D4; Wed, 12 Jan 2011 14:55:32 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_JS4BphdVjM+EvJpQbS3IVQ)"
Received: from [17.153.50.212] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEX002HSMCJMM00@gertie.apple.com> for hybi@ietf.org; Wed, 12 Jan 2011 14:55:32 -0800 (PST)
Sun-Java-System-SMTP-Warning: Lines longer than SMTP allows found and truncated.
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTi=d47mtFY232xNACWhwsozYBAVfqOBgLXHRhqtk@mail.gmail.com>
Date: Wed, 12 Jan 2011 14:55:30 -0800
Message-id: <14B88AD7-20B0-4D3C-99EF-D55AC4B376F4@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com> <AANLkTik-G0BYBj6fqabpRyfot7iAufQ9Df2yh5dOBUJq@mail.gmail.com> <A6C1B68A-BF42-4B9D-8434-BF6F070093DD@apple.com> <AANLkTi=NMZmqyTUqxhhm=+_mpq+O49NJ1UTN62vLx2HR@mail.gmail.com> <C0D46A37-4B06-4271-A15D-094162DBF841@apple.com>
To: John Tamplin <jat@google.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 22:53:13 -0000

--Boundary_(ID_JS4BphdVjM+EvJpQbS3IVQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 12, 2011, at 2:44 PM, John Tamplin wrote:

> On Wed, Jan 12, 2011 at 5:27 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> OK. The problem with this approach is the same as with other server checks that have no effect on normal operation. If the server's check is buggy, missing, or overly lenient, this won't be noticed in normal operation. Masking can provide better protection than that - if you don't compute the mask correctly, then you will fail in the normal non-attack case. Since there is one and only one way to compute the correct mask, there's no possibility of accidentally being too lenient but still working in the normal case. I think this is a robust design. If we are to use masking anyway, then I think the marginal cost to providing this robustness is low.
> 
> Others don't agree, as it means you can't interpret a frame without state from the handshake, and introduces a much higher cost.

I get that they don't agree. I disagree with their priorities. I'm just clearly stating my position. 

> 
> If we are worrying about poorly written servers, should we be worried about poorly written clients that will just use a constant or incrementing counter for the frame key?  What if the server doesn't actually verify the Origin (which seems like a much bigger issue to me) -- we aren't doing anything about that.

There is a small single-digit number of client implementations that will be exposed to the Web, and historically updating them has been much faster than updating all servers. This is why, for example, browsers try to defend against DNS rebinding even though it could be completely defeated by updating all Web servers to check the Host header. So in the long run, robustness against buggy servers is more important. That being said, I believe my preferred options are more robust against client-side programming errors as well.

> 
> It still seems like we can get the property you want during the handshake and using a less expensive mechanism on every frame.  For example, what if we have Hello frames and they are encoded as you propose for every frame -- a server that doesn't use the values properly won't be able to issue a Hello response, and the connection never gets initialized so the attack you are worried about can never take place.

It sounds like this would require an extra round trip to be effective, since only the client hello frame could present the proof that you are talking to a real WebSocket client. The client hello frame would also need to be variable length so the server can't just skip the first N bytes. I'd have to think more about whether this has other problems, in the meantime I have responded to the poll based on the proposals already on the table.

Regards,
Maciej


--Boundary_(ID_JS4BphdVjM+EvJpQbS3IVQ)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: quoted-printable

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><br><div><div>On Jan 12, 2011, at 2:44 PM, John Tamplin =
wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div class=3D"gmail_quote">On Wed, Jan 12, 2011 at 5:27 =
PM, Maciej Stachowiak <span dir=3D"ltr">&lt;<a =
href=3D"mailto:mjs@apple.com">mjs@apple.com</a>&gt;</span> =
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style=3D"word-wrap:break-word"><div><div></div><div class=3D"h5">OK. =
The problem with this approach is the same as with other server checks =
that have no effect on normal operation. If the server's check is buggy, =
missing, or overly lenient, this won't be noticed in normal operation. =
Masking can provide better protection than that - if you don't compute =
the mask correctly, then you will fail in the normal non-attack case. =
Since there is one and only one way to compute the correct mask, there's =
no possibility of accidentally being too lenient but still working in =
the normal case. I think this is a robust design. If we are to use =
masking anyway, then I think the marginal cost to providing this =
robustness is low.</div>

</div></div></blockquote></div><div><br></div>Others don't agree, as it =
means you can't interpret a frame without state from the handshake, and =
introduces a much higher cost.</blockquote><div><br></div><div>I get =
that they don't agree.&nbsp;I disagree with their priorities.&nbsp;I'm =
just clearly stating my position.&nbsp;</div><br><blockquote =
type=3D"cite"><div><br></div><div>If we are worrying about poorly =
written servers, should we be worried about poorly written clients that =
will just use a constant or incrementing counter for the frame key? =
&nbsp;What if the server doesn't actually verify the Origin (which seems =
like a much bigger issue to me) -- we aren't doing anything about =
that.</div></blockquote><div><br></div><div>There is a small =
single-digit number of client implementations that will be exposed to =
the Web, and historically updating them has been much faster than =
updating all servers. This is why, for example, browsers try to defend =
against DNS rebinding even though it could be completely defeated by =
updating all Web servers to check the Host header. So in the long run, =
robustness against buggy servers is more important.&nbsp;That being =
said, I believe my preferred options are more robust against client-side =
programming errors as well.</div><div><br></div><blockquote type=3D"cite">=


<div><br></div><div>It still seems like we can get the property you want =
during the handshake and using a less expensive mechanism on every =
frame. &nbsp;For example, what if we have Hello frames and they are =
encoded as you propose for every frame -- a server that doesn't use the =
values properly won't be able to issue a Hello response, and the =
connection never gets initialized so the attack you are worried about =
can never take place.<br =
clear=3D"all"></div></blockquote></div><br><div>It sounds like this =
would require an extra round trip to be effective, since only the client =
hello frame could present the proof that you are talking to a real =
WebSocket client. The client hello frame would also need to be variable =
length so the server can't just skip the first N bytes. I'd have to =
think more about whether this has other problems, in the meantime I have =
responded to the poll based on the proposals already on the =
table.</div><div><br></div><div>Regards,</div><div>Maciej</div><div><br></=
div></body></html>=

--Boundary_(ID_JS4BphdVjM+EvJpQbS3IVQ)--

From w@1wt.eu  Wed Jan 12 14:57:45 2011
Return-Path: <w@1wt.eu>
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 9F2DB3A6830 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:57:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.074
X-Spam-Level: 
X-Spam-Status: No, score=-2.074 tagged_above=-999 required=5 tests=[AWL=-0.031, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 ZbZj1zy8apXX for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 14:57:44 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 5EC3E3A67EC for <hybi@ietf.org>; Wed, 12 Jan 2011 14:57:44 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0CN01pf028209; Thu, 13 Jan 2011 00:00:01 +0100
Date: Thu, 13 Jan 2011 00:00:01 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110112230001.GK25018@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com> <20110112223632.GI25018@1wt.eu> <9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 22:57:46 -0000

On Wed, Jan 12, 2011 at 02:40:56PM -0800, Maciej Stachowiak wrote:
> I prefer the design that addresses more distinct attacks. This straw poll is about what masking algorithm to choose, not about how to address one specific attack. The preferences of many WG members will be based on factors that don't relate to security at all. So while you are free to disagree with my reasoning, I don't think it's fair to call it out of bounds for this poll.

I do think that because it's mixing solutions while maybe it is
not required.

> Also, I have no desire to cause yet another round of changing the masking. Let's pick the right one this time, and not thrash.

Then better delay the poll until we're sure that it's the masking that
must address the issue you've raised ?

> > The HTTP vs WS threat model was addressed a long time ago with the
> > handshake, but apparently you have discovered issues that were not
> > discovered by then. Thus we should probably revisit them and see
> > how to fix them.
> 
> I've explained in detail how masking that folds in a server nonce is a more robust defense multiple times, including in the past few days.

I personally have no objection against the XOR mask involving either or
both nonces provided that it only applies to payload, so as not to make
multiplexing impossible later.

Regards,
Willy


From dave@cridland.net  Wed Jan 12 15:14:47 2011
Return-Path: <dave@cridland.net>
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 CF4C93A67EC for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:14:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.546
X-Spam-Level: 
X-Spam-Status: No, score=-2.546 tagged_above=-999 required=5 tests=[AWL=0.053,  BAYES_00=-2.599]
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 NHPcWPzjCB+H for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:14:46 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 9C9073A65A5 for <hybi@ietf.org>; Wed, 12 Jan 2011 15:14:46 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 0A57A1168117; Wed, 12 Jan 2011 23:17:06 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0-nFp7E-LkWl; Wed, 12 Jan 2011 23:17:02 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 1FBAE11680FB; Wed, 12 Jan 2011 23:17:02 +0000 (GMT)
References: <4D2E0863.2040804@ericsson.com>
In-Reply-To: <4D2E0863.2040804@ericsson.com>
MIME-Version: 1.0
Message-Id: <22648.1294874222.125772@puncture>
Date: Wed, 12 Jan 2011 23:17:02 +0000
From: Dave Cridland <dave@cridland.net>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>, Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 23:14:47 -0000

On Wed Jan 12 20:00:35 2011, Salvatore Loreto wrote:
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to  
> reduce security risks.

I'm not clear how you can make the call that this is strong  
consensus, but still.

I can live - under protest - with something based on XOR with a  
maximum keylength of 56 bits. In this instance I no longer care what  
method is used to derive the key, and more to the point nor will the  
regulatory bodies within the EU.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From jat@google.com  Wed Jan 12 15:25:23 2011
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 F04A93A6809 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:25:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.578
X-Spam-Level: 
X-Spam-Status: No, score=-104.578 tagged_above=-999 required=5 tests=[AWL=-1.602, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 2paygbPNTkNH for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:25:22 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id CE87D3A67EC for <hybi@ietf.org>; Wed, 12 Jan 2011 15:25:21 -0800 (PST)
Received: from hpaq5.eem.corp.google.com (hpaq5.eem.corp.google.com [172.25.149.5]) by smtp-out.google.com with ESMTP id p0CNRfvq001296 for <hybi@ietf.org>; Wed, 12 Jan 2011 15:27:41 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294874861; bh=NxGJdJmAvKOgjPnUCmjKN9rJwMI=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=OpEx2TqiaDCQsqCWLvnp8lZ8bwKw7PceEBBxw2A+vJk7C/GWjqtHr9R/ZkKWL53B9 PBUkTGDNxXT8C18ASBxbQ==
Received: from ywa6 (ywa6.prod.google.com [10.192.1.6]) by hpaq5.eem.corp.google.com with ESMTP id p0CNRKkl016526 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Wed, 12 Jan 2011 15:27:40 -0800
Received: by ywa6 with SMTP id 6so564947ywa.26 for <hybi@ietf.org>; Wed, 12 Jan 2011 15:27:40 -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=0s5hQda4vuANDxtFXmLqtK0J5vXyBpXivxjvz1QE7Gw=; b=NAJKDP/SvwfW0a0VtDwnOH7jPBtz9MPVtRaIoykanCWiSNC0jAPHkixt0waog4EZju 3dsolaYHDdouBCbf4bOQ==
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=jVaTWuogFioMs+Iy4KrNRwmFYi4WyFtZd53N4hmgfRGSJWIlidlgi0S+xY9pA7WkJK YymDmpgYuaSTOJCAk1tw==
Received: by 10.150.192.12 with SMTP id p12mr2865384ybf.263.1294874859962; Wed, 12 Jan 2011 15:27:39 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 12 Jan 2011 15:27:19 -0800 (PST)
In-Reply-To: <20110112230001.GK25018@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com> <20110112223632.GI25018@1wt.eu> <9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com> <20110112230001.GK25018@1wt.eu>
From: John Tamplin <jat@google.com>
Date: Wed, 12 Jan 2011 18:27:19 -0500
Message-ID: <AANLkTi=rKhTe2++HicG0LgEO8vJ9Wci_TJtjgUTeb9p3@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=000e0cd6b11c0e81820499ae8ce5
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 23:25:23 -0000

--000e0cd6b11c0e81820499ae8ce5
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 12, 2011 at 6:00 PM, Willy Tarreau <w@1wt.eu> wrote:

> I personally have no objection against the XOR mask involving either or
> both nonces provided that it only applies to payload, so as not to make
> multiplexing impossible later.
>

I don't think applying the mask to the payload or the entire frame matters
regarding multiplexing - I believe the mux is going to have to unmask the
inner frames anyway [assuming they were masked at all - the initial use case
is a browser implementing muxing talking to a server (or frontend acting as
a server] that implements the MUX extension to reduce the number of
connections).

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

--000e0cd6b11c0e81820499ae8ce5
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 12, 2011 at 6:00 PM, Willy Tarreau <=
span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wr=
ote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">I personally have no objection against the XOR mask invol=
ving either or</div>
both nonces provided that it only applies to payload, so as not to make<br>
multiplexing impossible later.<br></blockquote></div><div><br></div>I don&#=
39;t think applying the mask to the payload or the entire frame matters reg=
arding multiplexing - I believe the mux is going to have to unmask the inne=
r frames anyway [assuming they were masked at all - the initial use case is=
 a browser implementing muxing talking to a server (or frontend acting as a=
 server] that implements the MUX extension to reduce the number of connecti=
ons).<br clear=3D"all">

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

--000e0cd6b11c0e81820499ae8ce5--

From ferg@caucho.com  Wed Jan 12 15:39:15 2011
Return-Path: <ferg@caucho.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 857B33A67D4 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:39:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.21
X-Spam-Level: 
X-Spam-Status: No, score=-2.21 tagged_above=-999 required=5 tests=[AWL=0.389,  BAYES_00=-2.599]
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 a5Mqsy4A7c9f for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:39:14 -0800 (PST)
Received: from nm15.bullet.mail.ac4.yahoo.com (nm15.bullet.mail.ac4.yahoo.com [98.139.52.212]) by core3.amsl.com (Postfix) with SMTP id 7C7E33A659C for <hybi@ietf.org>; Wed, 12 Jan 2011 15:39:14 -0800 (PST)
Received: from [98.139.52.197] by nm15.bullet.mail.ac4.yahoo.com with NNFMP; 12 Jan 2011 23:41:31 -0000
Received: from [98.139.52.151] by tm10.bullet.mail.ac4.yahoo.com with NNFMP; 12 Jan 2011 23:41:31 -0000
Received: from [127.0.0.1] by omp1034.mail.ac4.yahoo.com with NNFMP; 12 Jan 2011 23:41:31 -0000
X-Yahoo-Newman-Id: 564303.48212.bm@omp1034.mail.ac4.yahoo.com
Received: (qmail 90196 invoked from network); 12 Jan 2011 23:41:31 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp111.biz.mail.mud.yahoo.com with SMTP; 12 Jan 2011 15:41:30 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: BZdSmWAVM1kNJjsCKejLj2YA3QICaC2NasIqtepgf0QspDX AkV70LQv0HyQTQCOm0rJFk.UaFiX65R5vyX2zsdr8W0F5NSO2XqETFmMwSub zVxeXgkGVLoe7HvY7pA4DRtqi5Z2UKESbFwtszY14ASiiy4EZQPBU2.aGPoy F.6c8ljv1LKI9NfPDNA3fLqSsHLs3CmaEbBr1mO5zs9ORvKdIRWW9S75J8Kd A.gS0gPrxXcboYLe.PBq4zcO2WWtIArD0q9MaCd9olsCKBOuTv6Z4WZd4giA r6JCxeOfwzeGuqx1aLQNEagAaJPU4dt0IxrkRiFssFRhCJihIqUB44loquEe mryulUV84hteaFRFwy1fLLhldjmMwhiybXfdc0b1N
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D2E3C2A.5080609@caucho.com>
Date: Wed, 12 Jan 2011 15:41:30 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
References: <4D2E0863.2040804@ericsson.com>
In-Reply-To: <4D2E0863.2040804@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 23:39:15 -0000

Salvatore Loreto wrote:
> Hi all,
>
>
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce 
> security risks.

Well, more like acceptable overkill to achieve consensus.

>
> 1. a fixed mask carried entirely in the packet.
>

This is fine.

> 2. A longish repeated mask computed from the packet. For concreteness,
>    suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> || 
> <packet-key>), but
>    obviously there's flexibility here.
>
> 3. A fully generated mask (if so specify also what you would like to 
> use e.g. AES-CTR or HMAC-SHA).

These add no actual security value for this issue.

-- Scott


From derhoermi@gmx.net  Wed Jan 12 15:45:21 2011
Return-Path: <derhoermi@gmx.net>
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 6CBE23A67D4 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:45:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.233
X-Spam-Level: 
X-Spam-Status: No, score=-3.233 tagged_above=-999 required=5 tests=[AWL=-1.234, BAYES_00=-2.599, J_CHICKENPOX_31=0.6]
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 2sClpng3ke55 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:45:20 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id CB87C3A6822 for <hybi@ietf.org>; Wed, 12 Jan 2011 15:45:19 -0800 (PST)
Received: (qmail invoked by alias); 12 Jan 2011 23:47:39 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp007) with SMTP; 13 Jan 2011 00:47:39 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1+i4ntFdoqiwuqj0gvJlTZPYNsrmraysF7j87BsNU OqUQ2R8bF2ErbW
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Adam Barth <ietf@adambarth.com>
Date: Thu, 13 Jan 2011 00:47:34 +0100
Message-ID: <l2bsi6ll7c25ogv53kc1tj1gu88c2jjhg8@hive.bjoern.hoehrmann.de>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <sk1si6dvl4s1lmroa5qdt0ra2erd5066ri@hive.bjoern.hoehrmann.de> <AANLkTinBZeMoTLUjPUxjixB7sfhJ4yeHi3REk=oz76FC@mail.gmail.com>
In-Reply-To: <AANLkTinBZeMoTLUjPUxjixB7sfhJ4yeHi3REk=oz76FC@mail.gmail.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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, 12 Jan 2011 23:45:21 -0000

* Adam Barth wrote:
>Here's an example RFC that uses AES-128-CTR
>
>http://www.ietf.org/rfc/rfc4344.txt
>
>I believe it's technically defined by combining
>http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf and
>http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf, the
>later of which contains test vectors.  (Careful readers will notice
>that my example is wrong.)

I agree your example is wrong. So the concern was a chosen ciphertext
attack. For simplicity let's say Websocket frames are just 16 byte long
blocks and the attacker has full control over them. From the same 16
byte input the browser would generate at most 2^32 ciphertexts, so an
attacker can compute the masked frame for one of the nonces and send it
over and over again, eventually his ciphertext will appear.

Example: The handshake establishes the per-connection key K, I want to
put "0123456789ABCDEF" on the wire, I compute "0123456789ABCDEF" `xor`
AES(K, 0x12345678000000...) and ask the browser to send that again and
again; eventually it will pick 0x12345678 as per-frame nonce, it will
xor with the same AES value, and I get my attack payload on the wire
(if the block counter is not reset, I'd just take that into account by
recomputing the masked frame still assuming the same per-frame nonce.)

So is there an error in this analysis, or is the argument simply that
using your AES scheme seems to make attacks a little bit harder?
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From w@1wt.eu  Wed Jan 12 15:50:47 2011
Return-Path: <w@1wt.eu>
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 5AAAD3A686E for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:50:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.774
X-Spam-Level: 
X-Spam-Status: No, score=-1.774 tagged_above=-999 required=5 tests=[AWL=-0.331, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, J_CHICKENPOX_44=0.6]
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 1BIljW9-blLJ for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:50:46 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 342223A683B for <hybi@ietf.org>; Wed, 12 Jan 2011 15:50:46 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0CNqsZ4028355; Thu, 13 Jan 2011 00:52:54 +0100
Date: Thu, 13 Jan 2011 00:52:54 +0100
From: Willy Tarreau <w@1wt.eu>
To: John Tamplin <jat@google.com>
Message-ID: <20110112235254.GA28336@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com> <20110112223632.GI25018@1wt.eu> <9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com> <20110112230001.GK25018@1wt.eu> <AANLkTi=rKhTe2++HicG0LgEO8vJ9Wci_TJtjgUTeb9p3@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTi=rKhTe2++HicG0LgEO8vJ9Wci_TJtjgUTeb9p3@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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, 12 Jan 2011 23:50:47 -0000

On Wed, Jan 12, 2011 at 06:27:19PM -0500, John Tamplin wrote:
> On Wed, Jan 12, 2011 at 6:00 PM, Willy Tarreau <w@1wt.eu> wrote:
> 
> > I personally have no objection against the XOR mask involving either or
> > both nonces provided that it only applies to payload, so as not to make
> > multiplexing impossible later.
> >
> 
> I don't think applying the mask to the payload or the entire frame matters
> regarding multiplexing - I believe the mux is going to have to unmask the
> inner frames anyway [assuming they were masked at all - the initial use case
> is a browser implementing muxing talking to a server (or frontend acting as
> a server] that implements the MUX extension to reduce the number of
> connections).

Not necessarily John. Imagine for instance a mux which makes use of the
Host+path + maybe some other requests elements to aggregate multiple
streams over a single connection and forward it to a server. It will
know what stream goes where. However, if it wants to correctly
interleave frames, it must know their lengths, which means having
access to the framing (which almost only contains the length BTW).

Imagine you have two client streams A and B with frames numbered
1 to 4 of various lengths :

  A : 11222222222333333344444444444
  B : 11111122222222333333333333344

The mux would send that to C :

      A(11)B(111111)A(22222222222)B(2222222)...

This does not require decoding the payload though. However, if there is
no way to read the framing, multiplexing is not possible.

The only ones which will need to read the payload are the ones which
will accept the connection on behalf of the server. Since they will
share nonces with the client, if the keying depends on nonces, then
it will have to decode on one side to recode on the other one, which
becomes quite inefficient.

Regards,
Willy


From bruce@callenish.com  Wed Jan 12 15:59:48 2011
Return-Path: <bruce@callenish.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 1BB813A657C for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:59:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.586
X-Spam-Level: 
X-Spam-Status: No, score=-2.586 tagged_above=-999 required=5 tests=[AWL=0.013,  BAYES_00=-2.599]
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 210x223+Phhv for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 15:59:47 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 2F4EE3A6403 for <hybi@ietf.org>; Wed, 12 Jan 2011 15:59:47 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PdAdi-0000Qq-VQ for hybi@ietf.org; Wed, 12 Jan 2011 16:02:07 -0800
Message-ID: <4D2E4100.9010406@callenish.com>
Date: Wed, 12 Jan 2011 16:02:08 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com> <4D2E211D.90007@callenish.com> <2F572D74-9587-4798-91F6-AD313C31EFCA@apple.com>
In-Reply-To: <2F572D74-9587-4798-91F6-AD313C31EFCA@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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, 12 Jan 2011 23:59:48 -0000

On 12/01/2011 2:43 PM, Maciej Stachowiak wrote:
> That would fail to protect against the intermediary attack - the server (assumed untrusted) can control the client's first mask, so it can choose the plaintext of the first frame.

Ahh, now I understand what you are getting at. You are right. Because we 
are trying to do two different things with masking, the simplest 
solutions pull in two different directions. The intermediary attack 
needs random bits, and the cross site scripting attack is most easily 
dealt with using a mask generated from the server nonce.

Well, you could split the difference - half the bits from the server 
nonce and half random. I suspect you wouldn't like what that did to the 
increase in usefulness of brute-force attacks on the intermediary, 
though. The other thing you could do is to pull the verifiable 
server-nonce info into some other part of the data sent by the client, 
as John suggests with the HELLO frame. There are many other ways to do 
that, including using a Sec- header. Hmmm. Haven't we come full circle?



From ietf@adambarth.com  Wed Jan 12 16:03:20 2011
Return-Path: <ietf@adambarth.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 675A23A67D4 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 16:03:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.534
X-Spam-Level: 
X-Spam-Status: No, score=-3.534 tagged_above=-999 required=5 tests=[AWL=-1.157, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_31=0.6, RCVD_IN_DNSWL_LOW=-1]
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 WlVwfCMG1yCZ for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 16:03:19 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id EC9F63A6403 for <hybi@ietf.org>; Wed, 12 Jan 2011 16:03:18 -0800 (PST)
Received: by vws7 with SMTP id 7so413241vws.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 16:05:38 -0800 (PST)
Received: by 10.220.171.19 with SMTP id f19mr392032vcz.235.1294877137187; Wed, 12 Jan 2011 16:05:37 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id g27sm559118vby.14.2011.01.12.16.05.35 (version=SSLv3 cipher=RC4-MD5); Wed, 12 Jan 2011 16:05:36 -0800 (PST)
Received: by iyi42 with SMTP id 42so1123785iyi.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 16:05:34 -0800 (PST)
Received: by 10.231.173.12 with SMTP id n12mr1724314ibz.77.1294877134749; Wed, 12 Jan 2011 16:05:34 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Wed, 12 Jan 2011 16:05:04 -0800 (PST)
In-Reply-To: <l2bsi6ll7c25ogv53kc1tj1gu88c2jjhg8@hive.bjoern.hoehrmann.de>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <sk1si6dvl4s1lmroa5qdt0ra2erd5066ri@hive.bjoern.hoehrmann.de> <AANLkTinBZeMoTLUjPUxjixB7sfhJ4yeHi3REk=oz76FC@mail.gmail.com> <l2bsi6ll7c25ogv53kc1tj1gu88c2jjhg8@hive.bjoern.hoehrmann.de>
From: Adam Barth <ietf@adambarth.com>
Date: Wed, 12 Jan 2011 16:05:04 -0800
Message-ID: <AANLkTi=BvE1uUW2Nqx1PcL=8--NWqwMpsZK8RVdYFOpw@mail.gmail.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Thu, 13 Jan 2011 00:03:20 -0000

On Wed, Jan 12, 2011 at 3:47 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote=
:
> * Adam Barth wrote:
>>Here's an example RFC that uses AES-128-CTR
>>
>>http://www.ietf.org/rfc/rfc4344.txt
>>
>>I believe it's technically defined by combining
>>http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf and
>>http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf, the
>>later of which contains test vectors. =A0(Careful readers will notice
>>that my example is wrong.)
>
> I agree your example is wrong. So the concern was a chosen ciphertext
> attack. For simplicity let's say Websocket frames are just 16 byte long
> blocks and the attacker has full control over them. From the same 16
> byte input the browser would generate at most 2^32 ciphertexts, so an
> attacker can compute the masked frame for one of the nonces and send it
> over and over again, eventually his ciphertext will appear.
>
> Example: The handshake establishes the per-connection key K, I want to
> put "0123456789ABCDEF" on the wire, I compute "0123456789ABCDEF" `xor`
> AES(K, 0x12345678000000...) and ask the browser to send that again and
> again; eventually it will pick 0x12345678 as per-frame nonce, it will
> xor with the same AES value, and I get my attack payload on the wire
> (if the block counter is not reset, I'd just take that into account by
> recomputing the masked frame still assuming the same per-frame nonce.)
>
> So is there an error in this analysis, or is the argument simply that
> using your AES scheme seems to make attacks a little bit harder?

That's not really a chosen ciphertext attack.  A chosen ciphertext
attack means something specific in cryptography:

http://en.wikipedia.org/wiki/Chosen-ciphertext_attack

Your overall point is correct, however.  The security of the masking
depends on the size of the per-frame nonce.  That's the case for each
of the masking proposals.  32 bits seems like a reasonable trade-off
between security and per-frame size overhead.  With a 32 bit nonce,
you'll have to try this attack 2,147,483,648 times (on average) before
it works (that's around 2 billion).

Adam

From Martin.Thomson@andrew.com  Wed Jan 12 16:03:48 2011
Return-Path: <Martin.Thomson@andrew.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 0D3DA3A67D7 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 16:03:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.532
X-Spam-Level: 
X-Spam-Status: No, score=-2.532 tagged_above=-999 required=5 tests=[AWL=0.067,  BAYES_00=-2.599]
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 63F0o923H99B for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 16:03:47 -0800 (PST)
Received: from csmailgw1.commscope.com (csmailgw1.commscope.com [198.135.207.244]) by core3.amsl.com (Postfix) with ESMTP id 8F2633A6403 for <hybi@ietf.org>; Wed, 12 Jan 2011 16:03:46 -0800 (PST)
Received: from [10.86.20.103] ([10.86.20.103]:28535 "EHLO ACDCE7HC2.commscope.com") by csmailgw1.commscope.com with ESMTP id S41238192Ab1AMAGH (ORCPT <rfc822;hybi@ietf.org>); Wed, 12 Jan 2011 18:06:07 -0600
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.3.137.0; Wed, 12 Jan 2011 18:05:38 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Thu, 13 Jan 2011 08:05:35 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Maciej Stachowiak <mjs@apple.com>, Salvatore Loreto <salvatore.loreto@ericsson.com>
Date: Thu, 13 Jan 2011 08:05:33 +0800
Thread-Topic: [hybi] Straw-poll on Masking options
Thread-Index: Acuyp2C6Ut1/EkxaTcu0YHQOEaVtXQABIvIQ
Message-ID: <8B0A9FCBB9832F43971E38010638454F03F525932C@SISPE7MB1.commscope.com>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com>
In-Reply-To: <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw1.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 00:03:48 -0000

T24gMjAxMS0wMS0xMyBhdCAwOToyMzozNiwgTWFjaWVqIFN0YWNob3dpYWsgd3JvdGU6DQo+ID4g
Mi4gQSBsb25naXNoIHJlcGVhdGVkIG1hc2sgY29tcHV0ZWQgZnJvbSB0aGUgcGFja2V0LiBGb3IN
Cj4gY29uY3JldGVuZXNzLA0KPiA+ICAgc3VwcG9zZSBITUFDLVNIQTEoPHV1aWQ+LCA8c2VydmVy
LWNvbm4ta2V5PiB8fCA8Y2xpZW50LWNvbm4ta2V5PiB8fA0KPiA8cGFja2V0LWtleT4pLCBidXQN
Cj4gPiAgIG9idmlvdXNseSB0aGVyZSdzIGZsZXhpYmlsaXR5IGhlcmUuDQo+IA0KPiBJIGNhbiBs
aXZlIHdpdGggdGhpcyBvcHRpb24sIGJ1dCBpdCdzIG5vdCBteSBwcmVmZXJyZWQgY2hvaWNlLiBJ
dCBoYXMNCj4gd29yc2UgcGVyZm9ybWFuY2UgYW5kIHNsaWdodGx5IHdvcnNlIHNlY3VyaXR5IHBy
b3BlcnRpZXMgdGhhbiAjMy4NCg0KSSBkb24ndCBzZWUgaG93IGdlbmVyYXRpbmcgb25lIEhNQUMg
cGVyIGZyYW1lIGlzIGdvaW5nIHRvIGJlIGxlc3MgZWZmaWNpZW50IHRoYW4gZ2VuZXJhdGluZyBu
IGJpdHMuICBPbiB2ZXJ5IHNtYWxsICgyMCBieXRlKSBmcmFtZXMsIHN1cmUsIGJ1dCBvdmVyaGVh
ZHMgYXJlIGdvaW5nIHRvIGtpbGwgcGVyZm9ybWFuY2Ugb24gdGhvc2UgYW55d2F5Lg0K

From ekr@rtfm.com  Wed Jan 12 16:07:57 2011
Return-Path: <ekr@rtfm.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 6F5083A6784 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 16:07:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.675
X-Spam-Level: 
X-Spam-Status: No, score=-102.675 tagged_above=-999 required=5 tests=[AWL=0.302, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 x6ydj7FH7jTK for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 16:07:56 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 52B9E3A67D7 for <hybi@ietf.org>; Wed, 12 Jan 2011 16:07:56 -0800 (PST)
Received: by yxt33 with SMTP id 33so498343yxt.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 16:10:17 -0800 (PST)
MIME-Version: 1.0
Received: by 10.91.83.18 with SMTP id k18mr2417366agl.79.1294877416427; Wed, 12 Jan 2011 16:10:16 -0800 (PST)
Received: by 10.90.154.19 with HTTP; Wed, 12 Jan 2011 16:10:16 -0800 (PST)
In-Reply-To: <AANLkTi=Jtu+6E8OSqGVQZErTeW35v9_jrc4SfA-Y9QSs@mail.gmail.com>
References: <4D2E0863.2040804@ericsson.com> <AANLkTi=Jtu+6E8OSqGVQZErTeW35v9_jrc4SfA-Y9QSs@mail.gmail.com>
Date: Thu, 13 Jan 2011 00:10:16 +0000
Message-ID: <AANLkTineShqiwrn=85Xqzh54+3=Z910++Lu59nZ=Vd2c@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Adam Barth <ietf@adambarth.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 00:07:57 -0000

This relfects my position as well.

I would prefer AES but can live with any plausible PRF-looking thing

-Ekr



On Wed, Jan 12, 2011 at 9:22 PM, Adam Barth <ietf@adambarth.com> wrote:
> On Wed, Jan 12, 2011 at 12:00 PM, Salvatore Loreto
> <salvatore.loreto@ericsson.com> wrote:
>> Hi all,
>>
>> Masking from the client to the server
>> has reached strong consensus within this wg as a mechanism to reduce
>> security risks.
>>
>> However there is disagreement on the actual method for masking.
>> The technical differences, pro and cons, advantages and disadvantages,
>> as well as the legal implications of each method have already been deepl=
y
>> discussed.
>>
>> In order to settle the question of masking and find a way forward that h=
as a
>> wide acceptance,
>> Joe and I, as HyBi chairs, want to check where the consensus is
>> on the following relevant options that have been discussed (and summariz=
ed
>> at
>> some point in the mailing list by Eric Rescorla)
>>
>> 1. a fixed mask carried entirely in the packet.
>>
>> 2. A longish repeated mask computed from the packet. For concreteness,
>> =A0 suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
>> <packet-key>), but
>> =A0 obviously there's flexibility here.
>
> This option is ok, but less than ideal.
>
>> 3. A fully generated mask (if so specify also what you would like to use
>> e.g. AES-CTR or HMAC-SHA).
>
> This is the best option.
>
>> Please indicate your preference(s) or the one can meet your bar for "I c=
ould
>> live with that";
>> In the case you have more then one, please put the choices in a preferen=
ce
>> order.
>>
>> This poll will run until January 18th.
>>
>> cheers
>> /Sal
>>
>> --
>> Salvatore Loreto
>> www.sloreto.com
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From bruce@callenish.com  Wed Jan 12 16:09:18 2011
Return-Path: <bruce@callenish.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 7ACBD3A67D7 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 16:09:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.587
X-Spam-Level: 
X-Spam-Status: No, score=-2.587 tagged_above=-999 required=5 tests=[AWL=0.012,  BAYES_00=-2.599]
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 tTsCYFHzlqTT for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 16:09:17 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id BD31B3A6784 for <hybi@ietf.org>; Wed, 12 Jan 2011 16:09:17 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PdAmv-0006yg-Fw for hybi@ietf.org; Wed, 12 Jan 2011 16:11:37 -0800
Message-ID: <4D2E433A.8020105@callenish.com>
Date: Wed, 12 Jan 2011 16:11:38 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com> <AANLkTik-G0BYBj6fqabpRyfot7iAufQ9Df2yh5dOBUJq@mail.gmail.com> <A6C1B68A-BF42-4B9D-8434-BF6F070093DD@apple.com> <AANLkTi=NMZmqyTUqxhhm=+_mpq+O49NJ1UTN62vLx2HR@mail.gmail.com> <C0D46A37-4B06-4271-A15D-094162DBF841@apple.com> <14B88AD7-20B0-4D3C-99EF-D55AC4B376F4@apple.com>
In-Reply-To: <14B88AD7-20B0-4D3C-99EF-D55AC4B376F4@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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: Thu, 13 Jan 2011 00:09:18 -0000

On 12/01/2011 2:55 PM, Maciej Stachowiak wrote:
>
> There is a small single-digit number of client implementations that 
> will be exposed to the Web, and historically updating them has been 
> much faster than updating all servers.

Whoa, where did this assumption come from?

There are a huge number of HTTP clients on the web. That is because it 
is so easy to create them using standard libraries in most languages. It 
is true that if Websockets requires the kind of overhead you are 
suggesting it is unlikely there will be that many clients around, but if 
we can keep it lightweight there is no reason to think people won't be 
generating Websocket clients quite regularly, although probably not as 
many as there are HTTP clients.

If it ends up just being single digit number of clients (namely just the 
major browsers), I would see that as a fail for Websockets.


From mjs@apple.com  Wed Jan 12 17:01:41 2011
Return-Path: <mjs@apple.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 893E53A6846 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 17:01:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.243
X-Spam-Level: 
X-Spam-Status: No, score=-106.243 tagged_above=-999 required=5 tests=[AWL=-0.244, BAYES_00=-2.599, J_CHICKENPOX_43=0.6, 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 qKD6RaLAmlkI for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 17:01:40 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 9EEDA3A65A6 for <hybi@ietf.org>; Wed, 12 Jan 2011 17:01:40 -0800 (PST)
Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out3.apple.com (Postfix) with ESMTP id D1EF0C6CAFA0 for <hybi@ietf.org>; Wed, 12 Jan 2011 17:04:01 -0800 (PST)
X-AuditID: 11807134-b7cfdae000001831-c5-4d2e4f81670d
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay14.apple.com (Apple SCV relay) with SMTP id 61.FC.06193.18F4E2D4; Wed, 12 Jan 2011 17:04:01 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.50.212] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEX009U9SAPFA00@elliott.apple.com> for hybi@ietf.org; Wed, 12 Jan 2011 17:04:01 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D2E4100.9010406@callenish.com>
Date: Wed, 12 Jan 2011 17:04:00 -0800
Message-id: <B8A9FB5A-10C5-432D-A15B-FA7E5C4513BB@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com> <4D2E211D.90007@callenish.com> <2F572D74-9587-4798-91F6-AD313C31EFCA@apple.com> <4D2E4100.9010406@callenish.com>
To: Bruce Atherton <bruce@callenish.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Thu, 13 Jan 2011 01:01:41 -0000

On Jan 12, 2011, at 4:02 PM, Bruce Atherton wrote:

> On 12/01/2011 2:43 PM, Maciej Stachowiak wrote:
>> That would fail to protect against the intermediary attack - the server (assumed untrusted) can control the client's first mask, so it can choose the plaintext of the first frame.
> 
> Ahh, now I understand what you are getting at. You are right. Because we are trying to do two different things with masking, the simplest solutions pull in two different directions. The intermediary attack needs random bits, and the cross site scripting attack is most easily dealt with using a mask generated from the server nonce.
> 
> Well, you could split the difference - half the bits from the server nonce and half random. I suspect you wouldn't like what that did to the increase in usefulness of brute-force attacks on the intermediary, though.

That's effectively what the HMAC+XOR and AES-CTR proposals do, although they mix the bits in a cryptographically strong way, so it doesn't reduce the resistance to brute-force attacks in either direction.

> The other thing you could do is to pull the verifiable server-nonce info into some other part of the data sent by the client, as John suggests with the HELLO frame. There are many other ways to do that, including using a Sec- header. Hmmm. Haven't we come full circle?

I've explained why I don't think this is as robust as incorporating the server nonce into the mask. I think folks can make their own determination of whether this robustness is worthwhile.

Regards,
Maciej


From mjs@apple.com  Wed Jan 12 17:03:20 2011
Return-Path: <mjs@apple.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 8AFD23A67A4 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 17:03:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.535
X-Spam-Level: 
X-Spam-Status: No, score=-106.535 tagged_above=-999 required=5 tests=[AWL=0.064, BAYES_00=-2.599, 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 VFN1AIS5B0BJ for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 17:03:19 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id C7C8E3A65A6 for <hybi@ietf.org>; Wed, 12 Jan 2011 17:03:19 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out3.apple.com (Postfix) with ESMTP id 108DCC6CB07F for <hybi@ietf.org>; Wed, 12 Jan 2011 17:05:41 -0800 (PST)
X-AuditID: 11807136-b7bf8ae00000244a-d2-4d2e4fe4b0cd
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay15.apple.com (Apple SCV relay) with SMTP id 2B.4C.09290.4EF4E2D4; Wed, 12 Jan 2011 17:05:41 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.50.212] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEX002A1SDGMM40@gertie.apple.com> for hybi@ietf.org; Wed, 12 Jan 2011 17:05:40 -0800 (PST)
Sun-Java-System-SMTP-Warning: Lines longer than SMTP allows found and truncated.
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D2E433A.8020105@callenish.com>
Date: Wed, 12 Jan 2011 17:05:39 -0800
Message-id: <DA22F85E-DFEE-47CD-B5E1-B42050EDE367@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <4D2DEA53.6080901@callenish.com> <343AAA15-A0A1-4326-947F-6853F521350A@apple.com> <AANLkTik-G0BYBj6fqabpRyfot7iAufQ9Df2yh5dOBUJq@mail.gmail.com> <A6C1B68A-BF42-4B9D-8434-BF6F070093DD@apple.com> <AANLkTi=NMZmqyTUqxhhm=+_mpq+O49NJ1UTN62vLx2HR@mail.gmail.com> <C0D46A37-4B06-4271-A15D-094162DBF841@apple.com> <14B88AD7-20B0-4D3C-99EF-D55AC4B376F4@apple.com>
To: Bruce Atherton <bruce@callenish.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Thu, 13 Jan 2011 01:03:20 -0000

On Jan 12, 2011, at 4:11 PM, Bruce Atherton wrote:

> On 12/01/2011 2:55 PM, Maciej Stachowiak wrote:
>> 
>> There is a small single-digit number of client implementations that will be exposed to the Web, and historically updating them has been much faster than updating all servers.
> 
> Whoa, where did this assumption come from?
> 
> There are a huge number of HTTP clients on the web.

The vast majority them can't effectively be used for a "drive by" browsing attack, since users aren't using them to browse the Web. You are right that HTTP has non-browsing uses, but that's a completely different threat profile, because you can't force a victim user's system to act as the HTTP client.

Regards,
Maciej



From jat@google.com  Wed Jan 12 17:12:56 2011
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 B1D3B3A67EE for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 17:12:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.255
X-Spam-Level: 
X-Spam-Status: No, score=-104.255 tagged_above=-999 required=5 tests=[AWL=-1.879, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_44=0.6, RCVD_IN_DNSWL_LOW=-1, 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 6-vlPf3LJAmF for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 17:12:55 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 99DD73A67A4 for <hybi@ietf.org>; Wed, 12 Jan 2011 17:12:55 -0800 (PST)
Received: from hpaq14.eem.corp.google.com (hpaq14.eem.corp.google.com [172.25.149.14]) by smtp-out.google.com with ESMTP id p0D1FFTg027714 for <hybi@ietf.org>; Wed, 12 Jan 2011 17:15:15 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294881315; bh=+QT5VR5720wxd9HuSKC+rfPjSfo=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=RQEZzcK8hsRMLCVQ2zjokIckicXUMFaN6k6KM9d/9H6LEAI2VeegV4NF1Psxo3HQJ ceUsQOU0/bR8KQxQ8NDBw==
Received: from yxm8 (yxm8.prod.google.com [10.190.4.8]) by hpaq14.eem.corp.google.com with ESMTP id p0D1DRqi018046 for <hybi@ietf.org>; Wed, 12 Jan 2011 17:15:14 -0800
Received: by yxm8 with SMTP id 8so503154yxm.21 for <hybi@ietf.org>; Wed, 12 Jan 2011 17:15:14 -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=mLebN9nIWJd3PQjQLYfJ/xUjcspkkRKg97SzJ4gtLu0=; b=spyL8lTZuQKvLx7i2Q661fPHGNybFvROwaumk+GTSJtmnxY9BPPU+GLWaW7FE5elYN e3AzJ2BcKxA36hsWBkXA==
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=lvfL5jqPsZGWvdXrT4UBCAFHRsPt1JC9lZUL2jHpWgJ+rsYkOjTfTSzYQ7ZLRve6e5 +5W6UvzaUgnP8csQupMw==
Received: by 10.150.228.1 with SMTP id a1mr2833797ybh.434.1294881314082; Wed, 12 Jan 2011 17:15:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 12 Jan 2011 17:14:53 -0800 (PST)
In-Reply-To: <20110112235254.GA28336@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com> <20110112223632.GI25018@1wt.eu> <9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com> <20110112230001.GK25018@1wt.eu> <AANLkTi=rKhTe2++HicG0LgEO8vJ9Wci_TJtjgUTeb9p3@mail.gmail.com> <20110112235254.GA28336@1wt.eu>
From: John Tamplin <jat@google.com>
Date: Wed, 12 Jan 2011 20:14:53 -0500
Message-ID: <AANLkTimQ2dF318h3T9ZmBySkrb-=oxPVvDrHK0XuwOWk@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=000e0cd4040ec091040499b00cb8
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 01:12:56 -0000

--000e0cd4040ec091040499b00cb8
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 12, 2011 at 6:52 PM, Willy Tarreau <w@1wt.eu> wrote:

> Not necessarily John. Imagine for instance a mux which makes use of the
> Host+path + maybe some other requests elements to aggregate multiple
> streams over a single connection and forward it to a server. It will
> know what stream goes where. However, if it wants to correctly
> interleave frames, it must know their lengths, which means having
> access to the framing (which almost only contains the length BTW).
>
> Imagine you have two client streams A and B with frames numbered
> 1 to 4 of various lengths :
>
>  A : 11222222222333333344444444444
>  B : 11111122222222333333333333344
>
> The mux would send that to C :
>
>      A(11)B(111111)A(22222222222)B(2222222)...
>
> This does not require decoding the payload though. However, if there is
> no way to read the framing, multiplexing is not possible.
>
> The only ones which will need to read the payload are the ones which
> will accept the connection on behalf of the server. Since they will
> share nonces with the client, if the keying depends on nonces, then
> it will have to decode on one side to recode on the other one, which
> becomes quite inefficient.
>

The problem is that the MUX'd frame will itself be masked, so you are
double-masking it.  If you allow that on the grounds it is cheaper than
recoding it, then you impose a cost on the MUX-in-the-client case for having
to multiply encode each logical channel's frames, which I think is going to
be far more important (at least in the near term).

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

--000e0cd4040ec091040499b00cb8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Wed, Jan 12, 2011 at 6:52 PM, Willy Tarreau <=
span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wr=
ote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class=3D"h5">Not necessarily John. Imagine for instanc=
e a mux which makes use of the</div></div>
Host+path + maybe some other requests elements to aggregate multiple<br>
streams over a single connection and forward it to a server. It will<br>
know what stream goes where. However, if it wants to correctly<br>
interleave frames, it must know their lengths, which means having<br>
access to the framing (which almost only contains the length BTW).<br>
<br>
Imagine you have two client streams A and B with frames numbered<br>
1 to 4 of various lengths :<br>
<br>
 =C2=A0A : 11222222222333333344444444444<br>
 =C2=A0B : 11111122222222333333333333344<br>
<br>
The mux would send that to C :<br>
<br>
 =C2=A0 =C2=A0 =C2=A0A(11)B(111111)A(22222222222)B(2222222)...<br>
<br>
This does not require decoding the payload though. However, if there is<br>
no way to read the framing, multiplexing is not possible.<br>
<br>
The only ones which will need to read the payload are the ones which<br>
will accept the connection on behalf of the server. Since they will<br>
share nonces with the client, if the keying depends on nonces, then<br>
it will have to decode on one side to recode on the other one, which<br>
becomes quite inefficient.<br></blockquote><div><br></div><div>The problem =
is that the MUX&#39;d frame will itself be masked, so you are double-maskin=
g it. =C2=A0If you allow that on the grounds it is cheaper than recoding it=
, then you impose a cost on the MUX-in-the-client case for having to multip=
ly encode each logical channel&#39;s frames, which I think is going to be f=
ar more important (at least in the near term).=C2=A0</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--000e0cd4040ec091040499b00cb8--

From derhoermi@gmx.net  Wed Jan 12 19:56:16 2011
Return-Path: <derhoermi@gmx.net>
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 5067F3A6822 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 19:56:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.503
X-Spam-Level: 
X-Spam-Status: No, score=-3.503 tagged_above=-999 required=5 tests=[AWL=-0.904, BAYES_00=-2.599]
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 IkUkJXaXl8Ui for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 19:56:15 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id A19E43A67AD for <hybi@ietf.org>; Wed, 12 Jan 2011 19:56:14 -0800 (PST)
Received: (qmail invoked by alias); 13 Jan 2011 03:58:34 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp049) with SMTP; 13 Jan 2011 04:58:34 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX18PvV0X0SIPJXV0saC4S1MEyslvb+BLFQ7qc4PW1r Sm+cNinWkrI4o6
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Date: Thu, 13 Jan 2011 04:58:30 +0100
Message-ID: <4jmsi6dhidqr47iskdj39t6fv77hi5j52u@hive.bjoern.hoehrmann.de>
References: <4D2E0863.2040804@ericsson.com>
In-Reply-To: <4D2E0863.2040804@ericsson.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 03:56:16 -0000

* Salvatore Loreto wrote:
>However there is disagreement on the actual method for masking.

We disagree about the requirements our protocol design needs to meet. We
have some who find very simple schemes sufficient, others find them in-
sufficient. As far as I am aware, the latter group has not been able to
point out any software that has the combination of bugs that would give
cause to worry. They have not been able to cite an argument why such a
software would be deployed in notable numbers. They have not been able
to point out an attack that would make the simple schemes considerably
weaker than the more elaborate schemes. Nor have they shown that even if
we took all those things for granted that more elaborate masking schemes
are the best way to address "the problem". [1]

If there is something resembling rough consensus that more than simple
schemes offer needs to be done, we can figure out what the best way to
accomplish that is. If there is rough consensus in the other direction
we can make an effort to better understand the concerns and look for
other ways to address them if the concerns are unpersuasive. If the
concerns turn out to be persuasive, all the better.

I don't think running this poll and then seeing, say, well most people
prefer the very simple scheme, so let's ignore the concerns raised and
get this done, or seeing, well, round about everybody could live with
the "hash" option so let's just say run SHA-1 over the key and call it
a day, would lead to the best protocol design here, nor would it help
much to get something out "in time".

So I will not be participating in this poll.

[1] Given how ... unconvincing the concerns have become at this point
    I actually did investigate a similarily ... unconvincing solution
    http://lists.w3.org/Archives/Public/www-archive/2011Jan/0014.html

Well, off now; couple of years ago Microsoft sent me a free copy of the
Microsoft Press "Software Requirements" book; reading it again I will
either learn something new -- or won't feel bad throwing it at people.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From duerst@it.aoyama.ac.jp  Wed Jan 12 20:13:24 2011
Return-Path: <duerst@it.aoyama.ac.jp>
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 153253A6851 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 20:13:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -100.32
X-Spam-Level: 
X-Spam-Status: No, score=-100.32 tagged_above=-999 required=5 tests=[AWL=-0.530, BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265, MIME_8BIT_HEADER=0.3, 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 bAaB63lcpvjs for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 20:13:22 -0800 (PST)
Received: from scintmta01.scbb.aoyama.ac.jp (scintmta01.scbb.aoyama.ac.jp [133.2.253.33]) by core3.amsl.com (Postfix) with ESMTP id 4936C3A6862 for <hybi@ietf.org>; Wed, 12 Jan 2011 20:13:21 -0800 (PST)
Received: from scmse01.scbb.aoyama.ac.jp ([133.2.253.231]) by scintmta01.scbb.aoyama.ac.jp (secret/secret) with SMTP id p0D4FckM026632 for <hybi@ietf.org>; Thu, 13 Jan 2011 13:15:38 +0900
Received: from (unknown [133.2.206.133]) by scmse01.scbb.aoyama.ac.jp with smtp id 168b_1d9b_c6e16580_1ecb_11e0_9b1a_001d096c566a; Thu, 13 Jan 2011 13:15:38 +0900
Received: from [IPv6:::1] ([133.2.210.1]:60555) by itmail.it.aoyama.ac.jp with [XMail 1.22 ESMTP Server] id <S14B38B9> for <hybi@ietf.org> from <duerst@it.aoyama.ac.jp>; Thu, 13 Jan 2011 13:15:38 +0900
Message-ID: <4D2E7C61.2070905@it.aoyama.ac.jp>
Date: Thu, 13 Jan 2011 13:15:29 +0900
From: =?ISO-8859-1?Q?=22Martin_J=2E_D=FCrst=22?= <duerst@it.aoyama.ac.jp>
Organization: Aoyama Gakuin University
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
References: <4D2E0863.2040804@ericsson.com>
In-Reply-To: <4D2E0863.2040804@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 04:13:24 -0000

On 2011/01/13 5:00, Salvatore Loreto wrote:
> Hi all,
>
>
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce
> security risks.
>
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been
> deeply discussed.
>
> In order to settle the question of masking and find a way forward that
> has a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and
> summarized at
> some point in the mailing list by Eric Rescorla)
>
>
> 1. a fixed mask carried entirely in the packet.

My first preference is for a fixed mask per frame, directly visible at 
the start of the frame, derived from (possibly some server material and 
some client material and) some randomness, but not involving the packet 
data itself.
This seems to be potentially somewhat above a, but below 2. Please count 
this towards 1 and/or 2 depending on how the details turn out.

> 2. A longish repeated mask computed from the packet. For concreteness,
> suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> <packet-key>), but
> obviously there's flexibility here.
>
> 3. A fully generated mask (if so specify also what you would like to use
> e.g. AES-CTR or HMAC-SHA).

I won't die if the WG accepts this option, so in that sense, I have to 
admit "I could live" with it, but I'm extremely reluctant to agree to 
this. If in doubt, please count me out.

As a general comment, I have to say that this is the first protocol I 
know where there is talk about using data obfuscation in general and 
crypto in some variations in the non-secure version. Given the extremely 
long tradition of text-based application-level protocols in the IETF, 
and the very many advantages (debugging, education,...) of such 
protocols (probably underestimated by many because they are so obvious), 
I'm extremely reluctant to agree to anything that requires any state for 
decoding/inspecting packets.

Regards,   Martin.


> Please indicate your preference(s) or the one can meet your bar for "I
> could live with that";
> In the case you have more then one, please put the choices in a
> preference order.
>
> This poll will run until January 18th.
>
> cheers
> /Sal
>

-- 
#-# Martin J. Dürst, Professor, Aoyama Gakuin University
#-# http://www.sw.it.aoyama.ac.jp   mailto:duerst@it.aoyama.ac.jp

From w@1wt.eu  Wed Jan 12 22:11:25 2011
Return-Path: <w@1wt.eu>
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 130FC3A6AB0 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 22:11:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.472
X-Spam-Level: 
X-Spam-Status: No, score=-1.472 tagged_above=-999 required=5 tests=[AWL=-0.629, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, J_CHICKENPOX_44=0.6, J_CHICKENPOX_66=0.6]
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 5+o48UA8yr0G for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 22:11:18 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 74E163A6AB4 for <hybi@ietf.org>; Wed, 12 Jan 2011 22:11:16 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0D6DRu8029612; Thu, 13 Jan 2011 07:13:27 +0100
Date: Thu, 13 Jan 2011 07:13:27 +0100
From: Willy Tarreau <w@1wt.eu>
To: John Tamplin <jat@google.com>
Message-ID: <20110113061327.GB28336@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com> <20110112223632.GI25018@1wt.eu> <9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com> <20110112230001.GK25018@1wt.eu> <AANLkTi=rKhTe2++HicG0LgEO8vJ9Wci_TJtjgUTeb9p3@mail.gmail.com> <20110112235254.GA28336@1wt.eu> <AANLkTimQ2dF318h3T9ZmBySkrb-=oxPVvDrHK0XuwOWk@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTimQ2dF318h3T9ZmBySkrb-=oxPVvDrHK0XuwOWk@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 06:11:26 -0000

On Wed, Jan 12, 2011 at 08:14:53PM -0500, John Tamplin wrote:
> On Wed, Jan 12, 2011 at 6:52 PM, Willy Tarreau <w@1wt.eu> wrote:
> 
> > Not necessarily John. Imagine for instance a mux which makes use of the
> > Host+path + maybe some other requests elements to aggregate multiple
> > streams over a single connection and forward it to a server. It will
> > know what stream goes where. However, if it wants to correctly
> > interleave frames, it must know their lengths, which means having
> > access to the framing (which almost only contains the length BTW).
> >
> > Imagine you have two client streams A and B with frames numbered
> > 1 to 4 of various lengths :
> >
> >  A : 11222222222333333344444444444
> >  B : 11111122222222333333333333344
> >
> > The mux would send that to C :
> >
> >      A(11)B(111111)A(22222222222)B(2222222)...
> >
> > This does not require decoding the payload though. However, if there is
> > no way to read the framing, multiplexing is not possible.
> >
> > The only ones which will need to read the payload are the ones which
> > will accept the connection on behalf of the server. Since they will
> > share nonces with the client, if the keying depends on nonces, then
> > it will have to decode on one side to recode on the other one, which
> > becomes quite inefficient.
> >
> 
> The problem is that the MUX'd frame will itself be masked, so you are
> double-masking it.

No, that was not suggesting such a thing at all. I was really suggesting
that this component was forwarding frames that it has just interleaved.
However, if the encoding key cannot simply be adjuster per-frame, then
the mux has to decode+encode each frame. If the encoding is a simple XOR
and key is a derived from a random at the beginning of the frame and the
nonces, then the mux can still change it in each frame without having to
decode/recode.

Willy


From jat@google.com  Wed Jan 12 22:26:19 2011
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 9C3683A6AB5 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 22:26:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.23
X-Spam-Level: 
X-Spam-Status: No, score=-104.23 tagged_above=-999 required=5 tests=[AWL=-1.854, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_66=0.6, RCVD_IN_DNSWL_LOW=-1, 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 wver1gt+hTcQ for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 22:26:15 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id BCC2B3A686E for <hybi@ietf.org>; Wed, 12 Jan 2011 22:26:14 -0800 (PST)
Received: from kpbe15.cbf.corp.google.com (kpbe15.cbf.corp.google.com [172.25.105.79]) by smtp-out.google.com with ESMTP id p0D6SXuW012482 for <hybi@ietf.org>; Wed, 12 Jan 2011 22:28:35 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294900115; bh=b5rvSfGHQ7q0nijzNKcK9mPfMXE=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=NKBN/jxsgHDwllh09+ZcgM8gbd97q6TNmPFtY3/3b8IYnM1uDa5ivuNC7Xi0hjmhr +UL9XE17neyolRbm849YA==
Received: from yxi11 (yxi11.prod.google.com [10.190.3.11]) by kpbe15.cbf.corp.google.com with ESMTP id p0D6SVup029698 for <hybi@ietf.org>; Wed, 12 Jan 2011 22:28:32 -0800
Received: by yxi11 with SMTP id 11so544183yxi.16 for <hybi@ietf.org>; Wed, 12 Jan 2011 22:28:31 -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=SmK4mHjFhT0neAclS7B25BFQyYOr35pX5hfkk8rk2W8=; b=fYZ2S0SlguL/zrq9hCoYSPQuCSrs3GDBhVBJb/YjstD2ocXQ+03J9Fi7b4Q4MKmBqW 8ULhuaEsczFpix6X/6JA==
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=DtMffAba6BVB0QBarnfakvmu9tg5XaxKSayB2a2jSeyBWEufP8XbXWCeXCGHK5va01 R3tmT8kYXFKTmjBe4mBQ==
Received: by 10.151.85.10 with SMTP id n10mr3133934ybl.206.1294900111703; Wed, 12 Jan 2011 22:28:31 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Wed, 12 Jan 2011 22:28:11 -0800 (PST)
In-Reply-To: <20110113061327.GB28336@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com> <20110112223632.GI25018@1wt.eu> <9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com> <20110112230001.GK25018@1wt.eu> <AANLkTi=rKhTe2++HicG0LgEO8vJ9Wci_TJtjgUTeb9p3@mail.gmail.com> <20110112235254.GA28336@1wt.eu> <AANLkTimQ2dF318h3T9ZmBySkrb-=oxPVvDrHK0XuwOWk@mail.gmail.com> <20110113061327.GB28336@1wt.eu>
From: John Tamplin <jat@google.com>
Date: Thu, 13 Jan 2011 01:28:11 -0500
Message-ID: <AANLkTim1ODbvRHO_HK9Kzt8mfQaFZbbbqPPeAj7Wx2jQ@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=000e0cd569442d80820499b46d3c
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 06:26:20 -0000

--000e0cd569442d80820499b46d3c
Content-Type: text/plain; charset=UTF-8

On Thu, Jan 13, 2011 at 1:13 AM, Willy Tarreau <w@1wt.eu> wrote:

> > The problem is that the MUX'd frame will itself be masked, so you are
> > double-masking it.
>
> No, that was not suggesting such a thing at all. I was really suggesting
> that this component was forwarding frames that it has just interleaved.
> However, if the encoding key cannot simply be adjuster per-frame, then
> the mux has to decode+encode each frame. If the encoding is a simple XOR
> and key is a derived from a random at the beginning of the frame and the
> nonces, then the mux can still change it in each frame without having to
> decode/recode.
>

It seems clear that the consensus will be that servers accepting connections
from untrusted clients will refuse to accept unmasked connections.
 Therefore, the MUX->server frames must be masked.  Each frame can only have
one mask, therefore the mux'd frame cannot use the mask of any of the
embedded frames (plus current discussions would require them to use nonces
from each handshake, which would also prevent reusing one of the embedded
frame's masking).  Each of the mux's clients will also be masked with its
own key.  Therefore, either the mux must double-mask the embedded frame's
payload, or it must unmask and remask them.  Even if the mask is pure XOR
and it can modify the masked data, I would consider that still decoding
under the old mask and recoding under the new one.

I believe the most common use for multiplexing will be for a browser to
aggregate connections between tabs (and within a given tab, as an app may be
composed of separately written modules which use their own WebSocket
connections) to a single server.  In that case, it does not need to
unmask/remask the data, as the data is already unmasked -- instead, it
simply masks the entire mux frame.

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

--000e0cd569442d80820499b46d3c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Jan 13, 2011 at 1:13 AM, Willy Tarreau <=
span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wr=
ote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">&gt; The problem is that the MUX&#39;d frame will itself =
be masked, so you are<br>
&gt; double-masking it.<br>
<br>
</div>No, that was not suggesting such a thing at all. I was really suggest=
ing<br>
that this component was forwarding frames that it has just interleaved.<br>
However, if the encoding key cannot simply be adjuster per-frame, then<br>
the mux has to decode+encode each frame. If the encoding is a simple XOR<br=
>
and key is a derived from a random at the beginning of the frame and the<br=
>
nonces, then the mux can still change it in each frame without having to<br=
>
decode/recode.<font class=3D"Apple-style-span" color=3D"#888888"><br></font=
></blockquote></div><div><br></div>It seems clear that the consensus will b=
e that servers accepting connections from untrusted clients will refuse to =
accept unmasked connections. =C2=A0Therefore, the MUX-&gt;server frames mus=
t be masked. =C2=A0Each frame can only have one mask, therefore the mux&#39=
;d frame cannot use the mask of any of the embedded frames (plus current di=
scussions would require them to use nonces from each handshake, which would=
 also prevent reusing one of the embedded frame&#39;s masking). =C2=A0Each =
of the mux&#39;s clients will also be masked with its own key. =C2=A0Theref=
ore, either the mux must double-mask the embedded frame&#39;s payload, or i=
t must unmask and remask them. =C2=A0Even if the mask is pure XOR and it ca=
n modify the masked data, I would consider that still decoding under the ol=
d mask and recoding under the new one.<div>

<br></div><div>I believe the most common use for multiplexing will be for a=
 browser to aggregate connections between tabs (and within a given tab, as =
an app may be composed of separately written modules which use their own We=
bSocket connections) to a single server. =C2=A0In that case, it does not ne=
ed to unmask/remask the data, as the data is already unmasked -- instead, i=
t simply masks the entire mux frame.<br clear=3D"all">

<br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>
</div>

--000e0cd569442d80820499b46d3c--

From w@1wt.eu  Wed Jan 12 22:37:28 2011
Return-Path: <w@1wt.eu>
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 CF0F23A6AB8 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 22:37:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.068
X-Spam-Level: 
X-Spam-Status: No, score=-2.068 tagged_above=-999 required=5 tests=[AWL=-0.025, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 X8EquzT0Yy6W for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 22:37:27 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 65BA83A6AB7 for <hybi@ietf.org>; Wed, 12 Jan 2011 22:37:27 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0D6dhmI029657; Thu, 13 Jan 2011 07:39:43 +0100
Date: Thu, 13 Jan 2011 07:39:43 +0100
From: Willy Tarreau <w@1wt.eu>
To: John Tamplin <jat@google.com>
Message-ID: <20110113063943.GC28336@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com> <20110112223632.GI25018@1wt.eu> <9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com> <20110112230001.GK25018@1wt.eu> <AANLkTi=rKhTe2++HicG0LgEO8vJ9Wci_TJtjgUTeb9p3@mail.gmail.com> <20110112235254.GA28336@1wt.eu> <AANLkTimQ2dF318h3T9ZmBySkrb-=oxPVvDrHK0XuwOWk@mail.gmail.com> <20110113061327.GB28336@1wt.eu> <AANLkTim1ODbvRHO_HK9Kzt8mfQaFZbbbqPPeAj7Wx2jQ@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTim1ODbvRHO_HK9Kzt8mfQaFZbbbqPPeAj7Wx2jQ@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 06:37:28 -0000

On Thu, Jan 13, 2011 at 01:28:11AM -0500, John Tamplin wrote:
> It seems clear that the consensus will be that servers accepting connections
> from untrusted clients will refuse to accept unmasked connections.

Agreed.

> Therefore, the MUX->server frames must be masked.

Agreed.

> Each frame can only have one mask, therefore the mux'd frame cannot use
> the mask of any of the embedded frames (plus current discussions would
> require them to use nonces from each handshake, which would also prevent
> reusing one of the embedded frame's masking).  Each of the mux's clients
> will also be masked with its own key.  Therefore, either the mux must
> double-mask the embedded frame's payload,

no, but below :

> or it must unmask and remask them.

Yes, that's what I was saying (or at least trying to say) !

> Even if the mask is pure XOR
> and it can modify the masked data, I would consider that still decoding
> under the old mask and recoding under the new one.

Yes, or as I said, in this case, it's possible to change the masking
key at the beginning of the frame without touching the data :

   new_key = old_key ^ client_side_key ^ server_side_key;

> I believe the most common use for multiplexing will be for a browser to
> aggregate connections between tabs (and within a given tab, as an app may be
> composed of separately written modules which use their own WebSocket
> connections) to a single server.  In that case, it does not need to
> unmask/remask the data, as the data is already unmasked -- instead, it
> simply masks the entire mux frame.

At the beginning it might be the most common use, but quickly we'll
see for WS the same optimizers that exist with HTTP. The same causes
will cause the same effects. Having one million concurrent connections
to a thread app is not possible. Having them on a front proxy which
aggregates them over a few hundreds of connections is possible and
not much difficult. That's already how some large sites handle large
amounts of HTTP connections, despite the in-order design. With WS,
there will not even be the in-order issue which means that a very
low number of concurrent connections will suffice.

So I really predict that multiplexing at the front of server-side
infrastructure will quickly appear. And if we don't design it ourselves,
some will add their proprietary extensions to support it, and we'll see
some "Fast-WebSocket", "WebSocket-Express" or such things emerge with
their own API.

Regards,
Willy


From jat@google.com  Wed Jan 12 22:57:09 2011
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 E12B83A695B for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 22:57:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.783
X-Spam-Level: 
X-Spam-Status: No, score=-103.783 tagged_above=-999 required=5 tests=[AWL=-0.807, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 GCKnSQF+7nAi for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 22:57:07 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 2873F3A6AAC for <hybi@ietf.org>; Wed, 12 Jan 2011 22:57:07 -0800 (PST)
Received: from hpaq13.eem.corp.google.com (hpaq13.eem.corp.google.com [172.25.149.13]) by smtp-out.google.com with ESMTP id p0D6xRb4006350 for <hybi@ietf.org>; Wed, 12 Jan 2011 22:59:28 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294901968; bh=C3B6gPOGCpKX7J4mFxKZWt7cW9U=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=cw8q8ZMQTFPpQ6F/eN4+rwtA1OS+a+R6jKxZ/ZsBhH6uwpMBPNaGXmCrlKm6sO08i fsWvbWcpqGmujYbRw9Uyg==
Received: from qyk36 (qyk36.prod.google.com [10.241.83.164]) by hpaq13.eem.corp.google.com with ESMTP id p0D6x4Ml013337 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Wed, 12 Jan 2011 22:59:26 -0800
Received: by qyk36 with SMTP id 36so1388703qyk.13 for <hybi@ietf.org>; Wed, 12 Jan 2011 22:59:26 -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=/B98UKGfRENaImbsbip5pyacv2KSolkR5TEaaehL5NM=; b=sTnNNl7XziZLxyBzExZJTlh1ttIW2qRsf1QMWGStdaxFuuzVeMpznz23dT1PUhI/pL exX8DyYdvJtjil9T3Bag==
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=klm0qi/4NrMlm6SHrF4eScyoeS6xDkTaIyYi3DXwyAZ/z0XHmN30fyvx7XaLznNh+0 4OXpGv3bwEmITvdu+e2A==
Received: by 10.229.232.15 with SMTP id js15mr480432qcb.136.1294901966215; Wed, 12 Jan 2011 22:59:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.78.96 with HTTP; Wed, 12 Jan 2011 22:59:05 -0800 (PST)
In-Reply-To: <20110113063943.GC28336@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com> <20110112223632.GI25018@1wt.eu> <9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com> <20110112230001.GK25018@1wt.eu> <AANLkTi=rKhTe2++HicG0LgEO8vJ9Wci_TJtjgUTeb9p3@mail.gmail.com> <20110112235254.GA28336@1wt.eu> <AANLkTimQ2dF318h3T9ZmBySkrb-=oxPVvDrHK0XuwOWk@mail.gmail.com> <20110113061327.GB28336@1wt.eu> <AANLkTim1ODbvRHO_HK9Kzt8mfQaFZbbbqPPeAj7Wx2jQ@mail.gmail.com> <20110113063943.GC28336@1wt.eu>
From: John Tamplin <jat@google.com>
Date: Thu, 13 Jan 2011 01:59:05 -0500
Message-ID: <AANLkTi=EOVczHhK1i7pJ-tCt1Yg5TECL3vov-zxbdhMT@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=0016363b90c4b719b20499b4db71
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 06:57:09 -0000

--0016363b90c4b719b20499b4db71
Content-Type: text/plain; charset=UTF-8

On Thu, Jan 13, 2011 at 1:39 AM, Willy Tarreau <w@1wt.eu> wrote:

> Yes, or as I said, in this case, it's possible to change the masking
> key at the beginning of the frame without touching the data :
>
>   new_key = old_key ^ client_side_key ^ server_side_key;


Ok, I see what you are saying now -- I agree that if this form of masking is
chosen you could simply alter the key for the logical channel frame and not
have to modify the payload bytes.

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

--0016363b90c4b719b20499b4db71
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Jan 13, 2011 at 1:39 AM, Willy Tarreau <=
span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wr=
ote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">Yes, or as I said, in this case, it&#39;s possible to cha=
nge the masking</div>
key at the beginning of the frame without touching the data :<br>
<br>
 =C2=A0 new_key =3D old_key ^ client_side_key ^ server_side_key;</blockquot=
e><div><br></div><div>Ok, I see what you are saying now -- I agree that if =
this form of masking is chosen you could simply alter the key for the logic=
al channel frame and not have to modify the payload bytes.=C2=A0</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--0016363b90c4b719b20499b4db71--

From tyoshino@google.com  Thu Jan 13 01:07:23 2011
Return-Path: <tyoshino@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 EB84B3A69EE for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 01:07:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.092
X-Spam-Level: 
X-Spam-Status: No, score=-102.092 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_FONT_FACE_BAD=0.884, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 Xs3jHeTi61RT for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 01:07:22 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 619E03A69C2 for <hybi@ietf.org>; Thu, 13 Jan 2011 01:07:21 -0800 (PST)
Received: from wpaz24.hot.corp.google.com (wpaz24.hot.corp.google.com [172.24.198.88]) by smtp-out.google.com with ESMTP id p0D99gBt030044 for <hybi@ietf.org>; Thu, 13 Jan 2011 01:09:43 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294909783; bh=OukcvB+pye/MclYHWgpJ3wvlPFc=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=VWVqseYxNn7pnLm1s/0/11Z4D0XztcTHige5vvanqhTnvIC2fpl3C8ehyytujqNNo l0yaH+RNchGWg0R0b1VFQ==
Received: from iwn37 (iwn37.prod.google.com [10.241.68.101]) by wpaz24.hot.corp.google.com with ESMTP id p0D99EON023966 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Thu, 13 Jan 2011 01:09:41 -0800
Received: by iwn37 with SMTP id 37so1617094iwn.39 for <hybi@ietf.org>; Thu, 13 Jan 2011 01:09:41 -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=Lwwebws+7xiYL9EIsGJN8z+1BJHxvsZ4Awf8bcWJCH8=; b=kxkW1fUSE1ZWTRQpmZgwMwUX3ybbglkJOeMW5KzsbTvE7HTFqHmoP6CVWfYTTtcjle ut7afXYCs6D+ql2xHDnw==
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=uXk2/y4yZYWQhYPQ83l/MMBXgGfrt6WWRLVx7YHagdfR94tmHF0FY5lSa05iGudtRj GXRyGXZafpSlCQYsuS3g==
Received: by 10.231.173.67 with SMTP id o3mr2187765ibz.29.1294909780013; Thu, 13 Jan 2011 01:09:40 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.15.139 with HTTP; Thu, 13 Jan 2011 01:09:19 -0800 (PST)
In-Reply-To: <AANLkTinBZeMoTLUjPUxjixB7sfhJ4yeHi3REk=oz76FC@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <sk1si6dvl4s1lmroa5qdt0ra2erd5066ri@hive.bjoern.hoehrmann.de> <AANLkTinBZeMoTLUjPUxjixB7sfhJ4yeHi3REk=oz76FC@mail.gmail.com>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Thu, 13 Jan 2011 18:09:19 +0900
Message-ID: <AANLkTi=CpyVwMYjqaaWizB0=Q5w-oD=xyBFg3_Bs_w5E@mail.gmail.com>
To: Adam Barth <ietf@adambarth.com>
Content-Type: multipart/alternative; boundary=0016364edb0c743e6b0499b6ad19
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Thu, 13 Jan 2011 09:07:24 -0000

--0016364edb0c743e6b0499b6ad19
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Jan 13, 2011 at 06:15, Adam Barth <ietf@adambarth.com> wrote:

> On Wed, Jan 12, 2011 at 12:28 PM, Bjoern Hoehrmann <derhoermi@gmx.net>
> wrote:
> > * Adam Barth wrote:
> >>http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
> >
> > This says:
> >
> >  The masked-data is the clear-text frame encrypted under AES-128-CTR
> >  (see [TODO: Cite AES-128-CTR]) using the masking-key as the key and
> >  the initial counter value equal to the masking-nonce followed by 28
> >  zero octets.
> >
> >  For example, octet i of the masked-data is computed from octet i of
> >  the clear-text frame as follows:
> >
> >    initial-counter = masking-nonce << 96
> >    masked-octet-i = clear-text-octet-i XOR AES_k(initial-counter + i)
> >
> >  where AES_k is AES keyed with the masking-key.
> >
> > Could you give a reference for AES-128-CTR and explain the example?
>
> Here's an example RFC that uses AES-128-CTR
>
> http://www.ietf.org/rfc/rfc4344.txt
>
> I believe it's technically defined by combining
> http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf and
> http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf, the
> later of which contains test vectors.  (Careful readers will notice
> that my example is wrong.)
>
>
So, this part can be rewritten like this, I thought. do you think it's
correct?

----
...[snip]
   the initial counter value equal to the masking-nonce followed by 12

...[snip]

  initial-counter = masking-nonce << 96
  for i = 0 to size-of-clear-text - 1
    j = i MOD 16
    if j == 0
      frame-key = AES_k(initial-counter + i / 16)

    masked-octet-i = clear-text-octet-i XOR octet-j-of-frame-key
----

and, since masking-key is 20 octet length, it looks like we must
truncated/padded key to fit AES key size?


> Adam
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--0016364edb0c743e6b0499b6ad19
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Jan 13, 2011 at 06:15, Adam Barth <span =
dir=3D"ltr">&lt;<a href=3D"mailto:ietf@adambarth.com">ietf@adambarth.com</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">On Wed, Jan 12, 2011 at 12:28 PM, Bjoern Hoehrmann &lt;<a=
 href=3D"mailto:derhoermi@gmx.net">derhoermi@gmx.net</a>&gt; wrote:<br>
&gt; * Adam Barth wrote:<br>
&gt;&gt;<a href=3D"http://www.ietf.org/id/draft-abarth-thewebsocketprotocol=
-01.txt" target=3D"_blank">http://www.ietf.org/id/draft-abarth-thewebsocket=
protocol-01.txt</a><br>
&gt;<br>
&gt; This says:<br>
&gt;<br>
&gt; =A0The masked-data is the clear-text frame encrypted under AES-128-CTR=
<br>
&gt; =A0(see [TODO: Cite AES-128-CTR]) using the masking-key as the key and=
<br>
&gt; =A0the initial counter value equal to the masking-nonce followed by 28=
<br>
&gt; =A0zero octets.<br>
&gt;<br>
&gt; =A0For example, octet i of the masked-data is computed from octet i of=
<br>
&gt; =A0the clear-text frame as follows:<br>
&gt;<br>
&gt; =A0 =A0initial-counter =3D masking-nonce &lt;&lt; 96<br>
&gt; =A0 =A0masked-octet-i =3D clear-text-octet-i XOR AES_k(initial-counter=
 + i)<br>
&gt;<br>
&gt; =A0where AES_k is AES keyed with the masking-key.<br>
&gt;<br>
&gt; Could you give a reference for AES-128-CTR and explain the example?<br=
>
<br>
</div>Here&#39;s an example RFC that uses AES-128-CTR<br>
<br>
<a href=3D"http://www.ietf.org/rfc/rfc4344.txt" target=3D"_blank">http://ww=
w.ietf.org/rfc/rfc4344.txt</a><br>
<br>
I believe it&#39;s technically defined by combining<br>
<a href=3D"http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf" tar=
get=3D"_blank">http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf<=
/a> and<br>
<a href=3D"http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf=
" target=3D"_blank">http://csrc.nist.gov/publications/nistpubs/800-38a/sp80=
0-38a.pdf</a>, the<br>
later of which contains test vectors. =A0(Careful readers will notice<br>
that my example is wrong.)<br>
<font color=3D"#888888"><br></font></blockquote><div><br></div><div>So, thi=
s part can be rewritten like this, I thought. do you think it&#39;s correct=
?</div><div><br></div><div>----</div><div>...[snip]</div><div>=A0=A0 the in=
itial counter value equal to the masking-nonce followed by <span class=3D"A=
pple-style-span" style=3D"background-color: rgb(255, 153, 102);">12</span><=
/div>

<div><br></div><div>...[snip]</div><div><br></div><div><font class=3D"Apple=
-style-span" face=3D"&#39;courier new&#39;, monospace">=A0=A0initial-counte=
r =3D masking-nonce &lt;&lt; 96</font></div><div><font class=3D"Apple-style=
-span" face=3D"&#39;courier new&#39;, monospace">=A0=A0for i =3D 0 to size-=
of-clear-text - 1</font></div>

<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace">=A0=A0 =A0j =3D i MOD 16</font></div><div><font class=3D"Apple-style-s=
pan" face=3D"&#39;courier new&#39;, monospace"></font><span class=3D"Apple-=
style-span" style=3D"font-family: &#39;courier new&#39;, monospace; ">=A0=
=A0 =A0if j =3D=3D 0</span></div>

<div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, monosp=
ace">=A0=A0 =A0 =A0frame-key =3D AES_k(initial-counter + i / 16)</font></di=
v><div><font class=3D"Apple-style-span" face=3D"&#39;courier new&#39;, mono=
space"><br></font></div>

<div><span class=3D"Apple-style-span" style=3D"font-family: &#39;courier ne=
w&#39;, monospace; ">=A0=A0 =A0masked-octet-i =3D clear-text-octet-i XOR oc=
tet-j-of-frame-key</span></div><div>----</div><div><br></div><div>and, sinc=
e masking-key is 20 octet length, it looks like we must truncated/padded ke=
y to fit AES key size?</div>

<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;"><font color=3D"#888888">
Adam<br>
</font><div><div></div><div class=3D"h5">__________________________________=
_____________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br>

--0016364edb0c743e6b0499b6ad19--

From ietf@adambarth.com  Thu Jan 13 01:23:51 2011
Return-Path: <ietf@adambarth.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 4388D3A6A04 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 01:23:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.827
X-Spam-Level: 
X-Spam-Status: No, score=-3.827 tagged_above=-999 required=5 tests=[AWL=-0.850, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 rWNRsPgNUGr2 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 01:23:49 -0800 (PST)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by core3.amsl.com (Postfix) with ESMTP id 33E373A69F2 for <hybi@ietf.org>; Thu, 13 Jan 2011 01:23:49 -0800 (PST)
Received: by gxk28 with SMTP id 28so668575gxk.31 for <hybi@ietf.org>; Thu, 13 Jan 2011 01:26:11 -0800 (PST)
Received: by 10.90.34.12 with SMTP id h12mr2879161agh.84.1294910769631; Thu, 13 Jan 2011 01:26:09 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id w4sm1924778anw.36.2011.01.13.01.26.07 (version=SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 01:26:07 -0800 (PST)
Received: by iwn40 with SMTP id 40so1451587iwn.31 for <hybi@ietf.org>; Thu, 13 Jan 2011 01:26:06 -0800 (PST)
Received: by 10.231.199.12 with SMTP id eq12mr2191333ibb.2.1294910766418; Thu, 13 Jan 2011 01:26:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Thu, 13 Jan 2011 01:25:36 -0800 (PST)
In-Reply-To: <AANLkTi=CpyVwMYjqaaWizB0=Q5w-oD=xyBFg3_Bs_w5E@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <sk1si6dvl4s1lmroa5qdt0ra2erd5066ri@hive.bjoern.hoehrmann.de> <AANLkTinBZeMoTLUjPUxjixB7sfhJ4yeHi3REk=oz76FC@mail.gmail.com> <AANLkTi=CpyVwMYjqaaWizB0=Q5w-oD=xyBFg3_Bs_w5E@mail.gmail.com>
From: Adam Barth <ietf@adambarth.com>
Date: Thu, 13 Jan 2011 01:25:36 -0800
Message-ID: <AANLkTi=vbc6TTcxzxRdi_80TtXAp4GVJ-D-dhuTK3bn2@mail.gmail.com>
To: Takeshi Yoshino <tyoshino@google.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] It's time to ship
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: Thu, 13 Jan 2011 09:23:51 -0000

On Thu, Jan 13, 2011 at 1:09 AM, Takeshi Yoshino <tyoshino@google.com> wrot=
e:
> On Thu, Jan 13, 2011 at 06:15, Adam Barth <ietf@adambarth.com> wrote:
>> On Wed, Jan 12, 2011 at 12:28 PM, Bjoern Hoehrmann <derhoermi@gmx.net>
>> wrote:
>> > * Adam Barth wrote:
>> >>http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
>> >
>> > This says:
>> >
>> > =A0The masked-data is the clear-text frame encrypted under AES-128-CTR
>> > =A0(see [TODO: Cite AES-128-CTR]) using the masking-key as the key and
>> > =A0the initial counter value equal to the masking-nonce followed by 28
>> > =A0zero octets.
>> >
>> > =A0For example, octet i of the masked-data is computed from octet i of
>> > =A0the clear-text frame as follows:
>> >
>> > =A0 =A0initial-counter =3D masking-nonce << 96
>> > =A0 =A0masked-octet-i =3D clear-text-octet-i XOR AES_k(initial-counter=
 + i)
>> >
>> > =A0where AES_k is AES keyed with the masking-key.
>> >
>> > Could you give a reference for AES-128-CTR and explain the example?
>>
>> Here's an example RFC that uses AES-128-CTR
>>
>> http://www.ietf.org/rfc/rfc4344.txt
>>
>> I believe it's technically defined by combining
>> http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf and
>> http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf, the
>> later of which contains test vectors. =A0(Careful readers will notice
>> that my example is wrong.)
>>
>
> So, this part can be rewritten like this, I thought. do you think it's
> correct?
> ----
> ...[snip]
> =A0=A0 the initial counter value equal to the masking-nonce followed by 1=
2
> ...[snip]
> =A0=A0initial-counter =3D masking-nonce << 96
> =A0=A0for i =3D 0 to size-of-clear-text - 1
> =A0=A0 =A0j =3D i MOD 16
> =A0=A0 =A0if j =3D=3D 0
> =A0=A0 =A0 =A0frame-key =3D AES_k(initial-counter + i / 16)
> =A0=A0 =A0masked-octet-i =3D clear-text-octet-i XOR octet-j-of-frame-key
> ----
> and, since masking-key is 20 octet length, it looks like we must
> truncated/padded key to fit AES key size?

Something like that.  Luckily we have crypto experts to help us get it
exactly right.

Adam

From salvatore.loreto@ericsson.com  Thu Jan 13 02:39:17 2011
Return-Path: <salvatore.loreto@ericsson.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 B29393A6A17 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 02:39:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.537
X-Spam-Level: 
X-Spam-Status: No, score=-106.537 tagged_above=-999 required=5 tests=[AWL=0.061, BAYES_00=-2.599, 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 okw5I7We4tNK for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 02:39:16 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 565053A6AE3 for <hybi@ietf.org>; Thu, 13 Jan 2011 02:39:16 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-04-4d2ed6e1725e
Received: from esessmw0256.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id D5.50.13987.1E6DE2D4; Thu, 13 Jan 2011 11:41:37 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0256.eemea.ericsson.se (153.88.115.97) with Microsoft SMTP Server id 8.2.234.1; Thu, 13 Jan 2011 11:41:37 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 199E524F7	for <hybi@ietf.org>; Thu, 13 Jan 2011 12:41:37 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id D4C3550585	for <hybi@ietf.org>; Thu, 13 Jan 2011 12:41:36 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 4871A50584	for <hybi@ietf.org>; Thu, 13 Jan 2011 12:41:36 +0200 (EET)
Message-ID: <4D2ED6DF.1000303@ericsson.com>
Date: Thu, 13 Jan 2011 11:41:35 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D2E0863.2040804@ericsson.com>
In-Reply-To: <4D2E0863.2040804@ericsson.com>
Content-Type: multipart/alternative; boundary="------------010407050605080407000909"
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 10:39:17 -0000

--------------010407050605080407000909
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit

Hi there

I have been asked to officially clarify option #3 (I will add the 
clarification in line below).

I want also invite people NOT to use this specific mail thread to try to 
convince each other
neither to discuss technicality of the different proposals on the table:
if you discussion please start a different thread for them.




On 1/12/11 9:00 PM, Salvatore Loreto wrote:
> Hi all,
>
>
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce
> security risks.
>
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been
> deeply discussed.
>
> In order to settle the question of masking and find a way forward that
> has a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and
> summarized at
> some point in the mailing list by Eric Rescorla)
>
>
> 1. a fixed mask carried entirely in the packet.
>
> 2. A longish repeated mask computed from the packet. For concreteness,
>      suppose HMAC-SHA1(<uuid>,<server-conn-key>  ||<client-conn-key>  ||
> <packet-key>), but
>      obviously there's flexibility here.
>
> 3. A fully generated mask (if so specify also what you would like to use
> e.g. AES-CTR or HMAC-SHA).
Clarification Note: "key at the end" / "buffer the whole frame"  are not 
intended for option #3

cheers
/Sal

>
> Please indicate your preference(s) or the one can meet your bar for "I
> could live with that";
> In the case you have more then one, please put the choices in a
> preference order.
>
> This poll will run until January 18th.
>
> cheers
> /Sal
>


--------------010407050605080407000909
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hi there <br>
    <br>
    I have been asked to officially clarify option #3 (I will add the
    clarification in line below).<br>
    <br>
    I want also invite people NOT to use this specific mail thread to
    try to convince each other<br>
    neither to discuss technicality of the different proposals on the
    table: <br>
    if you discussion please start a different thread for them.<br>
    <br>
    <br>
    &nbsp;<br>
    <br>
    On 1/12/11 9:00 PM, Salvatore Loreto wrote:
    <blockquote cite="mid:4D2E0863.2040804@ericsson.com" type="cite">
      <pre wrap="">Hi all,


Masking from the client to the server
has reached strong consensus within this wg as a mechanism to reduce 
security risks.

However there is disagreement on the actual method for masking.
The technical differences, pro and cons, advantages and disadvantages,
as well as the legal implications of each method have already been 
deeply discussed.

In order to settle the question of masking and find a way forward that 
has a wide acceptance,
Joe and I, as HyBi chairs, want to check where the consensus is
on the following relevant options that have been discussed (and 
summarized at
some point in the mailing list by Eric Rescorla)


1. a fixed mask carried entirely in the packet.

2. A longish repeated mask computed from the packet. For concreteness,
    suppose HMAC-SHA1(&lt;uuid&gt;, &lt;server-conn-key&gt; || &lt;client-conn-key&gt; || 
&lt;packet-key&gt;), but
    obviously there's flexibility here.

3. A fully generated mask (if so specify also what you would like to use 
e.g. AES-CTR or HMAC-SHA).
</pre>
    </blockquote>
    Clarification Note: "key at the end" / "buffer the whole frame"&nbsp; are
    not intended for option #3<br>
    <br>
    cheers<br>
    /Sal <br>
    <br>
    <style>table {  }.font5 { color: windowtext; font-size: 8pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Verdana; }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Verdana; vertical-align: bottom; border: medium none; white-space: nowrap; }ruby {  }rt { color: windowtext; font-size: 8pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Verdana; display: none; }</style>
    <blockquote cite="mid:4D2E0863.2040804@ericsson.com" type="cite">
      <pre wrap="">

Please indicate your preference(s) or the one can meet your bar for "I 
could live with that";
In the case you have more then one, please put the choices in a 
preference order.

This poll will run until January 18th.

cheers
/Sal

</pre>
    </blockquote>
    <br>
  </body>
</html>

--------------010407050605080407000909--

From salvatore.loreto@ericsson.com  Thu Jan 13 05:13:54 2011
Return-Path: <salvatore.loreto@ericsson.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 0A1A63A6B86 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 05:13:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.539
X-Spam-Level: 
X-Spam-Status: No, score=-106.539 tagged_above=-999 required=5 tests=[AWL=0.060, BAYES_00=-2.599, 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 ObLnAWOv8ts1 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 05:13:52 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id B14B83A6B85 for <hybi@ietf.org>; Thu, 13 Jan 2011 05:13:51 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-0c-4d2efb1c9b1f
Received: from esessmw0197.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id 5B.5D.23694.C1BFE2D4; Thu, 13 Jan 2011 14:16:12 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0197.eemea.ericsson.se (153.88.115.88) with Microsoft SMTP Server id 8.2.234.1; Thu, 13 Jan 2011 14:16:11 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id CB3B527C2	for <hybi@ietf.org>; Thu, 13 Jan 2011 15:16:08 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 94C77503A2	for <hybi@ietf.org>; Thu, 13 Jan 2011 15:16:08 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id EF73D502E7	for <hybi@ietf.org>; Thu, 13 Jan 2011 15:16:07 +0200 (EET)
Message-ID: <4D2EFB17.50502@ericsson.com>
Date: Thu, 13 Jan 2011 14:16:07 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D2E0863.2040804@ericsson.com>	<3CC6CF1C-F01E-4AA4-B99E-AAA76CB6B4A8@apple.com>	<20110112223632.GI25018@1wt.eu>	<9B9C40C4-1E5F-4E94-A0E6-E9633CBB8ECD@apple.com>	<20110112230001.GK25018@1wt.eu>	<AANLkTi=rKhTe2++HicG0LgEO8vJ9Wci_TJtjgUTeb9p3@mail.gmail.com>	<20110112235254.GA28336@1wt.eu>	<AANLkTimQ2dF318h3T9ZmBySkrb-=oxPVvDrHK0XuwOWk@mail.gmail.com>	<20110113061327.GB28336@1wt.eu>	<AANLkTim1ODbvRHO_HK9Kzt8mfQaFZbbbqPPeAj7Wx2jQ@mail.gmail.com> <20110113063943.GC28336@1wt.eu>
In-Reply-To: <20110113063943.GC28336@1wt.eu>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: [hybi] MUX and masking (was Re:  Straw-poll on Masking options)
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: Thu, 13 Jan 2011 13:13:54 -0000

On 1/13/11 7:39 AM, Willy Tarreau wrote:
> On Thu, Jan 13, 2011 at 01:28:11AM -0500, John Tamplin wrote:
>> It seems clear that the consensus will be that servers accepting connections
>> from untrusted clients will refuse to accept unmasked connections.
> Agreed.
>
>> Therefore, the MUX->server frames must be masked.
> Agreed.
>
>> Each frame can only have one mask, therefore the mux'd frame cannot use
>> the mask of any of the embedded frames (plus current discussions would
>> require them to use nonces from each handshake, which would also prevent
>> reusing one of the embedded frame's masking).  Each of the mux's clients
>> will also be masked with its own key.  Therefore, either the mux must
>> double-mask the embedded frame's payload,
> no, but below :
>
>> or it must unmask and remask them.
> Yes, that's what I was saying (or at least trying to say) !
>
>> Even if the mask is pure XOR
>> and it can modify the masked data, I would consider that still decoding
>> under the old mask and recoding under the new one.
> Yes, or as I said, in this case, it's possible to change the masking
> key at the beginning of the frame without touching the data :
>
>     new_key = old_key ^ client_side_key ^ server_side_key;
>
>> I believe the most common use for multiplexing will be for a browser to
>> aggregate connections between tabs (and within a given tab, as an app may be
>> composed of separately written modules which use their own WebSocket
>> connections) to a single server.  In that case, it does not need to
>> unmask/remask the data, as the data is already unmasked -- instead, it
>> simply masks the entire mux frame.
> At the beginning it might be the most common use, but quickly we'll
> see for WS the same optimizers that exist with HTTP. The same causes
> will cause the same effects. Having one million concurrent connections
> to a thread app is not possible. Having them on a front proxy which
> aggregates them over a few hundreds of connections is possible and
> not much difficult. That's already how some large sites handle large
> amounts of HTTP connections, despite the in-order design. With WS,
> there will not even be the in-order issue which means that a very
> low number of concurrent connections will suffice.
>
> So I really predict that multiplexing at the front of server-side
> infrastructure will quickly appear.
(as Individual)
I tend to agree on the Willy prediction,
especially in the Mobile Telco infrastructures that is something most 
likely to appear.

/Sal

>   And if we don't design it ourselves,
> some will add their proprietary extensions to support it, and we'll see
> some "Fast-WebSocket", "WebSocket-Express" or such things emerge with
> their own API.
>
> Regards,
> Willy
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


-- 
Salvatore Loreto
www.sloreto.com


From bruce@callenish.com  Thu Jan 13 09:16:19 2011
Return-Path: <bruce@callenish.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 DB67E3A6B3C for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 09:16:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.587
X-Spam-Level: 
X-Spam-Status: No, score=-2.587 tagged_above=-999 required=5 tests=[AWL=0.012,  BAYES_00=-2.599]
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 q2w84bRutTjT for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 09:16:19 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 27DCF3A6B15 for <hybi@ietf.org>; Thu, 13 Jan 2011 09:16:19 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PdQor-0003t3-A1 for hybi@ietf.org; Thu, 13 Jan 2011 09:18:41 -0800
Message-ID: <4D2F33F2.4070002@callenish.com>
Date: Thu, 13 Jan 2011 09:18:42 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <epgqi6hc9o0c00fbgk2bla5l40d4k908i7@hive.bjoern.hoehrmann.de> <181849A3-DE53-4C26-8B56-3D41FD8DDAB5@apple.com>
In-Reply-To: <181849A3-DE53-4C26-8B56-3D41FD8DDAB5@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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: Thu, 13 Jan 2011 17:16:19 -0000

On 11/01/2011 11:29 PM, Maciej Stachowiak wrote:
> I agree that mixing the frame key with something derived from the server nonce is sufficient. I can see how to apply this to options 2 and 3, but in option 1 it doesn't happen, by definition. Perhaps someone cares to make a proposal that uses a different algorithm for mixing.

Maciej, I thought I understood how your attack worked, but now I'm not 
so sure.

You are concerned that an attacker will be able to successfully open a 
Websocket connection and are worried that they can do their own masking 
to send whatever they want. So you want to use the server nonce, which 
is a secret that the attacker's javascript code doesn't know about, to 
generate the mask. Is that correct?

But in order to create the connection in the first place the attacker 
will have to provide a client nonce. And the server nonce is generated 
from the client nonce and a known GUID. So the attacker in fact will 
know the server nonce.

This means that masking offers no protection for this particular attack. 
Use random keys or AES-CTR, once the attacker knows the server nonce it 
is all over.

Can this be right? What am I missing?


From jat@google.com  Thu Jan 13 09:29:07 2011
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 7351D28C10E for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 09:29:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.771
X-Spam-Level: 
X-Spam-Status: No, score=-103.771 tagged_above=-999 required=5 tests=[AWL=-0.795, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 0-PdXw7XkrqD for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 09:29:06 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 5BB6128C0F7 for <hybi@ietf.org>; Thu, 13 Jan 2011 09:29:06 -0800 (PST)
Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [172.25.149.12]) by smtp-out.google.com with ESMTP id p0DHVSRr030670 for <hybi@ietf.org>; Thu, 13 Jan 2011 09:31:28 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294939889; bh=ZXjPUreAdKNgqqa5pj6rhZ2qXAk=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=dnc1tR/2giVzXxXp94yV3iySuuG1p/y+U1qEEJ7CDQk0PLH7qKibHKqy6FqUYwyHA DVi2R52KorbI7c5Mj9PUA==
Received: from yxi11 (yxi11.prod.google.com [10.190.3.11]) by hpaq12.eem.corp.google.com with ESMTP id p0DHVQiG002054 for <hybi@ietf.org>; Thu, 13 Jan 2011 09:31:27 -0800
Received: by yxi11 with SMTP id 11so735191yxi.1 for <hybi@ietf.org>; Thu, 13 Jan 2011 09:31:26 -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=CCin9iqHt05cOVoGlK03H4f4XzObr77kPsiUl7M5jKA=; b=bOq2i9ucTF/N+Csuidqyw+dpepAAVujA0ZKH0logX7x0AWSj5ZyFkCjEU8tdWn1QKv T7tMtzH+6f/rZZ+8ZVsA==
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=E/SZH2+SiRbq7KgSScS+cbspDWWJDdhoQDASPDz3LFotv3z9EGH3McpjCeYiMz3B65 vx6IV7UxyJ90429JDPEA==
Received: by 10.151.85.10 with SMTP id n10mr4062990ybl.206.1294939886152; Thu, 13 Jan 2011 09:31:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.212.8 with HTTP; Thu, 13 Jan 2011 09:31:05 -0800 (PST)
In-Reply-To: <4D2F33F2.4070002@callenish.com>
References: <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <epgqi6hc9o0c00fbgk2bla5l40d4k908i7@hive.bjoern.hoehrmann.de> <181849A3-DE53-4C26-8B56-3D41FD8DDAB5@apple.com> <4D2F33F2.4070002@callenish.com>
From: John Tamplin <jat@google.com>
Date: Thu, 13 Jan 2011 12:31:05 -0500
Message-ID: <AANLkTinwDqtoa2p9zEhh1-S466LBHXSVr0byuVtXa=qA@mail.gmail.com>
To: Bruce Atherton <bruce@callenish.com>
Content-Type: multipart/alternative; boundary=000e0cd56944eb79740499bdaf49
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Thu, 13 Jan 2011 17:29:07 -0000

--000e0cd56944eb79740499bdaf49
Content-Type: text/plain; charset=UTF-8

On Thu, Jan 13, 2011 at 12:18 PM, Bruce Atherton <bruce@callenish.com>wrote:

> But in order to create the connection in the first place the attacker will
> have to provide a client nonce. And the server nonce is generated from the
> client nonce and a known GUID. So the attacker in fact will know the server
> nonce.
>

As I understand it, the server nonce is random and the server acceptance is
based on the client nonce, server nonce, and a known GUID.  So a JS-only
attacker does not know the server nonce.

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

--000e0cd56944eb79740499bdaf49
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Jan 13, 2011 at 12:18 PM, Bruce Atherton=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:bruce@callenish.com">bruce@calleni=
sh.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">But in order to create the connection in the first place =
the attacker will have to provide a client nonce. And the server nonce is g=
enerated from the client nonce and a known GUID. So the attacker in fact wi=
ll know the server nonce.</div>

</blockquote><div><br></div><div>As I understand it, the server nonce is ra=
ndom and the server acceptance is based on the client nonce, server nonce, =
and a known GUID. =C2=A0So a JS-only attacker does not know the server nonc=
e.</div>

<div><br></div></div>-- <br>John A. Tamplin<br>Software Engineer (GWT), Goo=
gle<br>

--000e0cd56944eb79740499bdaf49--

From w@1wt.eu  Thu Jan 13 09:30:14 2011
Return-Path: <w@1wt.eu>
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 6AFF428C10E for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 09:30:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.067
X-Spam-Level: 
X-Spam-Status: No, score=-2.067 tagged_above=-999 required=5 tests=[AWL=-0.024, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 WBLTCcrGLRCw for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 09:30:12 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 9826C28C0F7 for <hybi@ietf.org>; Thu, 13 Jan 2011 09:30:11 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0DHWQIp032740; Thu, 13 Jan 2011 18:32:26 +0100
Date: Thu, 13 Jan 2011 18:32:26 +0100
From: Willy Tarreau <w@1wt.eu>
To: Bruce Atherton <bruce@callenish.com>
Message-ID: <20110113173226.GA32722@1wt.eu>
References: <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <epgqi6hc9o0c00fbgk2bla5l40d4k908i7@hive.bjoern.hoehrmann.de> <181849A3-DE53-4C26-8B56-3D41FD8DDAB5@apple.com> <4D2F33F2.4070002@callenish.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D2F33F2.4070002@callenish.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Thu, 13 Jan 2011 17:30:14 -0000

On Thu, Jan 13, 2011 at 09:18:42AM -0800, Bruce Atherton wrote:
> On 11/01/2011 11:29 PM, Maciej Stachowiak wrote:
> >I agree that mixing the frame key with something derived from the server 
> >nonce is sufficient. I can see how to apply this to options 2 and 3, but 
> >in option 1 it doesn't happen, by definition. Perhaps someone cares to 
> >make a proposal that uses a different algorithm for mixing.
> 
> Maciej, I thought I understood how your attack worked, but now I'm not 
> so sure.
> 
> You are concerned that an attacker will be able to successfully open a 
> Websocket connection and are worried that they can do their own masking 
> to send whatever they want. So you want to use the server nonce, which 
> is a secret that the attacker's javascript code doesn't know about, to 
> generate the mask. Is that correct?
> 
> But in order to create the connection in the first place the attacker 
> will have to provide a client nonce. And the server nonce is generated 
> from the client nonce and a known GUID. So the attacker in fact will 
> know the server nonce.
> 
> This means that masking offers no protection for this particular attack. 
> Use random keys or AES-CTR, once the attacker knows the server nonce it 
> is all over.
> 
> Can this be right? What am I missing?

It seems so to me too. However, if the masking relied on a nonce emitted
by the server's hello frame, then that would probably be OK assuming that
the JS code can't get the return traffic.

Otherwise if we accept that the JS code controls sent traffic and return
traffic, then it simply becomes a complete WS client.

Willy


From mjs@apple.com  Thu Jan 13 09:39:53 2011
Return-Path: <mjs@apple.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 B13093A6BBA for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 09:39:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.536
X-Spam-Level: 
X-Spam-Status: No, score=-106.536 tagged_above=-999 required=5 tests=[AWL=0.062, BAYES_00=-2.599, 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 ecupbWJN6eYL for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 09:39:53 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id E878E3A6B3C for <hybi@ietf.org>; Thu, 13 Jan 2011 09:39:52 -0800 (PST)
Received: from relay12.apple.com (relay12.apple.com [17.128.113.53]) by mail-out3.apple.com (Postfix) with ESMTP id 08322C6F6A4B for <hybi@ietf.org>; Thu, 13 Jan 2011 09:42:16 -0800 (PST)
X-AuditID: 11807135-b7b80ae0000017ec-32-4d2f39773b93
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay12.apple.com (Apple SCV relay) with SMTP id 2B.2E.06124.7793F2D4; Thu, 13 Jan 2011 09:42:15 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_1ryX8MTR2JTZbragrprmFg)"
Received: from [17.153.53.78] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LEZ00G662IFJS40@gertie.apple.com> for hybi@ietf.org; Thu, 13 Jan 2011 09:42:15 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTinwDqtoa2p9zEhh1-S466LBHXSVr0byuVtXa=qA@mail.gmail.com>
Date: Thu, 13 Jan 2011 09:42:15 -0800
Message-id: <32FDD9A0-1C2B-400B-AD42-54CC1952E709@apple.com>
References: <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <epgqi6hc9o0c00fbgk2bla5l40d4k908i7@hive.bjoern.hoehrmann.de> <181849A3-DE53-4C26-8B56-3D41FD8DDAB5@apple.com> <4D2F33F2.4070002@callenish.com> <AANLkTinwDqtoa2p9zEhh1-S466LBHXSVr0byuVtXa=qA@mail.gmail.com>
To: John Tamplin <jat@google.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Thu, 13 Jan 2011 17:39:53 -0000

--Boundary_(ID_1ryX8MTR2JTZbragrprmFg)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 13, 2011, at 9:31 AM, John Tamplin wrote:

> On Thu, Jan 13, 2011 at 12:18 PM, Bruce Atherton <bruce@callenish.com> wrote:
> But in order to create the connection in the first place the attacker will have to provide a client nonce. And the server nonce is generated from the client nonce and a known GUID. So the attacker in fact will know the server nonce.
> 
> As I understand it, the server nonce is random and the server acceptance is based on the client nonce, server nonce, and a known GUID.  So a JS-only attacker does not know the server nonce.

That's correct. The server nonce is random, and therefore unknown to an attacker using HTTP APIs in the browser. The attacker cannot know the server nonce before sending the HTTP request (including its body), so if it is involved in masking, then it is impossible to precompute valid frames and stuff them in an HTTP body.

Regards,
Maciej


--Boundary_(ID_1ryX8MTR2JTZbragrprmFg)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 13, 2011, at 9:31 AM, John Tamplin wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Thu, Jan 13, 2011 at 12:18 PM, Bruce Atherton <span dir="ltr">&lt;<a href="mailto:bruce@callenish.com">bruce@callenish.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">But in order to create the connection in the first place the attacker will have to provide a client nonce. And the server nonce is generated from the client nonce and a known GUID. So the attacker in fact will know the server nonce.</div>

</blockquote><div><br></div><div>As I understand it, the server nonce is random and the server acceptance is based on the client nonce, server nonce, and a known GUID. &nbsp;So a JS-only attacker does not know the server nonce.</div>

</div></blockquote><br></div><div>That's correct. The server nonce is random, and therefore unknown to an attacker using HTTP APIs in the browser. The attacker cannot know the server nonce before sending the HTTP request (including its body), so if it is involved in masking, then it is impossible to precompute valid frames and stuff them in an HTTP body.</div><div><br></div><div>Regards,</div><div>Maciej</div><div><br></div></body></html>

--Boundary_(ID_1ryX8MTR2JTZbragrprmFg)--

From bruce@callenish.com  Thu Jan 13 10:03:41 2011
Return-Path: <bruce@callenish.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 1CB773A6B3C for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 10:03:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.587
X-Spam-Level: 
X-Spam-Status: No, score=-2.587 tagged_above=-999 required=5 tests=[AWL=0.011,  BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 RYhfHWT0JJMJ for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 10:03:40 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id B1B0C3A67B8 for <hybi@ietf.org>; Thu, 13 Jan 2011 10:03:39 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PdRYg-0002o8-2o for hybi@ietf.org; Thu, 13 Jan 2011 10:06:02 -0800
Message-ID: <4D2F3F0B.3010407@callenish.com>
Date: Thu, 13 Jan 2011 10:06:03 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <20110111205545.GB21915@1wt.eu> <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <epgqi6hc9o0c00fbgk2bla5l40d4k908i7@hive.bjoern.hoehrmann.de> <181849A3-DE53-4C26-8B56-3D41FD8DDAB5@apple.com> <4D2F33F2.4070002@callenish.com> <AANLkTinwDqtoa2p9zEhh1-S466LBHXSVr0byuVtXa=qA@mail.gmail.com> <32FDD9A0-1C2B-400B-AD42-54CC1952E709@apple.com>
In-Reply-To: <32FDD9A0-1C2B-400B-AD42-54CC1952E709@apple.com>
Content-Type: multipart/alternative; boundary="------------020809020702050100050201"
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] on applicability of AES
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: Thu, 13 Jan 2011 18:03:41 -0000

This is a multi-part message in MIME format.
--------------020809020702050100050201
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

My mistake. I was reading the non-normative version of the handshake, 
and the only thing that looked like a server nonce was the Accept-Key.

Section 5.2.2 makes it clear that both a random nonce and the accept key 
are sent by the server.

On 13/01/2011 9:42 AM, Maciej Stachowiak wrote:
>
> On Jan 13, 2011, at 9:31 AM, John Tamplin wrote:
>
>> On Thu, Jan 13, 2011 at 12:18 PM, Bruce Atherton <bruce@callenish.com 
>> <mailto:bruce@callenish.com>> wrote:
>>
>>     But in order to create the connection in the first place the
>>     attacker will have to provide a client nonce. And the server
>>     nonce is generated from the client nonce and a known GUID. So the
>>     attacker in fact will know the server nonce.
>>
>>
>> As I understand it, the server nonce is random and the server 
>> acceptance is based on the client nonce, server nonce, and a known 
>> GUID.  So a JS-only attacker does not know the server nonce.
>
> That's correct. The server nonce is random, and therefore unknown to 
> an attacker using HTTP APIs in the browser. The attacker cannot know 
> the server nonce before sending the HTTP request (including its body), 
> so if it is involved in masking, then it is impossible to precompute 
> valid frames and stuff them in an HTTP body.
>
> Regards,
> Maciej
>


--------------020809020702050100050201
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    My mistake. I was reading the non-normative version of the
    handshake, and the only thing that looked like a server nonce was
    the Accept-Key.<br>
    <br>
    Section 5.2.2 makes it clear that both a random nonce and the accept
    key are sent by the server.<br>
    <br>
    On 13/01/2011 9:42 AM, Maciej Stachowiak wrote:
    <blockquote
      cite="mid:32FDD9A0-1C2B-400B-AD42-54CC1952E709@apple.com"
      type="cite"><br>
      <div>
        <div>On Jan 13, 2011, at 9:31 AM, John Tamplin wrote:</div>
        <br class="Apple-interchange-newline">
        <blockquote type="cite">
          <div class="gmail_quote">On Thu, Jan 13, 2011 at 12:18 PM,
            Bruce Atherton <span dir="ltr">&lt;<a
                moz-do-not-send="true" href="mailto:bruce@callenish.com">bruce@callenish.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
              0.8ex; border-left: 1px solid rgb(204, 204, 204);
              padding-left: 1ex;">
              <div class="im">But in order to create the connection in
                the first place the attacker will have to provide a
                client nonce. And the server nonce is generated from the
                client nonce and a known GUID. So the attacker in fact
                will know the server nonce.</div>
            </blockquote>
            <div><br>
            </div>
            <div>As I understand it, the server nonce is random and the
              server acceptance is based on the client nonce, server
              nonce, and a known GUID. &nbsp;So a JS-only attacker does not
              know the server nonce.</div>
          </div>
        </blockquote>
        <br>
      </div>
      <div>That's correct. The server nonce is random, and therefore
        unknown to an attacker using HTTP APIs in the browser. The
        attacker cannot know the server nonce before sending the HTTP
        request (including its body), so if it is involved in masking,
        then it is impossible to precompute valid frames and stuff them
        in an HTTP body.</div>
      <div><br>
      </div>
      <div>Regards,</div>
      <div>Maciej</div>
      <div><br>
      </div>
    </blockquote>
    <br>
  </body>
</html>

--------------020809020702050100050201--

From gregw@intalio.com  Thu Jan 13 13:28:57 2011
Return-Path: <gregw@intalio.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 C4C063A6BE0 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 13:28:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.932
X-Spam-Level: 
X-Spam-Status: No, score=-2.932 tagged_above=-999 required=5 tests=[AWL=0.045,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 WVNtrDJ9zrC5 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 13:28:57 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id E28E23A6BDF for <hybi@ietf.org>; Thu, 13 Jan 2011 13:28:56 -0800 (PST)
Received: by qyk34 with SMTP id 34so5599953qyk.10 for <hybi@ietf.org>; Thu, 13 Jan 2011 13:31:20 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.36.208 with SMTP id u16mr2521232qad.299.1294954280063; Thu, 13 Jan 2011 13:31:20 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.98.212 with HTTP; Thu, 13 Jan 2011 13:31:19 -0800 (PST)
In-Reply-To: <4D2E0863.2040804@ericsson.com>
References: <4D2E0863.2040804@ericsson.com>
Date: Fri, 14 Jan 2011 08:31:19 +1100
X-Google-Sender-Auth: 730-NmBmsorXB0xYePnAMGOcuts
Message-ID: <AANLkTinFKih_PFVzkS1OJ=G1xtngKo_poAbDrFM83Uo9@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 21:28:57 -0000

On 13 January 2011 07:00, Salvatore Loreto
<salvatore.loreto@ericsson.com> wrote:
>
> 1. a fixed mask carried entirely in the packet.

This option is my strong preference.


> 2. A longish repeated mask computed from the packet. For concreteness,
> =A0 suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> <packet-key>), but
> =A0 obviously there's flexibility here.
>
> 3. A fully generated mask (if so specify also what you would like to use
> e.g. AES-CTR or HMAC-SHA).

I could only accept either of these options if there were a) no other
strong objectors; b) they were applied as optional extensions.

From gregw@intalio.com  Thu Jan 13 13:38:48 2011
Return-Path: <gregw@intalio.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 0A8873A6BD8 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 13:38:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.932
X-Spam-Level: 
X-Spam-Status: No, score=-2.932 tagged_above=-999 required=5 tests=[AWL=0.045,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 6GCPzVNVRu4u for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 13:38:47 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 2F79E3A6BCB for <hybi@ietf.org>; Thu, 13 Jan 2011 13:38:47 -0800 (PST)
Received: by qwi2 with SMTP id 2so2322500qwi.31 for <hybi@ietf.org>; Thu, 13 Jan 2011 13:41:10 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.53.213 with SMTP id n21mr2529295qag.399.1294954870244; Thu, 13 Jan 2011 13:41:10 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.98.212 with HTTP; Thu, 13 Jan 2011 13:41:10 -0800 (PST)
In-Reply-To: <77B6CAA1-FAF8-4B31-A7BD-014AF0B9676D@apple.com>
References: <1294776396.7650.829.camel@ds9.ducksong.com> <02F101E6-7516-4394-BBF8-246FF5FE831B@apple.com> <1294778281.7650.842.camel@ds9.ducksong.com> <484A91D9-2028-4C08-8ABF-9780DFB3A2E8@apple.com> <20110111205545.GB21915@1wt.eu> <77B6CAA1-FAF8-4B31-A7BD-014AF0B9676D@apple.com>
Date: Fri, 14 Jan 2011 08:41:10 +1100
X-Google-Sender-Auth: sg-c2KZs0VFmZNnZnCPnzp5yCfI
Message-ID: <AANLkTim7W37G_N5VHv_gyUVkDh50G7SeondnR=9o8NMp@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Thu, 13 Jan 2011 21:38:48 -0000

On 12 January 2011 08:35, Maciej Stachowiak <mjs@apple.com> wrote:
> I don't think anyone has demonstrated that export regulations are a practical problem in any way.

I don't think anyone has demonstrated that export regulations are an
insurmountable problem, but they are definitely a practical one.

> Do software implementations of other IETF protocols that use crypto get restricted in practice?

You have obviously never had to pay personally to jump (albeit low)
hurdles required for this.     As somebody that has worked in the past
for cash strapped startup I can definitely say that crypto export
requirements have caused considerable pain to me in the past.   Note
also that it is my experience that even just calling crypto APIs in
the JVM is enough to trigger the spooks to call the lawyers to make
you explain to your lawyers what you are doing.

It's not impossible - just painful and somewhat expensive (for
starving self funded startups at least ).
If there was a good reason for it, then the pain would be worth it.

From julian.reschke@gmx.de  Thu Jan 13 13:41:23 2011
Return-Path: <julian.reschke@gmx.de>
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 D216F3A6BD8 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 13:41:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.018
X-Spam-Level: 
X-Spam-Status: No, score=-104.018 tagged_above=-999 required=5 tests=[AWL=-1.419, BAYES_00=-2.599, 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 Cg0owvFewBCH for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 13:41:23 -0800 (PST)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 9A8FE3A6BCB for <hybi@ietf.org>; Thu, 13 Jan 2011 13:41:21 -0800 (PST)
Received: (qmail invoked by alias); 13 Jan 2011 21:43:43 -0000
Received: from p508FA62D.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.166.45] by mail.gmx.net (mp030) with SMTP; 13 Jan 2011 22:43:43 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+lsukIetClQjhl4VTYmWwO8c+h/baK+qs4F0s+lG AxtoftukFUMXca
Message-ID: <4D2F7203.8080906@gmx.de>
Date: Thu, 13 Jan 2011 22:43:31 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <4D2E0863.2040804@ericsson.com> <AANLkTinFKih_PFVzkS1OJ=G1xtngKo_poAbDrFM83Uo9@mail.gmail.com>
In-Reply-To: <AANLkTinFKih_PFVzkS1OJ=G1xtngKo_poAbDrFM83Uo9@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 21:41:23 -0000

On 13.01.2011 22:31, Greg Wilkins wrote:
> On 13 January 2011 07:00, Salvatore Loreto
> <salvatore.loreto@ericsson.com>  wrote:
>>
>> 1. a fixed mask carried entirely in the packet.
>
> This option is my strong preference.
> ...

+1

Disclaimer: I'm not an implementer (currently), nor a security expert.

On the other hand, I haven't been convinced that the problems more 
complicated approaches try to address are real (in the sense that 
Websockets need to solve them). As a matter of fact, I'm not even 
convinced that we need any masking.

That being said... minimally, it should be possible to inspect a message 
without having to keep state.

Best regards, Julian


From daniel@haxx.se  Thu Jan 13 13:45:18 2011
Return-Path: <daniel@haxx.se>
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 3322F3A6BCB for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 13:45:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.262
X-Spam-Level: 
X-Spam-Status: No, score=-3.262 tagged_above=-999 required=5 tests=[AWL=-1.013, BAYES_00=-2.599, HELO_EQ_SE=0.35]
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 Zsx8RN5A45Do for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 13:45:17 -0800 (PST)
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50]) by core3.amsl.com (Postfix) with ESMTP id AAEAA3A67AA for <hybi@ietf.org>; Thu, 13 Jan 2011 13:45:16 -0800 (PST)
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50]) by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id p0DLlgBD010623 for <hybi@ietf.org>; Thu, 13 Jan 2011 22:47:42 +0100
Date: Thu, 13 Jan 2011 22:47:42 +0100 (CET)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: "hybi@ietf.org" <hybi@ietf.org>
In-Reply-To: <AANLkTinFKih_PFVzkS1OJ=G1xtngKo_poAbDrFM83Uo9@mail.gmail.com>
Message-ID: <alpine.DEB.2.00.1101132245490.31338@tvnag.unkk.fr>
References: <4D2E0863.2040804@ericsson.com> <AANLkTinFKih_PFVzkS1OJ=G1xtngKo_poAbDrFM83Uo9@mail.gmail.com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5 (giant.haxx.se [80.67.6.50]); Thu, 13 Jan 2011 22:47:42 +0100 (CET)
Subject: Re: [hybi] Straw-poll on Masking options
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: Thu, 13 Jan 2011 21:45:18 -0000

On Fri, 14 Jan 2011, Greg Wilkins wrote:

>> 1. a fixed mask carried entirely in the packet.
>
> This option is my strong preference.

+1

I do not think it has been shown that masking beyond this level is worth the 
added complexity.

-- 

  / daniel.haxx.se

From jamie@shareable.org  Thu Jan 13 19:51:27 2011
Return-Path: <jamie@shareable.org>
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 816453A6846 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 19:51:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.626
X-Spam-Level: 
X-Spam-Status: No, score=-2.626 tagged_above=-999 required=5 tests=[AWL=-0.342, BAYES_00=-2.599, SARE_MILLIONSOF=0.315]
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 JXnuCa56nrJe for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 19:51:26 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id AD0BB3A6811 for <hybi@ietf.org>; Thu, 13 Jan 2011 19:51:26 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PdajQ-0004XD-Nn; Fri, 14 Jan 2011 03:53:44 +0000
Date: Fri, 14 Jan 2011 03:53:44 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110114035344.GG4476@shareable.org>
References: <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Fri, 14 Jan 2011 03:51:27 -0000

Maciej Stachowiak wrote:
> 3) AES-CTR, using a key computed using HMAC from client and server nonces and random counter per frame
> 
> Pro:
> - Makes output indistinguishable from random. This has the best provable security properties.

No, it *doesn't* have the best provable security properties in all the
relevant ways that have been brought up.

I gather one of the objectives motivating AES-CTR is to prevent lax
intermediaries and HTTP servers from dubiously recognising HTTP
requests among a stream of random bytes on many connections?

Case-insensitive 'GET ' followed by an arbitrary string and a newline
occurs rather often in random bytes.  (Every 2^29 or so - it's really
quite poor if you have millions of active user connections.)

Case-insensitive anything-that-looks-like-it-might-be-a-HTTP-method
followed by whitespace, and a short
URL-not-fussy-if-it-contains-8bit-character and a newline occurs *way*
more often.

Often enough to hit at the start of the data in a predictable place if
you have a bit of JavaScript opening connections at the maximum rate
in multiple WebWorkers, unknown to the browser's user (who leaves the
page open all day).

Even Base64 is technically superior in *this* regard - and it blocks JS
browser attacks as well doesn't it?

Same goes for escaping newline characters and other variations on that
theme.

Not that I'm advocating Base64 or newline-escaping - just reminding,
that in this context what is good for encryption (it looks random) is
*not* necessarily best security in this context.

-- Jamie

From jamie@shareable.org  Thu Jan 13 20:13:46 2011
Return-Path: <jamie@shareable.org>
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 185F63A6868 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 20:13:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.763
X-Spam-Level: 
X-Spam-Status: No, score=-2.763 tagged_above=-999 required=5 tests=[AWL=-0.164, BAYES_00=-2.599]
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 HcXUeV+Vk6T2 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 20:13:45 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id DD6673A6846 for <hybi@ietf.org>; Thu, 13 Jan 2011 20:13:44 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Pdb4k-0004bl-1N; Fri, 14 Jan 2011 04:15:46 +0000
Date: Fri, 14 Jan 2011 04:15:46 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <w@1wt.eu>
Message-ID: <20110114041545.GH4476@shareable.org>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110112221206.GG25018@1wt.eu>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 04:13:46 -0000

Willy Tarreau wrote:
> On Wed, Jan 12, 2011 at 09:00:35PM +0100, Salvatore Loreto wrote:
> > 1. a fixed mask carried entirely in the packet.
> > 
> > 2. A longish repeated mask computed from the packet. For concreteness,
> >    suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> || 
> > <packet-key>), but
> >    obviously there's flexibility here.
> > 
> > 3. A fully generated mask (if so specify also what you would like to use 
> > e.g. AES-CTR or HMAC-SHA).
> 
> BTW Sal, could we list Base64 (or any equivalent CRLF-less masking) that
> very few of us have already evocated here ?
> 
> It is the only solution to be _certain_ to definitely get rid of the
> issue we're talking about, has much less CPU overhead than AES/HMAC,
> at the expense of higher network costs (+14-33% for the simplest
> versions, even less with escaping).

+1

Wouldn't just replacing all CRs and LFs with an escape sequence give
perfect security against HTTP injection/confusion attacks ...with
essentially no network, CPU or programming overhead?

Compared with 1, 2 or 3 which are still vulnerable to the attacks they
are designed to block, given enough connection attempts.

-- Jamie

From jamie@shareable.org  Thu Jan 13 21:40:06 2011
Return-Path: <jamie@shareable.org>
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 EBCB43A6879 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 21:40:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.754
X-Spam-Level: 
X-Spam-Status: No, score=-2.754 tagged_above=-999 required=5 tests=[AWL=-0.155, BAYES_00=-2.599]
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 JaN+iQ58x9RK for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 21:40:06 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id CF0373A6853 for <hybi@ietf.org>; Thu, 13 Jan 2011 21:40:05 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PdcQW-0004nj-1N; Fri, 14 Jan 2011 05:42:20 +0000
Date: Fri, 14 Jan 2011 05:42:20 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <w@1wt.eu>
Message-ID: <20110114054219.GJ4476@shareable.org>
References: <2948.1294683316.925357@puncture> <AANLkTikhcHhFyiuh=qM-NPXGm3gGDjjfF-k59SsHKg3O@mail.gmail.com> <AANLkTimHq5q1k1dO9st_y6QP47ygvBg0E+ciMCBcopF1@mail.gmail.com> <20110110230430.GA16301@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110110230430.GA16301@1wt.eu>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Do we need to change the framing again?
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: Fri, 14 Jan 2011 05:40:07 -0000

Willy Tarreau wrote:
> On Mon, Jan 10, 2011 at 12:18:28PM -0800, Ian Fette (????????????????????????) wrote:
> > On Mon, Jan 10, 2011 at 11:46 AM, John Tamplin <jat@google.com> wrote:
> > 
> > > On Mon, Jan 10, 2011 at 1:15 PM, Dave Cridland <dave@cridland.net> wrote:
> > > > Much of the design of the framing was in support of being able to perform
> > > > lightweight streaming and sendfile() operations. Many of us went along
> > > with
> > > > various very vocal requests for this, leading to a 63-bit frame size, for
> > > > example, which is impractical with masking. We all, I think, universally
> > > > assumed a symmetric framing, whereas we have now discarded the symmetry
> > > > anyway.
> > >
> > > Why is a 63-bit frame size impractical with masking?  As long as the
> > > masking key is before the payload that is masked, you can apply it as
> > > you go with minimal cost.  The server->client connection isn't masked,
> > > and the proponents of sendfile() compatibility were talking about the
> > > server, so that hasn't changed either.
> > >
> > > > Given that we now require making, and (as EKR points out in another
> > > mail),
> > > > this in turn requires that the per-frame key is transmitted at the end of
> > > > each block, which damages streaming, should we be revisisting these early
> > > > design decisions?
> > >
> > > I do not believe it is necessary or desirable to place the key at the
> > > end of the frame.  What is required is that the client can't alter the
> > > payload of a frame while it is in progress.  For a streaming
> > > application, I would expect the typical application to have a buffer
> > > and to write a fragment when the buffer is full or the message is
> > > terminated - which doesn't allow the client to alter the message after
> > > the server might have received the key.  The one case which might be a
> > > problem in the future, is when JS supports a byte buffer API -- the
> > > browser would just have to make sure that the JS code can't modify the
> > > byte buffer while the message is being written to the network.
> > >
> > >
> > I would personally agree that I don't want to see the key at the end. It
> > makes it impossible to do anything useful with it until we have all the
> > data, which seems tragic.
> 
> indeed, and it would also make it impossible to send large frames. Right
> now we support lengths up to 63 bit, but anything more than a few tens
> of kB is going to be painful on some components, especially those which
> are designed to support vast amounts of concurrent connections.

I agree - you have to use small frames when there's any kind of concurrency.

Intermediaries needn't be bothered by larger frames, as long as they
can split them into pieces during forwarding if they might modify the
stream (even if it's just to insert a control message).

Of course they can only do that if the key isn't at the end...

Btw, it's quite feasible that some 1Tb/s networks in the next 10 years
will have megabyte-sized packets, running over IPv6.

-- Jamie


From w@1wt.eu  Thu Jan 13 21:50:34 2011
Return-Path: <w@1wt.eu>
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 502EA3A693A for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 21:50:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.067
X-Spam-Level: 
X-Spam-Status: No, score=-2.067 tagged_above=-999 required=5 tests=[AWL=-0.024, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 0CbCYylgJLNK for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 21:50:33 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 834F63A690E for <hybi@ietf.org>; Thu, 13 Jan 2011 21:50:31 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0E5qrZq002836; Fri, 14 Jan 2011 06:52:53 +0100
Date: Fri, 14 Jan 2011 06:52:53 +0100
From: Willy Tarreau <w@1wt.eu>
To: Jamie Lokier <jamie@shareable.org>
Message-ID: <20110114055253.GA1063@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <20110114041545.GH4476@shareable.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110114041545.GH4476@shareable.org>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 05:50:34 -0000

On Fri, Jan 14, 2011 at 04:15:46AM +0000, Jamie Lokier wrote:
> Willy Tarreau wrote:
> > On Wed, Jan 12, 2011 at 09:00:35PM +0100, Salvatore Loreto wrote:
> > > 1. a fixed mask carried entirely in the packet.
> > > 
> > > 2. A longish repeated mask computed from the packet. For concreteness,
> > >    suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> || 
> > > <packet-key>), but
> > >    obviously there's flexibility here.
> > > 
> > > 3. A fully generated mask (if so specify also what you would like to use 
> > > e.g. AES-CTR or HMAC-SHA).
> > 
> > BTW Sal, could we list Base64 (or any equivalent CRLF-less masking) that
> > very few of us have already evocated here ?
> > 
> > It is the only solution to be _certain_ to definitely get rid of the
> > issue we're talking about, has much less CPU overhead than AES/HMAC,
> > at the expense of higher network costs (+14-33% for the simplest
> > versions, even less with escaping).
> 
> +1
> 
> Wouldn't just replacing all CRs and LFs with an escape sequence give
> perfect security against HTTP injection/confusion attacks ...with
> essentially no network, CPU or programming overhead?

It would in fact be a trade-off between CPU overhead and network
overhead :
  - escaping 3 chars (CR, LF and the escape prefix) would provide
    the smallest network overhead but would require the CPU to
    parse all bytes when forwarding them because the length cannot
    be determined at the beginning

  - performing a fixed transform on the contents (base64/128)
    allows intermediaries to know in advance how many bytes need
    to be forwarded (once the frame has been decoded), but it
    implies higher networking overhead (+33/+14%).

> Compared with 1, 2 or 3 which are still vulnerable to the attacks they
> are designed to block, given enough connection attempts.

I'd say that it's cheaper than 2 or 3 CPU-wise and stronger at the same
time. In fact, it's provably secure as it's proved that you can't find
either a CR or an LF in a base64 sequence.

But I really think that for what we're trying to achieve, #1 is by far
enough, and even less expensive for the network and CPU.

Willy


From jamie@shareable.org  Thu Jan 13 23:17:26 2011
Return-Path: <jamie@shareable.org>
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 67E053A68D0 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 23:17:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.746
X-Spam-Level: 
X-Spam-Status: No, score=-2.746 tagged_above=-999 required=5 tests=[AWL=-0.147, BAYES_00=-2.599]
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 na+VegkjQaKv for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 23:17:25 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 507A23A6830 for <hybi@ietf.org>; Thu, 13 Jan 2011 23:17:25 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Pddwp-000557-3w; Fri, 14 Jan 2011 07:19:47 +0000
Date: Fri, 14 Jan 2011 07:19:47 +0000
From: Jamie Lokier <jamie@shareable.org>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Message-ID: <20110114071947.GK4476@shareable.org>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com> <20110107060128.GI28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D9A@SISPE7MB1.commscope.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03F5258D9A@SISPE7MB1.commscope.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 14 Jan 2011 07:17:26 -0000

Thomson, Martin wrote:
> On 2011-01-07 at 17:01:28, Willy Tarreau wrote:
> > No, the randomness I'm talking about is to reduce the probability that
> > the
> > server will guess the key and exploit it. If the key is changed for
> > each
> > frame, the ability for the server to guess *and exploit* it depends on
> > the
> > message length too. The server does not have more chance to forge a
> > correct
> > message when it has 1/256 change to guess the key on a message that's
> > 256
> > bytes long than when it has 1/65536 on a message that's 65536 bytes
> > long.
> 
> You need more space to exploit it, sure.
> 
> But since we were talking about pragmatism, we have to expect that
> the probability of an intermediary ignoring noise decreases as the
> amount of noise increases.  You could almost say that the first bytes
> are going to be the most crucial.  But that doesn't help if we're
> heading for an ironclad, provable probability.

So just use lots of short connections and brute-force the first bytes.

Don't forget that an attack can target (say) 10^6 _separate_ users
visiting a page without knowing it has an attack script on it (say
it's a hacked popular server), that they leave open for a day, each
making connections at the maximum rate allowed by the browser.

Suppose browsers are very conservative and permit just 1 new
connection per second in steady state.  (That's probably low.)

That's still 86,400,000,000 connections in a day (roughly 2^36).

It's a lot, but not beyond a well connected site.

If each connection sends just a single 1kB data packet, that's roughly
2^46 bytes a day.  The home users won't notice; it's only 1kB/s.

That's a lot for a site to handle now, but in a few years time, on a
multi-server site, it's plausible that it might not be noticed for a
while, as a hack on the side of someone else's legitimate server
handling large numbers of connections anyway.

That's a pretty big search space in which to find "dangerous strings",
with all the data is concentrated into the first 1kB of each
connection.

Using that, an attack can brute-force their little string into the
first 1kB/s at the rate of 2^46 bytes a day.

Or, if they have to be *initial* bytes (i.e. proper HTTP, no skipping
junk), they can brute-force at the rate of 2^36 a day.

If it's true (and I'm not sure if it is) that case-insensitive "GET\n"
can muddle a certain Apache caching proxy, that's just 2^29 of
entropy, or about *THREE MINUTES* of sustained attack to get a match

Being at the beginning of the data, this might actually be a plausible
attach on Apache caching proxies.

It only needs to get one to successfully poison *someone*'s cache,
which is often enough.

This is with any kind of crypto.  It doesn't matter how "random" the
bits look, if they don't explicitly guard against being recognised as
HTTP.

I doubt there's a real exploit in this, just noting that large numbers
of connections are part of the brute-force possibilities, and this can
attack at the initial bytes.

-- Jamie

From gregw@intalio.com  Thu Jan 13 23:18:31 2011
Return-Path: <gregw@intalio.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 C28F728C0E2 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 23:18:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.775
X-Spam-Level: 
X-Spam-Status: No, score=-2.775 tagged_above=-999 required=5 tests=[AWL=-0.113, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, SARE_MILLIONSOF=0.315]
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 iEBIZgJEQURH for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 23:18:30 -0800 (PST)
Received: from mail-qw0-f66.google.com (mail-qw0-f66.google.com [209.85.216.66]) by core3.amsl.com (Postfix) with ESMTP id B556228C10B for <hybi@ietf.org>; Thu, 13 Jan 2011 23:18:30 -0800 (PST)
Received: by qwk3 with SMTP id 3so620284qwk.1 for <hybi@ietf.org>; Thu, 13 Jan 2011 23:20:55 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.214.71 with SMTP id gz7mr342062qab.349.1294989655073; Thu, 13 Jan 2011 23:20:55 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.98.212 with HTTP; Thu, 13 Jan 2011 23:20:54 -0800 (PST)
In-Reply-To: <20110114035344.GG4476@shareable.org>
References: <AANLkTinjv781Ebb0FMHeaADuJmV+cXtcMRDA0QF89gER@mail.gmail.com> <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <20110114035344.GG4476@shareable.org>
Date: Fri, 14 Jan 2011 18:20:54 +1100
X-Google-Sender-Auth: LkgdmXzqdise9MAU7K-hHG9LR2U
Message-ID: <AANLkTi=iOgRtsbdnCNO=4n+j+CdxzVqkgB_RWPXYzvk9@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Jamie Lokier <jamie@shareable.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Fri, 14 Jan 2011 07:18:31 -0000

Note also that with something like AES-CTR it will always be possible
for any non-evil payload to be masked into a legal HTTP request.

With a repeated XOR mask, the original data would need to have a
particular structure in it before it would end up looking like a
request.   Thus is probably far less likely to turn a non-evil payload
into an accidentally evil masked payload.

Off course all these evil and non-evil HTTP requests would still need
the intermediary to be accepting of bad HTTP responses and skip over
bad framing looking for a suitable match, so I don't think we have
much to worry about.

cheers



On 14 January 2011 14:53, Jamie Lokier <jamie@shareable.org> wrote:
> Maciej Stachowiak wrote:
>> 3) AES-CTR, using a key computed using HMAC from client and server nonce=
s and random counter per frame
>>
>> Pro:
>> - Makes output indistinguishable from random. This has the best provable=
 security properties.
>
> No, it *doesn't* have the best provable security properties in all the
> relevant ways that have been brought up.
>
> I gather one of the objectives motivating AES-CTR is to prevent lax
> intermediaries and HTTP servers from dubiously recognising HTTP
> requests among a stream of random bytes on many connections?
>
> Case-insensitive 'GET ' followed by an arbitrary string and a newline
> occurs rather often in random bytes. =A0(Every 2^29 or so - it's really
> quite poor if you have millions of active user connections.)
>
> Case-insensitive anything-that-looks-like-it-might-be-a-HTTP-method
> followed by whitespace, and a short
> URL-not-fussy-if-it-contains-8bit-character and a newline occurs *way*
> more often.
>
> Often enough to hit at the start of the data in a predictable place if
> you have a bit of JavaScript opening connections at the maximum rate
> in multiple WebWorkers, unknown to the browser's user (who leaves the
> page open all day).
>
> Even Base64 is technically superior in *this* regard - and it blocks JS
> browser attacks as well doesn't it?
>
> Same goes for escaping newline characters and other variations on that
> theme.
>
> Not that I'm advocating Base64 or newline-escaping - just reminding,
> that in this context what is good for encryption (it looks random) is
> *not* necessarily best security in this context.
>
> -- Jamie
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From gregw@intalio.com  Thu Jan 13 23:22:43 2011
Return-Path: <gregw@intalio.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 1D06B28C0E2 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 23:22:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.932
X-Spam-Level: 
X-Spam-Status: No, score=-2.932 tagged_above=-999 required=5 tests=[AWL=0.045,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 SH3MOGc22fBB for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 23:22:42 -0800 (PST)
Received: from mail-qy0-f194.google.com (mail-qy0-f194.google.com [209.85.216.194]) by core3.amsl.com (Postfix) with ESMTP id 45DF33A6C52 for <hybi@ietf.org>; Thu, 13 Jan 2011 23:22:42 -0800 (PST)
Received: by qyk4 with SMTP id 4so735165qyk.1 for <hybi@ietf.org>; Thu, 13 Jan 2011 23:25:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.87.13 with SMTP id u13mr399227qcl.55.1294989906500; Thu, 13 Jan 2011 23:25:06 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.98.212 with HTTP; Thu, 13 Jan 2011 23:25:06 -0800 (PST)
In-Reply-To: <20110112221206.GG25018@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu>
Date: Fri, 14 Jan 2011 18:25:06 +1100
X-Google-Sender-Auth: 1KGCo_rgRq7RqOOFaEJq_Xjq3Dw
Message-ID: <AANLkTimZBpMByz_qjFsN8tRHA11=bHfqQMBp=Pf8Qcwj@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 07:22:43 -0000

On 13 January 2011 09:12, Willy Tarreau <w@1wt.eu> wrote:
> BTW Sal, could we list Base64 (or any equivalent CRLF-less masking) that
> very few of us have already evocated here ?
>
> It is the only solution to be _certain_ to definitely get rid of the
> issue we're talking about,...

well not the only solution.   The suggestion to fragment a frame when
ever a risky string is seen (eg HTTP) also works..... but
unfortunately does not fit the definition as a masking algorithm.

cheers

From ietf@adambarth.com  Thu Jan 13 23:23:39 2011
Return-Path: <ietf@adambarth.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 52D5928C0E2 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 23:23:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.816
X-Spam-Level: 
X-Spam-Status: No, score=-3.816 tagged_above=-999 required=5 tests=[AWL=-0.839, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 0nRQrXJPxqwx for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 23:23:37 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 0EBDE3A6C5A for <hybi@ietf.org>; Thu, 13 Jan 2011 23:23:36 -0800 (PST)
Received: by gwj17 with SMTP id 17so1135222gwj.31 for <hybi@ietf.org>; Thu, 13 Jan 2011 23:26:01 -0800 (PST)
Received: by 10.151.26.5 with SMTP id d5mr819114ybj.179.1294989960945; Thu, 13 Jan 2011 23:26:00 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id r41sm614128yba.4.2011.01.13.23.25.58 (version=SSLv3 cipher=RC4-MD5); Thu, 13 Jan 2011 23:25:59 -0800 (PST)
Received: by iyi42 with SMTP id 42so2460249iyi.31 for <hybi@ietf.org>; Thu, 13 Jan 2011 23:25:57 -0800 (PST)
Received: by 10.231.156.1 with SMTP id u1mr393676ibw.52.1294989957784; Thu, 13 Jan 2011 23:25:57 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Thu, 13 Jan 2011 23:25:27 -0800 (PST)
In-Reply-To: <20110114071947.GK4476@shareable.org>
References: <4D25D82A.8070302@warmcat.com> <AANLkTinPY+2=1HqrOFfML-+wQU8Ppj_DCg6wSSQjn5pA@mail.gmail.com> <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com> <20110107060128.GI28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D9A@SISPE7MB1.commscope.com> <20110114071947.GK4476@shareable.org>
From: Adam Barth <ietf@adambarth.com>
Date: Thu, 13 Jan 2011 23:25:27 -0800
Message-ID: <AANLkTin=BYqwTRpTUdiauStrEHkb8zmor_CWfFWtRHkw@mail.gmail.com>
To: Jamie Lokier <jamie@shareable.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 14 Jan 2011 07:23:39 -0000

The problem with your analysis is that "GET " isn't actually an
attack.  The cost of constructing an attack string doubles with every
*bit* you add to its length.  If you run your numbers for the attack
string "Willy Tarreau", you'll get vastly different results.

Adam


On Thu, Jan 13, 2011 at 11:19 PM, Jamie Lokier <jamie@shareable.org> wrote:
> Thomson, Martin wrote:
>> On 2011-01-07 at 17:01:28, Willy Tarreau wrote:
>> > No, the randomness I'm talking about is to reduce the probability that
>> > the
>> > server will guess the key and exploit it. If the key is changed for
>> > each
>> > frame, the ability for the server to guess *and exploit* it depends on
>> > the
>> > message length too. The server does not have more chance to forge a
>> > correct
>> > message when it has 1/256 change to guess the key on a message that's
>> > 256
>> > bytes long than when it has 1/65536 on a message that's 65536 bytes
>> > long.
>>
>> You need more space to exploit it, sure.
>>
>> But since we were talking about pragmatism, we have to expect that
>> the probability of an intermediary ignoring noise decreases as the
>> amount of noise increases. =A0You could almost say that the first bytes
>> are going to be the most crucial. =A0But that doesn't help if we're
>> heading for an ironclad, provable probability.
>
> So just use lots of short connections and brute-force the first bytes.
>
> Don't forget that an attack can target (say) 10^6 _separate_ users
> visiting a page without knowing it has an attack script on it (say
> it's a hacked popular server), that they leave open for a day, each
> making connections at the maximum rate allowed by the browser.
>
> Suppose browsers are very conservative and permit just 1 new
> connection per second in steady state. =A0(That's probably low.)
>
> That's still 86,400,000,000 connections in a day (roughly 2^36).
>
> It's a lot, but not beyond a well connected site.
>
> If each connection sends just a single 1kB data packet, that's roughly
> 2^46 bytes a day. =A0The home users won't notice; it's only 1kB/s.
>
> That's a lot for a site to handle now, but in a few years time, on a
> multi-server site, it's plausible that it might not be noticed for a
> while, as a hack on the side of someone else's legitimate server
> handling large numbers of connections anyway.
>
> That's a pretty big search space in which to find "dangerous strings",
> with all the data is concentrated into the first 1kB of each
> connection.
>
> Using that, an attack can brute-force their little string into the
> first 1kB/s at the rate of 2^46 bytes a day.
>
> Or, if they have to be *initial* bytes (i.e. proper HTTP, no skipping
> junk), they can brute-force at the rate of 2^36 a day.
>
> If it's true (and I'm not sure if it is) that case-insensitive "GET\n"
> can muddle a certain Apache caching proxy, that's just 2^29 of
> entropy, or about *THREE MINUTES* of sustained attack to get a match
>
> Being at the beginning of the data, this might actually be a plausible
> attach on Apache caching proxies.
>
> It only needs to get one to successfully poison *someone*'s cache,
> which is often enough.
>
> This is with any kind of crypto. =A0It doesn't matter how "random" the
> bits look, if they don't explicitly guard against being recognised as
> HTTP.
>
> I doubt there's a real exploit in this, just noting that large numbers
> of connections are part of the brute-force possibilities, and this can
> attack at the initial bytes.
>
> -- Jamie
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From jamie@shareable.org  Thu Jan 13 23:29:23 2011
Return-Path: <jamie@shareable.org>
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 77A4328C0E5 for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 23:29:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.739
X-Spam-Level: 
X-Spam-Status: No, score=-2.739 tagged_above=-999 required=5 tests=[AWL=-0.140, BAYES_00=-2.599]
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 50bZzt4Yi+DN for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 23:29:22 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 17B093A693A for <hybi@ietf.org>; Thu, 13 Jan 2011 23:29:22 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Pde8P-00057q-CY; Fri, 14 Jan 2011 07:31:45 +0000
Date: Fri, 14 Jan 2011 07:31:45 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20110114073145.GL4476@shareable.org>
References: <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <20110114035344.GG4476@shareable.org> <AANLkTi=iOgRtsbdnCNO=4n+j+CdxzVqkgB_RWPXYzvk9@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTi=iOgRtsbdnCNO=4n+j+CdxzVqkgB_RWPXYzvk9@mail.gmail.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Fri, 14 Jan 2011 07:29:23 -0000

Greg Wilkins wrote:
> Off course all these evil and non-evil HTTP requests would still need
> the intermediary to be accepting of bad HTTP responses and skip over
> bad framing looking for a suitable match, so I don't think we have
> much to worry about.

Indeed.  Though see the mail I just posted (different thread; same
list) discussing the feasabilitity of using large numbers of
connections, from large (but realistic) numbers of users, to cause an
evil request to appear at a known position near the beginning on one
of those connections.

If the masking occurs from the very first octets following the
HTTP-like handshake, and uses a key which can take all values
uniformly, the attacker doesn't even have to control the messages sent
by the client.  Just the fact that the first octets vary due to the
key is enough, with enough connections.

-- Jamie

From jamie@shareable.org  Fri Jan 14 00:07:43 2011
Return-Path: <jamie@shareable.org>
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 DAE0F3A6C4E for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 00:07:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.732
X-Spam-Level: 
X-Spam-Status: No, score=-2.732 tagged_above=-999 required=5 tests=[AWL=-0.133, BAYES_00=-2.599]
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 ZzXtc5aT8N0K for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 00:07:43 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id CC40C3A693A for <hybi@ietf.org>; Fri, 14 Jan 2011 00:07:42 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PdejH-0005Ft-52; Fri, 14 Jan 2011 08:09:51 +0000
Date: Fri, 14 Jan 2011 08:09:51 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110114080951.GM4476@shareable.org>
References: <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com> <20110107060128.GI28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D9A@SISPE7MB1.commscope.com> <20110114071947.GK4476@shareable.org> <AANLkTin=BYqwTRpTUdiauStrEHkb8zmor_CWfFWtRHkw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTin=BYqwTRpTUdiauStrEHkb8zmor_CWfFWtRHkw@mail.gmail.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 14 Jan 2011 08:07:44 -0000

Adam Barth wrote:
> The problem with your analysis is that "GET " isn't actually an
> attack.  The cost of constructing an attack string doubles with every
> *bit* you add to its length.  If you run your numbers for the attack
> string "Willy Tarreau", you'll get vastly different results.

I haven't worked out the numbers exactly in what follows; I am just
too lazy to sum over the variable-length strings etc.  But hopefully
they're in the right sort of range of numbers of bits:

"GET [[:any-valid-URL-characters:]]+\r?\n"

is an HTTP/0.9 request attack requiring roughly 2^40 tries, and

"[ \t\n\r]*[Gg][Ee][Tt][ \t]+[[:any-ASCII-non-whitespace-or-upper-8bit:]]+[ \t]*[\n\r]"

is an attack if the HTTP parser is sloppy (and many are), requiring
roughly 2^36 tries.

Due to not caring about URL and URL length, the attack cost is greatly
decreased compared with looking for a fixed string of similar length.
You can't control the URL you're poisoning, but you have nonetheless
smuggled in a response which you shouldn't.

Due you see a significant mistake in that analysis?

"GET\n" was a reference to the below specifically:

Willy Tarreau wrote:
> On Wed, Jan 12, 2011 at 10:24:33AM -0500, Patrick McManus wrote:
> >
> > >  one 32-bit pattern looking like
> > > and HTTP request for a known proxy (Apache).
> >
> > I don't understand why "GET\n" is interesting in a proxy scenario.
> > Without a host header exactly what host is the server going to be able
> > to spoof in the cache?
>
> The proxy's default host. For example, the hosting provider's site
> or default site. Since it worked on my Apache reverse proxy, I don't
> see why we should dismiss it as a valid case. What Apache does is
> rewrite the request as a complete one with a real Host header.
>
> > The paper that this is all based on discusses
> > mismatches between host headers and ip addresses of the connection.
> >
> > The only thing I can figure is you are saying that a "GET\n" might
> > translate into "GET / HTTP/1.0\r\nhost: previous-request" but that would
> > require inserting the previous request as well.
>
> No, it sets "GET / HTTP/1.1\r\nHost: <default-host>\r\n\r\n".

From gregw@intalio.com  Fri Jan 14 00:13:35 2011
Return-Path: <gregw@intalio.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 49D183A6C5C for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 00:13:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.932
X-Spam-Level: 
X-Spam-Status: No, score=-2.932 tagged_above=-999 required=5 tests=[AWL=0.045,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 mgBvEIY874DQ for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 00:13:34 -0800 (PST)
Received: from mail-qw0-f66.google.com (mail-qw0-f66.google.com [209.85.216.66]) by core3.amsl.com (Postfix) with ESMTP id 199673A6C54 for <hybi@ietf.org>; Fri, 14 Jan 2011 00:13:33 -0800 (PST)
Received: by qwk3 with SMTP id 3so628550qwk.1 for <hybi@ietf.org>; Fri, 14 Jan 2011 00:15:58 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.87.13 with SMTP id u13mr435503qcl.55.1294992958352; Fri, 14 Jan 2011 00:15:58 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.98.212 with HTTP; Fri, 14 Jan 2011 00:15:58 -0800 (PST)
In-Reply-To: <20110114080951.GM4476@shareable.org>
References: <20110106184607.GB27099@1wt.eu> <AANLkTimetuh1H6OCg_rHZHe16im1bHCwSJFYWTeDbNwx@mail.gmail.com> <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com> <20110107060128.GI28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D9A@SISPE7MB1.commscope.com> <20110114071947.GK4476@shareable.org> <AANLkTin=BYqwTRpTUdiauStrEHkb8zmor_CWfFWtRHkw@mail.gmail.com> <20110114080951.GM4476@shareable.org>
Date: Fri, 14 Jan 2011 19:15:58 +1100
X-Google-Sender-Auth: Eef497zE2HpSPZvHa2gXht8ciD4
Message-ID: <AANLkTinarfi-BLDzKyUc3z2E3KP_A_0ZjhB7D7=MMjKO@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Jamie Lokier <jamie@shareable.org>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 14 Jan 2011 08:13:35 -0000

On 14 January 2011 19:09, Jamie Lokier <jamie@shareable.org> wrote:
> "GET [[:any-valid-URL-characters:]]+\r?\n"
>
> is an HTTP/0.9 request attack requiring roughly 2^40 tries,

For it to be an attack, doesn't it have to be 1.1, or at least 1.0
with a host header?
Unless there is a spoofed host header, then there will be no poisoning
of the cache.

Thus a request that is going to be part of an attack will need to look
something like:

GET /ga.js HTTP/1.1
Host: google-analytics.com

From w@1wt.eu  Fri Jan 14 00:52:51 2011
Return-Path: <w@1wt.eu>
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 71E513A6B64 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 00:52:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.067
X-Spam-Level: 
X-Spam-Status: No, score=-2.067 tagged_above=-999 required=5 tests=[AWL=-0.024, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 IsI2lSb-EKGg for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 00:52:50 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 63BE23A6ACC for <hybi@ietf.org>; Fri, 14 Jan 2011 00:52:49 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0E8tBin003816; Fri, 14 Jan 2011 09:55:11 +0100
Date: Fri, 14 Jan 2011 09:55:11 +0100
From: Willy Tarreau <w@1wt.eu>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20110114085511.GA3795@1wt.eu>
References: <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com> <20110107060128.GI28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D9A@SISPE7MB1.commscope.com> <20110114071947.GK4476@shareable.org> <AANLkTin=BYqwTRpTUdiauStrEHkb8zmor_CWfFWtRHkw@mail.gmail.com> <20110114080951.GM4476@shareable.org> <AANLkTinarfi-BLDzKyUc3z2E3KP_A_0ZjhB7D7=MMjKO@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTinarfi-BLDzKyUc3z2E3KP_A_0ZjhB7D7=MMjKO@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 14 Jan 2011 08:52:51 -0000

Hi Greg,

On Fri, Jan 14, 2011 at 07:15:58PM +1100, Greg Wilkins wrote:
> On 14 January 2011 19:09, Jamie Lokier <jamie@shareable.org> wrote:
> > "GET [[:any-valid-URL-characters:]]+\r?\n"
> >
> > is an HTTP/0.9 request attack requiring roughly 2^40 tries,
> 
> For it to be an attack, doesn't it have to be 1.1, or at least 1.0
> with a host header?

Not necessarily, because as I have shown, some intermediaries such as
Apache rewrite "GET\n" as "GET / HTTP/1.1\r\nHost: <default_host>\r\n"
followed by a few headers. Thus this becomes a completely valid HTTP/1.1
request that itself or whatever cache behind it can see.

I'm still thinking we're walking on our own heads anyway, some are trying
to show that a significant amount of crypto can help block supposed attacks
and others are trying to show that some supposedly impossible attacks which
are still possible in some rare situations are not completely defeated by
such protections.

That's why I'd strongly prefer a pragmatic approach :
  - accept that the risk of attack is extremely low and that each attack has
    a cost ;
  - accept a low-cost preventive measure.

If the cost of the protection is lower for normal use than the cost to attack
the service for a specific attacker, it's already a good solution.

Regards,
Willy


From jgraham@opera.com  Fri Jan 14 03:10:24 2011
Return-Path: <jgraham@opera.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 A589F3A6B6A for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 03:10:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.499
X-Spam-Level: 
X-Spam-Status: No, score=-6.499 tagged_above=-999 required=5 tests=[AWL=0.100,  BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 s1cDhP2DvG+4 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 03:10:22 -0800 (PST)
Received: from smtp.opera.com (smtp.opera.com [213.236.208.81]) by core3.amsl.com (Postfix) with ESMTP id 9205F3A6B67 for <hybi@ietf.org>; Fri, 14 Jan 2011 03:10:22 -0800 (PST)
Received: from [10.30.0.35] (oslo.jvpn.opera.com [213.236.208.46]) (authenticated bits=0) by smtp.opera.com (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p0EBCium008827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <hybi@ietf.org>; Fri, 14 Jan 2011 11:12:45 GMT
Message-ID: <4D302FAB.9010900@opera.com>
Date: Fri, 14 Jan 2011 12:12:43 +0100
From: James Graham <jgraham@opera.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9pre) Gecko/20100217 Shredder/3.0.3pre
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D2E0863.2040804@ericsson.com>
In-Reply-To: <4D2E0863.2040804@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 11:10:24 -0000

On 01/12/2011 09:00 PM, Salvatore Loreto wrote:
> Hi all,
>
>
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce
> security risks.
>
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been
> deeply discussed.
>
> In order to settle the question of masking and find a way forward that
> has a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and
> summarized at
> some point in the mailing list by Eric Rescorla)
>
>
> 1. a fixed mask carried entirely in the packet.

I can't live with this as it doesn't have the desired security properties.

> 2. A longish repeated mask computed from the packet. For concreteness,
> suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> <packet-key>), but
> obviously there's flexibility here.

This seems to be worse than #3 in significant ways. However it meets the 
"can live with" bar for me.

> 3. A fully generated mask (if so specify also what you would like to use
> e.g. AES-CTR or HMAC-SHA).

This is my preferred option.


From gregw@intalio.com  Fri Jan 14 05:38:31 2011
Return-Path: <gregw@intalio.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 BFE983A6C61 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 05:38:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.932
X-Spam-Level: 
X-Spam-Status: No, score=-2.932 tagged_above=-999 required=5 tests=[AWL=0.045,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 Ump7dtqRiqa8 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 05:38:31 -0800 (PST)
Received: from mail-qy0-f194.google.com (mail-qy0-f194.google.com [209.85.216.194]) by core3.amsl.com (Postfix) with ESMTP id DDA923A6B7F for <hybi@ietf.org>; Fri, 14 Jan 2011 05:38:30 -0800 (PST)
Received: by qyk4 with SMTP id 4so805019qyk.1 for <hybi@ietf.org>; Fri, 14 Jan 2011 05:40:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.236.134 with SMTP id kk6mr668942qcb.93.1295012455275; Fri, 14 Jan 2011 05:40:55 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.98.212 with HTTP; Fri, 14 Jan 2011 05:40:55 -0800 (PST)
In-Reply-To: <20110114085511.GA3795@1wt.eu>
References: <20110106221426.GA28367@1wt.eu> <AANLkTimNc6YDUG=920P=G7kxs9oDwDEsGJ5LA6BG_iyb@mail.gmail.com> <20110107053410.GG28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com> <20110107060128.GI28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D9A@SISPE7MB1.commscope.com> <20110114071947.GK4476@shareable.org> <AANLkTin=BYqwTRpTUdiauStrEHkb8zmor_CWfFWtRHkw@mail.gmail.com> <20110114080951.GM4476@shareable.org> <AANLkTinarfi-BLDzKyUc3z2E3KP_A_0ZjhB7D7=MMjKO@mail.gmail.com> <20110114085511.GA3795@1wt.eu>
Date: Sat, 15 Jan 2011 00:40:55 +1100
X-Google-Sender-Auth: W7tzWu-bXZm9ew1T5q7hCAv8EgM
Message-ID: <AANLkTim31ARNsBCZ_zYGFASEXXED7W5s8Et1BuO3zAUU@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 14 Jan 2011 13:38:31 -0000

On 14 January 2011 19:55, Willy Tarreau <w@1wt.eu> wrote:
> On Fri, Jan 14, 2011 at 07:15:58PM +1100, Greg Wilkins wrote:
> Not necessarily, because as I have shown, some intermediaries such as
> Apache rewrite "GET\n" as "GET / HTTP/1.1\r\nHost: <default_host>\r\n"
> followed by a few headers. Thus this becomes a completely valid HTTP/1.1
> request that itself or whatever cache behind it can see.

wont the default host be valid, and thus not usable in poisoning?

> I'm still thinking we're walking on our own heads anyway, some are trying
> to show that a significant amount of crypto can help block supposed attac=
ks
> and others are trying to show that some supposedly impossible attacks whi=
ch
> are still possible in some rare situations are not completely defeated by
> such protections.

true

> That's why I'd strongly prefer a pragmatic approach :
> =A0- accept that the risk of attack is extremely low and that each attack=
 has
> =A0 =A0a cost ;
> =A0- accept a low-cost preventive measure.

+1 (although I think it is a low-cost mitigation measure, rather than
preventive measure)

cheers

From zt.tmzt@gmail.com  Fri Jan 14 05:59:06 2011
Return-Path: <zt.tmzt@gmail.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 6839C3A6B7F for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 05:59:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 dkPqHOrWIsPR for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 05:59:05 -0800 (PST)
Received: from mail-qy0-f194.google.com (mail-qy0-f194.google.com [209.85.216.194]) by core3.amsl.com (Postfix) with ESMTP id 7F7113A6B7A for <hybi@ietf.org>; Fri, 14 Jan 2011 05:59:05 -0800 (PST)
Received: by qyk4 with SMTP id 4so809171qyk.1 for <hybi@ietf.org>; Fri, 14 Jan 2011 06:01:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type; bh=vLWdvDoHgZ0UXY4WwmnsFdm+yagKrvTJHg2tM4HnoRA=; b=LC+9LnvQTkcHP4ClziSfGTTUIhwpK5WttEXpukVgmP2DWqmOMOE5LJXdbLXTMIekI4 X1RD9R5WSVBZPq7dd/Mxr8roQ0dEl0vfuheXpQxPKCug3WK4rhYH/+yNSWH67v1bYLlz Od6Ml3Oz1VG12WA4vyRO4oyQKCAGUpE2ny8MY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=wlLg1kLKvOpuiCNIO5o2d76BE2W8wQH33fKJc8yduaBLb0IQKirPsdTO0O9K2DSw41 s71t7710uqb31Ot23+dKr48bPdps81fgkXwbbkxtsGqIR4U/pIm64/1upnSGYHlAtUJ3 EdeJ9fuQna+Afd+l9/gSEWoVBGV3ff8FrSue0=
MIME-Version: 1.0
Received: by 10.229.99.76 with SMTP id t12mr668842qcn.275.1295013690248; Fri, 14 Jan 2011 06:01:30 -0800 (PST)
Received: by 10.220.176.69 with HTTP; Fri, 14 Jan 2011 06:01:30 -0800 (PST)
Date: Fri, 14 Jan 2011 09:01:30 -0500
Message-ID: <AANLkTik1aGJCAqSY9ED1zmZcHPMymtwJZJVR7zLq_mrJ@mail.gmail.com>
From: "zt.tmzt@gmail.com" <zt.tmzt@gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: [hybi] Proposal for RLE framing and escape mechanism
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: Fri, 14 Jan 2011 13:59:06 -0000

As an outsider reading Jamie Lokier's comment on escape sequences as a
mechanism to avoid CRLF and other potentially harmful sequences.

As I understand it, the proposed framing already has the form

<opcode><length><data>

Would it be sufficient to amend it as follows:

<opcode><length><data not including unwanted characters or sequences>
<opcode representing the unwanted character or sequence><0>
<opcode><length><continuation of data not including unwanted
characters or sequences>

Timothy Meade
(real time web developer)

From mcmanus@ducksong.com  Fri Jan 14 09:48:32 2011
Return-Path: <mcmanus@ducksong.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 8522C3A6C67 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 09:48:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.533
X-Spam-Level: 
X-Spam-Status: No, score=-2.533 tagged_above=-999 required=5 tests=[AWL=0.066,  BAYES_00=-2.599]
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 oQIXgaQIf2XK for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 09:48:31 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id B19F63A6C1D for <hybi@ietf.org>; Fri, 14 Jan 2011 09:48:31 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id 1C70E10305; Fri, 14 Jan 2011 12:50:56 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id A719C10157; Fri, 14 Jan 2011 12:50:52 -0500 (EST)
From: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
In-Reply-To: <4D2E0863.2040804@ericsson.com>
References: <4D2E0863.2040804@ericsson.com>
Content-Type: text/plain; charset="UTF-8"
Date: Fri, 14 Jan 2011 12:50:51 -0500
Message-ID: <1295027451.7650.955.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 17:48:32 -0000

On Wed, 2011-01-12 at 21:00 +0100, Salvatore Loreto wrote:
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and 

> 1. a fixed mask carried entirely in the packet.

> 2. A longish repeated mask computed from the packet.

> 3. A fully generated mask (if so specify also what you would like to use 
> e.g. AES-CTR or HMAC-SHA).

My primary preference is for 1 which is sufficient to the job at hand -
if we can have consensus that it is good enough I would be content with
it. If that isn't enough, I can support #2 which is expensive but
tolerably so.

At this point #3 (AES) would be acceptable as a negotiated option with
#1 or more likely #2 as a required fallback. That approach would give
the camp that needs "at least #2" that level of randomness, while
allowing implementations who wished to deal with the regulations around
AES the capability of opting into something faster (assuming opted into
by both ends). Intermediaries not willing to do AES would obviously have
to participate in the negotiation, which all gets complicated.. so this
is my least preferred, yet acceptable, route.








From w@1wt.eu  Fri Jan 14 09:50:11 2011
Return-Path: <w@1wt.eu>
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 55B513A6C67 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 09:50:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.067
X-Spam-Level: 
X-Spam-Status: No, score=-2.067 tagged_above=-999 required=5 tests=[AWL=-0.024, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 Hk9bB7fEKtvK for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 09:50:07 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id D848F28C0F9 for <hybi@ietf.org>; Fri, 14 Jan 2011 09:50:02 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0EHqMJI006215; Fri, 14 Jan 2011 18:52:22 +0100
Date: Fri, 14 Jan 2011 18:52:22 +0100
From: Willy Tarreau <w@1wt.eu>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20110114175222.GB6148@1wt.eu>
References: <20110107053410.GG28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D86@SISPE7MB1.commscope.com> <20110107060128.GI28367@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03F5258D9A@SISPE7MB1.commscope.com> <20110114071947.GK4476@shareable.org> <AANLkTin=BYqwTRpTUdiauStrEHkb8zmor_CWfFWtRHkw@mail.gmail.com> <20110114080951.GM4476@shareable.org> <AANLkTinarfi-BLDzKyUc3z2E3KP_A_0ZjhB7D7=MMjKO@mail.gmail.com> <20110114085511.GA3795@1wt.eu> <AANLkTim31ARNsBCZ_zYGFASEXXED7W5s8Et1BuO3zAUU@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTim31ARNsBCZ_zYGFASEXXED7W5s8Et1BuO3zAUU@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>, "Thomson, Martin" <Martin.Thomson@andrew.com>
Subject: Re: [hybi] A bit of pragmatism
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: Fri, 14 Jan 2011 17:50:15 -0000

On Sat, Jan 15, 2011 at 12:40:55AM +1100, Greg Wilkins wrote:
> On 14 January 2011 19:55, Willy Tarreau <w@1wt.eu> wrote:
> > On Fri, Jan 14, 2011 at 07:15:58PM +1100, Greg Wilkins wrote:
> > Not necessarily, because as I have shown, some intermediaries such as
> > Apache rewrite "GET\n" as "GET / HTTP/1.1\r\nHost: <default_host>\r\n"
> > followed by a few headers. Thus this becomes a completely valid HTTP/1.1
> > request that itself or whatever cache behind it can see.
> 
> wont the default host be valid, and thus not usable in poisoning?

If it's valid and the server still controls the response stream, then
we're in the situation we want to avoid.

> > That's why I'd strongly prefer a pragmatic approach :
> >  - accept that the risk of attack is extremely low and that each attack has
> >    a cost ;
> >  - accept a low-cost preventive measure.
> 
> +1 (although I think it is a low-cost mitigation measure, rather than
> preventive measure)

Yes you're right, thanks for correcting me.

Willy


From w@1wt.eu  Fri Jan 14 09:53:23 2011
Return-Path: <w@1wt.eu>
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 87EE93A6BA3 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 09:53:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.067
X-Spam-Level: 
X-Spam-Status: No, score=-2.067 tagged_above=-999 required=5 tests=[AWL=-0.024, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 eg-QOG8yA+oY for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 09:53:22 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 87AE23A6A82 for <hybi@ietf.org>; Fri, 14 Jan 2011 09:53:22 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0EHtkmB006235; Fri, 14 Jan 2011 18:55:46 +0100
Date: Fri, 14 Jan 2011 18:55:46 +0100
From: Willy Tarreau <w@1wt.eu>
To: "zt.tmzt@gmail.com" <zt.tmzt@gmail.com>
Message-ID: <20110114175546.GC6148@1wt.eu>
References: <AANLkTik1aGJCAqSY9ED1zmZcHPMymtwJZJVR7zLq_mrJ@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTik1aGJCAqSY9ED1zmZcHPMymtwJZJVR7zLq_mrJ@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Proposal for RLE framing and escape mechanism
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: Fri, 14 Jan 2011 17:53:23 -0000

On Fri, Jan 14, 2011 at 09:01:30AM -0500, zt.tmzt@gmail.com wrote:
> As an outsider reading Jamie Lokier's comment on escape sequences as a
> mechanism to avoid CRLF and other potentially harmful sequences.
> 
> As I understand it, the proposed framing already has the form
> 
> <opcode><length><data>
> 
> Would it be sufficient to amend it as follows:
> 
> <opcode><length><data not including unwanted characters or sequences>
> <opcode representing the unwanted character or sequence><0>
> <opcode><length><continuation of data not including unwanted
> characters or sequences>

In would still have a few defaults :
  - if either <opcode> or <length> encode as the CR or LF chars, you lose.

  - when sending binary data, we'd have on average 2/256 chars escaped,
    which considerably reduces the average frame length. It can come with
    a substantial frame parsing cost.

Regards,
Willy


From tomas@tomasf.se  Fri Jan 14 10:06:40 2011
Return-Path: <tomas@tomasf.se>
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 2997D3A6C76 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 10:06:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.949
X-Spam-Level: 
X-Spam-Status: No, score=-2.949 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_SE=0.35, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 fXMFELDxBNDA for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 10:06:39 -0800 (PST)
Received: from smtprelay-h31.telenor.se (smtprelay-h31.telenor.se [213.150.131.4]) by core3.amsl.com (Postfix) with ESMTP id 292413A6C1D for <hybi@ietf.org>; Fri, 14 Jan 2011 10:06:38 -0800 (PST)
Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-h31.telenor.se (Postfix) with ESMTP id 75EC6EAAF6 for <hybi@ietf.org>; Fri, 14 Jan 2011 19:09:03 +0100 (CET)
X-SENDER-IP: [85.227.3.7]
X-LISTENER: [smtp.bredband.net]
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AmoVAAogME1V4wMHPGdsb2JhbAAMiEucCgEBAQE1u1qFTwSLFg
X-IronPort-AV: E=Sophos;i="4.60,323,1291590000"; d="scan'208";a="1706330613"
Received: from ua-85-227-3-7.cust.bredbandsbolaget.se (HELO [192.168.0.101]) ([85.227.3.7]) by ipb4.telenor.se with ESMTP; 14 Jan 2011 19:09:03 +0100
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset=us-ascii
From: =?iso-8859-1?Q?Tomas_Franz=E9n?= <tomas@tomasf.se>
In-Reply-To: <20110112221206.GG25018@1wt.eu>
Date: Fri, 14 Jan 2011 19:09:02 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 18:06:40 -0000

On 12 jan 2011, at 23.12, Willy Tarreau wrote:
> On Wed, Jan 12, 2011 at 09:00:35PM +0100, Salvatore Loreto wrote:
>> 1. a fixed mask carried entirely in the packet.
>>=20
>> 2. A longish repeated mask computed from the packet. For =
concreteness,
>>   suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||=20=

>> <packet-key>), but
>>   obviously there's flexibility here.
>>=20
>> 3. A fully generated mask (if so specify also what you would like to =
use=20
>> e.g. AES-CTR or HMAC-SHA).
>=20
> BTW Sal, could we list Base64 (or any equivalent CRLF-less masking) =
that
> very few of us have already evocated here ?
>=20
> It is the only solution to be _certain_ to definitely get rid of the
> issue we're talking about, has much less CPU overhead than AES/HMAC,
> at the expense of higher network costs (+14-33% for the simplest
> versions, even less with escaping).

+1

Finally a relatively nice solution. Base64 is simple, commonly used in =
other standards and a guarantee that the payload will never contain =
CRLF. The length overhead seems acceptable to me.

Tomas=

From neonux@gmail.com  Fri Jan 14 10:51:28 2011
Return-Path: <neonux@gmail.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 B36173A6BB1 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 10:51:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.677
X-Spam-Level: 
X-Spam-Status: No, score=-2.677 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 a3g9RN0hc0T3 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 10:51:24 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by core3.amsl.com (Postfix) with ESMTP id BA8A63A67B8 for <hybi@ietf.org>; Fri, 14 Jan 2011 10:51:23 -0800 (PST)
Received: by iyi42 with SMTP id 42so3023888iyi.31 for <hybi@ietf.org>; Fri, 14 Jan 2011 10:53:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=4oGfX9gPjTyT7LqPip6WjR8Q2+cjWmkamgaZU6TUP5o=; b=Nca3aez6aFhsH3y9Uq5qEPsMVdY7DleiAPQ5LB1Zwam85ZGA8l4KzKze/e7YY+iuSe 5dH4znzrrnfMr0LzCTx0AUfmsUdTeBXVe6pua0jRHBfPWP/pFSobF/Tk7a8i8WovznOu P1MDwpxAzVqVTXQLB8rtj6yiULJLP1t5rpxjM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=xaAMNRKWXUNdXIZCSkE4bUBFgzodZK2UAN+t2bwR2SaNo5oAVxlnVXu8bhmkbv5GJO 0bEOB81VsT/pTRKVfODgJ4nAu2BE1NBE2PNw8GYeiQ52IUMjlfFzVC3XmqEgmZ5JVYkz ZjbAU2q2wIIScoj1UK7k6c2+OyBGIpDJG14Zc=
Received: by 10.42.166.197 with SMTP id p5mr1172609icy.368.1295031229734; Fri, 14 Jan 2011 10:53:49 -0800 (PST)
MIME-Version: 1.0
Sender: neonux@gmail.com
Received: by 10.42.179.72 with HTTP; Fri, 14 Jan 2011 10:53:19 -0800 (PST)
In-Reply-To: <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se>
From: Cedric Vivier <cedricv@neonux.com>
Date: Sat, 15 Jan 2011 02:53:19 +0800
X-Google-Sender-Auth: Wke_MqvRQ1PYWsLJOHLwGQr58rw
Message-ID: <AANLkTi=ep3qiggpVVisx2gD+AL3-8fY030KY-rb39ZgK@mail.gmail.com>
To: =?UTF-8?Q?Tomas_Franz=C3=A9n?= <tomas@tomasf.se>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 18:51:28 -0000

On Sat, Jan 15, 2011 at 02:09, Tomas Franz=C3=A9n <tomas@tomasf.se> wrote:
> +1
>
> Finally a relatively nice solution. Base64 is simple, commonly used in ot=
her standards and a guarantee that the payload will never contain CRLF. The=
 length overhead seems acceptable to me.

Sounds like it is reasonable AND actually take care of the original
problem.. which is to guarantee no intermediary will get tricked by an
evil HTTP-looking sequence of bytes in the packet.

By using XOR or AES, no matter how random our packets are, they will
eventually produce be a potentially dangerous sequence... if you
consider the possibility that a broken proxy has thousands of users
behind it, it's just a matter of time and amount of bytes before its
cache will be poisoned, no matter what.

Also the size overhead could be lesser by using Ascii85 rather than
Base64... and this would actually generate smaller packets in some
cases [1] where latency is important since the overhead of Ascii85 can
be lesser than the overhead of sending a new random key for each
packet.

[1] : WebSockets clients using the protocol for frequent updates
through [very] small packets (eg. interactive/real-time applications
such as games or collaborative writing...)


Regards,

From josh@lindenlab.com  Fri Jan 14 10:54:54 2011
Return-Path: <josh@lindenlab.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 B4AF03A67B8 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 10:54:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.976
X-Spam-Level: 
X-Spam-Status: No, score=-102.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 9KV4PpVtjcCg for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 10:54:53 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 7CB4E3A6C66 for <hybi@ietf.org>; Fri, 14 Jan 2011 10:54:53 -0800 (PST)
Received: by gwj17 with SMTP id 17so1386876gwj.31 for <hybi@ietf.org>; Fri, 14 Jan 2011 10:57:19 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.100.4 with SMTP id x4mr1486175agb.4.1295031439113; Fri, 14 Jan 2011 10:57:19 -0800 (PST)
Received: by 10.90.23.9 with HTTP; Fri, 14 Jan 2011 10:57:19 -0800 (PST)
In-Reply-To: <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se>
Date: Fri, 14 Jan 2011 10:57:19 -0800
Message-ID: <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com>
From: Joshua Bell <josh@lindenlab.com>
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: multipart/alternative; boundary=0016362834f4e6bf0b0499d30025
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 18:54:54 -0000

--0016362834f4e6bf0b0499d30025
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Fri, Jan 14, 2011 at 10:09 AM, Tomas Franz=C3=A9n <tomas@tomasf.se> wrot=
e:

> On 12 jan 2011, at 23.12, Willy Tarreau wrote:>
> > BTW Sal, could we list Base64 (or any equivalent CRLF-less masking) tha=
t
> > very few of us have already evocated here ?
> >
> > It is the only solution to be _certain_ to definitely get rid of the
> > issue we're talking about, has much less CPU overhead than AES/HMAC,
> > at the expense of higher network costs (+14-33% for the simplest
> > versions, even less with escaping).
>
> +1
>
> Finally a relatively nice solution. Base64 is simple, commonly used in
> other standards and a guarantee that the payload will never contain CRLF.
> The length overhead seems acceptable to me.


If we're considering options that sacrifice message length for security, do
we also need to consider an option where the (unencoded) payload length is
sent as something other than a network-order 63-bit integer, to avoid
attacks where "GET /" is encoded into the length? Furthering the concession
of sacrificing frame length for simplicity+security, the length could be
sent as a 16-digit hexadecimal ASCII string. (More compact forms are of
course possible, such as a UTF-8-like encoding scheme for length where high
bits are set except for the trailing octet.)

The first octet of the data could be as per the -04 framing
(FIN/RSV1/RSV2/RSV3/opcode) as this is not under the control of the
browser-sandboxed attacker so it is not a concern, although for simplicity
extension data would follow this directly, with the caveat that the lead
octet + extension data can't look like "GET /"; this would be a requirement
that future extensions supported by browsers may have to honor.

Overall frame structure would be:

<framing octet> <extension data> <ASCII length> <base64-encoded payload>

For example the payload "Hello World" as a single fragment Unicode text
frame with no extensions (i.e. what browsers would be sending on behalf of
sandboxed script in the near term) would be sent as:

0x84 "000000000000000bSGVsbG8gV29ybGQ=3D"

Long but simple.

-- Josh

--0016362834f4e6bf0b0499d30025
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Fri, Jan 14, 2011 at 10:09 AM, Tomas Franz=C3=A9n <span dir=3D"ltr">&lt;=
<a href=3D"mailto:tomas@tomasf.se">tomas@tomasf.se</a>&gt;</span> wrote:<br=
><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On 12 jan 2011, at 23.12, Willy Tarreau wrote:&gt;</div><=
div class=3D"im">&gt; BTW Sal, could we list Base64 (or any equivalent CRLF=
-less masking) that<br>
&gt; very few of us have already evocated here ?<br>
&gt;<br>
&gt; It is the only solution to be _certain_ to definitely get rid of the<b=
r>
</div><div class=3D"im">&gt; issue we&#39;re talking about, has much less C=
PU overhead than AES/HMAC,<br>
&gt; at the expense of higher network costs (+14-33% for the simplest<br>
&gt; versions, even less with escaping).<br>
<br>
+1<br>
<br>
</div>Finally a relatively nice solution. Base64 is simple, commonly used i=
n other standards and a guarantee that the payload will never contain CRLF.=
 The length overhead seems acceptable to me.</blockquote><div><br></div>
<div>If we&#39;re considering options that sacrifice message length for sec=
urity, do we also need to consider an option where the (unencoded) payload =
length is sent as something other than a network-order 63-bit integer, to a=
void attacks where &quot;GET /&quot; is encoded into the length? Furthering=
 the concession of sacrificing frame length for simplicity+security, the le=
ngth could be sent as a 16-digit hexadecimal ASCII string. (More compact fo=
rms are of course possible, such as a UTF-8-like encoding scheme for length=
 where high bits are set except for the trailing octet.)</div>
<div><br></div><div>The first octet of the data could be as per the -04 fra=
ming (FIN/RSV1/RSV2/RSV3/opcode) as this is not under the control of the br=
owser-sandboxed=C2=A0attacker so it is not a concern, although for simplici=
ty extension data would follow this directly, with the caveat that the lead=
 octet + extension data can&#39;t look like &quot;GET /&quot;; this would b=
e a requirement that future extensions supported by browsers may have to ho=
nor.</div>
<div><br></div><div>Overall frame structure would be:</div><div><br></div><=
div>&lt;framing octet&gt; &lt;extension data&gt; &lt;ASCII length&gt; &lt;b=
ase64-encoded payload&gt;</div><div><br></div><div>For example the payload =
&quot;Hello World&quot; as a single fragment Unicode text frame with no ext=
ensions (i.e. what browsers would be sending on behalf of sandboxed script =
in the near term) would be sent as:</div>
<div><div><br></div><div>0x84 &quot;000000000000000bSGVsbG8gV29ybGQ=3D&quot=
;</div></div><div><br></div><div>Long but simple.</div><div><br></div><div>=
-- Josh</div><div><br></div></div>

--0016362834f4e6bf0b0499d30025--

From bruce@callenish.com  Fri Jan 14 11:34:41 2011
Return-Path: <bruce@callenish.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 2A4C13A6BA7 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 11:34:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.587
X-Spam-Level: 
X-Spam-Status: No, score=-2.587 tagged_above=-999 required=5 tests=[AWL=0.012,  BAYES_00=-2.599]
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 W6-tYtwQZvYm for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 11:34:40 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 43CC03A6A58 for <hybi@ietf.org>; Fri, 14 Jan 2011 11:34:40 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PdpSK-0001Ks-RG for hybi@ietf.org; Fri, 14 Jan 2011 11:37:04 -0800
Message-ID: <4D30A5E6.5000007@callenish.com>
Date: Fri, 14 Jan 2011 11:37:10 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <4D2E0863.2040804@ericsson.com>
In-Reply-To: <4D2E0863.2040804@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 19:34:41 -0000

I don't see why this has to be an either/or. My vote would be to support 
both option 1 and option 3. Option 1 as the default, option 3 (or 
base64, which I agree is a more secure option in this case) available as 
an extension.

Anyone writing a websocket client could choose to only implement the 
option 3 extension masking for sending data if they want to give such a 
preference to security. Anyone else could choose option 1 with its much 
lower barriers to entry.

If there can be only one masking algorithm, then my vote is for option 
1. There is one form of attack it does not address, but masking is not 
the only way, nor the best way I have become convinced, to protect 
against that attack.

The attack presupposes that setRequestHeader() is insecure in browsers, 
but getRequestHeader() is completely secure. I think fixing the browsers 
to make setRequestHeader() secure is a more desirable outcome than 
warping the protocol to get around this buggy behaviour. If not, then 
there are other solutions such as using HELLO frames. The cost of this, 
losing the ability to force the server to check that the client is 
authentic, is IMO trivial compared to the costs of losing the ability to 
debug streams in many situations, the loss of ubiquity for Websockets, 
and the vastly increased complexity of implementation. How many lines of 
C code with the standard library would a basic websockets client take 
with option 1? 100 at most? How many with options 2 or 3?

Can I live with options 2 or 3? I'm not slicing my wrists over any 
protocol. But if options 2 or 3 were the only one available, then for me 
Websockets would become a niche protocol, to be used only when 
constraints left me no other options, rather than a general tool to be 
considered anywhere a bidirectional client/server protocol was needed. 
The costs of adopting it would be too high for that.

On 12/01/2011 12:00 PM, Salvatore Loreto wrote:
> Hi all,
>
>
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce 
> security risks.
>
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been 
> deeply discussed.
>
> In order to settle the question of masking and find a way forward that 
> has a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and 
> summarized at
> some point in the mailing list by Eric Rescorla)
>
>
> 1. a fixed mask carried entirely in the packet.
>
> 2. A longish repeated mask computed from the packet. For concreteness,
>    suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> || 
> <packet-key>), but
>    obviously there's flexibility here.
>
> 3. A fully generated mask (if so specify also what you would like to 
> use e.g. AES-CTR or HMAC-SHA).
>
>
> Please indicate your preference(s) or the one can meet your bar for "I 
> could live with that";
> In the case you have more then one, please put the choices in a 
> preference order.
>
> This poll will run until January 18th.
>
> cheers
> /Sal
>


From w@1wt.eu  Fri Jan 14 12:30:46 2011
Return-Path: <w@1wt.eu>
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 81E123A6BCE for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 12:30:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.067
X-Spam-Level: 
X-Spam-Status: No, score=-2.067 tagged_above=-999 required=5 tests=[AWL=-0.024, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 z9tkGjejmOMC for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 12:30:45 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 5E8953A6C18 for <hybi@ietf.org>; Fri, 14 Jan 2011 12:30:44 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0EKX4oi006945; Fri, 14 Jan 2011 21:33:04 +0100
Date: Fri, 14 Jan 2011 21:33:04 +0100
From: Willy Tarreau <w@1wt.eu>
To: Joshua Bell <josh@lindenlab.com>
Message-ID: <20110114203304.GA6872@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se> <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 20:30:46 -0000

On Fri, Jan 14, 2011 at 10:57:19AM -0800, Joshua Bell wrote:
> On Fri, Jan 14, 2011 at 10:09 AM, Tomas Franzén <tomas@tomasf.se> wrote:
> 
> > On 12 jan 2011, at 23.12, Willy Tarreau wrote:>
> > > BTW Sal, could we list Base64 (or any equivalent CRLF-less masking) that
> > > very few of us have already evocated here ?
> > >
> > > It is the only solution to be _certain_ to definitely get rid of the
> > > issue we're talking about, has much less CPU overhead than AES/HMAC,
> > > at the expense of higher network costs (+14-33% for the simplest
> > > versions, even less with escaping).
> >
> > +1
> >
> > Finally a relatively nice solution. Base64 is simple, commonly used in
> > other standards and a guarantee that the payload will never contain CRLF.
> > The length overhead seems acceptable to me.
> 
> 
> If we're considering options that sacrifice message length for security, do
> we also need to consider an option where the (unencoded) payload length is
> sent as something other than a network-order 63-bit integer, to avoid
> attacks where "GET /" is encoded into the length?

Cheap maskings such as XOR or Base64 can probably afford having the
framing masked. With XOR it's trivial, with Base64, we need to base64
decode the 2nd and third characters to know what framing length is
used. I agree it's not much convenient but still trivially easy to
do. Honnestly, I'd be more in favor of an even simpler encoding
algorithm. Base64 is for getting printable text. We don't need that,
we just need to avoid CRLFs. We could very well have a 7-to-8 bit
encoding where 7 bytes chunks are encoded in 8 bytes all having their
7th bit set, and where a premature end of frame could be indicated
with \0. Such an encoding is much cheaper than base64 since there's
no lookup at all and can be even cheaper on 64-bit machines that are
very common today, for instance something like this :

/* Decode 64 bits to 56 */
static inline uint64_t raw_to_wire(uint64_t in)
{
	int shift;
	uint64_t out = 0;

	for (shift = 0; shift < 56; shift += 7) {
		out += (in & 0x7F) << shift;
		in >>= 8;
	}
	return out;
}

Regards,
Willy


From fenix@google.com  Fri Jan 14 12:49:36 2011
Return-Path: <fenix@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 29DD03A6C6B for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 12:49:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.949
X-Spam-Level: 
X-Spam-Status: No, score=-103.949 tagged_above=-999 required=5 tests=[AWL=-0.973, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 B9T+Qfcd0Jbx for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 12:49:35 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id EE3B13A6A85 for <hybi@ietf.org>; Fri, 14 Jan 2011 12:49:34 -0800 (PST)
Received: from hpaq2.eem.corp.google.com (hpaq2.eem.corp.google.com [172.25.149.2]) by smtp-out.google.com with ESMTP id p0EKq0Fc022978 for <hybi@ietf.org>; Fri, 14 Jan 2011 12:52:00 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295038320; bh=Jc2JOEpF2zB8lf+wX6KlRI0I9qQ=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=Vgv8I+b2dS57pqUfQ2xVkBQCSCto8CRN86CBDzXbqkPUX0c/B1CjYHgAI0H2nxczf q6KZ9B/FDu3MawWaHH7ww==
Received: from qyk29 (qyk29.prod.google.com [10.241.83.157]) by hpaq2.eem.corp.google.com with ESMTP id p0EKpwVH012142 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Fri, 14 Jan 2011 12:51:59 -0800
Received: by qyk29 with SMTP id 29so3392355qyk.18 for <hybi@ietf.org>; Fri, 14 Jan 2011 12:51:58 -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:date :message-id:subject:from:to:cc:content-type; bh=QVUIsp9EBvRGiW0pNzIdFcuQQHU8v+sVNWpWUQaDbM4=; b=MiMv/plV7XVndpa2dbySTX2TWyaQosUaVChGCCpdk+/rx8kZXC5Ppn0wZdsO1aAkox DQqo1JDBS/oGlhUbnzsw==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=lC8nWHNlpRpcnggJPmjHTIKo+iUKKL/QMtGHtU6K0btL1yNFT3wf975yD7Zqyv4X8y nhMSV39BLSAr4GvkrI9w==
MIME-Version: 1.0
Received: by 10.229.84.203 with SMTP id k11mr1017168qcl.281.1295038317985; Fri, 14 Jan 2011 12:51:57 -0800 (PST)
Received: by 10.229.17.73 with HTTP; Fri, 14 Jan 2011 12:51:57 -0800 (PST)
In-Reply-To: <AANLkTinFKih_PFVzkS1OJ=G1xtngKo_poAbDrFM83Uo9@mail.gmail.com>
References: <4D2E0863.2040804@ericsson.com> <AANLkTinFKih_PFVzkS1OJ=G1xtngKo_poAbDrFM83Uo9@mail.gmail.com>
Date: Fri, 14 Jan 2011 12:51:57 -0800
Message-ID: <AANLkTi=4QKBB0DA+o1kxc15s_wdMbH=mxgPuP0scH-ot@mail.gmail.com>
From: Roberto Peon <fenix@google.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: multipart/alternative; boundary=0016364ef322ea075c0499d49aa6
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 20:49:36 -0000

--0016364ef322ea075c0499d49aa6
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Jan 13, 2011 at 1:31 PM, Greg Wilkins <gregw@webtide.com> wrote:

> On 13 January 2011 07:00, Salvatore Loreto
> <salvatore.loreto@ericsson.com> wrote:
> >
> > 1. a fixed mask carried entirely in the packet.
>
> This option is my strong preference.
>

Ditto.
-=R


>
>
> > 2. A longish repeated mask computed from the packet. For concreteness,
> >   suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> > <packet-key>), but
> >   obviously there's flexibility here.
> >
> > 3. A fully generated mask (if so specify also what you would like to use
> > e.g. AES-CTR or HMAC-SHA).
>
> I could only accept either of these options if there were a) no other
> strong objectors; b) they were applied as optional extensions.
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--0016364ef322ea075c0499d49aa6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Thu, Jan 13, 2011 at 1:31 PM, Greg Wi=
lkins <span dir=3D"ltr">&lt;<a href=3D"mailto:gregw@webtide.com">gregw@webt=
ide.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On 13 January 2011 07:00, Salvatore Loreto<br>
<div class=3D"im">&lt;<a href=3D"mailto:salvatore.loreto@ericsson.com">salv=
atore.loreto@ericsson.com</a>&gt; wrote:<br>
&gt;<br>
</div><div class=3D"im">&gt; 1. a fixed mask carried entirely in the packet=
.<br>
<br>
</div>This option is my strong preference.<br></blockquote><div><br></div><=
div>Ditto.</div><div>-=3DR</div><div>=A0</div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
;">

<div class=3D"im"><br>
<br>
&gt; 2. A longish repeated mask computed from the packet. For concreteness,=
<br>
&gt; =A0 suppose HMAC-SHA1(&lt;uuid&gt;, &lt;server-conn-key&gt; || &lt;cli=
ent-conn-key&gt; ||<br>
&gt; &lt;packet-key&gt;), but<br>
&gt; =A0 obviously there&#39;s flexibility here.<br>
&gt;<br>
&gt; 3. A fully generated mask (if so specify also what you would like to u=
se<br>
&gt; e.g. AES-CTR or HMAC-SHA).<br>
<br>
</div>I could only accept either of these options if there were a) no other=
<br>
strong objectors; b) they were applied as optional extensions.<br>
<div><div></div><div class=3D"h5">_________________________________________=
______<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br>

--0016364ef322ea075c0499d49aa6--

From mjs@apple.com  Fri Jan 14 12:59:00 2011
Return-Path: <mjs@apple.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 578823A6C86 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 12:59:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.539
X-Spam-Level: 
X-Spam-Status: No, score=-106.539 tagged_above=-999 required=5 tests=[AWL=0.060, BAYES_00=-2.599, 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 2HozDBeBcWSd for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 12:58:58 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id C7A513A6C6B for <hybi@ietf.org>; Fri, 14 Jan 2011 12:58:58 -0800 (PST)
Received: from relay16.apple.com (relay16.apple.com [17.128.113.55]) by mail-out3.apple.com (Postfix) with ESMTP id 58E23C758021 for <hybi@ietf.org>; Fri, 14 Jan 2011 13:01:25 -0800 (PST)
X-AuditID: 11807137-b7bfaae000004d31-03-4d30b9a559d4
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay16.apple.com (Apple SCV relay) with SMTP id 7D.49.19761.5A9B03D4; Fri, 14 Jan 2011 13:01:25 -0800 (PST)
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Received: from [17.153.103.182] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LF1003EY6ECFH30@elliott.apple.com> for hybi@ietf.org; Fri, 14 Jan 2011 13:01:24 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110114203304.GA6872@1wt.eu>
Date: Fri, 14 Jan 2011 13:01:23 -0800
Content-transfer-encoding: quoted-printable
Message-id: <6551F684-3619-4969-B2A7-093E91BF7FA1@apple.com>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se> <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com> <20110114203304.GA6872@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 20:59:00 -0000

Using more bandwidth to save CPU strikes me as a poor tradeoff. CPU =
speeds increase at a faster rate than network bandwidth, or for that =
matter memory bandwidth.

Regards,
Maciej


On Jan 14, 2011, at 12:33 PM, Willy Tarreau wrote:

> On Fri, Jan 14, 2011 at 10:57:19AM -0800, Joshua Bell wrote:
>> On Fri, Jan 14, 2011 at 10:09 AM, Tomas Franz=E9n <tomas@tomasf.se> =
wrote:
>>=20
>>> On 12 jan 2011, at 23.12, Willy Tarreau wrote:>
>>>> BTW Sal, could we list Base64 (or any equivalent CRLF-less masking) =
that
>>>> very few of us have already evocated here ?
>>>>=20
>>>> It is the only solution to be _certain_ to definitely get rid of =
the
>>>> issue we're talking about, has much less CPU overhead than =
AES/HMAC,
>>>> at the expense of higher network costs (+14-33% for the simplest
>>>> versions, even less with escaping).
>>>=20
>>> +1
>>>=20
>>> Finally a relatively nice solution. Base64 is simple, commonly used =
in
>>> other standards and a guarantee that the payload will never contain =
CRLF.
>>> The length overhead seems acceptable to me.
>>=20
>>=20
>> If we're considering options that sacrifice message length for =
security, do
>> we also need to consider an option where the (unencoded) payload =
length is
>> sent as something other than a network-order 63-bit integer, to avoid
>> attacks where "GET /" is encoded into the length?
>=20
> Cheap maskings such as XOR or Base64 can probably afford having the
> framing masked. With XOR it's trivial, with Base64, we need to base64
> decode the 2nd and third characters to know what framing length is
> used. I agree it's not much convenient but still trivially easy to
> do. Honnestly, I'd be more in favor of an even simpler encoding
> algorithm. Base64 is for getting printable text. We don't need that,
> we just need to avoid CRLFs. We could very well have a 7-to-8 bit
> encoding where 7 bytes chunks are encoded in 8 bytes all having their
> 7th bit set, and where a premature end of frame could be indicated
> with \0. Such an encoding is much cheaper than base64 since there's
> no lookup at all and can be even cheaper on 64-bit machines that are
> very common today, for instance something like this :
>=20
> /* Decode 64 bits to 56 */
> static inline uint64_t raw_to_wire(uint64_t in)
> {
> 	int shift;
> 	uint64_t out =3D 0;
>=20
> 	for (shift =3D 0; shift < 56; shift +=3D 7) {
> 		out +=3D (in & 0x7F) << shift;
> 		in >>=3D 8;
> 	}
> 	return out;
> }
>=20
> Regards,
> Willy
>=20
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


From w@1wt.eu  Fri Jan 14 13:06:26 2011
Return-Path: <w@1wt.eu>
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 3E5463A6C85 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 13:06:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.067
X-Spam-Level: 
X-Spam-Status: No, score=-2.067 tagged_above=-999 required=5 tests=[AWL=-0.024, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 CMJU80oCL6Bx for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 13:06:25 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 0313B3A6C6C for <hybi@ietf.org>; Fri, 14 Jan 2011 13:06:24 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0EL8iDU007216; Fri, 14 Jan 2011 22:08:44 +0100
Date: Fri, 14 Jan 2011 22:08:44 +0100
From: Willy Tarreau <w@1wt.eu>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Message-ID: <20110114210844.GB6872@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <20110112214211.GD25018@1wt.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110112214211.GD25018@1wt.eu>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 21:06:26 -0000

On Wed, Jan 12, 2011 at 10:42:11PM +0100, Willy Tarreau wrote:
> On Wed, Jan 12, 2011 at 09:00:35PM +0100, Salvatore Loreto wrote:
> > In order to settle the question of masking and find a way forward that 
> > has a wide acceptance,
> > Joe and I, as HyBi chairs, want to check where the consensus is
> > on the following relevant options that have been discussed (and 
> > summarized at
> > some point in the mailing list by Eric Rescorla)
> > 
> > 
> > 1. a fixed mask carried entirely in the packet.
> 
> I vote for this one above, which we can improve with a changing mask
> so that the attacker cannot know the relations between bytes in advance
> if some prefer it..
> 
> > 2. A longish repeated mask computed from the packet. For concreteness,
> >    suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> || 
> > <packet-key>), but
> >    obviously there's flexibility here.
> 
> Definitely not this one, it's far too slow on small frames.
> 
> > 3. A fully generated mask (if so specify also what you would like to use 
> > e.g. AES-CTR or HMAC-SHA).
> 
> Warning, there were two proposals for this one. The first one which does
> not offer better protection than #1, and the second one which requires
> servers and intermediaries to *bufferize all the frame* before being
> able to decipher it, which is very expensive on medium-sized frames,
> and not possible at all for large ones (up to 2^63 bytes).
> 
> While I could probably live with the first version, I'd definitely
> reject the second proposal which cannot reasonably be implemented
> at all.

The more I'm thinking about it, the more I feel discomfort with those
masking options which consist in prepending random text at the beginning
of the frames.

The reason is simple : without this masking, the FIN bit prevents a
standard HTTP intermediary or server from seeing a request as the
beginning of the frames. I'm not discussing the ones that we'd like
to protect which supposedly skip the garbage, but the ones which don't
know about Upgrade+101 and which expect a second request. And we know
they exist.

With random at the beginning, even if it's the key, on average one
legitim connection in 4 billion *will* result in making a valid request
such as "GET\n" appear. So in fact, by trying to protect against a
supposed thread, we make another one appear where it would not have
otherwise.

I'll send a small proposal for an alternate masking method using 7-to-8
bits in a separate mail before the end of the poll. Maybe participants
will simply receive it with "pfff go away with your thing" but at least
I think we'll have explored quite a bunch of possibilities.

Regards,
Willy


From w@1wt.eu  Fri Jan 14 13:15:41 2011
Return-Path: <w@1wt.eu>
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 5E5613A6BC3 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 13:15:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.066
X-Spam-Level: 
X-Spam-Status: No, score=-2.066 tagged_above=-999 required=5 tests=[AWL=-0.023, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 gSsbelVNKXCt for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 13:15:40 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 996AE3A6A85 for <hybi@ietf.org>; Fri, 14 Jan 2011 13:15:39 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0ELI2Ex007263; Fri, 14 Jan 2011 22:18:02 +0100
Date: Fri, 14 Jan 2011 22:18:02 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110114211802.GC6872@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se> <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com> <20110114203304.GA6872@1wt.eu> <6551F684-3619-4969-B2A7-093E91BF7FA1@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <6551F684-3619-4969-B2A7-093E91BF7FA1@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 21:15:41 -0000

On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej Stachowiak wrote:
> 
> Using more bandwidth to save CPU strikes me as a poor tradeoff. CPU speeds increase at a faster rate than network bandwidth, or for that matter memory bandwidth.

Sorry Maciej, but on this point I think you're wrong. Network speed increases
much faster than CPUs and that's even becoming an issue to process frames.

Some networks I saw migrate from 10 to 100 Mbps 12 years ago are now switching
to 10G, thus a 100x increase. The machines were quad-600 MHz Alphas, we're not
yet at 240 GHz in equivalent servers.

While derivates from Moore's law indicate performance doubling every 2 years,
some ISPs indicate that network bandwidth doubles every 9 months.

Regards,
Willy


From salvatore.loreto@ericsson.com  Fri Jan 14 13:30:24 2011
Return-Path: <salvatore.loreto@ericsson.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 D50773A6C52 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 13:30:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.54
X-Spam-Level: 
X-Spam-Status: No, score=-106.54 tagged_above=-999 required=5 tests=[AWL=0.059, BAYES_00=-2.599, 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 EWbzTLvPneGd for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 13:30:23 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id DBC7C3A6C8D for <hybi@ietf.org>; Fri, 14 Jan 2011 13:30:22 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-79-4d30c10059a7
Received: from esessmw0237.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id 1C.31.23694.001C03D4; Fri, 14 Jan 2011 22:32:48 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0237.eemea.ericsson.se (153.88.115.91) with Microsoft SMTP Server id 8.2.234.1; Fri, 14 Jan 2011 22:32:48 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id DB7B02327	for <hybi@ietf.org>; Fri, 14 Jan 2011 23:32:46 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id A4C59505A7	for <hybi@ietf.org>; Fri, 14 Jan 2011 23:32:46 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 37451502E7	for <hybi@ietf.org>; Fri, 14 Jan 2011 23:32:46 +0200 (EET)
Message-ID: <4D30C0FD.9020508@ericsson.com>
Date: Fri, 14 Jan 2011 22:32:45 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu>	<8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se>	<AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com>	<20110114203304.GA6872@1wt.eu>	<6551F684-3619-4969-B2A7-093E91BF7FA1@apple.com> <20110114211802.GC6872@1wt.eu>
In-Reply-To: <20110114211802.GC6872@1wt.eu>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 21:30:25 -0000

Please
do NOT use this specific mail thread to try to convince each other
neither to discuss technicality of the different proposals on the table 
or different/new one:
if you want to discuss them please start a different thread for them.

An appropriate mail subject would also help people to follow better the 
different discussions.


cheers
/Sal





On 1/14/11 10:18 PM, Willy Tarreau wrote:
> On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej Stachowiak wrote:
>> Using more bandwidth to save CPU strikes me as a poor tradeoff. CPU speeds increase at a faster rate than network bandwidth, or for that matter memory bandwidth.
> Sorry Maciej, but on this point I think you're wrong. Network speed increases
> much faster than CPUs and that's even becoming an issue to process frames.
>
> Some networks I saw migrate from 10 to 100 Mbps 12 years ago are now switching
> to 10G, thus a 100x increase. The machines were quad-600 MHz Alphas, we're not
> yet at 240 GHz in equivalent servers.
>
> While derivates from Moore's law indicate performance doubling every 2 years,
> some ISPs indicate that network bandwidth doubles every 9 months.
>
> Regards,
> Willy
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


-- 
Salvatore Loreto
www.sloreto.com


From jat@google.com  Fri Jan 14 13:49:56 2011
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 6F2ED3A67AA for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 13:49:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.758
X-Spam-Level: 
X-Spam-Status: No, score=-103.758 tagged_above=-999 required=5 tests=[AWL=-0.782, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 BOwvdMv46MJR for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 13:49:55 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 20A0E3A6C8B for <hybi@ietf.org>; Fri, 14 Jan 2011 13:49:53 -0800 (PST)
Received: from kpbe18.cbf.corp.google.com (kpbe18.cbf.corp.google.com [172.25.105.82]) by smtp-out.google.com with ESMTP id p0ELqJIp008677 for <hybi@ietf.org>; Fri, 14 Jan 2011 13:52:19 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295041940; bh=N6cih+L8vCAMS5lSa54/IVPF5Qw=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Tbi90mL9SePhCU0RLI6M8M3OXh6Uj9hUeeyI76JECADlih+KCgyp+JlSTh+Feh6Gf cYg8OEDnfKralrvI7xbNA==
Received: from qwk3 (qwk3.prod.google.com [10.241.195.131]) by kpbe18.cbf.corp.google.com with ESMTP id p0ELpKOb019863 for <hybi@ietf.org>; Fri, 14 Jan 2011 13:52:18 -0800
Received: by qwk3 with SMTP id 3so3332462qwk.2 for <hybi@ietf.org>; Fri, 14 Jan 2011 13:52:17 -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=4458OH0fNyGMJpIiSHXonMM/qLTDXbiRXgKd8M2izKU=; b=ikfrJRQxh4ciIizV5FNH4pcuMAC85/kQwUvuFzURtUcO4sHYee1Z39pZD+X/r2sE6t OTEhl2w9ClmGQaZpJt0g==
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=sNRlYpFCM2ByvmYB2i6vueLQvQ+7J7UV44eyaJG32VGizNVkzMQi3BFzdYDCdNd3tO 0GeH8TmL3bYTn+HpH9PA==
Received: by 10.229.219.132 with SMTP id hu4mr1145240qcb.60.1295041937825; Fri, 14 Jan 2011 13:52:17 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.78.96 with HTTP; Fri, 14 Jan 2011 13:51:57 -0800 (PST)
In-Reply-To: <AANLkTik1aGJCAqSY9ED1zmZcHPMymtwJZJVR7zLq_mrJ@mail.gmail.com>
References: <AANLkTik1aGJCAqSY9ED1zmZcHPMymtwJZJVR7zLq_mrJ@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Fri, 14 Jan 2011 16:51:57 -0500
Message-ID: <AANLkTim_fNWdNc6UN+0nHe+Jb7x_nWgZdpZNCV0A=Typ@mail.gmail.com>
To: "zt.tmzt@gmail.com" <zt.tmzt@gmail.com>
Content-Type: multipart/alternative; boundary=001636284566ac60ad0499d572d6
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Proposal for RLE framing and escape mechanism
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: Fri, 14 Jan 2011 21:49:56 -0000

--001636284566ac60ad0499d572d6
Content-Type: text/plain; charset=UTF-8

On Fri, Jan 14, 2011 at 9:01 AM, zt.tmzt@gmail.com <zt.tmzt@gmail.com>wrote:

> As an outsider reading Jamie Lokier's comment on escape sequences as a
> mechanism to avoid CRLF and other potentially harmful sequences.
>
> As I understand it, the proposed framing already has the form
>
> <opcode><length><data>
>
> Would it be sufficient to amend it as follows:
>
> <opcode><length><data not including unwanted characters or sequences>
> <opcode representing the unwanted character or sequence><0>
> <opcode><length><continuation of data not including unwanted
> characters or sequences>
>

This is essentially the suggestion proposed earlier to fragment frames in
the middle of dangerous sequences, with the addition of using one of the few
opcodes available to represent quoted characters.

If we are going to go down that route, I would prefer to simply define only
text framing, and choose an encoding mechanism for the text such that CR/LF
can't occur in the data (perhaps use long UTF8 sequences for them, or use
FF-quoting).  However, we are just deferring the question of how to handle
binary frames until later and not actually solving the basic problem.

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

--001636284566ac60ad0499d572d6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Fri, Jan 14, 2011 at 9:01 AM, <a href=3D"mail=
to:zt.tmzt@gmail.com">zt.tmzt@gmail.com</a> <span dir=3D"ltr">&lt;<a href=
=3D"mailto:zt.tmzt@gmail.com">zt.tmzt@gmail.com</a>&gt;</span> wrote:<br><b=
lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px =
#ccc solid;padding-left:1ex;">

As an outsider reading Jamie Lokier&#39;s comment on escape sequences as a<=
br>
mechanism to avoid CRLF and other potentially harmful sequences.<br>
<br>
As I understand it, the proposed framing already has the form<br>
<br>
&lt;opcode&gt;&lt;length&gt;&lt;data&gt;<br>
<br>
Would it be sufficient to amend it as follows:<br>
<br>
&lt;opcode&gt;&lt;length&gt;&lt;data not including unwanted characters or s=
equences&gt;<br>
&lt;opcode representing the unwanted character or sequence&gt;&lt;0&gt;<br>
&lt;opcode&gt;&lt;length&gt;&lt;continuation of data not including unwanted=
<br>
characters or sequences&gt;<br></blockquote><div><br></div><div>This is ess=
entially the suggestion proposed earlier to fragment frames in the middle o=
f dangerous sequences, with the addition of using one of the few opcodes av=
ailable to represent quoted characters.</div>

<div><br></div><div>If we are going to go down that route, I would prefer t=
o simply define only text framing, and choose an encoding mechanism for the=
 text such that CR/LF can&#39;t occur in the data (perhaps use long UTF8 se=
quences for them, or use FF-quoting). =C2=A0However, we are just deferring =
the question of how to handle binary frames until later and not actually so=
lving the basic problem.=C2=A0</div>

<div><br></div></div>-- <br>John A. Tamplin<br>Software Engineer (GWT), Goo=
gle<br>

--001636284566ac60ad0499d572d6--

From ietf@adambarth.com  Fri Jan 14 13:57:19 2011
Return-Path: <ietf@adambarth.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 5D8ED3A6C9B for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 13:57:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.811
X-Spam-Level: 
X-Spam-Status: No, score=-3.811 tagged_above=-999 required=5 tests=[AWL=-0.834, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 NxpjMLpW4CKB for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 13:57:18 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 705213A6C91 for <hybi@ietf.org>; Fri, 14 Jan 2011 13:57:18 -0800 (PST)
Received: by qyj19 with SMTP id 19so3627847qyj.10 for <hybi@ietf.org>; Fri, 14 Jan 2011 13:59:44 -0800 (PST)
Received: by 10.229.98.71 with SMTP id p7mr1121639qcn.139.1295042384226; Fri, 14 Jan 2011 13:59:44 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id y17sm1085702qci.21.2011.01.14.13.59.42 (version=SSLv3 cipher=RC4-MD5); Fri, 14 Jan 2011 13:59:43 -0800 (PST)
Received: by iwn40 with SMTP id 40so3141187iwn.31 for <hybi@ietf.org>; Fri, 14 Jan 2011 13:59:41 -0800 (PST)
Received: by 10.231.85.137 with SMTP id o9mr1273882ibl.27.1295042381821; Fri, 14 Jan 2011 13:59:41 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Fri, 14 Jan 2011 13:59:11 -0800 (PST)
From: Adam Barth <ietf@adambarth.com>
Date: Fri, 14 Jan 2011 13:59:11 -0800
Message-ID: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com>
To: "Pat McManus @Mozilla" <mcmanus@ducksong.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Fri, 14 Jan 2011 21:57:19 -0000

Pat,

Having the client and the server negotiate masking doesn't really make
much sense.  The malicious server will just ask for whichever masking
it knows how to break.

Can you explain why you believe option #1 is sufficient for the job at
hand?  Specifically, how does it address the HTTP-to-WebSocket threat
model described by Maciej?

Adam


On Fri, Jan 14, 2011 at 9:50 AM, Pat McManus @Mozilla
<mcmanus@ducksong.com> wrote:
> On Wed, 2011-01-12 at 21:00 +0100, Salvatore Loreto wrote:
>> Joe and I, as HyBi chairs, want to check where the consensus is
>> on the following relevant options that have been discussed (and
>
>> 1. a fixed mask carried entirely in the packet.
>
>> 2. A longish repeated mask computed from the packet.
>
>> 3. A fully generated mask (if so specify also what you would like to use
>> e.g. AES-CTR or HMAC-SHA).
>
> My primary preference is for 1 which is sufficient to the job at hand -
> if we can have consensus that it is good enough I would be content with
> it. If that isn't enough, I can support #2 which is expensive but
> tolerably so.
>
> At this point #3 (AES) would be acceptable as a negotiated option with
> #1 or more likely #2 as a required fallback. That approach would give
> the camp that needs "at least #2" that level of randomness, while
> allowing implementations who wished to deal with the regulations around
> AES the capability of opting into something faster (assuming opted into
> by both ends). Intermediaries not willing to do AES would obviously have
> to participate in the negotiation, which all gets complicated.. so this
> is my least preferred, yet acceptable, route.
>
>
>
>
>
>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From tomas@tomasf.se  Fri Jan 14 14:05:31 2011
Return-Path: <tomas@tomasf.se>
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 C7DFC3A6CA4 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 14:05:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.449
X-Spam-Level: 
X-Spam-Status: No, score=-2.449 tagged_above=-999 required=5 tests=[AWL=-0.500, BAYES_00=-2.599, HELO_EQ_SE=0.35, MIME_8BIT_HEADER=0.3]
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 etXC8Btos4yG for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 14:05:31 -0800 (PST)
Received: from smtprelay-b11.telenor.se (smtprelay-b11.telenor.se [62.127.194.20]) by core3.amsl.com (Postfix) with ESMTP id C7C9E3A6C97 for <hybi@ietf.org>; Fri, 14 Jan 2011 14:05:30 -0800 (PST)
Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-b11.telenor.se (Postfix) with ESMTP id 98E0DC732 for <hybi@ietf.org>; Fri, 14 Jan 2011 23:07:55 +0100 (CET)
X-SENDER-IP: [85.227.3.7]
X-LISTENER: [smtp.bredband.net]
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AmoVABpYME1V4wMHPGdsb2JhbAAMiEucDQEBAQE1uymFTwSLFg
X-IronPort-AV: E=Sophos;i="4.60,324,1291590000"; d="scan'208";a="1706353830"
Received: from ua-85-227-3-7.cust.bredbandsbolaget.se (HELO [192.168.0.101]) ([85.227.3.7]) by ipb4.telenor.se with ESMTP; 14 Jan 2011 23:07:55 +0100
From: =?iso-8859-1?Q?Tomas_Franz=E9n?= <tomas@tomasf.se>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Date: Fri, 14 Jan 2011 23:07:54 +0100
Message-Id: <604CFC39-28A2-4E88-B80A-6FCD1FEC7E07@tomasf.se>
To: Willy Tarreau <w@1wt.eu>
Mime-Version: 1.0 (Apple Message framework v1082)
X-Mailer: Apple Mail (2.1082)
Cc: hybi@ietf.org
Subject: [hybi] Base64-like masking (Was: Straw-poll on Masking options)
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: Fri, 14 Jan 2011 22:05:31 -0000

On 14 jan 2011, at 21.33, Willy Tarreau wrote:
> On Fri, Jan 14, 2011 at 10:57:19AM -0800, Joshua Bell wrote:
>>=20
>> If we're considering options that sacrifice message length for =
security, do
>> we also need to consider an option where the (unencoded) payload =
length is
>> sent as something other than a network-order 63-bit integer, to avoid
>> attacks where "GET /" is encoded into the length?
>=20
> Cheap maskings such as XOR or Base64 can probably afford having the
> framing masked. With XOR it's trivial, with Base64, we need to base64
> decode the 2nd and third characters to know what framing length is
> used. I agree it's not much convenient but still trivially easy to
> do.

I noticed draft 00 had a 0xFF frame terminator. I didn't follow this =
list back then (and didn't find anything relevant in archives), so I =
don't know what the reason was for switching to a length field. Was it =
merely to support binary data payloads? With a limited set of possible =
byte values in something like Base64, having a special terminator like =
that would work again. That way, we wouldn't need a length field, right?

Tomas=

From mjs@apple.com  Fri Jan 14 14:12:04 2011
Return-Path: <mjs@apple.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 AFFB73A6CA1 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 14:12:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.541
X-Spam-Level: 
X-Spam-Status: No, score=-106.541 tagged_above=-999 required=5 tests=[AWL=0.058, BAYES_00=-2.599, 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 wmNW1iXvwimh for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 14:12:03 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id D27F53A6C97 for <hybi@ietf.org>; Fri, 14 Jan 2011 14:12:03 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out3.apple.com (Postfix) with ESMTP id 7FA3AC75B8BB for <hybi@ietf.org>; Fri, 14 Jan 2011 14:14:30 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-ff-4d30cac6e5e4
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay11.apple.com (Apple SCV relay) with SMTP id 72.07.04151.6CAC03D4; Fri, 14 Jan 2011 14:14:30 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.103.182] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LF100JYF9S53G00@gertie.apple.com> for hybi@ietf.org; Fri, 14 Jan 2011 14:14:30 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110114211802.GC6872@1wt.eu>
Date: Fri, 14 Jan 2011 14:14:28 -0800
Message-id: <F3A5BD8C-5B3F-425D-AF5D-F9470330826D@apple.com>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se> <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com> <20110114203304.GA6872@1wt.eu> <6551F684-3619-4969-B2A7-093E91BF7FA1@apple.com> <20110114211802.GC6872@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 14 Jan 2011 22:12:04 -0000

On Jan 14, 2011, at 1:18 PM, Willy Tarreau wrote:

> On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej Stachowiak wrote:
>> 
>> Using more bandwidth to save CPU strikes me as a poor tradeoff. CPU speeds increase at a faster rate than network bandwidth, or for that matter memory bandwidth.
> 
> Sorry Maciej, but on this point I think you're wrong. Network speed increases
> much faster than CPUs and that's even becoming an issue to process frames.
> 
> Some networks I saw migrate from 10 to 100 Mbps 12 years ago are now switching
> to 10G, thus a 100x increase. The machines were quad-600 MHz Alphas, we're not
> yet at 240 GHz in equivalent servers.
> 
> While derivates from Moore's law indicate performance doubling every 2 years,
> some ISPs indicate that network bandwidth doubles every 9 months.

Maybe on the backbone, but not last mile bandwidth.

 - Maciej


From mcmanus@ducksong.com  Fri Jan 14 14:21:23 2011
Return-Path: <mcmanus@ducksong.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 64FF73A6CA6 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 14:21:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.537
X-Spam-Level: 
X-Spam-Status: No, score=-2.537 tagged_above=-999 required=5 tests=[AWL=0.062,  BAYES_00=-2.599]
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 1NXdc2Mx9by4 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 14:21:22 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 5DF513A6BE6 for <hybi@ietf.org>; Fri, 14 Jan 2011 14:21:22 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id 4B88F10305; Fri, 14 Jan 2011 17:23:47 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 081C610157; Fri, 14 Jan 2011 17:23:43 -0500 (EST)
From: Patrick McManus <mcmanus@ducksong.com>
To: Adam Barth <ietf@adambarth.com>
In-Reply-To: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Date: Fri, 14 Jan 2011 17:23:41 -0500
Message-ID: <1295043821.7650.964.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Negotiating masking doesn't make sense
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: Fri, 14 Jan 2011 22:21:23 -0000

On Fri, 2011-01-14 at 13:59 -0800, Adam Barth wrote:
> Pat,
> 
> Having the client and the server negotiate masking doesn't really make
> much sense.  The malicious server will just ask for whichever masking
> it knows how to break.

assuming you are negotiating between per message hmac and aes I don't
believe that one is meaningfully weaker the other. Are you concerned
about the server breaking one of those? The negotiation choice in that
case is between speed and regulatory encumberance.

> > At this point #3 (AES) would be acceptable as a negotiated option with
> > #1 or more likely #2 as a required fallback. 



From mjs@apple.com  Fri Jan 14 14:26:59 2011
Return-Path: <mjs@apple.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 68F853A6A4C for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 14:26:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.543
X-Spam-Level: 
X-Spam-Status: No, score=-106.543 tagged_above=-999 required=5 tests=[AWL=0.056, BAYES_00=-2.599, 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 kK7GUHnhmGhj for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 14:26:58 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 5F21D3A6813 for <hybi@ietf.org>; Fri, 14 Jan 2011 14:26:58 -0800 (PST)
Received: from relay13.apple.com (relay13.apple.com [17.128.113.29]) by mail-out3.apple.com (Postfix) with ESMTP id 22200C75C68E for <hybi@ietf.org>; Fri, 14 Jan 2011 14:29:25 -0800 (PST)
X-AuditID: 1180711d-b7c30ae0000055b4-b3-4d30ce442335
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay13.apple.com (Apple SCV relay) with SMTP id F6.14.21940.44EC03D4; Fri, 14 Jan 2011 14:29:25 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.103.182] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LF1003UWAH0FH50@elliott.apple.com> for hybi@ietf.org; Fri, 14 Jan 2011 14:29:24 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <1295043821.7650.964.camel@ds9.ducksong.com>
Date: Fri, 14 Jan 2011 14:29:23 -0800
Message-id: <7C388E83-9198-4A52-BBA9-DD8EA9558F68@apple.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <1295043821.7650.964.camel@ds9.ducksong.com>
To: Patrick McManus <mcmanus@ducksong.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Negotiating masking doesn't make sense
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: Fri, 14 Jan 2011 22:26:59 -0000

On Jan 14, 2011, at 2:23 PM, Patrick McManus wrote:

> On Fri, 2011-01-14 at 13:59 -0800, Adam Barth wrote:
>> Pat,
>> 
>> Having the client and the server negotiate masking doesn't really make
>> much sense.  The malicious server will just ask for whichever masking
>> it knows how to break.
> 
> assuming you are negotiating between per message hmac and aes I don't
> believe that one is meaningfully weaker the other. Are you concerned
> about the server breaking one of those? The negotiation choice in that
> case is between speed and regulatory encumberance.

If we define two masking schemes and require negotiation, then we have the following options:

1) Client required to support both; server can choose which to use.
2) Server required to support both; server can choose which to use.
3) At least one is mandatory for both clients and servers, and the other is only used when both endpoints opt in.
4) Interoperability fail.

I assume #4 is off the table. 1-3 also each seem problematic. In the case of 1 or 2, we're increasing complexity for one side of the transaction for the benefit of the other, and presumably not avoiding whatever the legal concerns are regarding AES. If the answer is 3, then there is little incentive to ever implement the optional masking scheme, since you still face all the security attack surface from the other, so it would be equivalent to choosing only one.

Regards,
Maciej


From mcmanus@ducksong.com  Fri Jan 14 14:43:43 2011
Return-Path: <mcmanus@ducksong.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 4FC453A6BE3 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 14:43:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.54
X-Spam-Level: 
X-Spam-Status: No, score=-2.54 tagged_above=-999 required=5 tests=[AWL=0.059,  BAYES_00=-2.599]
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 r7NCU2yEzfWv for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 14:43:42 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 7C3293A6BCC for <hybi@ietf.org>; Fri, 14 Jan 2011 14:43:42 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id 9B83910305; Fri, 14 Jan 2011 17:46:08 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id D002310157; Fri, 14 Jan 2011 17:46:03 -0500 (EST)
From: Patrick McManus <mcmanus@ducksong.com>
To: Maciej Stachowiak <mjs@apple.com>
In-Reply-To: <7C388E83-9198-4A52-BBA9-DD8EA9558F68@apple.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <1295043821.7650.964.camel@ds9.ducksong.com> <7C388E83-9198-4A52-BBA9-DD8EA9558F68@apple.com>
Content-Type: text/plain; charset="UTF-8"
Date: Fri, 14 Jan 2011 17:46:02 -0500
Message-ID: <1295045162.7650.975.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Negotiating masking doesn't make sense
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: Fri, 14 Jan 2011 22:43:43 -0000

On Fri, 2011-01-14 at 14:29 -0800, Maciej Stachowiak wrote:

> 3) At least one is mandatory for both clients and servers, and the other is only used when both endpoints opt in.

> [..]
>  If the answer is 3, then there is little incentive to ever implement
> the optional masking scheme, since you still face all the security
> attack surface from the other, so it would be equivalent to choosing
> only one.

The idea is #3 with HMAC being mandatory and AES being optional with the
assumption being that HMAC security is sufficient and the incentive to
opt in to AES is better performance if you're comfortable with the
regulation it bundles.

These are security considerations, it is not a security encapsulation
protocol after all.

If you consider the HMAC approach both acceptable (which iirc you did
with a strong preference for AES) then this would be a path to widely
deploying AES while still keeping the standard implementable by folks
with regulatory concerns. It does nothing to address concerns some folks
have with including crypto complexity at all, of course.

But its all rather complicated if we could simply live with xor. (Sal's
#1). I'd appreciate it if you could again explain in detail if the
http-to-websockets attack depends on bugs in the websocket js client or
server implementation. Perhaps I misunderstood it the first time around,
its been a busy week. Thanks.



From w@1wt.eu  Fri Jan 14 16:13:47 2011
Return-Path: <w@1wt.eu>
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 CA9423A6CC2 for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 16:13:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.066
X-Spam-Level: 
X-Spam-Status: No, score=-2.066 tagged_above=-999 required=5 tests=[AWL=-0.023, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 ZOpIJcUqPaOh for <hybi@core3.amsl.com>; Fri, 14 Jan 2011 16:13:46 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id D98A73A6CBC for <hybi@ietf.org>; Fri, 14 Jan 2011 16:13:45 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0F0G9q5007767 for hybi@ietf.org; Sat, 15 Jan 2011 01:16:09 +0100
Date: Sat, 15 Jan 2011 01:16:09 +0100
From: Willy Tarreau <w@1wt.eu>
To: "hybi@ietf.org" <hybi@ietf.org>
Message-ID: <20110115001609.GE6872@1wt.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.3i
Subject: [hybi] CRLF-less masking proposal
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: Sat, 15 Jan 2011 00:13:47 -0000

Hi all,

after some thoughts on the various proposals, I figured that increasing
the encoding slightly should not be a problem for small frames compared
to current proposals where they're inflated by at least 32-bit for the
key anyway, without offering total protection even at the beginning of
the stream. Thus it was worth giving a try to an encoding which totally
prevents an intermediary from finding an HTTP request *by design*.

Since the opinions on the current masking poll seem to be quite spread
apart, it looks like it's hard to satisfy everyone's concerns with the
proposed choices only, and maybe such a design would be less rejected
afterall, or maybe it can help someone find something better.

Regards,
Willy

----------

Here's a frame masking proposal which addresses various of the concerns that
were raised around masking and its justification :

  - ensure that no intermediary will find a request in the stream, at any
    position

  - maintain a cheap frame forwarding cost for intermediaries

  - maintain a cheap frame decoding cost for servers

The principle consists in preventing any CR/LF byte from appearing in the
stream. In order to achieve this, we'll use a 7 to 8 bit conversion and
all bytes on the wire will have the high bit set, thus preventing any of
the CR (13) or LF (10) or any other ASCII character from appearing in the
stream.

Since the framing itself may contain those bytes, the masking also applies to
the framing. At one point I thought we should keep the opcode unmasked, but I
figured that it could make the frame parsing more complex (eg: different code
for request and response, or for masked and unmasked frames).

It would still be nice to be able to disable the masking at some safe places,
and to support multiplexing at the same time. This proposal does not prevent
that since decoding the frame length is cheap. If we want to support both
masked and unmasked frames in the same stream later, we'll have to use one of
the reserved bits to indicate whether the frame is masked or not. The advantage
is that reserved bits always have a fixed position in the clear stream, as well
as they have one in the masked stream.

The masked stream format is rather simple. Each output byte is composed of its
lowest bits collected from one or two input bytes, and has the high bit set.
Bytes are read one at a time and sent one at a time. The lowest bits of input
byte B+1 are stored above the highest bit of input byte B :

    /* Encode 7 input bytes to 8, returns number of bytes read */
    int encode_stream(const unsigned char *src, unsigned char *dst)
    {
	unsigned int shift, rem;

	for (shift = rem = 0; shift < 7; shift++) {
	    rem += (*src++ << shift);
	    *dst++ = 0x80 | rem;
	    rem >>= 7;
	}
	*dst++ = 0x80 | rem;
	return shift;
    }

    /* Decode 8 input bytes to 7, returns the number of bytes written */
    int decode_stream(const unsigned char *src, unsigned char *dst)
    {
	unsigned int shift, rem;

	if (*src & 0x80 == 0)
	   return 0;
	rem = *src++ & 0x7F;

	for (shift = 0; shift < 7; shift++) {
	    if (*src & 0x80 == 0)
	        return shift;
	    rem += (*src++ & 0x7F) << (7 - shift);
	    *dst++ = rem;
	    rem >>= 8;
	}
	return shift;
    }

    uint64_t get_decoded_len(uint64_t encoded_len)
    {
	return encoded_len / 8 * 7;
    }


Note that we can even have direct-access functions to get some framing
information without decoding the whole stream :

    int get_opcode(const unsigned char *stream)
    {
	return stream[0] & 0x0F;
    }

    int get_length_8(const unsigned char *stream)
    {
	return ((stream[1] & 0x7F) >> 1) + ((stream[2] & 3) << 6);
    }

    int get_length_16(const unsigned char *stream)
    {
	int len;
	len = ((stream[2] & 0x7F) >> 2) + ((stream[3] & 7) << 5);
	len = (len << 8) + ((stream[3] & 0x7F) >> 3) + ((stream[4] & 15) << 4);
	return len;
    }

    uint64_t get_length63(const unsigned char *stream)
    {
	uint64_t len;

	len = ((stream[2] & 0x7F) >> 2) + ((stream[3] & 0x07) << 5);
	len = (len << 8) + ((stream[3] & 0x7F) >> 3) + ((stream[4] & 0x0F) << 4);
	len = (len << 8) + ((stream[4] & 0x7F) >> 4) + ((stream[5] & 0x1F) << 3);
	len = (len << 8) + ((stream[5] & 0x7F) >> 5) + ((stream[6] & 0x3F) << 2);

	len = (len << 8) + ((stream[6] & 0x7F) >> 6) + ((stream[7] & 0x7F) << 1);
	len = (len << 8) + ((stream[8] & 0x7F) >> 0) + ((stream[9] & 0x01) << 7);
	len = (len << 8) + ((stream[9] & 0x7F) >> 1) + ((stream[10] & 0x03) << 6);
	len = (len << 8) + ((stream[10] & 0x7F) >> 2) + ((stream[11] & 0x03) << 5);

	return len;
    }

    uint64_t get_length(const unsigned char *stream)
    {
	uint64_t len;

	len = get_length_8(stream);
	if (len == 126)
		return get_length_16(stream);
	else if (len == 127)
		return get_length_63(stream);
	else
		return len;
    }


These functions are just examples of what could be performed on the encoded
stream. They're quite not perfect and might even not compile at all due to
typos. If there is any interested in this proposal, I can work on them though.


The encoding has a cost, which is not much important for our main target which
are small frames. It is possible to encode short frames with a minimal amount
of bytes and make the stream end on the first byte without the high bit set.
It's possible though it would require a slightly smarter parser which must
always look at the last 8-byte chunk one byte at a time.

Below is a comparison between the following masking methods for various payload
sizes :
  - raw (unmasked)
  - XOR/AES/HMAC/any encoding with a 32-bit key prefixing the stream
  - this proposal padded to 8 bytes (% vs 32-bit)
  - this proposal in optimal format (% vs 32-bit)


Payload  Raw   32-bit key   7-to-8 padded  7-to-8 optimal
  0      2         6         8  (+ 33%)        3 (- 50%)
  1      3         7         8  (+ 14%)        4 (- 43%)
  2      4         8         8  (  =  )        5 (- 37%)
  3      5         9         8  (- 11%)        6 (- 33%)
  4      6        10         8  (- 20%)        7 (- 30%) 
  5      7        11         8  (- 28%)        8 (- 28%)
 	        
  6      8        12        16  (+ 33%)       10 (- 16%)
  7      9        13	    16  (+ 23%)       11 (- 15%)
  8     10        14	    16  (+  6%)       12 (- 14%)
  9     11        15	    16  (+ 11%)       13 (- 13%)
 10     12        16	    16  (  =  )       14 (- 12%)
 11     13        17	    16  (-  6%)       15 (- 12%)
 12     14        18	    16  (- 11%)       16 (- 11%)
 	        
 13     15        19        24  (+ 26%)       18 (-  6%)
 14     16        20	    24  (+ 20%)       19 (-  5%)
 15     17        21	    24  (+ 14%)       20 (-  5%)
 16     18        22	    24  (+  9%)       21 (-  5%)
 17     19        23	    24  (+  4%)       22 (-  5%)
 18     20        24	    24  (  =  )       23 (-  5%)
 19     21        25	    24  (-  9%)       24 (-  4%)
 	        
 20     22        26        32  (+ 23%)       26 (  =  )
 21     23        27	    32  (+ 18%)       27 (  =  )
 22     24        28	    32  (+ 14%)       28 (  =  )
 23     25        29	    32  (+ 10%)       29 (  =  )
 24     26        30	    32  (+  6%)       30 (  =  )
 25     27        31	    32  (+  3%)       31 (  =  )
 26     28        32	    32  (  =  )       32 (  =  )
 	        
 40     42        46        48  (+  4%)       48 (+  4%)
 50     52        56        64  (+ 14%)       60 (+  7%)
100    102       106       120  (+ 13%)      119 (+ 12%)
124    126       130       144  (+ 10%)      144 (+ 10%)
125    127       131       152  (+ 16%)      146 (+ 11%)

And so on... The suite converges towards +14.3% (8/7) compared to 32-bit keying
for large frames. Those comprised between 120 and 125 bytes are around +10-16%.

We can also note that for frames smaller than 20 bytes, the 7-to-8 encoding can
be smaller than 32-bit masking, and will always be smaller if the optimal format
is used.

All in all for the browser-to-server uses we're expecting, the network overhead
compared to other solutions remains quite low. For larger transfers in safe local
areas, we might want to disable the encoding to save network bandwidth. The CPU
usage will always remain low (and as recently discussed, network speeds increase
faster than CPU speeds so this tradeoff makes sense).

It is quite debuggable without any context as there is no per-session state to
maintain in order to decode the stream.

It is possible to quickly detect that raw HTTP is being fed into the framing
because there will be bytes without the highest bit set.

----------



From derhoermi@gmx.net  Sat Jan 15 16:04:43 2011
Return-Path: <derhoermi@gmx.net>
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 578CC3A6BA0 for <hybi@core3.amsl.com>; Sat, 15 Jan 2011 16:04:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.482
X-Spam-Level: 
X-Spam-Status: No, score=-3.482 tagged_above=-999 required=5 tests=[AWL=-0.883, BAYES_00=-2.599]
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 O+S5MHt9BpFf for <hybi@core3.amsl.com>; Sat, 15 Jan 2011 16:04:42 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id B1E543A6B98 for <hybi@ietf.org>; Sat, 15 Jan 2011 16:04:41 -0800 (PST)
Received: (qmail invoked by alias); 16 Jan 2011 00:06:55 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp062) with SMTP; 16 Jan 2011 01:06:55 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX19Eu/MPSopERzww/yJPMkIcVU/N/cjT4kXtO0yLjl 5ODizneLb+Eaue
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Patrick McManus <mcmanus@ducksong.com>
Date: Sun, 16 Jan 2011 01:06:41 +0100
Message-ID: <ci54j6p4d2ci5jigqd8gffnelgog721470@hive.bjoern.hoehrmann.de>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <1295043821.7650.964.camel@ds9.ducksong.com> <7C388E83-9198-4A52-BBA9-DD8EA9558F68@apple.com> <1295045162.7650.975.camel@ds9.ducksong.com>
In-Reply-To: <1295045162.7650.975.camel@ds9.ducksong.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Negotiating masking doesn't make sense
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: Sun, 16 Jan 2011 00:04:43 -0000

* Patrick McManus wrote:
>But its all rather complicated if we could simply live with xor. (Sal's
>#1). I'd appreciate it if you could again explain in detail if the
>http-to-websockets attack depends on bugs in the websocket js client or
>server implementation. Perhaps I misunderstood it the first time around,
>its been a busy week. Thanks.

That is about using something like a form submission to interact with a
Websocket server, and raised essentially just because the poll option #1
"a fixed mask carried entirely in the packet" obviously does not include
something like the server nonce in the unmasking process, but option #2,
"A longish repeated mask computed from the packet", obviously does.

This is basically "Well, there are very few options to even think about
making such an attack work, for instance, you'd have to make the request
across origins." ~ "More!" "The handshake requires proof that the server
is a Websocket server, which in some proposals is based on reading a key
in the request and mixing that with something else; if done correctly
such an attack would fail." ~ "More!" "There are other properties of the
handshake that make this difficult, for instance, if a WEBSOCKET method
was required, that's easy to check for and necessary in many cases." ~
"More!"

"The Upgrade header?" ~ "More!" "So, the Websocket sever here does not
cooperate with the attacker, so it would not send a normal response just
after the 101 response; if the client does not properly recognize that,
it would wait for the next response before pipelining another request on
the connection, or it would read the response as being delimited by clo-
sing the connection and would thus not send another request either."
"More!" "If the server starts sending data without the client pushing
out another request, that should generally also trash the connection. ~
"More!"

"Well, even if you have cross-origin writes, you are not supposed to
have cross-origin reads without server consent, and there isn't much
reason for the Websocket server to employ any means to express consent,
so your level of interaction with the server would be very limited in
any case." ~ "More!"

"It's not exactly easy to fiddle the very few things you could hope to
control in the HTTP request just right into position so that you'd get
a spoofed mask on the wire and the right bits so the server would un-
mask anything resembling the protocol it understands." ~ "More!"

"There are also handshake proposals that identify where the code that
establishes the handshake is running on, and they are supposed to be
hard to spoof. A server that is somehow valuable to interact with and
not available to just about everyone would check for that at least." ~
"More!"

And so on.

So in any kind of reasonable setup there are any number of things that
can and should go wrong here on both sides of the connection -- and if
the Websocket server uses a fixed server nonce, or if the attacker can
read, or otherwise predict or brute force the server nonce, and that a
Websocket server uses an easily predictable PRNG wouldn't shock me at
all (just this week I found out that the version of Perl I've been
using for many years has only 15 bits of randomness in the default
generator), then all the proposals are equally vulnerable.

Throwing in yet another thing that maybe could help with some very hy-
pothetical scenario is something we could talk about, but the way in
which the people seemingly interested in this are presenting the issue
makes it hard to regard this as anything but theater.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From derhoermi@gmx.net  Sat Jan 15 17:23:42 2011
Return-Path: <derhoermi@gmx.net>
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 7021E3A6BEE for <hybi@core3.amsl.com>; Sat, 15 Jan 2011 17:23:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.462
X-Spam-Level: 
X-Spam-Status: No, score=-3.462 tagged_above=-999 required=5 tests=[AWL=-0.863, BAYES_00=-2.599]
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 qdxx-MJtqIud for <hybi@core3.amsl.com>; Sat, 15 Jan 2011 17:23:41 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id DE13F3A6BA7 for <hybi@ietf.org>; Sat, 15 Jan 2011 17:23:40 -0800 (PST)
Received: (qmail invoked by alias); 16 Jan 2011 01:26:09 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp037) with SMTP; 16 Jan 2011 02:26:09 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX18+FsJZhOM+Zh7PqqeVxdz+qj043Qbl2a1llOuZ9S qHCVW5BalAXbBw
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Jamie Lokier <jamie@shareable.org>
Date: Sun, 16 Jan 2011 02:26:02 +0100
Message-ID: <ald4j61rhj9rk018m8c814bm94bv7aadbp@hive.bjoern.hoehrmann.de>
References: <4D2CDB7E.5030003@caucho.com> <AANLkTi=ize3xAo5o2FxuSajM8QjAg1F93_Zgy-w6at+o@mail.gmail.com> <4D2CDFC4.1020407@caucho.com> <AANLkTimfJxfKAZpOJznpz0o1cPq--x1cQ-4whAwAaweC@mail.gmail.com> <4D2CF617.5080503@callenish.com> <13EDEAC9-925A-4B2E-8AA4-95F3FAC09EA2@apple.com> <4D2D1908.1040306@callenish.com> <4D2D288D.7090103@callenish.com> <0B26D677-1E3F-4B72-B5F8-D818B601ED15@apple.com> <20110114035344.GG4476@shareable.org>
In-Reply-To: <20110114035344.GG4476@shareable.org>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] on applicability of AES
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: Sun, 16 Jan 2011 01:23:42 -0000

* Jamie Lokier wrote:
>I gather one of the objectives motivating AES-CTR is to prevent lax
>intermediaries and HTTP servers from dubiously recognising HTTP
>requests among a stream of random bytes on many connections?

As I understand it, the only attack against any of the schemes proposed
works equally well against all the proposals. The more elborate schemes
are being proposed because a couple of people think "maybe they help",
at a tremendous cost that people entirely unaffacted by the underlying
"problem" are not willing to pay for based on a few people's feelings.

Personally I share the "bad feeling" and assume the most simple masking
scheme is much weaker than the length of the per-frame key might
suggest, and I assume that there are far more, orders of magnitude more,
intermediaries that are vulnerable to attack than the paper by Adam et
al. suggests (based on my own reasoning, I've not seen the proponents of
more elaborate schemes offer much reasoning).

But so what? Even if you could prove exceedingly convincingly that an
attack that'd require 2 TB of traffic with the AES scheme would require
only 2 MB of traffic with the most simple scheme, why would that make me
think using some AES scheme for masking is the best protocol design? We
would still have no evidence or argument that it would make a difference
in practise, and we would still have other options at our disposal.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From buskanaka@gmail.com  Sat Jan 15 23:00:34 2011
Return-Path: <buskanaka@gmail.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 73E9C3A6D0D for <hybi@core3.amsl.com>; Sat, 15 Jan 2011 23:00:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level: 
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 AVCFROAbjgmg for <hybi@core3.amsl.com>; Sat, 15 Jan 2011 23:00:31 -0800 (PST)
Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by core3.amsl.com (Postfix) with ESMTP id E00FE3A6D0B for <hybi@ietf.org>; Sat, 15 Jan 2011 23:00:30 -0800 (PST)
Received: by eyd10 with SMTP id 10so2226977eyd.31 for <hybi@ietf.org>; Sat, 15 Jan 2011 23:03:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=ubfcaDNlAWybVfIJW8uwUCxy1zBIU6Mr8frI4Ia0+HU=; b=GHJ053h1IcaVoh5NWymm7xjQyKNtJcx6WET7tyM/Tz+L/BKPTBROrx8yNxV/jjsFxE eb0GFgt4kLitLkHPrchnnYrhpgLZgP7JIGo0Y8sE5y0mGyIjZXbolRRyoNiyc0H9BmV3 1V6JClGH3lFkuMbZjxx6FpzcqxWlG7nteL+2k=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=q1RrdDFyYbF8EeVIID90npJ6xLNsDmUcNJmBSyAU11aF7B1U7tz8K6lG9tbUPo7cyf GY1FsOL/KgkaFFVTihUJ3D0nQ7WPEg+v8K/KeCvcIzeZYqJa2mBLnqCWD9w6CMPPdoMj cg62k3fLKoAioLTnyMGFI4R4Ex3rrmoWzPQ1c=
Received: by 10.14.119.206 with SMTP id n54mr1998348eeh.40.1295161379121; Sat, 15 Jan 2011 23:02:59 -0800 (PST)
MIME-Version: 1.0
Sender: buskanaka@gmail.com
Received: by 10.14.119.136 with HTTP; Sat, 15 Jan 2011 23:02:38 -0800 (PST)
In-Reply-To: <F3A5BD8C-5B3F-425D-AF5D-F9470330826D@apple.com>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se> <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com> <20110114203304.GA6872@1wt.eu> <6551F684-3619-4969-B2A7-093E91BF7FA1@apple.com> <20110114211802.GC6872@1wt.eu> <F3A5BD8C-5B3F-425D-AF5D-F9470330826D@apple.com>
From: Joel Martin <hybi@martintribe.org>
Date: Sun, 16 Jan 2011 01:02:38 -0600
X-Google-Sender-Auth: W2hxUeZGUOIyE8qGfYbRuVhgLvc
Message-ID: <AANLkTikOwLmc8ZJdJTS2zdnp4VP4LtNOoB-znN5_8cE3@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: multipart/alternative; boundary=90e6ba53b106edec5f0499f14152
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Sun, 16 Jan 2011 07:00:34 -0000

--90e6ba53b106edec5f0499f14152
Content-Type: text/plain; charset=ISO-8859-1

I believe the history of "last mile" since 1979 has shown a doubling every 2
years:

http://www.cabletechtalk.com/tech-discussions/2008/08/14/broadband-speed-and-moores-law-a-response-to-robb-topolski/

I think the real point is that adding a few percent to the size of
WebSockets traffic will quickly be addressed by the natural increase in
bandwidth (both backbone and last-mile). But security issues don't easily
fix themselves with time. It seems to me the WebSockets priorities should be
security, then ease of implementation, then latency, with bandwidth at the
end of the list.

Joel Martin

On Fri, Jan 14, 2011 at 4:14 PM, Maciej Stachowiak <mjs@apple.com> wrote:

>
> On Jan 14, 2011, at 1:18 PM, Willy Tarreau wrote:
>
> > On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej Stachowiak wrote:
> >>
> >> Using more bandwidth to save CPU strikes me as a poor tradeoff. CPU
> speeds increase at a faster rate than network bandwidth, or for that matter
> memory bandwidth.
> >
> > Sorry Maciej, but on this point I think you're wrong. Network speed
> increases
> > much faster than CPUs and that's even becoming an issue to process
> frames.
> >
> > Some networks I saw migrate from 10 to 100 Mbps 12 years ago are now
> switching
> > to 10G, thus a 100x increase. The machines were quad-600 MHz Alphas,
> we're not
> > yet at 240 GHz in equivalent servers.
> >
> > While derivates from Moore's law indicate performance doubling every 2
> years,
> > some ISPs indicate that network bandwidth doubles every 9 months.
>
> Maybe on the backbone, but not last mile bandwidth.
>
>  - Maciej
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--90e6ba53b106edec5f0499f14152
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>I believe the history of &quot;last mile&quot; since 1979 has shown a =
doubling every 2 years:</div><div><br></div><div><a href=3D"http://www.cabl=
etechtalk.com/tech-discussions/2008/08/14/broadband-speed-and-moores-law-a-=
response-to-robb-topolski/">http://www.cabletechtalk.com/tech-discussions/2=
008/08/14/broadband-speed-and-moores-law-a-response-to-robb-topolski/</a></=
div>

<div><br></div><div>I think the real point is that adding a few percent to =
the size of WebSockets traffic will quickly be addressed by the natural inc=
rease in bandwidth (both backbone and last-mile). But security issues don&#=
39;t easily fix themselves with time. It seems to me the WebSockets priorit=
ies should be security, then ease of implementation, then latency, with ban=
dwidth at the end of the list.</div>

<div><br></div><div>Joel Martin<br><br><div class=3D"gmail_quote">On Fri, J=
an 14, 2011 at 4:14 PM, Maciej Stachowiak <span dir=3D"ltr">&lt;<a href=3D"=
mailto:mjs@apple.com">mjs@apple.com</a>&gt;</span> wrote:<br><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex;">

<div class=3D"im"><br>
On Jan 14, 2011, at 1:18 PM, Willy Tarreau wrote:<br>
<br>
&gt; On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej Stachowiak wrote:<br>
&gt;&gt;<br>
&gt;&gt; Using more bandwidth to save CPU strikes me as a poor tradeoff. CP=
U speeds increase at a faster rate than network bandwidth, or for that matt=
er memory bandwidth.<br>
&gt;<br>
&gt; Sorry Maciej, but on this point I think you&#39;re wrong. Network spee=
d increases<br>
&gt; much faster than CPUs and that&#39;s even becoming an issue to process=
 frames.<br>
&gt;<br>
&gt; Some networks I saw migrate from 10 to 100 Mbps 12 years ago are now s=
witching<br>
&gt; to 10G, thus a 100x increase. The machines were quad-600 MHz Alphas, w=
e&#39;re not<br>
&gt; yet at 240 GHz in equivalent servers.<br>
&gt;<br>
&gt; While derivates from Moore&#39;s law indicate performance doubling eve=
ry 2 years,<br>
&gt; some ISPs indicate that network bandwidth doubles every 9 months.<br>
<br>
</div>Maybe on the backbone, but not last mile bandwidth.<br>
<font color=3D"#888888"><br>
=A0- Maciej<br>
</font><div><div></div><div class=3D"h5"><br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br></div>

--90e6ba53b106edec5f0499f14152--

From tomas@tomasf.se  Sun Jan 16 06:30:25 2011
Return-Path: <tomas@tomasf.se>
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 70C2A3A6D43 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 06:30:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.199
X-Spam-Level: 
X-Spam-Status: No, score=-2.199 tagged_above=-999 required=5 tests=[AWL=-0.250, BAYES_00=-2.599, HELO_EQ_SE=0.35, MIME_8BIT_HEADER=0.3]
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 VEwH1NwaNBHe for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 06:30:23 -0800 (PST)
Received: from smtprelay-h22.telenor.se (smtprelay-h22.telenor.se [195.54.99.197]) by core3.amsl.com (Postfix) with ESMTP id 3ED363A6BD7 for <hybi@ietf.org>; Sun, 16 Jan 2011 06:30:22 -0800 (PST)
Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-h22.telenor.se (Postfix) with ESMTP id B7CDFE9CC9 for <hybi@ietf.org>; Sun, 16 Jan 2011 15:32:52 +0100 (CET)
X-SENDER-IP: [85.227.3.7]
X-LISTENER: [smtp.bredband.net]
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AnoSAKeQMk1V4wMHPGdsb2JhbAAMpGgBAQEBNb0LhVAEix8
X-IronPort-AV: E=Sophos;i="4.60,329,1291590000"; d="scan'208";a="166363096"
Received: from ua-85-227-3-7.cust.bredbandsbolaget.se (HELO [192.168.0.101]) ([85.227.3.7]) by ipb1.telenor.se with ESMTP; 16 Jan 2011 15:32:52 +0100
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset=us-ascii
From: =?iso-8859-1?Q?Tomas_Franz=E9n?= <tomas@tomasf.se>
In-Reply-To: <20110115001609.GE6872@1wt.eu>
Date: Sun, 16 Jan 2011 15:32:51 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se>
References: <20110115001609.GE6872@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Sun, 16 Jan 2011 14:30:25 -0000

This seems like a fantastic alternative to XOR and the encryption =
madness. Though I'd personally prefer Base64, I'm definitely willing to =
back this proposal if less overhead means more people accept it.

* Perfect masking - definite protection against CRLF
* Easy to understand and implement
* No concerns about randomness - it doesn't have to be random
* No concerns about export regulations

The only disadvantage I can think of is the very modest 14% overhead. =
Does anyone think this is a problem?

Tomas


On 15 jan 2011, at 01.16, Willy Tarreau wrote:

> Hi all,
>=20
> after some thoughts on the various proposals, I figured that =
increasing
> the encoding slightly should not be a problem for small frames =
compared
> to current proposals where they're inflated by at least 32-bit for the
> key anyway, without offering total protection even at the beginning of
> the stream. Thus it was worth giving a try to an encoding which =
totally
> prevents an intermediary from finding an HTTP request *by design*.
>=20
> Since the opinions on the current masking poll seem to be quite spread
> apart, it looks like it's hard to satisfy everyone's concerns with the
> proposed choices only, and maybe such a design would be less rejected
> afterall, or maybe it can help someone find something better.
>=20
> Regards,
> Willy
>=20
> ----------
>=20
> Here's a frame masking proposal which addresses various of the =
concerns that
> were raised around masking and its justification :
>=20
>  - ensure that no intermediary will find a request in the stream, at =
any
>    position
>=20
>  - maintain a cheap frame forwarding cost for intermediaries
>=20
>  - maintain a cheap frame decoding cost for servers
>=20
> The principle consists in preventing any CR/LF byte from appearing in =
the
> stream. In order to achieve this, we'll use a 7 to 8 bit conversion =
and
> all bytes on the wire will have the high bit set, thus preventing any =
of
> the CR (13) or LF (10) or any other ASCII character from appearing in =
the
> stream.
>=20
> Since the framing itself may contain those bytes, the masking also =
applies to
> the framing. At one point I thought we should keep the opcode =
unmasked, but I
> figured that it could make the frame parsing more complex (eg: =
different code
> for request and response, or for masked and unmasked frames).
>=20
> It would still be nice to be able to disable the masking at some safe =
places,
> and to support multiplexing at the same time. This proposal does not =
prevent
> that since decoding the frame length is cheap. If we want to support =
both
> masked and unmasked frames in the same stream later, we'll have to use =
one of
> the reserved bits to indicate whether the frame is masked or not. The =
advantage
> is that reserved bits always have a fixed position in the clear =
stream, as well
> as they have one in the masked stream.
>=20
> The masked stream format is rather simple. Each output byte is =
composed of its
> lowest bits collected from one or two input bytes, and has the high =
bit set.
> Bytes are read one at a time and sent one at a time. The lowest bits =
of input
> byte B+1 are stored above the highest bit of input byte B :
>=20
>    /* Encode 7 input bytes to 8, returns number of bytes read */
>    int encode_stream(const unsigned char *src, unsigned char *dst)
>    {
> 	unsigned int shift, rem;
>=20
> 	for (shift =3D rem =3D 0; shift < 7; shift++) {
> 	    rem +=3D (*src++ << shift);
> 	    *dst++ =3D 0x80 | rem;
> 	    rem >>=3D 7;
> 	}
> 	*dst++ =3D 0x80 | rem;
> 	return shift;
>    }
>=20
>    /* Decode 8 input bytes to 7, returns the number of bytes written =
*/
>    int decode_stream(const unsigned char *src, unsigned char *dst)
>    {
> 	unsigned int shift, rem;
>=20
> 	if (*src & 0x80 =3D=3D 0)
> 	   return 0;
> 	rem =3D *src++ & 0x7F;
>=20
> 	for (shift =3D 0; shift < 7; shift++) {
> 	    if (*src & 0x80 =3D=3D 0)
> 	        return shift;
> 	    rem +=3D (*src++ & 0x7F) << (7 - shift);
> 	    *dst++ =3D rem;
> 	    rem >>=3D 8;
> 	}
> 	return shift;
>    }
>=20
>    uint64_t get_decoded_len(uint64_t encoded_len)
>    {
> 	return encoded_len / 8 * 7;
>    }
>=20
>=20
> Note that we can even have direct-access functions to get some framing
> information without decoding the whole stream :
>=20
>    int get_opcode(const unsigned char *stream)
>    {
> 	return stream[0] & 0x0F;
>    }
>=20
>    int get_length_8(const unsigned char *stream)
>    {
> 	return ((stream[1] & 0x7F) >> 1) + ((stream[2] & 3) << 6);
>    }
>=20
>    int get_length_16(const unsigned char *stream)
>    {
> 	int len;
> 	len =3D ((stream[2] & 0x7F) >> 2) + ((stream[3] & 7) << 5);
> 	len =3D (len << 8) + ((stream[3] & 0x7F) >> 3) + ((stream[4] & =
15) << 4);
> 	return len;
>    }
>=20
>    uint64_t get_length63(const unsigned char *stream)
>    {
> 	uint64_t len;
>=20
> 	len =3D ((stream[2] & 0x7F) >> 2) + ((stream[3] & 0x07) << 5);
> 	len =3D (len << 8) + ((stream[3] & 0x7F) >> 3) + ((stream[4] & =
0x0F) << 4);
> 	len =3D (len << 8) + ((stream[4] & 0x7F) >> 4) + ((stream[5] & =
0x1F) << 3);
> 	len =3D (len << 8) + ((stream[5] & 0x7F) >> 5) + ((stream[6] & =
0x3F) << 2);
>=20
> 	len =3D (len << 8) + ((stream[6] & 0x7F) >> 6) + ((stream[7] & =
0x7F) << 1);
> 	len =3D (len << 8) + ((stream[8] & 0x7F) >> 0) + ((stream[9] & =
0x01) << 7);
> 	len =3D (len << 8) + ((stream[9] & 0x7F) >> 1) + ((stream[10] & =
0x03) << 6);
> 	len =3D (len << 8) + ((stream[10] & 0x7F) >> 2) + ((stream[11] & =
0x03) << 5);
>=20
> 	return len;
>    }
>=20
>    uint64_t get_length(const unsigned char *stream)
>    {
> 	uint64_t len;
>=20
> 	len =3D get_length_8(stream);
> 	if (len =3D=3D 126)
> 		return get_length_16(stream);
> 	else if (len =3D=3D 127)
> 		return get_length_63(stream);
> 	else
> 		return len;
>    }
>=20
>=20
> These functions are just examples of what could be performed on the =
encoded
> stream. They're quite not perfect and might even not compile at all =
due to
> typos. If there is any interested in this proposal, I can work on them =
though.
>=20
>=20
> The encoding has a cost, which is not much important for our main =
target which
> are small frames. It is possible to encode short frames with a minimal =
amount
> of bytes and make the stream end on the first byte without the high =
bit set.
> It's possible though it would require a slightly smarter parser which =
must
> always look at the last 8-byte chunk one byte at a time.
>=20
> Below is a comparison between the following masking methods for =
various payload
> sizes :
>  - raw (unmasked)
>  - XOR/AES/HMAC/any encoding with a 32-bit key prefixing the stream
>  - this proposal padded to 8 bytes (% vs 32-bit)
>  - this proposal in optimal format (% vs 32-bit)
>=20
>=20
> Payload  Raw   32-bit key   7-to-8 padded  7-to-8 optimal
>  0      2         6         8  (+ 33%)        3 (- 50%)
>  1      3         7         8  (+ 14%)        4 (- 43%)
>  2      4         8         8  (  =3D  )        5 (- 37%)
>  3      5         9         8  (- 11%)        6 (- 33%)
>  4      6        10         8  (- 20%)        7 (- 30%)=20
>  5      7        11         8  (- 28%)        8 (- 28%)
> 	       =20
>  6      8        12        16  (+ 33%)       10 (- 16%)
>  7      9        13	    16  (+ 23%)       11 (- 15%)
>  8     10        14	    16  (+  6%)       12 (- 14%)
>  9     11        15	    16  (+ 11%)       13 (- 13%)
> 10     12        16	    16  (  =3D  )       14 (- 12%)
> 11     13        17	    16  (-  6%)       15 (- 12%)
> 12     14        18	    16  (- 11%)       16 (- 11%)
> 	       =20
> 13     15        19        24  (+ 26%)       18 (-  6%)
> 14     16        20	    24  (+ 20%)       19 (-  5%)
> 15     17        21	    24  (+ 14%)       20 (-  5%)
> 16     18        22	    24  (+  9%)       21 (-  5%)
> 17     19        23	    24  (+  4%)       22 (-  5%)
> 18     20        24	    24  (  =3D  )       23 (-  5%)
> 19     21        25	    24  (-  9%)       24 (-  4%)
> 	       =20
> 20     22        26        32  (+ 23%)       26 (  =3D  )
> 21     23        27	    32  (+ 18%)       27 (  =3D  )
> 22     24        28	    32  (+ 14%)       28 (  =3D  )
> 23     25        29	    32  (+ 10%)       29 (  =3D  )
> 24     26        30	    32  (+  6%)       30 (  =3D  )
> 25     27        31	    32  (+  3%)       31 (  =3D  )
> 26     28        32	    32  (  =3D  )       32 (  =3D  )
> 	       =20
> 40     42        46        48  (+  4%)       48 (+  4%)
> 50     52        56        64  (+ 14%)       60 (+  7%)
> 100    102       106       120  (+ 13%)      119 (+ 12%)
> 124    126       130       144  (+ 10%)      144 (+ 10%)
> 125    127       131       152  (+ 16%)      146 (+ 11%)
>=20
> And so on... The suite converges towards +14.3% (8/7) compared to =
32-bit keying
> for large frames. Those comprised between 120 and 125 bytes are around =
+10-16%.
>=20
> We can also note that for frames smaller than 20 bytes, the 7-to-8 =
encoding can
> be smaller than 32-bit masking, and will always be smaller if the =
optimal format
> is used.
>=20
> All in all for the browser-to-server uses we're expecting, the network =
overhead
> compared to other solutions remains quite low. For larger transfers in =
safe local
> areas, we might want to disable the encoding to save network =
bandwidth. The CPU
> usage will always remain low (and as recently discussed, network =
speeds increase
> faster than CPU speeds so this tradeoff makes sense).
>=20
> It is quite debuggable without any context as there is no per-session =
state to
> maintain in order to decode the stream.
>=20
> It is possible to quickly detect that raw HTTP is being fed into the =
framing
> because there will be bytes without the highest bit set.
>=20
> ----------
>=20
>=20
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi

From ietf@adambarth.com  Sun Jan 16 10:53:39 2011
Return-Path: <ietf@adambarth.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 5D51D3A6E5A for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 10:53:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.656
X-Spam-Level: 
X-Spam-Status: No, score=-3.656 tagged_above=-999 required=5 tests=[AWL=-0.979, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 frWLIziVO1KS for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 10:53:38 -0800 (PST)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by core3.amsl.com (Postfix) with ESMTP id D34AE3A6E04 for <hybi@ietf.org>; Sun, 16 Jan 2011 10:53:37 -0800 (PST)
Received: by ywk9 with SMTP id 9so1643023ywk.31 for <hybi@ietf.org>; Sun, 16 Jan 2011 10:56:09 -0800 (PST)
Received: by 10.90.35.13 with SMTP id i13mr3729665agi.15.1295204169305; Sun, 16 Jan 2011 10:56:09 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id d15sm4413744ana.15.2011.01.16.10.56.05 (version=SSLv3 cipher=RC4-MD5); Sun, 16 Jan 2011 10:56:06 -0800 (PST)
Received: by iyi42 with SMTP id 42so4384790iyi.31 for <hybi@ietf.org>; Sun, 16 Jan 2011 10:56:04 -0800 (PST)
Received: by 10.231.156.1 with SMTP id u1mr3204975ibw.52.1295204164837; Sun, 16 Jan 2011 10:56:04 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 16 Jan 2011 10:55:34 -0800 (PST)
In-Reply-To: <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 16 Jan 2011 10:55:34 -0800
Message-ID: <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com>
To: =?ISO-8859-1?Q?Tomas_Franz=E9n?= <tomas@tomasf.se>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Sun, 16 Jan 2011 18:53:39 -0000

The main disadvantage of this approach only defends against the
attacks we know.  The reason we often use randomness in cryptography
is because it's much easier to reason about the properties of
uniformly random data.  Masking the attacker's data erases any control
the attacker has over the on-the-wire bytes.  With something like
base64, the attacker has a large degree of control even though the
attacker is restricted to a limited character set.

Adam


On Sun, Jan 16, 2011 at 6:32 AM, Tomas Franz=E9n <tomas@tomasf.se> wrote:
> This seems like a fantastic alternative to XOR and the encryption madness=
. Though I'd personally prefer Base64, I'm definitely willing to back this =
proposal if less overhead means more people accept it.
>
> * Perfect masking - definite protection against CRLF
> * Easy to understand and implement
> * No concerns about randomness - it doesn't have to be random
> * No concerns about export regulations
>
> The only disadvantage I can think of is the very modest 14% overhead. Doe=
s anyone think this is a problem?
>
> Tomas
>
>
> On 15 jan 2011, at 01.16, Willy Tarreau wrote:
>
>> Hi all,
>>
>> after some thoughts on the various proposals, I figured that increasing
>> the encoding slightly should not be a problem for small frames compared
>> to current proposals where they're inflated by at least 32-bit for the
>> key anyway, without offering total protection even at the beginning of
>> the stream. Thus it was worth giving a try to an encoding which totally
>> prevents an intermediary from finding an HTTP request *by design*.
>>
>> Since the opinions on the current masking poll seem to be quite spread
>> apart, it looks like it's hard to satisfy everyone's concerns with the
>> proposed choices only, and maybe such a design would be less rejected
>> afterall, or maybe it can help someone find something better.
>>
>> Regards,
>> Willy
>>
>> ----------
>>
>> Here's a frame masking proposal which addresses various of the concerns =
that
>> were raised around masking and its justification :
>>
>> =A0- ensure that no intermediary will find a request in the stream, at a=
ny
>> =A0 =A0position
>>
>> =A0- maintain a cheap frame forwarding cost for intermediaries
>>
>> =A0- maintain a cheap frame decoding cost for servers
>>
>> The principle consists in preventing any CR/LF byte from appearing in th=
e
>> stream. In order to achieve this, we'll use a 7 to 8 bit conversion and
>> all bytes on the wire will have the high bit set, thus preventing any of
>> the CR (13) or LF (10) or any other ASCII character from appearing in th=
e
>> stream.
>>
>> Since the framing itself may contain those bytes, the masking also appli=
es to
>> the framing. At one point I thought we should keep the opcode unmasked, =
but I
>> figured that it could make the frame parsing more complex (eg: different=
 code
>> for request and response, or for masked and unmasked frames).
>>
>> It would still be nice to be able to disable the masking at some safe pl=
aces,
>> and to support multiplexing at the same time. This proposal does not pre=
vent
>> that since decoding the frame length is cheap. If we want to support bot=
h
>> masked and unmasked frames in the same stream later, we'll have to use o=
ne of
>> the reserved bits to indicate whether the frame is masked or not. The ad=
vantage
>> is that reserved bits always have a fixed position in the clear stream, =
as well
>> as they have one in the masked stream.
>>
>> The masked stream format is rather simple. Each output byte is composed =
of its
>> lowest bits collected from one or two input bytes, and has the high bit =
set.
>> Bytes are read one at a time and sent one at a time. The lowest bits of =
input
>> byte B+1 are stored above the highest bit of input byte B :
>>
>> =A0 =A0/* Encode 7 input bytes to 8, returns number of bytes read */
>> =A0 =A0int encode_stream(const unsigned char *src, unsigned char *dst)
>> =A0 =A0{
>> =A0 =A0 =A0 unsigned int shift, rem;
>>
>> =A0 =A0 =A0 for (shift =3D rem =3D 0; shift < 7; shift++) {
>> =A0 =A0 =A0 =A0 =A0 rem +=3D (*src++ << shift);
>> =A0 =A0 =A0 =A0 =A0 *dst++ =3D 0x80 | rem;
>> =A0 =A0 =A0 =A0 =A0 rem >>=3D 7;
>> =A0 =A0 =A0 }
>> =A0 =A0 =A0 *dst++ =3D 0x80 | rem;
>> =A0 =A0 =A0 return shift;
>> =A0 =A0}
>>
>> =A0 =A0/* Decode 8 input bytes to 7, returns the number of bytes written=
 */
>> =A0 =A0int decode_stream(const unsigned char *src, unsigned char *dst)
>> =A0 =A0{
>> =A0 =A0 =A0 unsigned int shift, rem;
>>
>> =A0 =A0 =A0 if (*src & 0x80 =3D=3D 0)
>> =A0 =A0 =A0 =A0 =A0return 0;
>> =A0 =A0 =A0 rem =3D *src++ & 0x7F;
>>
>> =A0 =A0 =A0 for (shift =3D 0; shift < 7; shift++) {
>> =A0 =A0 =A0 =A0 =A0 if (*src & 0x80 =3D=3D 0)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return shift;
>> =A0 =A0 =A0 =A0 =A0 rem +=3D (*src++ & 0x7F) << (7 - shift);
>> =A0 =A0 =A0 =A0 =A0 *dst++ =3D rem;
>> =A0 =A0 =A0 =A0 =A0 rem >>=3D 8;
>> =A0 =A0 =A0 }
>> =A0 =A0 =A0 return shift;
>> =A0 =A0}
>>
>> =A0 =A0uint64_t get_decoded_len(uint64_t encoded_len)
>> =A0 =A0{
>> =A0 =A0 =A0 return encoded_len / 8 * 7;
>> =A0 =A0}
>>
>>
>> Note that we can even have direct-access functions to get some framing
>> information without decoding the whole stream :
>>
>> =A0 =A0int get_opcode(const unsigned char *stream)
>> =A0 =A0{
>> =A0 =A0 =A0 return stream[0] & 0x0F;
>> =A0 =A0}
>>
>> =A0 =A0int get_length_8(const unsigned char *stream)
>> =A0 =A0{
>> =A0 =A0 =A0 return ((stream[1] & 0x7F) >> 1) + ((stream[2] & 3) << 6);
>> =A0 =A0}
>>
>> =A0 =A0int get_length_16(const unsigned char *stream)
>> =A0 =A0{
>> =A0 =A0 =A0 int len;
>> =A0 =A0 =A0 len =3D ((stream[2] & 0x7F) >> 2) + ((stream[3] & 7) << 5);
>> =A0 =A0 =A0 len =3D (len << 8) + ((stream[3] & 0x7F) >> 3) + ((stream[4]=
 & 15) << 4);
>> =A0 =A0 =A0 return len;
>> =A0 =A0}
>>
>> =A0 =A0uint64_t get_length63(const unsigned char *stream)
>> =A0 =A0{
>> =A0 =A0 =A0 uint64_t len;
>>
>> =A0 =A0 =A0 len =3D ((stream[2] & 0x7F) >> 2) + ((stream[3] & 0x07) << 5=
);
>> =A0 =A0 =A0 len =3D (len << 8) + ((stream[3] & 0x7F) >> 3) + ((stream[4]=
 & 0x0F) << 4);
>> =A0 =A0 =A0 len =3D (len << 8) + ((stream[4] & 0x7F) >> 4) + ((stream[5]=
 & 0x1F) << 3);
>> =A0 =A0 =A0 len =3D (len << 8) + ((stream[5] & 0x7F) >> 5) + ((stream[6]=
 & 0x3F) << 2);
>>
>> =A0 =A0 =A0 len =3D (len << 8) + ((stream[6] & 0x7F) >> 6) + ((stream[7]=
 & 0x7F) << 1);
>> =A0 =A0 =A0 len =3D (len << 8) + ((stream[8] & 0x7F) >> 0) + ((stream[9]=
 & 0x01) << 7);
>> =A0 =A0 =A0 len =3D (len << 8) + ((stream[9] & 0x7F) >> 1) + ((stream[10=
] & 0x03) << 6);
>> =A0 =A0 =A0 len =3D (len << 8) + ((stream[10] & 0x7F) >> 2) + ((stream[1=
1] & 0x03) << 5);
>>
>> =A0 =A0 =A0 return len;
>> =A0 =A0}
>>
>> =A0 =A0uint64_t get_length(const unsigned char *stream)
>> =A0 =A0{
>> =A0 =A0 =A0 uint64_t len;
>>
>> =A0 =A0 =A0 len =3D get_length_8(stream);
>> =A0 =A0 =A0 if (len =3D=3D 126)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return get_length_16(stream);
>> =A0 =A0 =A0 else if (len =3D=3D 127)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return get_length_63(stream);
>> =A0 =A0 =A0 else
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 return len;
>> =A0 =A0}
>>
>>
>> These functions are just examples of what could be performed on the enco=
ded
>> stream. They're quite not perfect and might even not compile at all due =
to
>> typos. If there is any interested in this proposal, I can work on them t=
hough.
>>
>>
>> The encoding has a cost, which is not much important for our main target=
 which
>> are small frames. It is possible to encode short frames with a minimal a=
mount
>> of bytes and make the stream end on the first byte without the high bit =
set.
>> It's possible though it would require a slightly smarter parser which mu=
st
>> always look at the last 8-byte chunk one byte at a time.
>>
>> Below is a comparison between the following masking methods for various =
payload
>> sizes :
>> =A0- raw (unmasked)
>> =A0- XOR/AES/HMAC/any encoding with a 32-bit key prefixing the stream
>> =A0- this proposal padded to 8 bytes (% vs 32-bit)
>> =A0- this proposal in optimal format (% vs 32-bit)
>>
>>
>> Payload =A0Raw =A0 32-bit key =A0 7-to-8 padded =A07-to-8 optimal
>> =A00 =A0 =A0 =A02 =A0 =A0 =A0 =A0 6 =A0 =A0 =A0 =A0 8 =A0(+ 33%) =A0 =A0=
 =A0 =A03 (- 50%)
>> =A01 =A0 =A0 =A03 =A0 =A0 =A0 =A0 7 =A0 =A0 =A0 =A0 8 =A0(+ 14%) =A0 =A0=
 =A0 =A04 (- 43%)
>> =A02 =A0 =A0 =A04 =A0 =A0 =A0 =A0 8 =A0 =A0 =A0 =A0 8 =A0( =A0=3D =A0) =
=A0 =A0 =A0 =A05 (- 37%)
>> =A03 =A0 =A0 =A05 =A0 =A0 =A0 =A0 9 =A0 =A0 =A0 =A0 8 =A0(- 11%) =A0 =A0=
 =A0 =A06 (- 33%)
>> =A04 =A0 =A0 =A06 =A0 =A0 =A0 =A010 =A0 =A0 =A0 =A0 8 =A0(- 20%) =A0 =A0=
 =A0 =A07 (- 30%)
>> =A05 =A0 =A0 =A07 =A0 =A0 =A0 =A011 =A0 =A0 =A0 =A0 8 =A0(- 28%) =A0 =A0=
 =A0 =A08 (- 28%)
>>
>> =A06 =A0 =A0 =A08 =A0 =A0 =A0 =A012 =A0 =A0 =A0 =A016 =A0(+ 33%) =A0 =A0=
 =A0 10 (- 16%)
>> =A07 =A0 =A0 =A09 =A0 =A0 =A0 =A013 =A0 =A0 =A0 16 =A0(+ 23%) =A0 =A0 =
=A0 11 (- 15%)
>> =A08 =A0 =A0 10 =A0 =A0 =A0 =A014 =A0 =A0 =A0 16 =A0(+ =A06%) =A0 =A0 =
=A0 12 (- 14%)
>> =A09 =A0 =A0 11 =A0 =A0 =A0 =A015 =A0 =A0 =A0 16 =A0(+ 11%) =A0 =A0 =A0 =
13 (- 13%)
>> 10 =A0 =A0 12 =A0 =A0 =A0 =A016 =A0 =A0 =A0 16 =A0( =A0=3D =A0) =A0 =A0 =
=A0 14 (- 12%)
>> 11 =A0 =A0 13 =A0 =A0 =A0 =A017 =A0 =A0 =A0 16 =A0(- =A06%) =A0 =A0 =A0 =
15 (- 12%)
>> 12 =A0 =A0 14 =A0 =A0 =A0 =A018 =A0 =A0 =A0 16 =A0(- 11%) =A0 =A0 =A0 16=
 (- 11%)
>>
>> 13 =A0 =A0 15 =A0 =A0 =A0 =A019 =A0 =A0 =A0 =A024 =A0(+ 26%) =A0 =A0 =A0=
 18 (- =A06%)
>> 14 =A0 =A0 16 =A0 =A0 =A0 =A020 =A0 =A0 =A0 24 =A0(+ 20%) =A0 =A0 =A0 19=
 (- =A05%)
>> 15 =A0 =A0 17 =A0 =A0 =A0 =A021 =A0 =A0 =A0 24 =A0(+ 14%) =A0 =A0 =A0 20=
 (- =A05%)
>> 16 =A0 =A0 18 =A0 =A0 =A0 =A022 =A0 =A0 =A0 24 =A0(+ =A09%) =A0 =A0 =A0 =
21 (- =A05%)
>> 17 =A0 =A0 19 =A0 =A0 =A0 =A023 =A0 =A0 =A0 24 =A0(+ =A04%) =A0 =A0 =A0 =
22 (- =A05%)
>> 18 =A0 =A0 20 =A0 =A0 =A0 =A024 =A0 =A0 =A0 24 =A0( =A0=3D =A0) =A0 =A0 =
=A0 23 (- =A05%)
>> 19 =A0 =A0 21 =A0 =A0 =A0 =A025 =A0 =A0 =A0 24 =A0(- =A09%) =A0 =A0 =A0 =
24 (- =A04%)
>>
>> 20 =A0 =A0 22 =A0 =A0 =A0 =A026 =A0 =A0 =A0 =A032 =A0(+ 23%) =A0 =A0 =A0=
 26 ( =A0=3D =A0)
>> 21 =A0 =A0 23 =A0 =A0 =A0 =A027 =A0 =A0 =A0 32 =A0(+ 18%) =A0 =A0 =A0 27=
 ( =A0=3D =A0)
>> 22 =A0 =A0 24 =A0 =A0 =A0 =A028 =A0 =A0 =A0 32 =A0(+ 14%) =A0 =A0 =A0 28=
 ( =A0=3D =A0)
>> 23 =A0 =A0 25 =A0 =A0 =A0 =A029 =A0 =A0 =A0 32 =A0(+ 10%) =A0 =A0 =A0 29=
 ( =A0=3D =A0)
>> 24 =A0 =A0 26 =A0 =A0 =A0 =A030 =A0 =A0 =A0 32 =A0(+ =A06%) =A0 =A0 =A0 =
30 ( =A0=3D =A0)
>> 25 =A0 =A0 27 =A0 =A0 =A0 =A031 =A0 =A0 =A0 32 =A0(+ =A03%) =A0 =A0 =A0 =
31 ( =A0=3D =A0)
>> 26 =A0 =A0 28 =A0 =A0 =A0 =A032 =A0 =A0 =A0 32 =A0( =A0=3D =A0) =A0 =A0 =
=A0 32 ( =A0=3D =A0)
>>
>> 40 =A0 =A0 42 =A0 =A0 =A0 =A046 =A0 =A0 =A0 =A048 =A0(+ =A04%) =A0 =A0 =
=A0 48 (+ =A04%)
>> 50 =A0 =A0 52 =A0 =A0 =A0 =A056 =A0 =A0 =A0 =A064 =A0(+ 14%) =A0 =A0 =A0=
 60 (+ =A07%)
>> 100 =A0 =A0102 =A0 =A0 =A0 106 =A0 =A0 =A0 120 =A0(+ 13%) =A0 =A0 =A0119=
 (+ 12%)
>> 124 =A0 =A0126 =A0 =A0 =A0 130 =A0 =A0 =A0 144 =A0(+ 10%) =A0 =A0 =A0144=
 (+ 10%)
>> 125 =A0 =A0127 =A0 =A0 =A0 131 =A0 =A0 =A0 152 =A0(+ 16%) =A0 =A0 =A0146=
 (+ 11%)
>>
>> And so on... The suite converges towards +14.3% (8/7) compared to 32-bit=
 keying
>> for large frames. Those comprised between 120 and 125 bytes are around +=
10-16%.
>>
>> We can also note that for frames smaller than 20 bytes, the 7-to-8 encod=
ing can
>> be smaller than 32-bit masking, and will always be smaller if the optima=
l format
>> is used.
>>
>> All in all for the browser-to-server uses we're expecting, the network o=
verhead
>> compared to other solutions remains quite low. For larger transfers in s=
afe local
>> areas, we might want to disable the encoding to save network bandwidth. =
The CPU
>> usage will always remain low (and as recently discussed, network speeds =
increase
>> faster than CPU speeds so this tradeoff makes sense).
>>
>> It is quite debuggable without any context as there is no per-session st=
ate to
>> maintain in order to decode the stream.
>>
>> It is possible to quickly detect that raw HTTP is being fed into the fra=
ming
>> because there will be bytes without the highest bit set.
>>
>> ----------
>>
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From w@1wt.eu  Sun Jan 16 11:09:51 2011
Return-Path: <w@1wt.eu>
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 205BB3A6E5B for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 11:09:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.066
X-Spam-Level: 
X-Spam-Status: No, score=-2.066 tagged_above=-999 required=5 tests=[AWL=-0.023, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 EYGHlO69vflX for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 11:09:50 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 0FA063A6E60 for <hybi@ietf.org>; Sun, 16 Jan 2011 11:09:49 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0GJCIrJ013361; Sun, 16 Jan 2011 20:12:18 +0100
Date: Sun, 16 Jan 2011 20:12:18 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110116191218.GD13161@1wt.eu>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Sun, 16 Jan 2011 19:09:51 -0000

On Sun, Jan 16, 2011 at 10:55:34AM -0800, Adam Barth wrote:
> The main disadvantage of this approach only defends against the
> attacks we know.  The reason we often use randomness in cryptography
> is because it's much easier to reason about the properties of
> uniformly random data.  Masking the attacker's data erases any control
> the attacker has over the on-the-wire bytes.  With something like
> base64, the attacker has a large degree of control even though the
> attacker is restricted to a limited character set.

Agreed, but randomness is not the solution to everything. In the present
case, it would make some known dangerous patterns randomly appear from
time to time while a more controlled encoding will never make them happen.
So in fact, for *some* known issues randomness can be a worse solution
than something more controlled.

Regards,
Willy


From buskanaka@gmail.com  Sun Jan 16 11:35:09 2011
Return-Path: <buskanaka@gmail.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 340893A6E5A for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 11:35:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level: 
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 1ekeR98d9DHm for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 11:35:06 -0800 (PST)
Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by core3.amsl.com (Postfix) with ESMTP id A0E2D3A6E11 for <hybi@ietf.org>; Sun, 16 Jan 2011 11:35:05 -0800 (PST)
Received: by eyd10 with SMTP id 10so2363519eyd.31 for <hybi@ietf.org>; Sun, 16 Jan 2011 11:37:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type; bh=T680fJ3yc8jVGZhPejmBnCDe3LfWzXnlYi1A2I1Sipk=; b=Iy9S+n1HUukkKHU5yL/PYQzhsVrC4m62MIIqscIK1rG9NJpkLFl3OUOSM7BxiEtEBZ Np+IQkxJSIVXL5ijeM82AvUVWirmJuOKNiqdPSFgz6E8oTBsWJBuu+I0eSMHocqpSO4l xe21lQAipkSwwHTNjwEoFRJYXbW08HL6H3ChM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=LHYG8JBGKxIHgEM6wiSy+8pSChoVUaPj1Q9QbkqEy6hlwzQ+EizZRAOVHXqvFxb+Fj EqmI7h+B1wQ144FEurHlxUaNroLfOaHw+qqEzuoqI12jfZe36MURPbKyz3wLG3FsLnwA 1vtMMuglj8GmfQTojRxU3zPGiiVrmkgixCbxA=
Received: by 10.14.11.232 with SMTP id 80mr2450444eex.12.1295206656764; Sun, 16 Jan 2011 11:37:36 -0800 (PST)
MIME-Version: 1.0
Sender: buskanaka@gmail.com
Received: by 10.14.119.136 with HTTP; Sun, 16 Jan 2011 11:37:16 -0800 (PST)
In-Reply-To: <4D32D9D4.7080305@ericsson.com>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se> <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com> <20110114203304.GA6872@1wt.eu> <6551F684-3619-4969-B2A7-093E91BF7FA1@apple.com> <20110114211802.GC6872@1wt.eu> <F3A5BD8C-5B3F-425D-AF5D-F9470330826D@apple.com> <AANLkTikOwLmc8ZJdJTS2zdnp4VP4LtNOoB-znN5_8cE3@mail.gmail.com> <4D32D9D4.7080305@ericsson.com>
From: Joel Martin <hybi@martintribe.org>
Date: Sun, 16 Jan 2011 13:37:16 -0600
X-Google-Sender-Auth: 7bYZf77d8Q7WdEqV6i406GUnIJA
Message-ID: <AANLkTi=NFhiPgtCjLoYMS0cHk+r4cYc8Y5Ah_e9k4prU@mail.gmail.com>
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: multipart/alternative; boundary=0016364d20b3afeb660499fbccd6
Subject: Re: [hybi] Straw-poll on Masking options
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: Sun, 16 Jan 2011 19:35:09 -0000

--0016364d20b3afeb660499fbccd6
Content-Type: text/plain; charset=ISO-8859-1

For the masking straw poll my preference is strongly for #1.

However, I think enough interest is being expressed in alternate encodings
that another straw poll may be in order after the masking poll closes. I.e.
1) base64  2) 7-bit/8-bit  3) whichever masking option "wins". The con
against 1 and 2 seems to be bandwidth which to me doesn't seem like an
compelling concern in this case.

Joel Martin


On 1/16/11 8:02 AM, Joel Martin wrote:

> I believe the history of "last mile" since 1979 has shown a doubling every
> 2 years:
>
>
>
> http://www.cabletechtalk.com/tech-discussions/2008/08/14/broadband-speed-and-moores-law-a-response-to-robb-topolski/
>
>
> I think the real point is that adding a few percent to the size of
> WebSockets traffic will quickly be addressed by the natural increase in
> bandwidth (both backbone and last-mile). But security issues don't easily
> fix themselves with time. It seems to me the WebSockets priorities should be
> security, then ease of implementation, then latency, with bandwidth at the
> end of the list.
>
> Joel Martin
>
>
> On Fri, Jan 14, 2011 at 4:14 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>
>
> On Jan 14, 2011, at 1:18 PM, Willy Tarreau wrote:
>
>>
> > On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej Stachowiak wrote:
>
>> >>
>
>> >> Using more bandwidth to save CPU strikes me as a poor tradeoff. CPU
> speeds increase at a faster rate than network bandwidth, or for that matter
> memory bandwidth.
>
>> >
>
>> > Sorry Maciej, but on this point I think you're wrong. Network speed
> increases
>
>> > much faster than CPUs and that's even becoming an issue to process
> frames.
>
>> >
>
>> > Some networks I saw migrate from 10 to 100 Mbps 12 years ago are now
> switching
>
>> > to 10G, thus a 100x increase. The machines were quad-600 MHz Alphas,
> we're not
>
>> > yet at 240 GHz in equivalent servers.
>
>> >
>
>> > While derivates from Moore's law indicate performance doubling every 2
> years,
>
>> > some ISPs indicate that network bandwidth doubles every 9 months.
>
>>
> Maybe on the backbone, but not last mile bandwidth.
>
>  - Maciej
>
>>
> _______________________________________________
>
>> hybi mailing list
>
>> hybi@ietf.org
>  https://www.ietf.org/mailman/listinfo/hybi
>
>

--0016364d20b3afeb660499fbccd6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>For the masking straw poll my preference is strongly for #1.</div><div=
><br></div><div>However, I think enough interest is being expressed in alte=
rnate encodings that another straw poll may be in order after the masking p=
oll closes. I.e. 1) base64 =A02) 7-bit/8-bit =A03) whichever masking option=
 &quot;wins&quot;. The con against 1 and 2 seems to be bandwidth which to m=
e doesn&#39;t seem like an compelling concern in this case.</div>

<div><br></div><div>Joel Martin</div><div><br></div><div><br></div><div><di=
v class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"></blockquote>On 1/1=
6/11 8:02 AM, Joel Martin wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div text=3D"#000000" bgcolor=3D"#ffffff"><=
div class=3D"im"><blockquote type=3D"cite">
      </blockquote>I believe the history of &quot;last mile&quot; since 197=
9 has shown a
        doubling every 2 years:<br><blockquote type=3D"cite">
      </blockquote><br><blockquote type=3D"cite">
      </blockquote><a href=3D"http://www.cabletechtalk.com/tech-discussions=
/2008/08/14/broadband-speed-and-moores-law-a-response-to-robb-topolski/" ta=
rget=3D"_blank">http://www.cabletechtalk.com/tech-discussions/2008/08/14/br=
oadband-speed-and-moores-law-a-response-to-robb-topolski/</a><br>

<blockquote type=3D"cite">
      </blockquote><br>
      <div>I think the real point is that adding a few percent to the
        size of WebSockets traffic will quickly be addressed by the
        natural increase in bandwidth (both backbone and last-mile). But
        security issues don&#39;t easily fix themselves with time. It seems
        to me the WebSockets priorities should be security, then ease of
        implementation, then latency, with bandwidth at the end of the
        list.</div>
    </div><div class=3D"im"><blockquote type=3D"cite"></blockquote>Joel Mar=
tin<br><blockquote type=3D"cite"></blockquote><br><blockquote type=3D"cite"=
></blockquote>On Fri, Jan 14, 2011 at 4:14 PM, Maciej
          Stachowiak <span dir=3D"ltr">&lt;<a href=3D"mailto:mjs@apple.com"=
 target=3D"_blank">mjs@apple.com</a>&gt;</span>
          wrote:<br><blockquote type=3D"cite"><div>
       =20
        <div class=3D"gmail_quote">
          <blockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8=
ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
            </blockquote><br><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left=
:1ex"></blockquote>On Jan 14, 2011, at 1:18 PM, Willy Tarreau wrote:<br><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-lef=
t:1px solid rgb(204, 204, 204);padding-left:1ex">

</blockquote><br><blockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt =
0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"></bloc=
kquote>&gt; On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej
              Stachowiak wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);paddi=
ng-left:1ex"></blockquote>&gt;&gt;<br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);pad=
ding-left:1ex">

</blockquote>&gt;&gt; Using more bandwidth to save CPU strikes me as a
              poor tradeoff. CPU speeds increase at a faster rate than
              network bandwidth, or for that matter memory bandwidth.<br><b=
lockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-le=
ft:1px solid rgb(204, 204, 204);padding-left:1ex"></blockquote>&gt;<br><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-left=
:1px solid rgb(204, 204, 204);padding-left:1ex">

</blockquote>&gt; Sorry Maciej, but on this point I think you&#39;re wrong.
              Network speed increases<br><blockquote class=3D"gmail_quote" =
style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);=
padding-left:1ex"></blockquote>&gt; much faster than CPUs and that&#39;s ev=
en becoming an
              issue to process frames.<br><blockquote class=3D"gmail_quote"=
 style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204)=
;padding-left:1ex"></blockquote>&gt;<br><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);p=
adding-left:1ex">

</blockquote>&gt; Some networks I saw migrate from 10 to 100 Mbps 12
              years ago are now switching<br><blockquote class=3D"gmail_quo=
te" style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 2=
04);padding-left:1ex"></blockquote>&gt; to 10G, thus a 100x increase. The m=
achines were
              quad-600 MHz Alphas, we&#39;re not<br><blockquote class=3D"gm=
ail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,=
 204, 204);padding-left:1ex"></blockquote>&gt; yet at 240 GHz in equivalent=
 servers.<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-=
left:1px solid rgb(204, 204, 204);padding-left:1ex"></blockquote>&gt;<br><b=
lockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-le=
ft:1px solid rgb(204, 204, 204);padding-left:1ex">

</blockquote>&gt; While derivates from Moore&#39;s law indicate performance
              doubling every 2 years,<br><blockquote class=3D"gmail_quote" =
style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);=
padding-left:1ex"></blockquote>&gt; some ISPs indicate that network bandwid=
th doubles
              every 9 months.<br><blockquote class=3D"gmail_quote" style=3D=
"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-=
left:1ex"></blockquote><br><blockquote class=3D"gmail_quote" style=3D"margi=
n:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1=
ex">

</blockquote>Maybe on the backbone, but not last mile bandwidth.<br><font c=
lass=3D"Apple-style-span" color=3D"#888888"><br></font><span class=3D"Apple=
-style-span" style=3D"color: rgb(136, 136, 136); ">=A0- Maciej</span><br><b=
lockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-le=
ft:1px solid rgb(204, 204, 204);padding-left:1ex">


            </blockquote><br><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left=
:1ex"></blockquote>_______________________________________________<br><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:=
1px solid rgb(204, 204, 204);padding-left:1ex">

</blockquote>hybi mailing list<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);paddi=
ng-left:1ex"></blockquote><a href=3D"mailto:hybi@ietf.org" target=3D"_blank=
">hybi@ietf.org</a><br>

<div>
              <div>
                <a href=3D"https://www.ietf.org/mailman/listinfo/hybi" targ=
et=3D"_blank">https://www.ietf.org/mailman/listinfo/hybi</a></div></div></d=
iv></div></blockquote></div></div></blockquote></div></div>

--0016364d20b3afeb660499fbccd6--

From ietf@adambarth.com  Sun Jan 16 11:51:57 2011
Return-Path: <ietf@adambarth.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 30EB63A6E15 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 11:51:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.8
X-Spam-Level: 
X-Spam-Status: No, score=-3.8 tagged_above=-999 required=5 tests=[AWL=-0.823,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 IyeVNlGwAWXy for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 11:51:56 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 4AB983A6E04 for <hybi@ietf.org>; Sun, 16 Jan 2011 11:51:56 -0800 (PST)
Received: by yxt33 with SMTP id 33so1934839yxt.31 for <hybi@ietf.org>; Sun, 16 Jan 2011 11:54:27 -0800 (PST)
Received: by 10.236.103.44 with SMTP id e32mr6390985yhg.37.1295207667827; Sun, 16 Jan 2011 11:54:27 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id 3sm2167889yhl.0.2011.01.16.11.54.26 (version=SSLv3 cipher=RC4-MD5); Sun, 16 Jan 2011 11:54:26 -0800 (PST)
Received: by iwn40 with SMTP id 40so4385828iwn.31 for <hybi@ietf.org>; Sun, 16 Jan 2011 11:54:25 -0800 (PST)
Received: by 10.231.19.138 with SMTP id a10mr3225496ibb.127.1295207665327; Sun, 16 Jan 2011 11:54:25 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 16 Jan 2011 11:53:55 -0800 (PST)
In-Reply-To: <20110116191218.GD13161@1wt.eu>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 16 Jan 2011 11:53:55 -0800
Message-ID: <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Sun, 16 Jan 2011 19:51:57 -0000

On Sun, Jan 16, 2011 at 11:12 AM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 16, 2011 at 10:55:34AM -0800, Adam Barth wrote:
>> The main disadvantage of this approach only defends against the
>> attacks we know. =A0The reason we often use randomness in cryptography
>> is because it's much easier to reason about the properties of
>> uniformly random data. =A0Masking the attacker's data erases any control
>> the attacker has over the on-the-wire bytes. =A0With something like
>> base64, the attacker has a large degree of control even though the
>> attacker is restricted to a limited character set.
>
> Agreed, but randomness is not the solution to everything. In the present
> case, it would make some known dangerous patterns randomly appear from
> time to time while a more controlled encoding will never make them happen=
.
> So in fact, for *some* known issues randomness can be a worse solution
> than something more controlled.

Honestly, that's a bunch of bunk.

Adam

From mjs@apple.com  Sun Jan 16 12:00:51 2011
Return-Path: <mjs@apple.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 E829028B23E for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 12:00:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.544
X-Spam-Level: 
X-Spam-Status: No, score=-106.544 tagged_above=-999 required=5 tests=[AWL=0.054, BAYES_00=-2.599, 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 26+qA3CUPGTY for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 12:00:49 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 4E9B93A6E5A for <hybi@ietf.org>; Sun, 16 Jan 2011 12:00:48 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out3.apple.com (Postfix) with ESMTP id 41716C7C1492 for <hybi@ietf.org>; Sun, 16 Jan 2011 12:03:20 -0800 (PST)
X-AuditID: 11807136-b7bf8ae00000244a-db-4d334f086db6
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay15.apple.com (Apple SCV relay) with SMTP id E6.21.09290.80F433D4; Sun, 16 Jan 2011 12:03:20 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_/YHBRU8TCvpIhUhqD0IO+w)"
Received: from [17.153.56.201] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LF400AHPT1JAN20@gertie.apple.com> for hybi@ietf.org; Sun, 16 Jan 2011 12:03:19 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTikOwLmc8ZJdJTS2zdnp4VP4LtNOoB-znN5_8cE3@mail.gmail.com>
Date: Sun, 16 Jan 2011 12:03:13 -0800
Message-id: <554DB69D-0498-496C-923C-E59D24122A1B@apple.com>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se> <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com> <20110114203304.GA6872@1wt.eu> <6551F684-3619-4969-B2A7-093E91BF7FA1@apple.com> <20110114211802.GC6872@1wt.eu> <F3A5BD8C-5B3F-425D-AF5D-F9470330826D@apple.com> <AANLkTikOwLmc8ZJdJTS2zdnp4VP4LtNOoB-znN5_8cE3@mail.gmail.com>
To: Joel Martin <hybi@martintribe.org>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Sun, 16 Jan 2011 20:00:51 -0000

--Boundary_(ID_/YHBRU8TCvpIhUhqD0IO+w)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 15, 2011, at 11:02 PM, Joel Martin wrote:

> I believe the history of "last mile" since 1979 has shown a doubling every 2 years:
> 
> http://www.cabletechtalk.com/tech-discussions/2008/08/14/broadband-speed-and-moores-law-a-response-to-robb-topolski/

And computational power doubles about every 18 months,

> 
> I think the real point is that adding a few percent to the size of WebSockets traffic will quickly be addressed by the natural increase in bandwidth (both backbone and last-mile). But security issues don't easily fix themselves with time. It seems to me the WebSockets priorities should be security, then ease of implementation, then latency, with bandwidth at the end of the list.

If security is really the top priority, and in particular if it's a higher priority than computational complexity, then a making scheme that produces data indistinguishable from random is the best choice. As I understand it, the base64 proposal is based on the premise that AES-CTR or HMAC are too expensive in CPU time to be worth the security benefit.

Regards,
Maciej

> 
> Joel Martin
> 
> On Fri, Jan 14, 2011 at 4:14 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> 
> On Jan 14, 2011, at 1:18 PM, Willy Tarreau wrote:
> 
> > On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej Stachowiak wrote:
> >>
> >> Using more bandwidth to save CPU strikes me as a poor tradeoff. CPU speeds increase at a faster rate than network bandwidth, or for that matter memory bandwidth.
> >
> > Sorry Maciej, but on this point I think you're wrong. Network speed increases
> > much faster than CPUs and that's even becoming an issue to process frames.
> >
> > Some networks I saw migrate from 10 to 100 Mbps 12 years ago are now switching
> > to 10G, thus a 100x increase. The machines were quad-600 MHz Alphas, we're not
> > yet at 240 GHz in equivalent servers.
> >
> > While derivates from Moore's law indicate performance doubling every 2 years,
> > some ISPs indicate that network bandwidth doubles every 9 months.
> 
> Maybe on the backbone, but not last mile bandwidth.
> 
>  - Maciej
> 
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
> 


--Boundary_(ID_/YHBRU8TCvpIhUhqD0IO+w)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 15, 2011, at 11:02 PM, Joel Martin wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I believe the history of "last mile" since 1979 has shown a doubling every 2 years:</div><div><br></div><div><a href="http://www.cabletechtalk.com/tech-discussions/2008/08/14/broadband-speed-and-moores-law-a-response-to-robb-topolski/">http://www.cabletechtalk.com/tech-discussions/2008/08/14/broadband-speed-and-moores-law-a-response-to-robb-topolski/</a></div></blockquote><div><br></div><div>And computational power doubles about every 18 months,</div><br><blockquote type="cite">

<div><br></div><div>I think the real point is that adding a few percent to the size of WebSockets traffic will quickly be addressed by the natural increase in bandwidth (both backbone and last-mile). But security issues don't easily fix themselves with time. It seems to me the WebSockets priorities should be security, then ease of implementation, then latency, with bandwidth at the end of the list.</div></blockquote><div><br></div><div>If security is really the top priority, and in particular if it's a higher priority than computational complexity, then a making scheme that produces data indistinguishable from random is the best choice. As I understand it, the base64 proposal is based on the premise that AES-CTR or HMAC are too expensive in CPU time to be worth the security benefit.</div><div><br></div><div>Regards,</div><div>Maciej</div><br><blockquote type="cite">

<div><br></div><div>Joel Martin<br><br><div class="gmail_quote">On Fri, Jan 14, 2011 at 4:14 PM, Maciej Stachowiak <span dir="ltr">&lt;<a href="mailto:mjs@apple.com">mjs@apple.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
On Jan 14, 2011, at 1:18 PM, Willy Tarreau wrote:<br>
<br>
&gt; On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej Stachowiak wrote:<br>
&gt;&gt;<br>
&gt;&gt; Using more bandwidth to save CPU strikes me as a poor tradeoff. CPU speeds increase at a faster rate than network bandwidth, or for that matter memory bandwidth.<br>
&gt;<br>
&gt; Sorry Maciej, but on this point I think you're wrong. Network speed increases<br>
&gt; much faster than CPUs and that's even becoming an issue to process frames.<br>
&gt;<br>
&gt; Some networks I saw migrate from 10 to 100 Mbps 12 years ago are now switching<br>
&gt; to 10G, thus a 100x increase. The machines were quad-600 MHz Alphas, we're not<br>
&gt; yet at 240 GHz in equivalent servers.<br>
&gt;<br>
&gt; While derivates from Moore's law indicate performance doubling every 2 years,<br>
&gt; some ISPs indicate that network bandwidth doubles every 9 months.<br>
<br>
</div>Maybe on the backbone, but not last mile bandwidth.<br>
<font color="#888888"><br>
&nbsp;- Maciej<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
hybi mailing list<br>
<a href="mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href="https://www.ietf.org/mailman/listinfo/hybi" target="_blank">https://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br></div>
</blockquote></div><br></body></html>

--Boundary_(ID_/YHBRU8TCvpIhUhqD0IO+w)--

From w@1wt.eu  Sun Jan 16 12:02:31 2011
Return-Path: <w@1wt.eu>
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 A142C3A6E26 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 12:02:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.066
X-Spam-Level: 
X-Spam-Status: No, score=-2.066 tagged_above=-999 required=5 tests=[AWL=-0.023, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 tAww0UgkaLmE for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 12:02:30 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id ED6C73A6E15 for <hybi@ietf.org>; Sun, 16 Jan 2011 12:02:29 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0GK50F9013539; Sun, 16 Jan 2011 21:05:00 +0100
Date: Sun, 16 Jan 2011 21:05:00 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110116200500.GG13161@1wt.eu>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Sun, 16 Jan 2011 20:02:31 -0000

On Sun, Jan 16, 2011 at 11:53:55AM -0800, Adam Barth wrote:
> On Sun, Jan 16, 2011 at 11:12 AM, Willy Tarreau <w@1wt.eu> wrote:
> > On Sun, Jan 16, 2011 at 10:55:34AM -0800, Adam Barth wrote:
> >> The main disadvantage of this approach only defends against the
> >> attacks we know.  The reason we often use randomness in cryptography
> >> is because it's much easier to reason about the properties of
> >> uniformly random data.  Masking the attacker's data erases any control
> >> the attacker has over the on-the-wire bytes.  With something like
> >> base64, the attacker has a large degree of control even though the
> >> attacker is restricted to a limited character set.
> >
> > Agreed, but randomness is not the solution to everything. In the present
> > case, it would make some known dangerous patterns randomly appear from
> > time to time while a more controlled encoding will never make them happen.
> > So in fact, for *some* known issues randomness can be a worse solution
> > than something more controlled.
> 
> Honestly, that's a bunch of bunk.

Why ?

Simply send 4 billion different random patterns to Apache after the
handshake, and the one matching "GET\n" will be forwarded as a valid
HTTP request. And we're not talking about an attack, just random WS
connections to WS-unable intermediaries that will forward a request
instead of nicely failing.

In my opinion, there are uses for everything including crypto. And
there are cases where a perfectly controlled solution can sometimes
better fit the needs than just random mask-based crypto.

Regards,
Willy


From ietf@adambarth.com  Sun Jan 16 15:32:11 2011
Return-Path: <ietf@adambarth.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 7485A28C0D0 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 15:32:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.795
X-Spam-Level: 
X-Spam-Status: No, score=-3.795 tagged_above=-999 required=5 tests=[AWL=-0.818, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 YOv2ojTFFHzg for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 15:32:10 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 696BB3A6E63 for <hybi@ietf.org>; Sun, 16 Jan 2011 15:32:10 -0800 (PST)
Received: by yxt33 with SMTP id 33so1975397yxt.31 for <hybi@ietf.org>; Sun, 16 Jan 2011 15:34:42 -0800 (PST)
Received: by 10.150.143.4 with SMTP id q4mr3727299ybd.29.1295220882506; Sun, 16 Jan 2011 15:34:42 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id v8sm2241584yba.14.2011.01.16.15.34.40 (version=SSLv3 cipher=RC4-MD5); Sun, 16 Jan 2011 15:34:41 -0800 (PST)
Received: by iyi42 with SMTP id 42so4520432iyi.31 for <hybi@ietf.org>; Sun, 16 Jan 2011 15:34:40 -0800 (PST)
Received: by 10.231.12.132 with SMTP id x4mr3375684ibx.177.1295220880150; Sun, 16 Jan 2011 15:34:40 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Sun, 16 Jan 2011 15:34:10 -0800 (PST)
In-Reply-To: <20110116200500.GG13161@1wt.eu>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 16 Jan 2011 15:34:10 -0800
Message-ID: <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Sun, 16 Jan 2011 23:32:12 -0000

On Sun, Jan 16, 2011 at 12:05 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 16, 2011 at 11:53:55AM -0800, Adam Barth wrote:
>> On Sun, Jan 16, 2011 at 11:12 AM, Willy Tarreau <w@1wt.eu> wrote:
>> > On Sun, Jan 16, 2011 at 10:55:34AM -0800, Adam Barth wrote:
>> >> The main disadvantage of this approach only defends against the
>> >> attacks we know. =A0The reason we often use randomness in cryptograph=
y
>> >> is because it's much easier to reason about the properties of
>> >> uniformly random data. =A0Masking the attacker's data erases any cont=
rol
>> >> the attacker has over the on-the-wire bytes. =A0With something like
>> >> base64, the attacker has a large degree of control even though the
>> >> attacker is restricted to a limited character set.
>> >
>> > Agreed, but randomness is not the solution to everything. In the prese=
nt
>> > case, it would make some known dangerous patterns randomly appear from
>> > time to time while a more controlled encoding will never make them hap=
pen.
>> > So in fact, for *some* known issues randomness can be a worse solution
>> > than something more controlled.
>>
>> Honestly, that's a bunch of bunk.
>
> Why ?
>
> Simply send 4 billion different random patterns to Apache after the
> handshake, and the one matching "GET\n" will be forwarded as a valid
> HTTP request. And we're not talking about an attack, just random WS
> connections to WS-unable intermediaries that will forward a request
> instead of nicely failing.
>
> In my opinion, there are uses for everything including crypto. And
> there are cases where a perfectly controlled solution can sometimes
> better fit the needs than just random mask-based crypto.

We've been over this Willy.  "GET\n" is not an attack.  The cost of
performing the attack doubles with each bit you add to the attack
string.  Anything even remotely interesting is wildly infeasible.
It's just simple math.

Adam

From buskanaka@gmail.com  Sun Jan 16 15:35:17 2011
Return-Path: <buskanaka@gmail.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 C030F28C0D0 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 15:35:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level: 
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[AWL=-0.000, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 LW5gwQ7Afe79 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 15:35:16 -0800 (PST)
Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by core3.amsl.com (Postfix) with ESMTP id B82F43A6BA5 for <hybi@ietf.org>; Sun, 16 Jan 2011 15:35:15 -0800 (PST)
Received: by eyd10 with SMTP id 10so2408692eyd.31 for <hybi@ietf.org>; Sun, 16 Jan 2011 15:37:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=2oy7qTgyNxe3hIZR+CGhiIQTBTeduCaoOK8PwlFxHhs=; b=p8v2cl4xY2yP3uqYcHH2xNTjcna0JVc8gDyl4WS7rKWzGr/xastMPD56oDzjol7MgL aVg7++c1F8Su11pI6KVcBDrRtJo0a/YTMQqlZBv9mK3+t5vTEtQZzhS6MPKXaCl3tCAu yr9AwDPee9QzkLPjMotlQuqICngK0OEiVAgSk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; b=OFJWnF9PB8LISNXW0/+HWv0Zk5RmHSX2gFB+ACZeFLJeyUgO2N+FJcHZ2Ie3wiXs+p 2RgBUGKLZGowHt3CjKHVkDLbVZcyjGqPwkfZ7TuBUGkqiU/ptMzbzethn3s5f0P9TyJK 3WdPnTkHJM7p4o0LGbTSY9R2me9KB/qlhCv30=
Received: by 10.14.119.206 with SMTP id n54mr2550259eeh.40.1295221067234; Sun, 16 Jan 2011 15:37:47 -0800 (PST)
MIME-Version: 1.0
Sender: buskanaka@gmail.com
Received: by 10.14.119.136 with HTTP; Sun, 16 Jan 2011 15:37:27 -0800 (PST)
From: Joel Martin <hybi@martintribe.org>
Date: Sun, 16 Jan 2011 17:37:27 -0600
X-Google-Sender-Auth: awRUmURFsTLTmO2uu0Az4hDCjBQ
Message-ID: <AANLkTikP=aGOkamoA44Mr=26FT++VmQ_V6xHuUga3OcR@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: multipart/alternative; boundary=90e6ba53b1069e3e3a0499ff2731
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Sun, 16 Jan 2011 23:35:18 -0000

--90e6ba53b1069e3e3a0499ff2731
Content-Type: text/plain; charset=ISO-8859-1

Maciej,

I've changed the subject to avoid the poll.

Actually, Moore's origianl writings indicated doubling every year and then
he changed it to every 2 years in 1975. He never claimed every 18 months
(that was an Intel executive David House). In fact it's closer to every 20
months (http://news.cnet.com/2100-1001-984051.html and wikipedia)

But regardless, the point is that last-mile bandwidth and transistors per
inch have both been on an exponential growth curve for at least 3 decades.
In other words, a few percent extra in CPU or bandwidth is quickly made
irrelevant by time. And I think it's important to note that CPU power
increases are no longer as easy to fully utilize since the doubling effect
no longer implies a doubling of CPU frequency but has shifted towards
parallel processing.

On the other hand, the march of time does NOT automatically help security
issues or Internet latency. In fact, as Jim Gettys has been arguing recent,
Internet latency has worsened in the last 20 years for a variety of reasons
(
http://gettys.wordpress.com/2010/12/06/whose-house-is-of-glasse-must-not-throw-stones-at-another/
)

For me (and I think for most) WebSockets is far more about latency than
bandwidth. And more important that either is security. I am concerned about
CPU too, but mostly for the impact it has on latency.

Since base64 or 7-bit/8-bit address the outstanding security concern whereas
the masking options simply mitigate it to varying degrees or another, my
preference is for one of the former. Specifically base64 since the four
languages I am personally concerned about (python, C, Flash AS3, Node.js)
have native base64 routines.

Regards,

Joel Martin

On Sun, Jan 16, 2011 at 2:03 PM, Maciej Stachowiak <mjs@apple.com> wrote:

>
> On Jan 15, 2011, at 11:02 PM, Joel Martin wrote:
>
> I believe the history of "last mile" since 1979 has shown a doubling every
> 2 years:
>
>
> http://www.cabletechtalk.com/tech-discussions/2008/08/14/broadband-speed-and-moores-law-a-response-to-robb-topolski/
>
>
> And computational power doubles about every 18 months,
>
>
> I think the real point is that adding a few percent to the size of
> WebSockets traffic will quickly be addressed by the natural increase in
> bandwidth (both backbone and last-mile). But security issues don't easily
> fix themselves with time. It seems to me the WebSockets priorities should be
> security, then ease of implementation, then latency, with bandwidth at the
> end of the list.
>
>
> If security is really the top priority, and in particular if it's a higher
> priority than computational complexity, then a making scheme that produces
> data indistinguishable from random is the best choice. As I understand it,
> the base64 proposal is based on the premise that AES-CTR or HMAC are too
> expensive in CPU time to be worth the security benefit.
>
> Regards,
> Maciej
>
>
> Joel Martin
>
> On Fri, Jan 14, 2011 at 4:14 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>
>>
>> On Jan 14, 2011, at 1:18 PM, Willy Tarreau wrote:
>>
>> > On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej Stachowiak wrote:
>> >>
>> >> Using more bandwidth to save CPU strikes me as a poor tradeoff. CPU
>> speeds increase at a faster rate than network bandwidth, or for that matter
>> memory bandwidth.
>> >
>> > Sorry Maciej, but on this point I think you're wrong. Network speed
>> increases
>> > much faster than CPUs and that's even becoming an issue to process
>> frames.
>> >
>> > Some networks I saw migrate from 10 to 100 Mbps 12 years ago are now
>> switching
>> > to 10G, thus a 100x increase. The machines were quad-600 MHz Alphas,
>> we're not
>> > yet at 240 GHz in equivalent servers.
>> >
>> > While derivates from Moore's law indicate performance doubling every 2
>> years,
>> > some ISPs indicate that network bandwidth doubles every 9 months.
>>
>> Maybe on the backbone, but not last mile bandwidth.
>>
>>  - Maciej
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>>
>
>
>

--90e6ba53b1069e3e3a0499ff2731
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Maciej,<div><br></div><div>I&#39;ve changed the subject to avoid the poll.<=
/div><div><br></div><div>Actually, Moore&#39;s origianl writings indicated =
doubling every year and then he changed it to every 2 years in 1975. He nev=
er claimed every 18 months (that was an Intel executive David House). In fa=
ct it&#39;s closer to every 20 months (<a href=3D"http://news.cnet.com/2100=
-1001-984051.html">http://news.cnet.com/2100-1001-984051.html</a> and wikip=
edia)</div>

<div><br></div><div>But regardless, the point is that last-mile bandwidth a=
nd transistors per inch have both been on an exponential growth curve for a=
t least 3 decades. In other words, a few percent extra in CPU or bandwidth =
is quickly made irrelevant by time. And I think it&#39;s important to note =
that CPU power increases are no longer as easy to fully utilize since the d=
oubling effect no longer implies a doubling of CPU frequency but has shifte=
d towards parallel processing.</div>

<div><br></div><div>On the other hand, the march of time does NOT automatic=
ally help security issues or Internet latency. In fact, as Jim Gettys has b=
een arguing recent, Internet latency has worsened in the last 20 years for =
a variety of reasons (<a href=3D"http://gettys.wordpress.com/2010/12/06/who=
se-house-is-of-glasse-must-not-throw-stones-at-another/">http://gettys.word=
press.com/2010/12/06/whose-house-is-of-glasse-must-not-throw-stones-at-anot=
her/</a>)</div>

<div><br></div><div>For me (and I think for most) WebSockets is far more ab=
out latency than bandwidth. And more important that either is security. I a=
m concerned about CPU too, but mostly for the impact it has on latency.</di=
v>

<div><br></div><div>Since base64 or 7-bit/8-bit address the outstanding sec=
urity concern whereas the masking options simply mitigate it to varying deg=
rees or another, my preference is for one of the former. Specifically base6=
4 since the four languages I am personally concerned about (python, C, Flas=
h AS3, Node.js) have native base64 routines.</div>

<div><br></div><div>Regards,</div><div><br></div><div>Joel Martin<br><br><d=
iv class=3D"gmail_quote">On Sun, Jan 16, 2011 at 2:03 PM, Maciej Stachowiak=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:mjs@apple.com">mjs@apple.com</a>&g=
t;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div style=3D"word-wrap:break-word"><br><di=
v><div class=3D"im"><div>On Jan 15, 2011, at 11:02 PM, Joel Martin wrote:</=
div>

<br><blockquote type=3D"cite"><div>I believe the history of &quot;last mile=
&quot; since 1979 has shown a doubling every 2 years:</div><div><br></div><=
div><a href=3D"http://www.cabletechtalk.com/tech-discussions/2008/08/14/bro=
adband-speed-and-moores-law-a-response-to-robb-topolski/" target=3D"_blank"=
>http://www.cabletechtalk.com/tech-discussions/2008/08/14/broadband-speed-a=
nd-moores-law-a-response-to-robb-topolski/</a></div>

</blockquote><div><br></div></div><div>And computational power doubles abou=
t every 18 months,</div><div class=3D"im"><br><blockquote type=3D"cite">

<div><br></div><div>I think the real point is that adding a few percent to =
the size of WebSockets traffic will quickly be addressed by the natural inc=
rease in bandwidth (both backbone and last-mile). But security issues don&#=
39;t easily fix themselves with time. It seems to me the WebSockets priorit=
ies should be security, then ease of implementation, then latency, with ban=
dwidth at the end of the list.</div>

</blockquote><div><br></div></div><div>If security is really the top priori=
ty, and in particular if it&#39;s a higher priority than computational comp=
lexity, then a making scheme that produces data indistinguishable from rand=
om is the best choice. As I understand it, the base64 proposal is based on =
the premise that AES-CTR or HMAC are too expensive in CPU time to be worth =
the security benefit.</div>

<div><br></div><div>Regards,</div><div>Maciej</div><div class=3D"im"><br><b=
lockquote type=3D"cite">

<div><br></div><div>Joel Martin<br><br><div class=3D"gmail_quote">On Fri, J=
an 14, 2011 at 4:14 PM, Maciej Stachowiak <span dir=3D"ltr">&lt;<a href=3D"=
mailto:mjs@apple.com" target=3D"_blank">mjs@apple.com</a>&gt;</span> wrote:=
<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">

<div><br>
On Jan 14, 2011, at 1:18 PM, Willy Tarreau wrote:<br>
<br>
&gt; On Fri, Jan 14, 2011 at 01:01:23PM -0800, Maciej Stachowiak wrote:<br>
&gt;&gt;<br>
&gt;&gt; Using more bandwidth to save CPU strikes me as a poor tradeoff. CP=
U speeds increase at a faster rate than network bandwidth, or for that matt=
er memory bandwidth.<br>
&gt;<br>
&gt; Sorry Maciej, but on this point I think you&#39;re wrong. Network spee=
d increases<br>
&gt; much faster than CPUs and that&#39;s even becoming an issue to process=
 frames.<br>
&gt;<br>
&gt; Some networks I saw migrate from 10 to 100 Mbps 12 years ago are now s=
witching<br>
&gt; to 10G, thus a 100x increase. The machines were quad-600 MHz Alphas, w=
e&#39;re not<br>
&gt; yet at 240 GHz in equivalent servers.<br>
&gt;<br>
&gt; While derivates from Moore&#39;s law indicate performance doubling eve=
ry 2 years,<br>
&gt; some ISPs indicate that network bandwidth doubles every 9 months.<br>
<br>
</div>Maybe on the backbone, but not last mile bandwidth.<br>
<font color=3D"#888888"><br>
=A0- Maciej<br>
</font><div><div></div><div><br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br></div>
</blockquote></div></div><br></div>
</blockquote></div><br></div>

--90e6ba53b1069e3e3a0499ff2731--

From derhoermi@gmx.net  Sun Jan 16 16:46:58 2011
Return-Path: <derhoermi@gmx.net>
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 BC7CF3A6BA2 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 16:46:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.443
X-Spam-Level: 
X-Spam-Status: No, score=-3.443 tagged_above=-999 required=5 tests=[AWL=-0.844, BAYES_00=-2.599]
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 56FQW96-Kbs0 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 16:46:57 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 417B53A67C0 for <hybi@ietf.org>; Sun, 16 Jan 2011 16:46:57 -0800 (PST)
Received: (qmail invoked by alias); 17 Jan 2011 00:49:28 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp062) with SMTP; 17 Jan 2011 01:49:28 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX198VYxA1xJ8cRqIqWRHU7v/EbE/Kg1cVC9SERXOEE 609jX6MNzA+EgR
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Maciej Stachowiak <mjs@apple.com>
Date: Mon, 17 Jan 2011 01:49:21 +0100
Message-ID: <gmv6j613ua5p3m0p576hkumgjgr1pec928@hive.bjoern.hoehrmann.de>
References: <4D2E0863.2040804@ericsson.com> <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se> <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com> <20110114203304.GA6872@1wt.eu> <6551F684-3619-4969-B2A7-093E91BF7FA1@apple.com> <20110114211802.GC6872@1wt.eu> <F3A5BD8C-5B3F-425D-AF5D-F9470330826D@apple.com> <AANLkTikOwLmc8ZJdJTS2zdnp4VP4LtNOoB-znN5_8cE3@mail.gmail.com> <554DB69D-0498-496C-923C-E59D24122A1B@apple.com>
In-Reply-To: <554DB69D-0498-496C-923C-E59D24122A1B@apple.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: [hybi] Security doesn't end here (was: Re: Straw-poll on Masking options)
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: Mon, 17 Jan 2011 00:46:58 -0000

* Maciej Stachowiak wrote:
>If security is really the top priority, and in particular if it's a
>higher priority than computational complexity, then a making scheme that
>produces data indistinguishable from random is the best choice.

Limiting an attacker's ability to confuse intermediaries is just one
aspect of security; limiting confusion about the protocol's security
properties is another. We can take for granted that if we were to use
AES in the protocol that some people will make incorrect assumptions
about the security properties that provides; we've seen people on this
list who've closely followed the discussions do that, for instance.
AES may very well be the worst option as far as overall security goes.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From w@1wt.eu  Sun Jan 16 21:43:17 2011
Return-Path: <w@1wt.eu>
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 BD41B3A6DBB for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 21:43:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.066
X-Spam-Level: 
X-Spam-Status: No, score=-2.066 tagged_above=-999 required=5 tests=[AWL=-0.023, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 7sDP89jb6Rl6 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 21:43:17 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 251EA3A6DAE for <hybi@ietf.org>; Sun, 16 Jan 2011 21:43:13 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0H5jf0A014657; Mon, 17 Jan 2011 06:45:41 +0100
Date: Mon, 17 Jan 2011 06:45:41 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110117054541.GI13161@1wt.eu>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 05:43:17 -0000

On Sun, Jan 16, 2011 at 03:34:10PM -0800, Adam Barth wrote:
> We've been over this Willy.  "GET\n" is not an attack.

I simply disagree with you on this point. While it was speculated that
it was possible that an intermediary would try to skip garbage to find
a request, we still have not find such one and several of us have strong
reasons to believe they don't exist at all.

However I have given an example of intemediaries that accept "GET\n" as
a valid request and even turn it into a complete HTTP/1.1 request when
forwarding it. This one really exists, it's called Apache. And it's even
possible that other ones do exist.

Other participants will surely understand that I'm more concerned about
preventing an existing intermediary from finding a request where there
should not be one rather than trying to randomize a stream so that we're
sure an attacker cannot make a request appear where no known intermediary
looks for it.

Regards,
Willy


From mjs@apple.com  Sun Jan 16 23:05:48 2011
Return-Path: <mjs@apple.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 F00503A6C69 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 23:05:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.546
X-Spam-Level: 
X-Spam-Status: No, score=-106.546 tagged_above=-999 required=5 tests=[AWL=0.053, BAYES_00=-2.599, 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 iFYGzZr1A-LU for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 23:05:47 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id DAF4A3A6E77 for <hybi@ietf.org>; Sun, 16 Jan 2011 23:05:46 -0800 (PST)
Received: from relay12.apple.com (relay12.apple.com [17.128.113.53]) by mail-out3.apple.com (Postfix) with ESMTP id 83736C7DE0CF for <hybi@ietf.org>; Sun, 16 Jan 2011 23:08:20 -0800 (PST)
X-AuditID: 11807135-b7be9ae000006bf6-c4-4d33eae48275
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay12.apple.com (Apple SCV relay) with SMTP id 9E.87.27638.4EAE33D4; Sun, 16 Jan 2011 23:08:20 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.56.201] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LF5009DNNTV8T60@elliott.apple.com> for hybi@ietf.org; Sun, 16 Jan 2011 23:08:20 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110117054541.GI13161@1wt.eu>
Date: Sun, 16 Jan 2011 23:08:18 -0800
Message-id: <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 07:05:48 -0000

On Jan 16, 2011, at 9:45 PM, Willy Tarreau wrote:

> On Sun, Jan 16, 2011 at 03:34:10PM -0800, Adam Barth wrote:
>> We've been over this Willy.  "GET\n" is not an attack.
> 
> I simply disagree with you on this point. While it was speculated that
> it was possible that an intermediary would try to skip garbage to find
> a request, we still have not find such one and several of us have strong
> reasons to believe they don't exist at all.
> 
> However I have given an example of intemediaries that accept "GET\n" as
> a valid request and even turn it into a complete HTTP/1.1 request when
> forwarding it. This one really exists, it's called Apache. And it's even
> possible that other ones do exist.
> 
> Other participants will surely understand that I'm more concerned about
> preventing an existing intermediary from finding a request where there
> should not be one rather than trying to randomize a stream so that we're
> sure an attacker cannot make a request appear where no known intermediary
> looks for it.

To successfully pull off cache poisoning, you need to convince the intermediary that the request is being sent to the victim's host, not the attacker's host. This requires an attacker-controlled Host header. If the server thinks the request is being sent to the attacker's host, then no meaningful cache poisoning attack is possible.

Regards,
Maciej
 

From w@1wt.eu  Sun Jan 16 23:34:54 2011
Return-Path: <w@1wt.eu>
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 23A1E3A6E50 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 23:34:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.066
X-Spam-Level: 
X-Spam-Status: No, score=-2.066 tagged_above=-999 required=5 tests=[AWL=-0.023, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 EmvxD-ttxpy6 for <hybi@core3.amsl.com>; Sun, 16 Jan 2011 23:34:53 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 00C803A6C3C for <hybi@ietf.org>; Sun, 16 Jan 2011 23:34:52 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0H7bLDv014950; Mon, 17 Jan 2011 08:37:21 +0100
Date: Mon, 17 Jan 2011 08:37:21 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110117073721.GJ13161@1wt.eu>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 07:34:54 -0000

Hi Maciej,

On Sun, Jan 16, 2011 at 11:08:18PM -0800, Maciej Stachowiak wrote:
> To successfully pull off cache poisoning, you need to convince the
> intermediary that the request is being sent to the victim's host,
> not the attacker's host. This requires an attacker-controlled Host header.
> If the server thinks the request is being sent to the attacker's host,
> then no meaningful cache poisoning attack is possible.

No Adam proved the opposite in his paper, that was the real point of the
initial discussion BTW : there are intermediaries that only rely on the
destination IP address and which use the Host header as a cache index
key.

For instance, let's admit I'm the attacker, hosted at my-preferred-hsp.
This hosting provider has a front reverse proxy that acts like the ones
Adam has spotted in his study, which means that it does not route based
on the Host header. It supports HTTP/0.9 requests just like Apache, and
has a default host configured to match the provider's portal (which makes
sense in order to direct all unknown hosts to the point where he can
advertise his service).

Then by sending a "GET\n" after a successful 101 response over an already
established connection, the request would be turned into "GET / HTTP/1.1\r\n
Host: my-preferred-hsp\r\n\r\n" and my server behind it has control over
the response traffic.

I'm not making this up, this was precisely the point of Adam's paper.

Alternatively if we all agree that the risk of this appearing is quite low
and it's not our problem, then let's get away with this masking hassle. But
it looks like browser vendors will feel more comfortable with masking now
that we managed to scare them.

Regards,
Willy


From ietf@adambarth.com  Mon Jan 17 00:42:01 2011
Return-Path: <ietf@adambarth.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 2951A3A6EB8 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 00:42:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.79
X-Spam-Level: 
X-Spam-Status: No, score=-3.79 tagged_above=-999 required=5 tests=[AWL=-0.813,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 hsM6pwDPLwSE for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 00:42:00 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 1CDA63A6E6B for <hybi@ietf.org>; Mon, 17 Jan 2011 00:42:00 -0800 (PST)
Received: by gwj17 with SMTP id 17so2081996gwj.31 for <hybi@ietf.org>; Mon, 17 Jan 2011 00:44:33 -0800 (PST)
Received: by 10.150.157.14 with SMTP id f14mr4039345ybe.265.1295253873161; Mon, 17 Jan 2011 00:44:33 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id j64sm2538886yha.28.2011.01.17.00.44.31 (version=SSLv3 cipher=RC4-MD5); Mon, 17 Jan 2011 00:44:31 -0800 (PST)
Received: by iyi42 with SMTP id 42so4818704iyi.31 for <hybi@ietf.org>; Mon, 17 Jan 2011 00:44:30 -0800 (PST)
Received: by 10.231.199.12 with SMTP id eq12mr3884072ibb.2.1295253870634; Mon, 17 Jan 2011 00:44:30 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Mon, 17 Jan 2011 00:44:00 -0800 (PST)
In-Reply-To: <20110117073721.GJ13161@1wt.eu>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Mon, 17 Jan 2011 00:44:00 -0800
Message-ID: <AANLkTin3w5GQ=kQJH=68cNMbauByPkrenmRtQMFRO=Ub@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 08:42:01 -0000

On Sun, Jan 16, 2011 at 11:37 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 16, 2011 at 11:08:18PM -0800, Maciej Stachowiak wrote:
>> To successfully pull off cache poisoning, you need to convince the
>> intermediary that the request is being sent to the victim's host,
>> not the attacker's host. This requires an attacker-controlled Host header.
>> If the server thinks the request is being sent to the attacker's host,
>> then no meaningful cache poisoning attack is possible.
>
> No Adam proved the opposite in his paper, that was the real point of the
> initial discussion BTW : there are intermediaries that only rely on the
> destination IP address and which use the Host header as a cache index
> key.
>
> For instance, let's admit I'm the attacker, hosted at my-preferred-hsp.
> This hosting provider has a front reverse proxy that acts like the ones
> Adam has spotted in his study, which means that it does not route based
> on the Host header. It supports HTTP/0.9 requests just like Apache, and
> has a default host configured to match the provider's portal (which makes
> sense in order to direct all unknown hosts to the point where he can
> advertise his service).
>
> Then by sending a "GET\n" after a successful 101 response over an already
> established connection, the request would be turned into "GET / HTTP/1.1\r\n
> Host: my-preferred-hsp\r\n\r\n" and my server behind it has control over
> the response traffic.
>
> I'm not making this up, this was precisely the point of Adam's paper.

Please don't put words in my mouth.

Kind regards,
Adam


> Alternatively if we all agree that the risk of this appearing is quite low
> and it's not our problem, then let's get away with this masking hassle. But
> it looks like browser vendors will feel more comfortable with masking now
> that we managed to scare them.
>
> Regards,
> Willy
>
>

From a.catel@weelya.com  Mon Jan 17 00:48:44 2011
Return-Path: <a.catel@weelya.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 565183A6E9D for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 00:48:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.249
X-Spam-Level: 
X-Spam-Status: No, score=-2.249 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_FR=0.35]
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 AYaXIA6c1U5o for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 00:48:43 -0800 (PST)
Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by core3.amsl.com (Postfix) with ESMTP id 62B543A6EC3 for <hybi@ietf.org>; Mon, 17 Jan 2011 00:48:40 -0800 (PST)
Received: from paramac.local (unknown [88.171.169.45]) by smtp4-g21.free.fr (Postfix) with ESMTP id 578BB4C81BA for <hybi@ietf.org>; Mon, 17 Jan 2011 09:51:09 +0100 (CET)
Message-ID: <4D34034C.2010005@weelya.com>
Date: Mon, 17 Jan 2011 09:52:28 +0100
From: Anthony Catel <a.catel@weelya.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6
MIME-Version: 1.0
To: hybi@ietf.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] Straw-poll on Masking options
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: Mon, 17 Jan 2011 08:48:44 -0000

> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce
> security risks.
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been
> deeply discussed.
> In order to settle the question of masking and find a way forward that
> has a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and
> summarized at
> some point in the mailing list by Eric Rescorla)
>
>
> 1. a fixed mask carried entirely in the packet.
I vote for this one, even if it's far from perfect.
> 2. A longish repeated mask computed from the packet. For concreteness,
>     suppose HMAC-SHA1(<uuid>,<server-conn-key>  ||<client-conn-key>  ||
> <packet-key>), but
>     obviously there's flexibility here.
>
> 3. A fully generated mask (if so specify also what you would like to use
> e.g. AES-CTR or HMAC-SHA).
>
As a server integrator, I can't live with #2 or #3. I will not argue how 
stupid, heavy and confusing is to use a crypto solution for a 
non-secured transmition.
BTW I'm more convinced by a lightweight masking proposal (base64, 
CRLF-less masking).


Anthony C.

From tyoshino@google.com  Mon Jan 17 00:51:21 2011
Return-Path: <tyoshino@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 8DBC63A6EC3 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 00:51:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.534
X-Spam-Level: 
X-Spam-Status: No, score=-102.534 tagged_above=-999 required=5 tests=[AWL=0.442, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 gBlLZRaBoC6p for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 00:51:20 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id C038B3A6E9D for <hybi@ietf.org>; Mon, 17 Jan 2011 00:51:19 -0800 (PST)
Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id p0H8rpjA024871 for <hybi@ietf.org>; Mon, 17 Jan 2011 00:53:52 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295254432; bh=Fnnqwi2C72+NpGTHzFNiplBKUMo=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=OFSAp5S4THaM4sT6L3SIm2yCrbF4VmhfNEjDIwyQBRNvb6iiXhPIj4cs2ga7lm76C fjg9DZF6AK45riuzPmb/Q==
Received: from iyi42 (iyi42.prod.google.com [10.241.51.42]) by wpaz13.hot.corp.google.com with ESMTP id p0H8rowq025214 for <hybi@ietf.org>; Mon, 17 Jan 2011 00:53:50 -0800
Received: by iyi42 with SMTP id 42so4825289iyi.31 for <hybi@ietf.org>; Mon, 17 Jan 2011 00:53:50 -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=5UnuDxxw56Vdit45pRNpdKQmdsLaf8Or7X0fw+mrU+U=; b=BzR5tQF3KXs2jGextHSVC/Ab/KlEiNTGBPr9YAKIfQ1RL2igLx5UxnQxB17XDCJMaP gvT5ezYjitkjDhxanYVw==
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=RAiRQZsZhLnB/n56JtoiqW13vEWNyd/1iOxFoimvNlLaxZeTvFHss3Iu8hjVnAxngb t8hwiXbgRqGLlO0RYqag==
Received: by 10.231.37.74 with SMTP id w10mr3939978ibd.4.1295254430232; Mon, 17 Jan 2011 00:53:50 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.15.139 with HTTP; Mon, 17 Jan 2011 00:53:29 -0800 (PST)
In-Reply-To: <20110117073721.GJ13161@1wt.eu>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Mon, 17 Jan 2011 17:53:29 +0900
Message-ID: <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=000325572cae35321a049a06ec16
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 08:51:21 -0000

--000325572cae35321a049a06ec16
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Jan 17, 2011 at 16:37, Willy Tarreau <w@1wt.eu> wrote:

> Hi Maciej,
>
> On Sun, Jan 16, 2011 at 11:08:18PM -0800, Maciej Stachowiak wrote:
> > To successfully pull off cache poisoning, you need to convince the
> > intermediary that the request is being sent to the victim's host,
> > not the attacker's host. This requires an attacker-controlled Host
> header.
> > If the server thinks the request is being sent to the attacker's host,
> > then no meaningful cache poisoning attack is possible.
>
> No Adam proved the opposite in his paper, that was the real point of the
> initial discussion BTW : there are intermediaries that only rely on the
> destination IP address and which use the Host header as a cache index
> key.
>
> For instance, let's admit I'm the attacker, hosted at my-preferred-hsp.
> This hosting provider has a front reverse proxy that acts like the ones
> Adam has spotted in his study, which means that it does not route based
> on the Host header. It supports HTTP/0.9 requests just like Apache, and
> has a default host configured to match the provider's portal (which makes
> sense in order to direct all unknown hosts to the point where he can
> advertise his service).
>
>
I couldn't understand this part well. What does "a default host" actually
means here? Could you please tell us the name of Apache directive/module for
better understanding?

Guessing from your explanation, maybe, a host header with it's value equals
to <default host> (e.g. welcome.my-preferred-hsp.com) will be added to a
request when the proxy receives a request toward unknown-IP (i.e. not in the
HSP's mapping), and the proxy forwards it to <default host> (e.g. the server
serving welcome.my-preferred-hsp.com). Right? Though it seems that you're
talking about intercepting proxy that routes only based on the destination
IP, without rewriting the destination IP we cannot guide the request to the
place where HSP can advertise the hosting service. Just adding host header
doesn't help.


> Then by sending a "GET\n" after a successful 101 response over an already
> established connection, the request would be turned into "GET /
> HTTP/1.1\r\n
> Host: my-preferred-hsp\r\n\r\n" and my server behind it has control over
> the response traffic.
>
>
Won't this request be forwarded to the server serving
welcome.my-preferred-hsp.com as I said above? Really Apache just extract
GET\n and keep receiving response from the attacker's host?


> I'm not making this up, this was precisely the point of Adam's paper.
>
> Alternatively if we all agree that the risk of this appearing is quite low
> and it's not our problem, then let's get away with this masking hassle. But
> it looks like browser vendors will feel more comfortable with masking now
> that we managed to scare them.
>
> Regards,
> Willy
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--000325572cae35321a049a06ec16
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Mon, Jan 17, 2011 at 16:37, Willy Tarreau <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wrot=
e:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex;">

Hi Maciej,<br>
<div class=3D"im"><br>
On Sun, Jan 16, 2011 at 11:08:18PM -0800, Maciej Stachowiak wrote:<br>
&gt; To successfully pull off cache poisoning, you need to convince the<br>
&gt; intermediary that the request is being sent to the victim&#39;s host,<=
br>
&gt; not the attacker&#39;s host. This requires an attacker-controlled Host=
 header.<br>
&gt; If the server thinks the request is being sent to the attacker&#39;s h=
ost,<br>
&gt; then no meaningful cache poisoning attack is possible.<br>
<br>
</div>No Adam proved the opposite in his paper, that was the real point of =
the<br>
initial discussion BTW : there are intermediaries that only rely on the<br>
destination IP address and which use the Host header as a cache index<br>
key.<br>
<br>
For instance, let&#39;s admit I&#39;m the attacker, hosted at my-preferred-=
hsp.<br>
This hosting provider has a front reverse proxy that acts like the ones<br>
Adam has spotted in his study, which means that it does not route based<br>
on the Host header. It supports HTTP/0.9 requests just like Apache, and<br>
has a default host configured to match the provider&#39;s portal (which mak=
es<br>
sense in order to direct all unknown hosts to the point where he can<br>
advertise his service).<br>
<br></blockquote><div><br></div><div>I couldn&#39;t understand this part we=
ll. What does &quot;a default host&quot; actually means here? Could you ple=
ase tell us the name of Apache directive/module for better understanding?</=
div>

<div><br></div><div>Guessing from your explanation, maybe,=A0a host header =
with it&#39;s value equals to &lt;default host&gt; (e.g. <a href=3D"http://=
welcome.my-preferred-hsp.com">welcome.my-preferred-hsp.com</a>) will be add=
ed=A0to a request when the proxy receives a request toward unknown-IP (i.e.=
 not in the HSP&#39;s mapping), and the proxy forwards it to &lt;default ho=
st&gt; (e.g. the server serving <a href=3D"http://welcome.my-preferred-hsp.=
com">welcome.my-preferred-hsp.com</a>). Right? Though it seems that you&#39=
;re talking about intercepting proxy that routes only based on the destinat=
ion IP, without rewriting the destination IP we cannot guide the request to=
 the place where HSP can advertise the hosting service. Just adding host he=
ader doesn&#39;t help.</div>

<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;">
Then by sending a &quot;GET\n&quot; after a successful 101 response over an=
 already<br>
established connection, the request would be turned into &quot;GET / HTTP/1=
.1\r\n<br>
Host: my-preferred-hsp\r\n\r\n&quot; and my server behind it has control ov=
er<br>
the response traffic.<br>
<br></blockquote><div><br></div><div>Won&#39;t this request be forwarded to=
 the server serving <a href=3D"http://welcome.my-preferred-hsp.com">welcome=
.my-preferred-hsp.com</a> as I said above? Really Apache just extract GET\n=
 and keep receiving response from the attacker&#39;s host?</div>

<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;">
I&#39;m not making this up, this was precisely the point of Adam&#39;s pape=
r.<br>
<br>
Alternatively if we all agree that the risk of this appearing is quite low<=
br>
and it&#39;s not our problem, then let&#39;s get away with this masking has=
sle. But<br>
it looks like browser vendors will feel more comfortable with masking now<b=
r>
that we managed to scare them.<br>
<br>
Regards,<br>
<font color=3D"#888888">Willy<br>
</font><div><div></div><div class=3D"h5"><br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br>

--000325572cae35321a049a06ec16--

From tyoshino@google.com  Mon Jan 17 01:11:08 2011
Return-Path: <tyoshino@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 2673E28C0E3 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 01:11:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.605
X-Spam-Level: 
X-Spam-Status: No, score=-102.605 tagged_above=-999 required=5 tests=[AWL=0.071, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 z0m6wh28S2RN for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 01:10:54 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 92E4E28B56A for <hybi@ietf.org>; Mon, 17 Jan 2011 01:10:51 -0800 (PST)
Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p0H9DOS9011294 for <hybi@ietf.org>; Mon, 17 Jan 2011 01:13:24 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295255604; bh=oZIxKYi980XbSFrPwlbWf6tsdk8=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=htOTSqsBi2VChrTrhfEpFHhggAeP6AC6zHrl/gGXDNMCqYE2Cm3+rRIk7QejyVf2l Fti7OUYmRze6jvvAhfMKg==
Received: from iye19 (iye19.prod.google.com [10.241.50.19]) by kpbe14.cbf.corp.google.com with ESMTP id p0H9DMUX004909 for <hybi@ietf.org>; Mon, 17 Jan 2011 01:13:23 -0800
Received: by iye19 with SMTP id 19so5041777iye.32 for <hybi@ietf.org>; Mon, 17 Jan 2011 01:13:22 -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=1+2X4cu9vLNZvzwZWTRg/QvArZyyuHhU09oH7N4id6w=; b=EqOVMlLsA8DkpK+E/dOv28HjRaOjvJxrfKj1ec6/6GJWKIlChXHnKMfRW4TH9zEnWt kPTmFYZRtOTBHfdPaG+w==
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=Ivs8v5YDH8Hx6CUCfWEIDqSQi3rrK3XcscCCCBEYYw+a1b0TQlVj8k8Wfe/9UWNLIo eIHe/5zQL9x0kCOfguEw==
Received: by 10.231.40.3 with SMTP id i3mr3907989ibe.129.1295255602603; Mon, 17 Jan 2011 01:13:22 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.15.139 with HTTP; Mon, 17 Jan 2011 01:13:02 -0800 (PST)
In-Reply-To: <604CFC39-28A2-4E88-B80A-6FCD1FEC7E07@tomasf.se>
References: <604CFC39-28A2-4E88-B80A-6FCD1FEC7E07@tomasf.se>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Mon, 17 Jan 2011 18:13:02 +0900
Message-ID: <AANLkTi=Hi8cT_HzArySxQ1=As2gqQfdyb7_C8Ae1Yfnj@mail.gmail.com>
To: =?ISO-8859-1?Q?Tomas_Franz=E9n?= <tomas@tomasf.se>
Content-Type: multipart/alternative; boundary=0003255749261629e1049a0732d1
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Base64-like masking (Was: Straw-poll on Masking options)
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: Mon, 17 Jan 2011 09:11:08 -0000

--0003255749261629e1049a0732d1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Sat, Jan 15, 2011 at 07:07, Tomas Franz=E9n <tomas@tomasf.se> wrote:

> On 14 jan 2011, at 21.33, Willy Tarreau wrote:
> > On Fri, Jan 14, 2011 at 10:57:19AM -0800, Joshua Bell wrote:
> >>
> >> If we're considering options that sacrifice message length for securit=
y,
> do
> >> we also need to consider an option where the (unencoded) payload lengt=
h
> is
> >> sent as something other than a network-order 63-bit integer, to avoid
> >> attacks where "GET /" is encoded into the length?
> >
> > Cheap maskings such as XOR or Base64 can probably afford having the
> > framing masked. With XOR it's trivial, with Base64, we need to base64
> > decode the 2nd and third characters to know what framing length is
> > used. I agree it's not much convenient but still trivially easy to
> > do.
>
> I noticed draft 00 had a 0xFF frame terminator. I didn't follow this list
> back then (and didn't find anything relevant in archives), so I don't kno=
w
> what the reason was for switching to a length field. Was it merely to
> support binary data payloads?


Basically, yes. IIRC, we had consensus on that 1) we should support binary
frame and 2) we should have only one framing method for simplicity. So, HyB=
i
draft 01 has length header. One benefit of having length header is that
knowing length in advance helps the receiver allocate buffer for receiving
at once.


> With a limited set of possible byte values in something like Base64, havi=
ng
> a special terminator like that would work again. That way, we wouldn't ne=
ed
> a length field, right?
>
> Tomas
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--0003255749261629e1049a0732d1
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sat, Jan 15, 2011 at 07:07, Tomas Franz=E9n <=
span dir=3D"ltr">&lt;<a href=3D"mailto:tomas@tomasf.se" target=3D"_blank">t=
omas@tomasf.se</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


On 14 jan 2011, at 21.33, Willy Tarreau wrote:<br>
&gt; On Fri, Jan 14, 2011 at 10:57:19AM -0800, Joshua Bell wrote:<br>
&gt;&gt;<br>
&gt;&gt; If we&#39;re considering options that sacrifice message length for=
 security, do<br>
&gt;&gt; we also need to consider an option where the (unencoded) payload l=
ength is<br>
&gt;&gt; sent as something other than a network-order 63-bit integer, to av=
oid<br>
&gt;&gt; attacks where &quot;GET /&quot; is encoded into the length?<br>
&gt;<br>
&gt; Cheap maskings such as XOR or Base64 can probably afford having the<br=
>
&gt; framing masked. With XOR it&#39;s trivial, with Base64, we need to bas=
e64<br>
&gt; decode the 2nd and third characters to know what framing length is<br>
&gt; used. I agree it&#39;s not much convenient but still trivially easy to=
<br>
&gt; do.<br>
<br>
I noticed draft 00 had a 0xFF frame terminator. I didn&#39;t follow this li=
st back then (and didn&#39;t find anything relevant in archives), so I don&=
#39;t know what the reason was for switching to a length field. Was it mere=
ly to support binary data payloads?</blockquote>


<div><br></div><div>Basically, yes. IIRC, we had consensus on that 1) we sh=
ould support binary frame and 2) we should have only one framing method for=
 simplicity. So, HyBi draft 01 has length header. One benefit of having len=
gth header is that knowing length in advance helps the receiver allocate bu=
ffer for receiving at once.</div>

<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"> With a limited set of possibl=
e byte values in something like Base64, having a special terminator like th=
at would work again. That way, we wouldn&#39;t need a length field, right?<=
br>



<br>
Tomas<br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</blockquote></div><br>

--0003255749261629e1049a0732d1--

From w@1wt.eu  Mon Jan 17 01:15:28 2011
Return-Path: <w@1wt.eu>
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 69F4E3A6D1E for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 01:15:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.066
X-Spam-Level: 
X-Spam-Status: No, score=-2.066 tagged_above=-999 required=5 tests=[AWL=-0.023, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 YZLpw0FN19Rq for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 01:15:27 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id E31803A6D1A for <hybi@ietf.org>; Mon, 17 Jan 2011 01:15:26 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0H9Htk6015458; Mon, 17 Jan 2011 10:17:55 +0100
Date: Mon, 17 Jan 2011 10:17:55 +0100
From: Willy Tarreau <w@1wt.eu>
To: Takeshi Yoshino <tyoshino@google.com>
Message-ID: <20110117091755.GA15349@1wt.eu>
References: <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 09:15:28 -0000

On Mon, Jan 17, 2011 at 05:53:29PM +0900, Takeshi Yoshino wrote:
> On Mon, Jan 17, 2011 at 16:37, Willy Tarreau <w@1wt.eu> wrote:
> 
> > Hi Maciej,
> >
> > On Sun, Jan 16, 2011 at 11:08:18PM -0800, Maciej Stachowiak wrote:
> > > To successfully pull off cache poisoning, you need to convince the
> > > intermediary that the request is being sent to the victim's host,
> > > not the attacker's host. This requires an attacker-controlled Host
> > header.
> > > If the server thinks the request is being sent to the attacker's host,
> > > then no meaningful cache poisoning attack is possible.
> >
> > No Adam proved the opposite in his paper, that was the real point of the
> > initial discussion BTW : there are intermediaries that only rely on the
> > destination IP address and which use the Host header as a cache index
> > key.
> >
> > For instance, let's admit I'm the attacker, hosted at my-preferred-hsp.
> > This hosting provider has a front reverse proxy that acts like the ones
> > Adam has spotted in his study, which means that it does not route based
> > on the Host header. It supports HTTP/0.9 requests just like Apache, and
> > has a default host configured to match the provider's portal (which makes
> > sense in order to direct all unknown hosts to the point where he can
> > advertise his service).
> >
> >
> I couldn't understand this part well. What does "a default host" actually
> means here? Could you please tell us the name of Apache directive/module for
> better understanding?

Just a ProxyPass directive out of a VirtualHost section.

> Guessing from your explanation, maybe, a host header with it's value equals
> to <default host> (e.g. welcome.my-preferred-hsp.com) will be added to a
> request when the proxy receives a request toward unknown-IP (i.e. not in the
> HSP's mapping), and the proxy forwards it to <default host> (e.g. the server
> serving welcome.my-preferred-hsp.com). Right?

yes

> Though it seems that you're
> talking about intercepting proxy that routes only based on the destination
> IP, without rewriting the destination IP we cannot guide the request to the
> place where HSP can advertise the hosting service. Just adding host header
> doesn't help.

That's not the point. The point is that we're adding masking because some
intermediaries have been detected whic only use the destination IP address
and don't forward based on the host header. However, they do cache based
on the host header. That means that the following handshake followed by a
data exchange over the same connection might help an attacker's server to
corrupt a cache :

   GET / HTTP/1.1
   Host: attacker.com
   Upgrade: WebSocket
   Connection: Upgrade

                            HTTP/1.1 101 Switching Protocols
                            Upgrade: WebSocket
   
   GET / HTTP/1.1
   Host: victim.com

                            HTTP/1.1 200 OK
                            <contents to inject into cache>
    
So we want to ensure that such intermediaries will not be abused by
such an HTTP-request looking stream after the handshake.

What we know till now :
  - some caches are vulnerable to the exchange above though we don't know
    which ones
  - some caches accept "GET\n" as a valid request even as the second one

So with that in mind we can't state for sure that a cache featuring both
combinations does not exist.

However we've not seen caches who happily skip garbage to find a request,
so I'm clearly not worried at all by anything looking like HTTP after
some HTTP-incompatible bytes or frames. The first bits of the initial
frames themselves might even be enough against this.

Regards,
Willy


From tyoshino@google.com  Mon Jan 17 02:22:01 2011
Return-Path: <tyoshino@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 8036F28B56A for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 02:22:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.976
X-Spam-Level: 
X-Spam-Status: No, score=-105.976 tagged_above=-999 required=5 tests=[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 yrKh3ak26wyp for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 02:22:00 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id A3D593A6E48 for <hybi@ietf.org>; Mon, 17 Jan 2011 02:21:59 -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 p0HAOWqC020173 for <hybi@ietf.org>; Mon, 17 Jan 2011 02:24:32 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295259873; bh=uxDIU2YquRYhSKTEuCo25nIQh9A=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=XVS7Tm/ApqDN/9936mGiN4ZkCoz/eztPEGBY1pZytHIXPUJz4TePkyKsSHNLD6lFX O3byDJfiofAMUU1RXsTdg==
Received: from iyj21 (iyj21.prod.google.com [10.241.51.85]) by wpaz37.hot.corp.google.com with ESMTP id p0HAOVBM026777 for <hybi@ietf.org>; Mon, 17 Jan 2011 02:24:31 -0800
Received: by iyj21 with SMTP id 21so4618168iyj.30 for <hybi@ietf.org>; Mon, 17 Jan 2011 02:24:31 -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=SDauOOoDsGezXu9wf/wms5BWth+n3KuQoMAQHeIqqy4=; b=IKg665HWX7jYh+iQ+NrCuc4p74nL/cQEz/70UzYU9Tlp0YyQlKrWZTkXATfEi5wL2g gC5c7ThJUIFF3PISyU9w==
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=FVK/UMMp3BNdQ0vJy3JdXdWovodLxf+r56UEufJ/sODiNjLOy7Sb5N+9+zaS/jQSdG pyImdUv7hqaLrG7uoO1A==
Received: by 10.231.16.132 with SMTP id o4mr3962584iba.154.1295259871202; Mon, 17 Jan 2011 02:24:31 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.15.139 with HTTP; Mon, 17 Jan 2011 02:24:11 -0800 (PST)
In-Reply-To: <20110117091755.GA15349@1wt.eu>
References: <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Mon, 17 Jan 2011 19:24:11 +0900
Message-ID: <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=0022152d7e0b83e58c049a08309c
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 10:22:01 -0000

--0022152d7e0b83e58c049a08309c
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Jan 17, 2011 at 18:17, Willy Tarreau <w@1wt.eu> wrote:

> On Mon, Jan 17, 2011 at 05:53:29PM +0900, Takeshi Yoshino wrote:
> > On Mon, Jan 17, 2011 at 16:37, Willy Tarreau <w@1wt.eu> wrote:
> >
> > > Hi Maciej,
> > >
> > > On Sun, Jan 16, 2011 at 11:08:18PM -0800, Maciej Stachowiak wrote:
> > > > To successfully pull off cache poisoning, you need to convince the
> > > > intermediary that the request is being sent to the victim's host,
> > > > not the attacker's host. This requires an attacker-controlled Host
> > > header.
> > > > If the server thinks the request is being sent to the attacker's
> host,
> > > > then no meaningful cache poisoning attack is possible.
> > >
> > > No Adam proved the opposite in his paper, that was the real point of
> the
> > > initial discussion BTW : there are intermediaries that only rely on the
> > > destination IP address and which use the Host header as a cache index
> > > key.
> > >
> > > For instance, let's admit I'm the attacker, hosted at my-preferred-hsp.
> > > This hosting provider has a front reverse proxy that acts like the ones
> > > Adam has spotted in his study, which means that it does not route based
> > > on the Host header. It supports HTTP/0.9 requests just like Apache, and
> > > has a default host configured to match the provider's portal (which
> makes
> > > sense in order to direct all unknown hosts to the point where he can
> > > advertise his service).
> > >
> > >
> > I couldn't understand this part well. What does "a default host" actually
> > means here? Could you please tell us the name of Apache directive/module
> for
> > better understanding?
>
> Just a ProxyPass directive out of a VirtualHost section.
>
>
Thanks, I checked that we can have Apache convert GET\n to e.g. GET /
HTTP/1.1\r\nHost: www.google.com\r\n\r\n with ProxyPass.


> > Guessing from your explanation, maybe, a host header with it's value
> equals
> > to <default host> (e.g. welcome.my-preferred-hsp.com) will be added to a
> > request when the proxy receives a request toward unknown-IP (i.e. not in
> the
> > HSP's mapping), and the proxy forwards it to <default host> (e.g. the
> server
> > serving welcome.my-preferred-hsp.com). Right?
>
> yes
>
> > Though it seems that you're
> > talking about intercepting proxy that routes only based on the
> destination
> > IP, without rewriting the destination IP we cannot guide the request to
> the
> > place where HSP can advertise the hosting service. Just adding host
> header
> > doesn't help.
>
> That's not the point. The point is that we're adding masking because some
> intermediaries have been detected whic only use the destination IP address
> and don't forward based on the host header. However, they do cache based
> on the host header. That means that the following handshake followed by a
> data exchange over the same connection might help an attacker's server to
> corrupt a cache :
>

agreed


>
>   GET / HTTP/1.1
>   Host: attacker.com
>   Upgrade: WebSocket
>   Connection: Upgrade
>
>                            HTTP/1.1 101 Switching Protocols
>                            Upgrade: WebSocket
>
>   GET / HTTP/1.1
>   Host: victim.com
>
>                            HTTP/1.1 200 OK
>                            <contents to inject into cache>
>
> So we want to ensure that such intermediaries will not be abused by
> such an HTTP-request looking stream after the handshake.
>
> What we know till now :
>  - some caches are vulnerable to the exchange above though we don't know
>    which ones
>  - some caches accept "GET\n" as a valid request even as the second one
>
>
What was not quite clear to me is that the proxy which converted "GET\n"
to "GET / HTTP/1.1\r\nHost: victim.com\r\n\r\n" is still asking some cache
behind it (or caching code inside itself) (which is targeted to be poisoned)
to keep talking with attacker.com. Your example above needs this assumption,
I think.
I cannot say that such software doesn't exist, but it doesn't sound
reasonable implementation.

Regards,
Takeshi


> So with that in mind we can't state for sure that a cache featuring both
> combinations does not exist.
>
> However we've not seen caches who happily skip garbage to find a request,
> so I'm clearly not worried at all by anything looking like HTTP after
> some HTTP-incompatible bytes or frames. The first bits of the initial
> frames themselves might even be enough against this.
>
> Regards,
> Willy
>
>

--0022152d7e0b83e58c049a08309c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Mon, Jan 17, 2011 at 18:17, Willy Tarreau <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wrot=
e:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">On Mon, Jan 17, 2011 at 05:53:29PM +0900, Takeshi Yoshino=
 wrote:<br>
&gt; On Mon, Jan 17, 2011 at 16:37, Willy Tarreau &lt;<a href=3D"mailto:w@1=
wt.eu">w@1wt.eu</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hi Maciej,<br>
&gt; &gt;<br>
&gt; &gt; On Sun, Jan 16, 2011 at 11:08:18PM -0800, Maciej Stachowiak wrote=
:<br>
&gt; &gt; &gt; To successfully pull off cache poisoning, you need to convin=
ce the<br>
&gt; &gt; &gt; intermediary that the request is being sent to the victim&#3=
9;s host,<br>
&gt; &gt; &gt; not the attacker&#39;s host. This requires an attacker-contr=
olled Host<br>
&gt; &gt; header.<br>
&gt; &gt; &gt; If the server thinks the request is being sent to the attack=
er&#39;s host,<br>
&gt; &gt; &gt; then no meaningful cache poisoning attack is possible.<br>
&gt; &gt;<br>
&gt; &gt; No Adam proved the opposite in his paper, that was the real point=
 of the<br>
&gt; &gt; initial discussion BTW : there are intermediaries that only rely =
on the<br>
&gt; &gt; destination IP address and which use the Host header as a cache i=
ndex<br>
&gt; &gt; key.<br>
&gt; &gt;<br>
&gt; &gt; For instance, let&#39;s admit I&#39;m the attacker, hosted at my-=
preferred-hsp.<br>
&gt; &gt; This hosting provider has a front reverse proxy that acts like th=
e ones<br>
&gt; &gt; Adam has spotted in his study, which means that it does not route=
 based<br>
&gt; &gt; on the Host header. It supports HTTP/0.9 requests just like Apach=
e, and<br>
&gt; &gt; has a default host configured to match the provider&#39;s portal =
(which makes<br>
&gt; &gt; sense in order to direct all unknown hosts to the point where he =
can<br>
&gt; &gt; advertise his service).<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; I couldn&#39;t understand this part well. What does &quot;a default ho=
st&quot; actually<br>
&gt; means here? Could you please tell us the name of Apache directive/modu=
le for<br>
&gt; better understanding?<br>
<br>
</div>Just a ProxyPass directive out of a VirtualHost section.<br>
<div class=3D"im"><br></div></blockquote><div><br></div><div>Thanks,=A0I ch=
ecked that we can have Apache convert GET\n to e.g. GET / HTTP/1.1\r\nHost:=
 <a href=3D"http://www.google.com">www.google.com</a>\r\n\r\n with ProxyPas=
s.</div>

<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;"><div class=3D"im">
&gt; Guessing from your explanation, maybe, a host header with it&#39;s val=
ue equals<br>
&gt; to &lt;default host&gt; (e.g. <a href=3D"http://welcome.my-preferred-h=
sp.com" target=3D"_blank">welcome.my-preferred-hsp.com</a>) will be added t=
o a<br>
&gt; request when the proxy receives a request toward unknown-IP (i.e. not =
in the<br>
&gt; HSP&#39;s mapping), and the proxy forwards it to &lt;default host&gt; =
(e.g. the server<br>
&gt; serving <a href=3D"http://welcome.my-preferred-hsp.com" target=3D"_bla=
nk">welcome.my-preferred-hsp.com</a>). Right?<br>
<br>
</div>yes<br>
<div class=3D"im"><br>
&gt; Though it seems that you&#39;re<br>
&gt; talking about intercepting proxy that routes only based on the destina=
tion<br>
&gt; IP, without rewriting the destination IP we cannot guide the request t=
o the<br>
&gt; place where HSP can advertise the hosting service. Just adding host he=
ader<br>
&gt; doesn&#39;t help.<br>
<br>
</div>That&#39;s not the point. The point is that we&#39;re adding masking =
because some<br>
intermediaries have been detected whic only use the destination IP address<=
br>
and don&#39;t forward based on the host header. However, they do cache base=
d<br>
on the host header. That means that the following handshake followed by a<b=
r>
data exchange over the same connection might help an attacker&#39;s server =
to<br>
corrupt a cache :<br></blockquote><div><br></div><div>agreed</div><div>=A0<=
/div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex;">
<br>
 =A0 GET / HTTP/1.1<br>
 =A0 Host: <a href=3D"http://attacker.com" target=3D"_blank">attacker.com</=
a><br>
 =A0 Upgrade: WebSocket<br>
 =A0 Connection: Upgrade<br>
<br>
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0HTTP/1.1 101 Switch=
ing Protocols<br>
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Upgrade: WebSocket<=
br>
<br>
 =A0 GET / HTTP/1.1<br>
 =A0 Host: <a href=3D"http://victim.com" target=3D"_blank">victim.com</a><b=
r>
<br>
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0HTTP/1.1 200 OK<br>
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&lt;contents to inj=
ect into cache&gt;<br>
<br></blockquote><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex;">So we want to ensure that =
such intermediaries will not be abused by<br>
such an HTTP-request looking stream after the handshake.<br>
<br>
What we know till now :<br>
 =A0- some caches are vulnerable to the exchange above though we don&#39;t =
know<br>
 =A0 =A0which ones<br>
 =A0- some caches accept &quot;GET\n&quot; as a valid request even as the s=
econd one<br>
<br></blockquote><div><br></div><div>What was not quite clear to me is that=
 the proxy which converted=A0&quot;GET\n&quot; to=A0&quot;GET / HTTP/1.1\r\=
nHost: <a href=3D"http://victim.com">victim.com</a>\r\n\r\n&quot; is still =
asking some=A0cache behind it (or=A0caching code inside itself) (which is t=
argeted to be poisoned) to keep talking with <a href=3D"http://attacker.com=
">attacker.com</a>. Your example above needs this assumption, I think.</div=
>

<div>I cannot say that such software doesn&#39;t exist, but it doesn&#39;t =
sound reasonable implementation.</div><div><br></div><div>Regards,</div><di=
v>Takeshi</div><div>=A0</div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


So with that in mind we can&#39;t state for sure that a cache featuring bot=
h<br>
combinations does not exist.<br>
<br>
However we&#39;ve not seen caches who happily skip garbage to find a reques=
t,<br>
so I&#39;m clearly not worried at all by anything looking like HTTP after<b=
r>
some HTTP-incompatible bytes or frames. The first bits of the initial<br>
frames themselves might even be enough against this.<br>
<br>
Regards,<br>
<font color=3D"#888888">Willy<br>
<br>
</font></blockquote></div><br>

--0022152d7e0b83e58c049a08309c--

From w@1wt.eu  Mon Jan 17 02:44:53 2011
Return-Path: <w@1wt.eu>
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 3864B3A6DBE for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 02:44:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.065
X-Spam-Level: 
X-Spam-Status: No, score=-2.065 tagged_above=-999 required=5 tests=[AWL=-0.022, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 Ox9vHh-qpKqw for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 02:44:52 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id E07C13A6D44 for <hybi@ietf.org>; Mon, 17 Jan 2011 02:44:51 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0HAlI68016128; Mon, 17 Jan 2011 11:47:18 +0100
Date: Mon, 17 Jan 2011 11:47:18 +0100
From: Willy Tarreau <w@1wt.eu>
To: Takeshi Yoshino <tyoshino@google.com>
Message-ID: <20110117104718.GA16088@1wt.eu>
References: <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 10:44:53 -0000

On Mon, Jan 17, 2011 at 07:24:11PM +0900, Takeshi Yoshino wrote:
> What was not quite clear to me is that the proxy which converted "GET\n"
> to "GET / HTTP/1.1\r\nHost: victim.com\r\n\r\n" is still asking some cache
> behind it (or caching code inside itself) (which is targeted to be poisoned)
> to keep talking with attacker.com. Your example above needs this assumption,
> I think.
> I cannot say that such software doesn't exist, but it doesn't sound
> reasonable implementation.

In fact it's not *my* assumption, but such unreasonable implementations
were detected during Adam's experiment, which is what finaly drove us
to talk about masking. It is very reasonable to imagine that there could
be two successive layers, the first one just rewriting the request and
the second one doing cache.

To be honnest, I'm not much concerned by that because I consider that
having this issue happen once in 4 billion connections is not useful
enough to build a valuable attack. But what I'm stating is that if we
consider this to be a problem, then we must address it for real, not
just try to slightly reduce the probabilty of it appearing. Thus I'm
claiming that is we think that XOR on a 32-bit mask is not enough,
then we must use a mechanism that completely prevents any request from
ever appearing.

That's why I'm in favor of 1) simple XOR masking, 2) base64/128 as an
alternative.

Regards,
Willy


From dave@cridland.net  Mon Jan 17 03:21:41 2011
Return-Path: <dave@cridland.net>
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 9AD9D3A6F33 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 03:21:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.55
X-Spam-Level: 
X-Spam-Status: No, score=-2.55 tagged_above=-999 required=5 tests=[AWL=0.049,  BAYES_00=-2.599]
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 5XnPtJLzii2I for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 03:21:40 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 22F923A6F2C for <hybi@ietf.org>; Mon, 17 Jan 2011 03:21:40 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id B5B28116811D; Mon, 17 Jan 2011 11:24:12 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2fec-BHAts9t; Mon, 17 Jan 2011 11:24:07 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id D47E711680FB; Mon, 17 Jan 2011 11:24:06 +0000 (GMT)
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com>
In-Reply-To: <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <2314.1295263446.878176@puncture>
Date: Mon, 17 Jan 2011 11:24:06 +0000
From: Dave Cridland <dave@cridland.net>
To: Adam Barth <ietf@adambarth.com>, Server-Initiated HTTP <hybi@ietf.org>, Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 11:21:41 -0000

On Sun Jan 16 23:34:10 2011, Adam Barth wrote:
> We've been over this Willy.  "GET\n" is not an attack.  The cost of
> performing the attack doubles with each bit you add to the attack
> string.  Anything even remotely interesting is wildly infeasible.
> It's just simple math.

Not the cost doubling. The probability halving. *That* is the simple  
maths involved. This would in turn double the cost of a dedicated  
attack, of course, but it merely halves the probablility of the same  
vulnerability being triggered accidentally.

Willy's argument is that one can reduce the probability to 0 for all  
the attacks described, and a zero probability must - by even simpler  
maths than your simple maths - be less likely to occur than a  
non-zero probability.

Now, if you extend your scope to suggesting that there are many  
"dangerous" bit-patterns possible and you don't want to risk the  
attacker being able to generate them, then the more bit patterns  
there are, the greater the probability of triggering them via random  
noise.

By describing the possible bit-patterns, we can construct a purely  
deterministic masking by which an attacker cannot produce that bit  
pattern on the wire, still reducing the probability of this occuring  
by chance to 0.

I doubt he'll make any headway on this argument, but it's entirely  
sound logic, and much simpler maths than yours.

However, he won't make any headway because you have the trump card of  
not actually explaining what these dangerous bit-patterns might be -  
we seem to have reached the point where Willy can propose a masking  
which entirely prevents any HTTP request appearing in the clear,  
which can be verified by a server, and which therefore not only  
prevents all described (and conjectured) attacks, but is also  
impossible to produce a weak implementation of, and it's still shot  
down because it "only defends against the attacks we know".

Arguing that your masking is somehow proof against something nobody's  
thought of yet is beyond the theoretical and well into the  
philosophical - I fail to see why things you haven't thought of are  
more likely to be real than things Willy hasn't thought of. Are you  
arguing that Willy's solution must be less good than yours because he  
might have more imagination?

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From a.catel@weelya.com  Mon Jan 17 03:24:20 2011
Return-Path: <a.catel@weelya.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 10CD728C0DF for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 03:24:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.249
X-Spam-Level: 
X-Spam-Status: No, score=-2.249 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_FR=0.35]
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 rSwLhCEBxxTD for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 03:24:19 -0800 (PST)
Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by core3.amsl.com (Postfix) with ESMTP id 2AB2A3A6E71 for <hybi@ietf.org>; Mon, 17 Jan 2011 03:24:17 -0800 (PST)
Received: from paramac.local (unknown [88.171.169.45]) by smtp4-g21.free.fr (Postfix) with ESMTP id CC4AC4C8147 for <hybi@ietf.org>; Mon, 17 Jan 2011 12:26:47 +0100 (CET)
Message-ID: <4D3427C5.9050404@weelya.com>
Date: Mon, 17 Jan 2011 12:28:05 +0100
From: Anthony Catel <a.catel@weelya.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6
MIME-Version: 1.0
To: hybi@ietf.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 11:24:20 -0000

I don't understand why some of you are still arguing in favour of something else than a non-CRLF-less masking
while we can have a simple, lightweight and safe CRLF-less masking solution that responds to the initial issue.

Seriously, WTF?

I vote for the light-100%-safe over the heavy-99.9%-random. You?


From yutak@google.com  Mon Jan 17 05:09:24 2011
Return-Path: <yutak@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 213E628C0D6 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 05:09:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.476
X-Spam-Level: 
X-Spam-Status: No, score=-106.476 tagged_above=-999 required=5 tests=[AWL=-3.500, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 MSh0uRP20rc2 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 05:09:23 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 0FE4828B797 for <hybi@ietf.org>; Mon, 17 Jan 2011 05:09:22 -0800 (PST)
Received: from kpbe19.cbf.corp.google.com (kpbe19.cbf.corp.google.com [172.25.105.83]) by smtp-out.google.com with ESMTP id p0HDBt2O009977 for <hybi@ietf.org>; Mon, 17 Jan 2011 05:11:56 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295269916; bh=Uqv5CWsNikXKONG5EFGF+jNTLtM=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=MkpCQsORANTS8IzIU+LpNQ6xm519+ucqKF1p3m+RWMS8pCueypqzGMKQg3nVWsbXI ux48X+61iVCQJvmzyRFdg==
Received: from gwb17 (gwb17.prod.google.com [10.200.2.17]) by kpbe19.cbf.corp.google.com with ESMTP id p0HDBsRm025965 for <hybi@ietf.org>; Mon, 17 Jan 2011 05:11:54 -0800
Received: by gwb17 with SMTP id 17so1856574gwb.16 for <hybi@ietf.org>; Mon, 17 Jan 2011 05:11:54 -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:date :message-id:subject:from:to:cc:content-type; bh=4d/lJAIesBLV/f+wnGfg6mWRUlod/PUZqTxUxJUeTjQ=; b=a3f4GXxJqq1rvTg5HTcAqEeNBb/Am02SJ10lA5Njqv5wzOLXy47pg4m8LP8jQG8SOZ kVxJNObRun2tqaSJbQqw==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=KXT6KCPcJmWBJb83lEsDdRRB5J7LIKN8OV+ZrrvMfcDy32YIdchi57EPAbGsWlHCdl Wb/jxNdSSvHUvKXDMjTQ==
MIME-Version: 1.0
Received: by 10.90.111.20 with SMTP id j20mr4704349agc.117.1295269913949; Mon, 17 Jan 2011 05:11:53 -0800 (PST)
Received: by 10.91.220.19 with HTTP; Mon, 17 Jan 2011 05:11:53 -0800 (PST)
In-Reply-To: <20110117104718.GA16088@1wt.eu>
References: <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu>
Date: Mon, 17 Jan 2011 22:11:53 +0900
Message-ID: <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com>
From: Yuta Kitamura <yutak@google.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=00163630fd771bfaad049a0a877f
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 13:09:24 -0000

--00163630fd771bfaad049a0a877f
Content-Type: text/plain; charset=ISO-8859-1

1) I don't think you have successfully shown "GET\n" is an attack. I think
you need to demonstrate that you can do something meaningful by sending
random bytes (or, by sending "GET\n" after a few gigabytes of random bytes)
in the real world configuration and measure how many percentages of users
are affected by this problem. What you have been saying is just a theory and
does not sound realistic to me.

2) BASE64 is a step backward and I'm opposed to it. As Adam mentioned, we
should not let attackers control the bytes on wire. What we need to do is to
find a generic approach to address a class of problems (cross-protocol
attacks). Avoiding "\r\n" does not sound right because it just tries to
solve a problem specific to HTTP and does not address any other attacks to
non-HTTP protocols.

Regards,
Yuta

--00163630fd771bfaad049a0a877f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

1) I don&#39;t think you have successfully shown &quot;GET\n&quot; is an at=
tack. I think you need to demonstrate that you can do something meaningful =
by sending random bytes (or, by sending &quot;GET\n&quot; after a few gigab=
ytes of random bytes) in the real world configuration and measure how many =
percentages of users are affected by this problem. What you have been sayin=
g is just a theory and does not sound realistic to me.<div>

<br></div><div>2) BASE64 is a step backward and I&#39;m opposed to it. As A=
dam mentioned, we should not let attackers control the bytes on wire. What =
we need to do is to find a generic approach to address a class of problems =
(cross-protocol attacks). Avoiding &quot;\r\n&quot; does not sound right be=
cause it just tries to solve a problem specific to HTTP and does not addres=
s any other attacks to non-HTTP protocols.</div>
<div><br></div><div>Regards,</div><div>Yuta</div><div><br></div>

--00163630fd771bfaad049a0a877f--

From dave@cridland.net  Mon Jan 17 05:53:54 2011
Return-Path: <dave@cridland.net>
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 E93BA28C0D9 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 05:53:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.551
X-Spam-Level: 
X-Spam-Status: No, score=-2.551 tagged_above=-999 required=5 tests=[AWL=0.048,  BAYES_00=-2.599]
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 zeIrbHuhwYrx for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 05:53:53 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 352CB28C0D7 for <hybi@ietf.org>; Mon, 17 Jan 2011 05:53:53 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id E98FA116811D; Mon, 17 Jan 2011 13:56:25 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ilyrG5h3fFBl; Mon, 17 Jan 2011 13:56:21 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 592DF11680FB; Mon, 17 Jan 2011 13:56:21 +0000 (GMT)
References: <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com>
In-Reply-To: <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <2314.1295272581.363859@puncture>
Date: Mon, 17 Jan 2011 13:56:21 +0000
From: Dave Cridland <dave@cridland.net>
To: Yuta Kitamura <yutak@google.com>, Server-Initiated HTTP <hybi@ietf.org>, Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 13:53:55 -0000

On Mon Jan 17 13:11:53 2011, Yuta Kitamura wrote:
> 1) I don't think you have successfully shown "GET\n" is an attack.  
> I think
> you need to demonstrate that you can do something meaningful by  
> sending
> random bytes (or, by sending "GET\n" after a few gigabytes of  
> random bytes)
> in the real world configuration and measure how many percentages of  
> users
> are affected by this problem. What you have been saying is just a  
> theory and
> does not sound realistic to me.
> 
> 
It seems to me you've misunderstood Willy's argument. He's saying  
that an initial GET\n may be an attack, on the assumption that an  
initial full request is. He's argued against a '"GET\n" after a few  
gigabytes of random bytes' being a real issue for some time - indeed,  
he's argued that it'd be impractical to write any caching  
intermediary which would recognise a request after virtually any  
non-HTTP traffic.

Given that the only test "in the real world configuration" thus far  
performed has demonstrated there already exists a way to prevent all  
HTTP attacks across the sample without masking, using this argument  
to demonstrate that masking using random data is therefore required  
places you on extremely shaky ground.


> 2) BASE64 is a step backward and I'm opposed to it. As Adam  
> mentioned, we
> should not let attackers control the bytes on wire. What we need to  
> do is to
> find a generic approach to address a class of problems  
> (cross-protocol
> attacks). Avoiding "\r\n" does not sound right because it just  
> tries to
> solve a problem specific to HTTP and does not address any other  
> attacks to
> non-HTTP protocols.

No, no, no.

The argument is:

a) Specific bit patterns on the wire can cause harm.

b) It seems probable that similar bit patterns may cause harm.

c) We should not allow attackers to produce the bit patterns in (a)  
or (b).

d) We should allow an attacker no influence on the output, and the  
output must be indistinguishable from random noise.

Now, (d) does not follow from (c), however much people repeat the  
fallacy. It is merely a way of making a deliberate attack very  
difficult.

Willy Tarreau's proposal implements (c), and in fact would protect  
against any other cross-protocol attacks where the target protocol  
relies on the presence of *any* 7-bit octets on the wire. I don't  
think any protocols remainins are vulnerable - but then, it's really  
not clear to me how one might mount a cross-protocol attack where the  
initial handling *has* to look like HTTP traffic, except for a  
cross-protocol attack on HTTP.

On the other hand, squirting purely random noise at a server will  
crash a large number of implementations, particularly of OSI based  
protocols. This in itself isn't an argument against the random  
masking, incidentally, because you'd need to find an X.400 server,  
say, which intially spoke HTTP, and moreover responded correctly to a  
WebSocket upgrade. But given that we're waaay into hypothetical  
territory, maybe I should insist that any design we do is validated  
not to be possible to use for cross-protocol attacks on X.400 MTAs.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From w@1wt.eu  Mon Jan 17 05:56:44 2011
Return-Path: <w@1wt.eu>
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 3693528C117 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 05:56:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.065
X-Spam-Level: 
X-Spam-Status: No, score=-2.065 tagged_above=-999 required=5 tests=[AWL=-0.022, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 15GujnHVBsYL for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 05:56:43 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id E310F28C0D7 for <hybi@ietf.org>; Mon, 17 Jan 2011 05:56:42 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0HDxCR8016720; Mon, 17 Jan 2011 14:59:12 +0100
Date: Mon, 17 Jan 2011 14:59:12 +0100
From: Willy Tarreau <w@1wt.eu>
To: Yuta Kitamura <yutak@google.com>
Message-ID: <20110117135912.GA16684@1wt.eu>
References: <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 13:56:44 -0000

On Mon, Jan 17, 2011 at 10:11:53PM +0900, Yuta Kitamura wrote:
> 1) I don't think you have successfully shown "GET\n" is an attack.

I don't say it's an attack, it's a request. Others have proven that a
request might become an attack with some intermediaries.

> I think
> you need to demonstrate that you can do something meaningful by sending
> random bytes (or, by sending "GET\n" after a few gigabytes of random bytes)

Oh I'm certain that this request (or any other one) after even 1 byte (eg:
\xFF) is not a valid request anymore. But it was decided differently here.
If you want my opinion, even the raw frames without any form of masking are
enough against faulty intermediaries.

> in the real world configuration and measure how many percentages of users
> are affected by this problem. What you have been saying is just a theory and
> does not sound realistic to me.

No, it's not theory. If we put a random pattern at the begining of the
handshake, 1/2^32 times this random pattern will match "GET\n". By
sending that just after a first request, we'll get a second request
to be processed by some intermediaries. The raw framing does not cause
this to happen because simply having the high bit set in the first byte
is enough to prevent an HTTP parser from matching a valid HTTP method,
or "HTTP" in the response.

> 2) BASE64 is a step backward and I'm opposed to it. As Adam mentioned, we
> should not let attackers control the bytes on wire.

The original design does not let them control *all* bits. The proposed
masking methods lets them have *any* pattern given a sufficient number
of attempts.

> What we need to do is to
> find a generic approach to address a class of problems (cross-protocol
> attacks). Avoiding "\r\n" does not sound right because it just tries to
> solve a problem specific to HTTP and does not address any other attacks to
> non-HTTP protocols.

The problem *is* specific to HTTP because the HTTP compliance of the whole
chain as well as the WebSocket compliance of the end point are verified by
the handshake. Just send a WS connection to an SMTP server, you won't get
any valid response because the maths involved in the response nonces can't
happen without a WS-specific computation.

The remaining part we're trying to solve is that some intermediaries might
be waiting for a second HTTP request after the WS handshake, so that clearly
is HTTP specific.

Regards,
Willy


From jmason@rim.com  Mon Jan 17 08:29:44 2011
Return-Path: <jmason@rim.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 3A52A3A6B94 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 08:29:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.418
X-Spam-Level: 
X-Spam-Status: No, score=-5.418 tagged_above=-999 required=5 tests=[AWL=-0.215, BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_MED=-4]
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 KthBZCxLYroV for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 08:29:43 -0800 (PST)
Received: from mhs04ykf.rim.net (mhs04ykf.rim.net [216.9.243.82]) by core3.amsl.com (Postfix) with ESMTP id 2730A3A6B91 for <hybi@ietf.org>; Mon, 17 Jan 2011 08:29:43 -0800 (PST)
X-AuditID: 0a666446-b7ba2ae000000a29-bd-4d346f1154c9
Received: from XHT110CNC.rim.net ( [10.65.22.55]) by mhs04ykf.rim.net (RIM Mail) with SMTP id 61.BB.02601.11F643D4; Mon, 17 Jan 2011 11:32:17 -0500 (EST)
Received: from XCH117CNC.rim.net ([fe80::b8df:541f:9d85:9909]) by XHT110CNC.rim.net ([fe80::d0e9:e16f:525b:55f5%11]) with mapi; Mon, 17 Jan 2011 11:32:17 -0500
From: Joe Mason <jmason@rim.com>
To: Adam Barth <ietf@adambarth.com>, Willy Tarreau <w@1wt.eu>
Date: Mon, 17 Jan 2011 11:32:16 -0500
Thread-Topic: [hybi] CRLF-less masking proposal
Thread-Index: Acu11fcH1A+sYA93TSWu2KtQ/IkDjQAjcYmA
Message-ID: <BB31C4AB95A70042A256109D4619912605CBF215@XCH117CNC.rim.net>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com>
In-Reply-To: <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
content-transfer-encoding: quoted-printable
MIME-Version: 1.0
X-Brightmail-Tracker: AAAAAgAAAZEXIZ8c
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 16:29:44 -0000

> -----Original Message-----
> From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
> Adam Barth
>
> We've been over this Willy.  "GET\n" is not an attack.

It is, however, a random connection failure. We want to avoid those too.

The obvious solution that addresses all concerns and satisfies nobody is to=
 use an XOR or AES mask, and then use Willy's algorithm to strip CRLF from t=
he random data.  I'm sure everyone's thought of that and dismissed it as bei=
ng overkill already, but I want to air the idea explicitly.

Joe

---------------------------------------------------------------------=0A=
This transmission (including any attachments) may contain confidential infor=
mation, privileged material (including material protected by the solicitor-c=
lient or other applicable privileges), or constitute non-public information.=
 Any use of this information by anyone other than the intended recipient is=
 prohibited. If you have received this transmission in error, please immedia=
tely reply to the sender and delete this information from your system. Use,=
 dissemination, distribution, or reproduction of this transmission by uninte=
nded recipients is not authorized and may be unlawful.

From zt.tmzt@gmail.com  Mon Jan 17 08:31:08 2011
Return-Path: <zt.tmzt@gmail.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 9E2B628C132 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 08:31:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[AWL=-0.001, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 0Kmzjoewq-q2 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 08:31:07 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id BACD028C11D for <hybi@ietf.org>; Mon, 17 Jan 2011 08:31:07 -0800 (PST)
Received: by qyj19 with SMTP id 19so5471853qyj.10 for <hybi@ietf.org>; Mon, 17 Jan 2011 08:33:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=OczjxRUa5r5J1P47ESo/4Vi1An8lFT4EQKcnM+D4lcw=; b=xpoXpZwedc2UccCzGOItaeT8hBRfup34mzys5e/c8BDgL3QFKS4chEME+HGe0iXZFf vB8X97yZWrQtSP1eekyAvfcMn2PVA7CQDbB+3P1BiHwPzFcgoixE5q2+V7beci9F0qz1 Mm8RMpzCatZrXy5YQzuM+pscUyID1xBwI98V8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Nc6eb60y7cwlutEmI+zirNVB8eWGhvcuanLTskSarEavAImjn9aJ5e5g9skP99DLxL 3tnOZtQjljUujAALOcyernBBdGHESibhJfkTcFK2aQI2lJHsT4jW8HkFelfru4yD8ira YY9XoAPWPpnI1jxyWQq8Xnb9zAHU8Y4q8a0Is=
MIME-Version: 1.0
Received: by 10.224.19.139 with SMTP id a11mr4036729qab.123.1295282022020; Mon, 17 Jan 2011 08:33:42 -0800 (PST)
Received: by 10.220.177.140 with HTTP; Mon, 17 Jan 2011 08:33:41 -0800 (PST)
Received: by 10.220.177.140 with HTTP; Mon, 17 Jan 2011 08:33:41 -0800 (PST)
Date: Mon, 17 Jan 2011 11:33:41 -0500
Message-ID: <AANLkTim_qTdgf+sdmN5LS_pspSvUSxUvgc+1wXfMMWL+@mail.gmail.com>
From: "zt.tmzt@gmail.com" <zt.tmzt@gmail.com>
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: multipart/alternative; boundary=0015175cb4e2ce7599049a0d5874
Subject: [hybi] 7to8 Content-encoding
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: Mon, 17 Jan 2011 16:31:08 -0000

--0015175cb4e2ce7599049a0d5874
Content-Type: text/plain; charset=ISO-8859-1

Might it make sense to treat 7to8 bit encoding as proposed for masking as
something existing below the framing entirely and use an appropriate
signaling method.

Note I'm not proposing making it optional, just making the seperation of the
masking from the inner framing clear, using langauge to the effect of:

A conforming WebSocket-0x client MUST specify Content-Encoding: */7to8bit in
the Upgrade request to a WebSocket server, and MUST upon connection send all
messages in 7to8 encoding.  A WebSocket-0x server MAY specify
Content-Encoding in the response following the Upgrade request and MAY use
an encoding when sending messages to a client.

A conforming WebSocket-0x server MUST terminate the connection if bytes not
compliant with the 7to8bit encoding are received.

--
Timothy Meade
real time web developer

--0015175cb4e2ce7599049a0d5874
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>Might it make sense to treat 7to8 bit encoding as proposed for masking a=
s something existing below the framing entirely and use an appropriate sign=
aling method.</p>
<p>Note I&#39;m not proposing making it optional, just making the seperatio=
n of the masking from the inner framing clear, using langauge to the effect=
 of:</p>
<p>A conforming WebSocket-0x client MUST specify Content-Encoding: */7to8bi=
t in the Upgrade request to a WebSocket server, and MUST upon connection se=
nd all messages in 7to8 encoding.=A0 A WebSocket-0x server MAY specify Cont=
ent-Encoding in the response following the Upgrade request and MAY use an e=
ncoding when sending messages to a client.</p>

<p>A conforming WebSocket-0x server MUST terminate the connection if bytes =
not compliant with the 7to8bit encoding are received.</p>
<p>--<br>
Timothy Meade<br>
real time web developer</p>

--0015175cb4e2ce7599049a0d5874--

From mjs@apple.com  Mon Jan 17 09:40:06 2011
Return-Path: <mjs@apple.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 32EBD28C1A2 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 09:40:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.547
X-Spam-Level: 
X-Spam-Status: No, score=-106.547 tagged_above=-999 required=5 tests=[AWL=0.052, BAYES_00=-2.599, 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 7IwfJ3IiGPdU for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 09:40:05 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 6EE9228C17C for <hybi@ietf.org>; Mon, 17 Jan 2011 09:40:05 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out4.apple.com (Postfix) with ESMTP id 5D372CC32559 for <hybi@ietf.org>; Mon, 17 Jan 2011 09:42:40 -0800 (PST)
X-AuditID: 11807130-b7cb4ae000001037-79-4d347f90fec2
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay11.apple.com (Apple SCV relay) with SMTP id 98.DF.04151.09F743D4; Mon, 17 Jan 2011 09:42:40 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.103.53] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LF600EXQH700170@et.apple.com> for hybi@ietf.org; Mon, 17 Jan 2011 09:42:40 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <2314.1295263446.878176@puncture>
Date: Mon, 17 Jan 2011 09:42:33 -0800
Message-id: <263ECB7A-A2E8-4ECF-9F2D-ABD273E54555@apple.com>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <2314.1295263446.878176@puncture>
To: Dave Cridland <dave@cridland.net>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 17:40:06 -0000

On Jan 17, 2011, at 3:24 AM, Dave Cridland wrote:

> On Sun Jan 16 23:34:10 2011, Adam Barth wrote:
>> We've been over this Willy.  "GET\n" is not an attack.  The cost of
>> performing the attack doubles with each bit you add to the attack
>> string.  Anything even remotely interesting is wildly infeasible.
>> It's just simple math.
> 
> Not the cost doubling. The probability halving. *That* is the simple maths involved. This would in turn double the cost of a dedicated attack, of course, but it merely halves the probablility of the same vulnerability being triggered accidentally.

It's not a security vulnerability if it's triggered accidentally, though it may be a bug.

Regards,
Maciej


From mjs@apple.com  Mon Jan 17 09:42:44 2011
Return-Path: <mjs@apple.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 E8EFC28C1C8 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 09:42:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.549
X-Spam-Level: 
X-Spam-Status: No, score=-106.549 tagged_above=-999 required=5 tests=[AWL=0.050, BAYES_00=-2.599, 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 N+tL7-1VUevX for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 09:42:44 -0800 (PST)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 214C428C1C6 for <hybi@ietf.org>; Mon, 17 Jan 2011 09:42:44 -0800 (PST)
Received: from relay12.apple.com (relay12.apple.com [17.128.113.53]) by mail-out4.apple.com (Postfix) with ESMTP id 1E2D0CC32842 for <hybi@ietf.org>; Mon, 17 Jan 2011 09:45:19 -0800 (PST)
X-AuditID: 11807135-b7be9ae000006bf6-40-4d34802e0466
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay12.apple.com (Apple SCV relay) with SMTP id 0E.35.27638.E20843D4; Mon, 17 Jan 2011 09:45:19 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.103.53] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LF600E0AHB60180@et.apple.com> for hybi@ietf.org; Mon, 17 Jan 2011 09:45:18 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <BB31C4AB95A70042A256109D4619912605CBF215@XCH117CNC.rim.net>
Date: Mon, 17 Jan 2011 09:45:06 -0800
Message-id: <3E50CD6B-E782-4E00-91B4-2CB553243130@apple.com>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <BB31C4AB95A70042A256109D4619912605CBF215@XCH117CNC.rim.net>
To: Joe Mason <jmason@rim.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 17:42:45 -0000

On Jan 17, 2011, at 8:32 AM, Joe Mason wrote:

>> -----Original Message-----
>> From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
>> Adam Barth
>> 
>> We've been over this Willy.  "GET\n" is not an attack.
> 
> It is, however, a random connection failure. We want to avoid those too.

I doubt it. It's easy to set up an experiment to see if different masking variants have different success rates though.

Regards,
Maciej


From mjs@apple.com  Mon Jan 17 09:53:10 2011
Return-Path: <mjs@apple.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 581CB28C1F3 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 09:53:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.55
X-Spam-Level: 
X-Spam-Status: No, score=-106.55 tagged_above=-999 required=5 tests=[AWL=0.049, BAYES_00=-2.599, 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 Dxzliie8odN1 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 09:53:09 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 7D8A528C1F2 for <hybi@ietf.org>; Mon, 17 Jan 2011 09:53:09 -0800 (PST)
Received: from relay12.apple.com (relay12.apple.com [17.128.113.53]) by mail-out4.apple.com (Postfix) with ESMTP id 80CC9CC33245 for <hybi@ietf.org>; Mon, 17 Jan 2011 09:55:44 -0800 (PST)
X-AuditID: 11807135-b7be9ae000006bf6-ec-4d3482a08b02
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay12.apple.com (Apple SCV relay) with SMTP id 5E.B7.27638.0A2843D4; Mon, 17 Jan 2011 09:55:44 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.103.53] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LF600I35HSQV100@et.apple.com> for hybi@ietf.org; Mon, 17 Jan 2011 09:55:44 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <20110117073721.GJ13161@1wt.eu>
Date: Mon, 17 Jan 2011 09:55:32 -0800
Message-id: <2B7D58A6-AD54-4385-B08D-6B2A59F95DAB@apple.com>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu>
To: Willy Tarreau <w@1wt.eu>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 17:53:10 -0000

On Jan 16, 2011, at 11:37 PM, Willy Tarreau wrote:

> Hi Maciej,
> 
> On Sun, Jan 16, 2011 at 11:08:18PM -0800, Maciej Stachowiak wrote:
>> To successfully pull off cache poisoning, you need to convince the
>> intermediary that the request is being sent to the victim's host,
>> not the attacker's host. This requires an attacker-controlled Host header.
>> If the server thinks the request is being sent to the attacker's host,
>> then no meaningful cache poisoning attack is possible.
> 
> No Adam proved the opposite in his paper, that was the real point of the
> initial discussion BTW : there are intermediaries that only rely on the
> destination IP address and which use the Host header as a cache index
> key.

The paper did not prove the opposite. It showed that some proxies which route by IP but cache by Host are vulnerable to cache poisoning. You need an attacker-controlled Host header to poison the cache of your victim's choice.

> 
> For instance, let's admit I'm the attacker, hosted at my-preferred-hsp.
> This hosting provider has a front reverse proxy that acts like the ones
> Adam has spotted in his study, which means that it does not route based
> on the Host header. It supports HTTP/0.9 requests just like Apache, and
> has a default host configured to match the provider's portal (which makes
> sense in order to direct all unknown hosts to the point where he can
> advertise his service).
> 
> Then by sending a "GET\n" after a successful 101 response over an already
> established connection, the request would be turned into "GET / HTTP/1.1\r\n
> Host: my-preferred-hsp\r\n\r\n" and my server behind it has control over
> the response traffic.

Should this scenario occur, you can temporarily deface your hosting provider's homepage, but you can't mount cache poisoning on an arbitrary host of your choice. A more realistic attack scenario would be at minimum "GET / HTTP/1.1\nHost: a\n", which is 22 characters, or 176 bits. That's granting the generous assumption that you're attacking a single-character host. 

> I'm not making this up, this was precisely the point of Adam's paper.

I don't believe that was the point of Adam's paper at all.

> 
> Alternatively if we all agree that the risk of this appearing is quite low
> and it's not our problem, then let's get away with this masking hassle. But
> it looks like browser vendors will feel more comfortable with masking now
> that we managed to scare them.

Being dismissive of security concerns doesn't help your case.

Regards,
Maciej


From hcommowick@exosec.fr  Mon Jan 17 09:54:33 2011
Return-Path: <hcommowick@exosec.fr>
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 C47EB28C1E7 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 09:54:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.562
X-Spam-Level: 
X-Spam-Status: No, score=-1.562 tagged_above=-999 required=5 tests=[AWL=0.076,  BAYES_00=-2.599, HELO_EQ_FR=0.35, HOST_MISMATCH_NET=0.311, MIME_8BIT_HEADER=0.3]
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 3yKPjHLkZaIT for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 09:54:32 -0800 (PST)
Received: from mx1.exosec.fr (exo1066.net2.nerim.net [213.41.175.60]) by core3.amsl.com (Postfix) with ESMTP id 23AD528C1EF for <hybi@ietf.org>; Mon, 17 Jan 2011 09:54:32 -0800 (PST)
Date: Mon, 17 Jan 2011 18:57:06 +0100
From: =?ISO-8859-1?Q?Herv=E9?= COMMOWICK <hcommowick@exosec.fr>
To: hybi@ietf.org
Message-ID: <20110117185706.55c09c4e@tosh>
In-Reply-To: <20110116211502.GH13161@1wt.eu>
References: <20110116211502.GH13161@1wt.eu>
Organization: Exosec
X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; x86_64-unknown-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: Re: [hybi] Straw-poll on Masking options
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: Mon, 17 Jan 2011 17:54:33 -0000

If i have to made of choice, based on my current experience, I think
HMAC/AES proposal will quickly become as hell for little/medium shared
hosting supplier, because they will need more and more CPU, that he
will not be able to afford so quickly as his bandwith.=20
Furthermore, this will add sizeable latency where we really want to be
as quick as possible. The matter of this kind of protocol *in my
opinion* is to be able to be handled nearly at the speed of the media,
as there will be additional processing for each request, and it is
nearly impossible for small packet with HMAC.

So, i vote for proposal 1, which is sufficient in term of security and
address the main goal of this poll.

Regards,

Herv=E9.

On Wed, 12 Jan 2011 21:00:35 +0100
Salvatore Loreto <salvatore.loreto at ericsson.com> wrote:
>=20
> Hi all,
>=20
>=20
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to
> reduce security risks.
>=20
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and
> disadvantages, as well as the legal implications of each method
> have already been deeply discussed.
>=20
> In order to settle the question of masking and find a way forward
> that has a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and=20
> summarized at
> some point in the mailing list by Eric Rescorla)
>=20
>=20
> 1. a fixed mask carried entirely in the packet.
>=20
> 2. A longish repeated mask computed from the packet. For
> concreteness, suppose HMAC-SHA1(<uuid>, <server-conn-key> ||
> <client-conn-key> || <packet-key>), but
>    obviously there's flexibility here.
>=20
> 3. A fully generated mask (if so specify also what you would like
> to use e.g. AES-CTR or HMAC-SHA).
>=20
>=20
> Please indicate your preference(s) or the one can meet your bar for
> "I could live with that";
> In the case you have more then one, please put the choices in a=20
> preference order.
>=20
> This poll will run until January 18th.
>=20
> cheers
> /Sal
>=20
> --=20
> Salvatore Loreto
> www.sloreto.com
>=20
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>=20

--=20
Herv=E9 COMMOWICK, EXOSEC (http://www.exosec.fr/)
ZAC des Metz - 3 Rue du petit robinson - 78350 JOUY EN JOSAS
Tel: +33 1 30 67 60 65  -  Fax: +33 1 75 43 40 70
mailto:hcommowick@exosec.fr

From w@1wt.eu  Mon Jan 17 10:50:54 2011
Return-Path: <w@1wt.eu>
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 E48A828C10A for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 10:50:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.065
X-Spam-Level: 
X-Spam-Status: No, score=-2.065 tagged_above=-999 required=5 tests=[AWL=-0.022, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 zZLYFPFPKhQi for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 10:50:54 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 3FEC83A6D1F for <hybi@ietf.org>; Mon, 17 Jan 2011 10:50:53 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0HIrJf1018284; Mon, 17 Jan 2011 19:53:19 +0100
Date: Mon, 17 Jan 2011 19:53:18 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110117185318.GA18217@1wt.eu>
References: <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <2B7D58A6-AD54-4385-B08D-6B2A59F95DAB@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <2B7D58A6-AD54-4385-B08D-6B2A59F95DAB@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 18:50:55 -0000

On Mon, Jan 17, 2011 at 09:55:32AM -0800, Maciej Stachowiak wrote:
> > Then by sending a "GET\n" after a successful 101 response over an already
> > established connection, the request would be turned into "GET / HTTP/1.1\r\n
> > Host: my-preferred-hsp\r\n\r\n" and my server behind it has control over
> > the response traffic.
> 
> Should this scenario occur, you can temporarily deface your hosting provider's homepage, but you can't mount cache poisoning on an arbitrary host of your choice.

I never said the opposite. But I find it surprizing that we should consider
that this is not a security issue to take into account while the ability
for someone to make a request appear after several gigabytes of garbage
when we're already sure that noone will look there is an issue...

> Being dismissive of security concerns doesn't help your case.

I'm not being dismissive, I'm trying to be pragmatic. We are focusing on
issues that nobody can seriously describe in details, but the ones that
are possibly smaller but more realistic because they involve existing
components are dismissed.

Sometimes I feel like we're thinking "well, let's have crypto there, what
issue could we solve with it, and under what condition might the issue
appear ?".

Crypto should not be a goal but a solution. Till now there is no much
problem.

Regards,
Willy


From jamie@shareable.org  Mon Jan 17 11:46:03 2011
Return-Path: <jamie@shareable.org>
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 5F1163A6E0A for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 11:46:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.725
X-Spam-Level: 
X-Spam-Status: No, score=-2.725 tagged_above=-999 required=5 tests=[AWL=-0.127, BAYES_00=-2.599, WEIRD_PORT=0.001]
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 ENuXuhdym2Kq for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 11:46:02 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 29DFE3A6DB6 for <hybi@ietf.org>; Mon, 17 Jan 2011 11:46:02 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Pev3w-0008Vd-Fa; Mon, 17 Jan 2011 19:48:24 +0000
Date: Mon, 17 Jan 2011 19:48:24 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <w@1wt.eu>
Message-ID: <20110117194824.GA30268@shareable.org>
References: <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110117104718.GA16088@1wt.eu>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 19:46:03 -0000

Willy Tarreau wrote:
> On Mon, Jan 17, 2011 at 07:24:11PM +0900, Takeshi Yoshino wrote:
> > What was not quite clear to me is that the proxy which converted "GET\n"
> > to "GET / HTTP/1.1\r\nHost: victim.com\r\n\r\n" is still asking some cache
> > behind it (or caching code inside itself) (which is targeted to be poisoned)
> > to keep talking with attacker.com. Your example above needs this assumption,
> > I think.
> > I cannot say that such software doesn't exist, but it doesn't sound
> > reasonable implementation.
> 
> In fact it's not *my* assumption, but such unreasonable implementations
> were detected during Adam's experiment, which is what finaly drove us
> to talk about masking. It is very reasonable to imagine that there could
> be two successive layers, the first one just rewriting the request and
> the second one doing cache.

>From a user browser security POV, I would also worry about the
numerous script proxies and other 'personal protection' cheap
products, that presumably people install onto client machines and
client gateways (affecting other people) from time to time.  Most of
them seem to advertise themselves as ad-blockers and such.  From the
few HTTP parsers whose code I've read, I don't have a lot of
confidence in them not doing something overly-"helpful" like Apache.

There are a great many very permissive, sloppy HTTP parsers around,
many of them skipping whitespace anywhere, ignoring case, some even
ignore the method name (I've seen one that tests "is it POST?
otherwise assume GET"), and matching using regular expressions with no
error checking, or the most minimal C that works.

It would be nice if such things weren't client side proxies.  But a
quick Google just now revealed (a) it's really easy to write and
deploy quick'n'dirty proxies in Perl, Python etc.  I have no doubt
some of these are used on networks because the admin felt the need,
where the browser user can't be blamed.  (b) Google led me straight
away to a list of 37 proxies written in Python linked from one page,
most of them client-side.  Many of them billed as ad-blockers and
such, so possibly targetting users who don't write code themselves.

I have no idea how many are deployed, or how many are deployed on
gateways affecting users who didn't ask for it.

Where they are installed on the client or client's local network,
there's a fairly good chance they will be forwarding to one or even
two transparent caching proxies on the way to the origin server (ISP's
forward proxy and site's reverse proxy).


Regarding the Apache configuration as a client side transparent proxy:
I know this has existed; I've seen it used on a client network gateway.

It's easier to configure than Squid, quite versatile, and fits well if
you're using Apache already on the gateway machine (which seems to be
very common in small business environments).  Google reveals that
Apache does get used in that way; I don't know how much.

A 'default host' is explicitly configurable, so presumably some people
do use it.  From the online docs of Apache httpd 2.2:

   ProxyDomain Directive
   Description:	Default domain name for proxied requests
   Syntax:	ProxyDomain Domain
   Context:	server config, virtual host
   Status:	Extension
   Module:	mod_proxy

   This directive is only useful for Apache proxy servers within
   intranets. The ProxyDomain directive specifies the default domain
   which the apache proxy server will belong to. If a request to a host
   without a domain name is encountered, a redirection response to the
   same host with the configured Domain appended will be generated.
   Example

   ProxyRemote * http://firewall.example.com:81
   NoProxy .example.com 192.168.112.0/21
   ProxyDomain .example.com

I don't know if by "redirection" that means an internal redirect
(i.e. converting the request internally before forwarding) or a 3xx.

Anyway, Willy has shown that Apache does convert "GET\n" and forward
in some cases; maybe different from the above one.  If Apache uses the
system hostname for that, it's moderately likely to be the domain of
a web site, internet-facing or intranet.

-- Jamie

From jamie@shareable.org  Mon Jan 17 11:58:02 2011
Return-Path: <jamie@shareable.org>
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 B598728C174 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 11:58:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Level: 
X-Spam-Status: No, score=-2.72 tagged_above=-999 required=5 tests=[AWL=-0.121,  BAYES_00=-2.599]
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 WX03tHgGoiZC for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 11:58:01 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 9041D3A6DB6 for <hybi@ietf.org>; Mon, 17 Jan 2011 11:58:01 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PevFg-00007p-0L; Mon, 17 Jan 2011 20:00:32 +0000
Date: Mon, 17 Jan 2011 20:00:31 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <w@1wt.eu>
Message-ID: <20110117200031.GB30268@shareable.org>
References: <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <20110117135912.GA16684@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110117135912.GA16684@1wt.eu>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 19:58:03 -0000

Willy Tarreau wrote:
> On Mon, Jan 17, 2011 at 10:11:53PM +0900, Yuta Kitamura wrote:
> > 1) I don't think you have successfully shown "GET\n" is an attack.
> 
> I don't say it's an attack, it's a request. Others have proven that a
> request might become an attack with some intermediaries.
> 
> > I think
> > you need to demonstrate that you can do something meaningful by sending
> > random bytes (or, by sending "GET\n" after a few gigabytes of random bytes)
> 
> Oh I'm certain that this request (or any other one) after even 1 byte (eg:
> \xFF) is not a valid request anymore. But it was decided differently here.
> If you want my opinion, even the raw frames without any form of masking are
> enough against faulty intermediaries.
> 
> > in the real world configuration and measure how many percentages of users
> > are affected by this problem. What you have been saying is just a theory and
> > does not sound realistic to me.
> 
> No, it's not theory. If we put a random pattern at the begining of the
> handshake, 1/2^32 times this random pattern will match "GET\n". By
> sending that just after a first request, we'll get a second request
> to be processed by some intermediaries. The raw framing does not cause
> this to happen because simply having the high bit set in the first byte
> is enough to prevent an HTTP parser from matching a valid HTTP method,
> or "HTTP" in the response.

Fwiw, there are proxies around whose HTTP parser will match the first
byte with the high bit set as part of the method name.  Hopefully it
doesn't matter.

I would really like to see a better effort to "fast fail reliably"
with bogus proxies so it's quicker to fallback to a different method
than WebSocket, and a CRC, MAC or something to protect against any
which mostly forward the data (so connection appears to work) but
randomly mangle it later.

> > 2) BASE64 is a step backward and I'm opposed to it. As Adam mentioned, we
> > should not let attackers control the bytes on wire.
> 
> The original design does not let them control *all* bits. The proposed
> masking methods lets them have *any* pattern given a sufficient number
> of attempts.

The solution to both concerns is to *combine* strong hashing (AES-CTR
etc.)  *and* escaping plausible HTTP request character sequences.

I don't like that because I think it's a strange thing to be
encrypting for some kind of half-security when you've selected *not*
to use a secure connection (i.e. not TLS).

But it's the technical solution to both concerns, and it has negligable
overhead (compared with AES or SHA in the first place.)

> > What we need to do is to
> > find a generic approach to address a class of problems (cross-protocol
> > attacks). Avoiding "\r\n" does not sound right because it just tries to
> > solve a problem specific to HTTP and does not address any other attacks to
> > non-HTTP protocols.
> 
> The problem *is* specific to HTTP because the HTTP compliance of the whole
> chain as well as the WebSocket compliance of the end point are verified by
> the handshake. Just send a WS connection to an SMTP server, you won't get
> any valid response because the maths involved in the response nonces can't
> happen without a WS-specific computation.
> 
> The remaining part we're trying to solve is that some intermediaries might
> be waiting for a second HTTP request after the WS handshake, so that clearly
> is HTTP specific.

I suppose you could make a WebSocket connection to the FTP command
port going through a NAT router that forwards all the bytes, so the WS
handshake succeeds, and then later mangles a few bytes because it's
substituting anything that looks like an text IP address in the stream.

Of course you wouldn't connect to the FTP port, but you might use some
other port than a NAT just happens to think is a good one to mangle
because it's also used by something else.

-- Jamie

From jamie@shareable.org  Mon Jan 17 12:18:11 2011
Return-Path: <jamie@shareable.org>
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 2F42D3A6F55 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 12:18:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.715
X-Spam-Level: 
X-Spam-Status: No, score=-2.715 tagged_above=-999 required=5 tests=[AWL=-0.116, BAYES_00=-2.599]
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 9RkaXka0abEM for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 12:18:10 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id D9B663A6F51 for <hybi@ietf.org>; Mon, 17 Jan 2011 12:18:09 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PevZC-0000EO-FX; Mon, 17 Jan 2011 20:20:42 +0000
Date: Mon, 17 Jan 2011 20:20:42 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Dave Cridland <dave@cridland.net>
Message-ID: <20110117202042.GC30268@shareable.org>
References: <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <2314.1295272581.363859@puncture>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <2314.1295272581.363859@puncture>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 20:18:11 -0000

Dave Cridland wrote:
> On Mon Jan 17 13:11:53 2011, Yuta Kitamura wrote:
> >1) I don't think you have successfully shown "GET\n" is an attack.  
> >I think
> >you need to demonstrate that you can do something meaningful by  
> >sending
> >random bytes (or, by sending "GET\n" after a few gigabytes of  
> >random bytes)
> >in the real world configuration and measure how many percentages of  
> >users
> >are affected by this problem. What you have been saying is just a  
> >theory and
> >does not sound realistic to me.
> >
> >
> It seems to me you've misunderstood Willy's argument. He's saying  
> that an initial GET\n may be an attack, on the assumption that an  
> initial full request is. He's argued against a '"GET\n" after a few  
> gigabytes of random bytes' being a real issue for some time - indeed,  
> he's argued that it'd be impractical to write any caching  
> intermediary which would recognise a request after virtually any  
> non-HTTP traffic.
> 
> Given that the only test "in the real world configuration" thus far  
> performed has demonstrated there already exists a way to prevent all  
> HTTP attacks across the sample without masking, using this argument  
> to demonstrate that masking using random data is therefore required  
> places you on extremely shaky ground.
> 
> 
> >2) BASE64 is a step backward and I'm opposed to it. As Adam  
> >mentioned, we
> >should not let attackers control the bytes on wire. What we need to  
> >do is to
> >find a generic approach to address a class of problems  
> >(cross-protocol
> >attacks). Avoiding "\r\n" does not sound right because it just  
> >tries to
> >solve a problem specific to HTTP and does not address any other  
> >attacks to
> >non-HTTP protocols.
> 
> No, no, no.
> 
> The argument is:
> 
> a) Specific bit patterns on the wire can cause harm.
> 
> b) It seems probable that similar bit patterns may cause harm.
> 
> c) We should not allow attackers to produce the bit patterns in (a)  
> or (b).
> 
> d) We should allow an attacker no influence on the output, and the  
> output must be indistinguishable from random noise.
> 
> Now, (d) does not follow from (c), however much people repeat the  
> fallacy. It is merely a way of making a deliberate attack very  
> difficult.
> 
> Willy Tarreau's proposal implements (c), and in fact would protect  
> against any other cross-protocol attacks where the target protocol  
> relies on the presence of *any* 7-bit octets on the wire. I don't  
> think any protocols remainins are vulnerable - but then, it's really  
> not clear to me how one might mount a cross-protocol attack where the  
> initial handling *has* to look like HTTP traffic, except for a  
> cross-protocol attack on HTTP.
> 
> On the other hand, squirting purely random noise at a server will  
> crash a large number of implementations, particularly of OSI based  
> protocols. This in itself isn't an argument against the random  
> masking, incidentally, because you'd need to find an X.400 server,  
> say, which intially spoke HTTP, and moreover responded correctly to a  
> WebSocket upgrade. But given that we're waaay into hypothetical  
> territory, maybe I should insist that any design we do is validated  
> not to be possible to use for cross-protocol attacks on X.400 MTAs.

The main things seems to be HTTP proxies or pure data forwarding
proxies which look for something to mangle (i.e. NATs do this, as
would broken implementations of CONNECT in HTTP proxies, if there are any.)

If the server isn't forwarding what it receives to another server, and
doesn't do the handshake calculation, than it's unlikely to be
vulnerable - at least, no more than it is to regular HTTP requests
sent to that port.

The vector of attack which people are (rightly) concerned about is
only browsers running server-supplied scripts, as far as I can tell.
Right now all web infrastructure can largely count on browsers only
sending valid-looking HTTP requests, so they are safe from this sort
of attack as long as that can't be confused with what the server
really speaks.

I'm still not sure why sending a valid-looking "decoy" HTTP request
after CONNECT (such as OPTIONS * with Connection:close and
Content-Length:large) hasn't caught on as an idea, as I would expect
just about any non-HTTP server, or non-WebSocket HTTP server, to be
quite robust when receiving one of those (otherwise it would be
vulnerable to existing non-WebSocket attacks.)

ps. Thinking about that just made me realise the CONNECT-based WS
handshake we're planning doesn't work across two or more proxies,
which is very common (client gateway and server loadbalancer) :-( sigh.

-- Jamie

From jamie@shareable.org  Mon Jan 17 12:38:02 2011
Return-Path: <jamie@shareable.org>
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 28C7C28C205 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 12:38:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.711
X-Spam-Level: 
X-Spam-Status: No, score=-2.711 tagged_above=-999 required=5 tests=[AWL=-0.112, BAYES_00=-2.599]
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 D+peelqeljXF for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 12:38:01 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 37D4B28C1A2 for <hybi@ietf.org>; Mon, 17 Jan 2011 12:38:01 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PevsR-0000Ko-91; Mon, 17 Jan 2011 20:40:35 +0000
Date: Mon, 17 Jan 2011 20:40:35 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110117204035.GD30268@shareable.org>
References: <20110115001609.GE6872@1wt.eu> <E04C310E-8630-4C42-9CA3-645BCC241EEF@tomasf.se> <AANLkTinNMNbAybtx_xmBQ+6VcMazrX_-J5p18TsijOvq@mail.gmail.com> <20110116191218.GD13161@1wt.eu> <AANLkTimZgKoBmmH7yZPDTd9BN6r3CYhd4FkEGEPcRrhG@mail.gmail.com> <20110116200500.GG13161@1wt.eu> <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <2314.1295263446.878176@puncture> <263ECB7A-A2E8-4ECF-9F2D-ABD273E54555@apple.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <263ECB7A-A2E8-4ECF-9F2D-ABD273E54555@apple.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 20:38:02 -0000

Maciej Stachowiak wrote:
> 
> On Jan 17, 2011, at 3:24 AM, Dave Cridland wrote:
> 
> > On Sun Jan 16 23:34:10 2011, Adam Barth wrote:
> >> We've been over this Willy.  "GET\n" is not an attack.  The cost of
> >> performing the attack doubles with each bit you add to the attack
> >> string.  Anything even remotely interesting is wildly infeasible.
> >> It's just simple math.
> > 
> > Not the cost doubling. The probability halving. *That* is the simple maths involved. This would in turn double the cost of a dedicated attack, of course, but it merely halves the probablility of the same vulnerability being triggered accidentally.
> 
> It's not a security vulnerability if it's triggered accidentally, though it may be a bug.

If it can be triggered accidentally with more than 1/cryptosecure
probability, then it can be triggered by deliberately a well-placed
malicious script spawning WebSockets at the maximum rate in the
background (maybe WebWorkers, maybe not) on every client
(i.e. hundreds of thousands on some sites) that's visiting pages
containing the script, running for as long as the attacker has
patience (i.e. months.)

That's a *lot* of connections.

It doesn't even have to ammount to a DDOS on one site, as that kind of
attack could target a cross-section of servers, looking for any
opportunity to poison/misdirect a client while diffusing the load
across sites to hide its intensity.  A bit like the way port scanners
target random IPs; they don't care which one they get.

OF course there is some randomness level above which we can assume
it's so unlikely that it doesn't matter (like strong crypto).  On the
current internet, 2^32 is not enough against a concerted attack; 2^40
is a (just about) plausible attack figure if a script gets onto
popular sites, performs a smart diffused attack, and isn't noticed for
a month, say.  That's on today's internet.

-- Jamie

From dave@cridland.net  Mon Jan 17 12:51:34 2011
Return-Path: <dave@cridland.net>
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 4727E28C162 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 12:51:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.252
X-Spam-Level: 
X-Spam-Status: No, score=-2.252 tagged_above=-999 required=5 tests=[AWL=-0.253, BAYES_00=-2.599, J_CHICKENPOX_37=0.6]
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 t89GqPoNvkcp for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 12:51:33 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 4816328C145 for <hybi@ietf.org>; Mon, 17 Jan 2011 12:51:33 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 1EED9116811F; Mon, 17 Jan 2011 20:54:07 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UKrKjyCuEwWx; Mon, 17 Jan 2011 20:54:03 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id E56B3116811E; Mon, 17 Jan 2011 20:54:02 +0000 (GMT)
References: <AANLkTinmHv0uTFo36UmEr3RAo7Ry5Q=DFPZveVWURcud@mail.gmail.com> <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <2314.1295272581.363859@puncture> <20110117202042.GC30268@shareable.org>
In-Reply-To: <20110117202042.GC30268@shareable.org>
MIME-Version: 1.0
Message-Id: <2314.1295297642.949619@puncture>
Date: Mon, 17 Jan 2011 20:54:02 +0000
From: Dave Cridland <dave@cridland.net>
To: Jamie Lokier <jamie@shareable.org>, Yuta Kitamura <yutak@google.com>, Server-Initiated HTTP <hybi@ietf.org>, Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 20:51:34 -0000

On Mon Jan 17 20:20:42 2011, Jamie Lokier wrote:
> I'm still not sure why sending a valid-looking "decoy" HTTP request
> after CONNECT (such as OPTIONS * with Connection:close and
> Content-Length:large) hasn't caught on as an idea, as I would expect
> just about any non-HTTP server, or non-WebSocket HTTP server, to be
> quite robust when receiving one of those (otherwise it would be
> vulnerable to existing non-WebSocket attacks.)
> 
> ps. Thinking about that just made me realise the CONNECT-based WS
> handshake we're planning doesn't work across two or more proxies,
> which is very common (client gateway and server loadbalancer) :-(  
> sigh.

Hence my argument to use a GET+Upgrade followed by a dummy CONNECT,  
which combines both valid HTTP to negotiate the WebSocket, plus a  
dummy CONNECT that's known to defend against further interpretation.

But, the argument goes, this isn't needed if you do masking, and  
masking is based on maths, rather than experimental testing.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From hcommowick@exosec.fr  Mon Jan 17 00:59:10 2011
Return-Path: <hcommowick@exosec.fr>
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 851703A6ECD for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 00:59:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.638
X-Spam-Level: 
X-Spam-Status: No, score=-1.638 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_FR=0.35, HOST_MISMATCH_NET=0.311, MIME_8BIT_HEADER=0.3]
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 lF-z7xCEPSnc for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 00:59:09 -0800 (PST)
Received: from mx1.exosec.fr (exo1066.net2.nerim.net [213.41.175.60]) by core3.amsl.com (Postfix) with ESMTP id 2BD343A6ECC for <hybi@ietf.org>; Mon, 17 Jan 2011 00:59:08 -0800 (PST)
Date: Mon, 17 Jan 2011 10:01:39 +0100
From: =?ISO-8859-1?Q?Herv=E9?= COMMOWICK <hcommowick@exosec.fr>
To: hybi@ietf.org
Message-ID: <20110117100139.0c94e315@tosh>
In-Reply-To: <20110116211502.GH13161@1wt.eu>
References: <20110116211502.GH13161@1wt.eu>
Organization: Exosec
X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; x86_64-unknown-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Mailman-Approved-At: Mon, 17 Jan 2011 13:01:37 -0800
Subject: Re: [hybi] Straw-poll on Masking options
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: Mon, 17 Jan 2011 09:00:34 -0000

If i have to made of choice, based on my current experience, I think
HMAC/AES proposal will quickly become as hell for little/medium shared
hosting supplier, because they will need more and more CPU, that he
will not be able to afford so quickly as his bandwith.=20
Furthermore, this will add sizeable latency where we really want to be
as quick as possible. The matter of this kind of protocol *in my
opinion* is to be able to be handled nearly at the speed of the media,
as there will be additional processing for each request, and it is
nearly impossible for small packet with HMAC.

So, i vote for proposal 1, which is sufficient in term of security and
address the main goal of this poll.

Regards,

Herv=E9.

On Wed, 12 Jan 2011 21:00:35 +0100
Salvatore Loreto <salvatore.loreto at ericsson.com> wrote:
>=20
> Hi all,
>=20
>=20
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to
> reduce security risks.
>=20
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and
> disadvantages, as well as the legal implications of each method
> have already been deeply discussed.
>=20
> In order to settle the question of masking and find a way forward
> that has a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and=20
> summarized at
> some point in the mailing list by Eric Rescorla)
>=20
>=20
> 1. a fixed mask carried entirely in the packet.
>=20
> 2. A longish repeated mask computed from the packet. For
> concreteness, suppose HMAC-SHA1(<uuid>, <server-conn-key> ||
> <client-conn-key> || <packet-key>), but
>    obviously there's flexibility here.
>=20
> 3. A fully generated mask (if so specify also what you would like
> to use e.g. AES-CTR or HMAC-SHA).
>=20
>=20
> Please indicate your preference(s) or the one can meet your bar for
> "I could live with that";
> In the case you have more then one, please put the choices in a=20
> preference order.
>=20
> This poll will run until January 18th.
>=20
> cheers
> /Sal
>=20
> --=20
> Salvatore Loreto
> www.sloreto.com
>=20
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>=20

--=20
Herv=E9 COMMOWICK, EXOSEC (http://www.exosec.fr/)
ZAC des Metz - 3 Rue du petit robinson - 78350 JOUY EN JOSAS
Tel: +33 1 30 67 60 65  -  Fax: +33 1 75 43 40 70
mailto:hcommowick@exosec.fr

From w@1wt.eu  Mon Jan 17 14:18:44 2011
Return-Path: <w@1wt.eu>
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 50F6F3A6D87 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 14:18:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.065
X-Spam-Level: 
X-Spam-Status: No, score=-2.065 tagged_above=-999 required=5 tests=[AWL=-0.022, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 c1PeZwniKki8 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 14:18:43 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id BC8773A6F68 for <hybi@ietf.org>; Mon, 17 Jan 2011 14:18:41 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0HML6x6019277; Mon, 17 Jan 2011 23:21:06 +0100
Date: Mon, 17 Jan 2011 23:21:06 +0100
From: Willy Tarreau <w@1wt.eu>
To: Jamie Lokier <jamie@shareable.org>
Message-ID: <20110117222106.GA19206@1wt.eu>
References: <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <20110117135912.GA16684@1wt.eu> <20110117200031.GB30268@shareable.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110117200031.GB30268@shareable.org>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 22:18:44 -0000

Hi Jamie,

On Mon, Jan 17, 2011 at 08:00:31PM +0000, Jamie Lokier wrote:
> Fwiw, there are proxies around whose HTTP parser will match the first
> byte with the high bit set as part of the method name.  Hopefully it
> doesn't matter.

I agree there are and that does not matter because we're concerned about
the risk of caching, and a cache must consider the method.

> I would really like to see a better effort to "fast fail reliably"
> with bogus proxies so it's quicker to fallback to a different method
> than WebSocket,

In fact it's not easy at all, considering the various behaviours that
can be encountered, in part because of those who consider 101 as a 1xx
and wait for a second response. However, I expect those ones to quickly
disappear once WS is standardized because they'll quickly get spotted
as the faulty part in many chains.

> and a CRC, MAC or something to protect against any
> which mostly forward the data (so connection appears to work) but
> randomly mangle it later.

That's in fact where the Hello frames could sensibly help.

> > > 2) BASE64 is a step backward and I'm opposed to it. As Adam mentioned, we
> > > should not let attackers control the bytes on wire.
> > 
> > The original design does not let them control *all* bits. The proposed
> > masking methods lets them have *any* pattern given a sufficient number
> > of attempts.
> 
> The solution to both concerns is to *combine* strong hashing (AES-CTR
> etc.)  *and* escaping plausible HTTP request character sequences.

It might be one, but what are we making up for a clear text protocol ?

> I don't like that because I think it's a strange thing to be
> encrypting for some kind of half-security when you've selected *not*
> to use a secure connection (i.e. not TLS).

exactly....

> But it's the technical solution to both concerns, and it has negligable
> overhead (compared with AES or SHA in the first place.)

Unfortunately, not so negligible either. My measurements have shown a
performance limit as low as slightly less than 1 Gbps on a Core2quad
3GHz. This machine is already able to forward 10 Gbps of HTTP traffic
without sweating. That means that it will make it quite hard or expensive
to support high data rates on frontend equipments (NAT router boxes, load
balancers, etc...).

> > The problem *is* specific to HTTP because the HTTP compliance of the whole
> > chain as well as the WebSocket compliance of the end point are verified by
> > the handshake. Just send a WS connection to an SMTP server, you won't get
> > any valid response because the maths involved in the response nonces can't
> > happen without a WS-specific computation.
> > 
> > The remaining part we're trying to solve is that some intermediaries might
> > be waiting for a second HTTP request after the WS handshake, so that clearly
> > is HTTP specific.
> 
> I suppose you could make a WebSocket connection to the FTP command
> port going through a NAT router that forwards all the bytes, so the WS
> handshake succeeds, and then later mangles a few bytes because it's
> substituting anything that looks like an text IP address in the stream.

I see your point, but anyone using the FTP port as a transparent port is
looking for trouble. Other protocols such as HTTP, SMTP, and maybe a few
others are not doing checksums and would possibly experience issues as
well if run over port 21.

Regards,
Willy


From derhoermi@gmx.net  Mon Jan 17 14:30:43 2011
Return-Path: <derhoermi@gmx.net>
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 543C73A6D87 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 14:30:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.425
X-Spam-Level: 
X-Spam-Status: No, score=-3.425 tagged_above=-999 required=5 tests=[AWL=-0.826, BAYES_00=-2.599]
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 E2XyB+lnDjzu for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 14:30:42 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 7E45C3A6DB6 for <hybi@ietf.org>; Mon, 17 Jan 2011 14:30:41 -0800 (PST)
Received: (qmail invoked by alias); 17 Jan 2011 22:33:15 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp061) with SMTP; 17 Jan 2011 23:33:15 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1+Dr3FFxhODB1kjLGwVCVEYTA0er0xonkJAKI0HFf aADnMqLuKwcE2O
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Jamie Lokier <jamie@shareable.org>
Date: Mon, 17 Jan 2011 23:33:11 +0100
Message-ID: <f2f9j6p71iuci6fq2kdj3oh9bn3upknu4o@hive.bjoern.hoehrmann.de>
References: <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <2314.1295272581.363859@puncture> <20110117202042.GC30268@shareable.org>
In-Reply-To: <20110117202042.GC30268@shareable.org>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 22:30:43 -0000

* Jamie Lokier wrote:
>I'm still not sure why sending a valid-looking "decoy" HTTP request
>after CONNECT (such as OPTIONS * with Connection:close and
>Content-Length:large) hasn't caught on as an idea, as I would expect
>just about any non-HTTP server, or non-WebSocket HTTP server, to be
>quite robust when receiving one of those (otherwise it would be
>vulnerable to existing non-WebSocket attacks.)

Sending a valid-looking request may make an intermediary think that the
connection has not in fact been upgraded, so this may end up being less
secure than not sending a decoy.

>ps. Thinking about that just made me realise the CONNECT-based WS
>handshake we're planning doesn't work across two or more proxies,
>which is very common (client gateway and server loadbalancer) :-( sigh.

The methods the working group seems to be considering are WEBSOCKET,
GET, and OPTIONS, not CONNECT, as far as I am aware.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From buskanaka@gmail.com  Mon Jan 17 14:44:12 2011
Return-Path: <buskanaka@gmail.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 84D763A6F52 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 14:44:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level: 
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 dPDtgBtamGSB for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 14:44:11 -0800 (PST)
Received: from mail-ew0-f44.google.com (mail-ew0-f44.google.com [209.85.215.44]) by core3.amsl.com (Postfix) with ESMTP id 6DFA73A6DB6 for <hybi@ietf.org>; Mon, 17 Jan 2011 14:44:11 -0800 (PST)
Received: by ewy8 with SMTP id 8so3098258ewy.31 for <hybi@ietf.org>; Mon, 17 Jan 2011 14:46:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=GsVbNqRGS953krpACzRxqkAE07kJ17AKsjs7/DUNLo8=; b=Ji8RzZo8s8sW1ottKSDlhLVIZ0/oWzp3n3DnrJBAxNhCVD64RkOYvWZy6Llh9LOUe9 qyPSdiMmz07fufu/qILiKtO30qZGmLKcCqAjTHo/X8yoiMflOMtkJCrZnkjxPct01tTc DSpivSP+RqrAmoaix1/wabUGLdB8YaWS0ViL4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=Ws4VzuWjQtpyfbJ5Vs/SZx/SNmEwU9KgrK6rAIpHRVVhokBkrhXFDKsnuweGqSP+QW Tz40ic0u7s6aOJW+wecPZrxPi0JILK7onvdpmJ+Hmq41/T2mTlHNmzbaYYoeftiGVyY+ 056m8mV6nEZQyup5Y9lnlyNu2LJh9s+ewWdPs=
Received: by 10.14.119.206 with SMTP id n54mr3837036eeh.40.1295304405779; Mon, 17 Jan 2011 14:46:45 -0800 (PST)
MIME-Version: 1.0
Sender: buskanaka@gmail.com
Received: by 10.14.119.136 with HTTP; Mon, 17 Jan 2011 14:46:25 -0800 (PST)
In-Reply-To: <20110117222106.GA19206@1wt.eu>
References: <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <20110117135912.GA16684@1wt.eu> <20110117200031.GB30268@shareable.org> <20110117222106.GA19206@1wt.eu>
From: Joel Martin <hybi@martintribe.org>
Date: Mon, 17 Jan 2011 16:46:25 -0600
X-Google-Sender-Auth: LwZSEWUL3mPToaPP3MHalF4roJ0
Message-ID: <AANLkTik=OcpHcUWrfj8+jc_XiCCBat_pHHncq6cBySD4@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=90e6ba53b106fb85e2049a128e64
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 22:44:12 -0000

--90e6ba53b106fb85e2049a128e64
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Jan 17, 2011 at 4:21 PM, Willy Tarreau <w@1wt.eu> wrote:

> > The solution to both concerns is to *combine* strong hashing (AES-CTR
> > etc.)  *and* escaping plausible HTTP request character sequences.
>
> It might be one, but what are we making up for a clear text protocol ?
>
> > I don't like that because I think it's a strange thing to be
> > encrypting for some kind of half-security when you've selected *not*
> > to use a secure connection (i.e. not TLS).
>
> exactly....
>
> > But it's the technical solution to both concerns, and it has negligable
> > overhead (compared with AES or SHA in the first place.)
>
> Unfortunately, not so negligible either. My measurements have shown a
> performance limit as low as slightly less than 1 Gbps on a Core2quad
> 3GHz. This machine is already able to forward 10 Gbps of HTTP traffic
> without sweating. That means that it will make it quite hard or expensive
> to support high data rates on frontend equipments (NAT router boxes, load
> balancers, etc...).


Do you think you might have the opportunity to do the same perf tests on
base64 and 7-bit/8-bit in order to compare to the performance of the masking
options?

Thanks,

Joel Martin

--90e6ba53b106fb85e2049a128e64
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Mon, Jan 17, 2011 at 4:21 PM, Willy Tarreau <=
span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wr=
ote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">&gt; The solution to both concerns is to *combine* strong=
 hashing (AES-CTR<br>
&gt; etc.) =A0*and* escaping plausible HTTP request character sequences.<br=
>
<br>
</div>It might be one, but what are we making up for a clear text protocol =
?<br>
<div class=3D"im"><br>
&gt; I don&#39;t like that because I think it&#39;s a strange thing to be<b=
r>
&gt; encrypting for some kind of half-security when you&#39;ve selected *no=
t*<br>
&gt; to use a secure connection (i.e. not TLS).<br>
<br>
</div>exactly....<br>
<div class=3D"im"><br>
&gt; But it&#39;s the technical solution to both concerns, and it has negli=
gable<br>
&gt; overhead (compared with AES or SHA in the first place.)<br>
<br>
</div>Unfortunately, not so negligible either. My measurements have shown a=
<br>
performance limit as low as slightly less than 1 Gbps on a Core2quad<br>
3GHz. This machine is already able to forward 10 Gbps of HTTP traffic<br>
without sweating. That means that it will make it quite hard or expensive<b=
r>
to support high data rates on frontend equipments (NAT router boxes, load<b=
r>
balancers, etc...).</blockquote><div><br></div><div>Do you think you might =
have the opportunity to do the same perf tests on base64 and 7-bit/8-bit in=
 order to compare to the performance of the masking options?</div><div>

<br></div><div>Thanks,</div><div><br></div><div>Joel Martin</div></div>

--90e6ba53b106fb85e2049a128e64--

From w@1wt.eu  Mon Jan 17 14:50:46 2011
Return-Path: <w@1wt.eu>
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 24A1E3A6F56 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 14:50:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.065
X-Spam-Level: 
X-Spam-Status: No, score=-2.065 tagged_above=-999 required=5 tests=[AWL=-0.022, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 RVNhPbmgTfLk for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 14:50:45 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id E1EC13A6D87 for <hybi@ietf.org>; Mon, 17 Jan 2011 14:50:44 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0HMr97P019438; Mon, 17 Jan 2011 23:53:09 +0100
Date: Mon, 17 Jan 2011 23:53:09 +0100
From: Willy Tarreau <w@1wt.eu>
To: Joel Martin <hybi@martintribe.org>
Message-ID: <20110117225309.GC19206@1wt.eu>
References: <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <20110117135912.GA16684@1wt.eu> <20110117200031.GB30268@shareable.org> <20110117222106.GA19206@1wt.eu> <AANLkTik=OcpHcUWrfj8+jc_XiCCBat_pHHncq6cBySD4@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTik=OcpHcUWrfj8+jc_XiCCBat_pHHncq6cBySD4@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Mon, 17 Jan 2011 22:50:46 -0000

On Mon, Jan 17, 2011 at 04:46:25PM -0600, Joel Martin wrote:
> On Mon, Jan 17, 2011 at 4:21 PM, Willy Tarreau <w@1wt.eu> wrote:
> 
> > > The solution to both concerns is to *combine* strong hashing (AES-CTR
> > > etc.)  *and* escaping plausible HTTP request character sequences.
> >
> > It might be one, but what are we making up for a clear text protocol ?
> >
> > > I don't like that because I think it's a strange thing to be
> > > encrypting for some kind of half-security when you've selected *not*
> > > to use a secure connection (i.e. not TLS).
> >
> > exactly....
> >
> > > But it's the technical solution to both concerns, and it has negligable
> > > overhead (compared with AES or SHA in the first place.)
> >
> > Unfortunately, not so negligible either. My measurements have shown a
> > performance limit as low as slightly less than 1 Gbps on a Core2quad
> > 3GHz. This machine is already able to forward 10 Gbps of HTTP traffic
> > without sweating. That means that it will make it quite hard or expensive
> > to support high data rates on frontend equipments (NAT router boxes, load
> > balancers, etc...).
> 
> 
> Do you think you might have the opportunity to do the same perf tests on
> base64 and 7-bit/8-bit in order to compare to the performance of the masking
> options?

Yes, it's easy to do, but it's possible that I won't have time to do that
before next week-end.

Regards,
Willy


From jamie@shareable.org  Mon Jan 17 17:03:47 2011
Return-Path: <jamie@shareable.org>
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 773AB28C1E2 for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 17:03:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.406
X-Spam-Level: 
X-Spam-Status: No, score=-2.406 tagged_above=-999 required=5 tests=[AWL=-0.407, BAYES_00=-2.599, J_CHICKENPOX_37=0.6]
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 V6YQjEc-7UqJ for <hybi@core3.amsl.com>; Mon, 17 Jan 2011 17:03:46 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id A2BEF28C16B for <hybi@ietf.org>; Mon, 17 Jan 2011 17:03:46 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Pf01V-0001L7-7h; Tue, 18 Jan 2011 01:06:13 +0000
Date: Tue, 18 Jan 2011 01:06:13 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Dave Cridland <dave@cridland.net>
Message-ID: <20110118010613.GF30268@shareable.org>
References: <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <2314.1295272581.363859@puncture> <20110117202042.GC30268@shareable.org> <2314.1295297642.949619@puncture>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <2314.1295297642.949619@puncture>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Tue, 18 Jan 2011 01:03:47 -0000

Dave Cridland wrote:
> On Mon Jan 17 20:20:42 2011, Jamie Lokier wrote:
> >I'm still not sure why sending a valid-looking "decoy" HTTP request
> >after CONNECT (such as OPTIONS * with Connection:close and
> >Content-Length:large) hasn't caught on as an idea, as I would expect
> >just about any non-HTTP server, or non-WebSocket HTTP server, to be
> >quite robust when receiving one of those (otherwise it would be
> >vulnerable to existing non-WebSocket attacks.)
> >
> >ps. Thinking about that just made me realise the CONNECT-based WS
> >handshake we're planning doesn't work across two or more proxies,
> >which is very common (client gateway and server loadbalancer) :-(  
> >sigh.
> 
> Hence my argument to use a GET+Upgrade followed by a dummy CONNECT,  
> which combines both valid HTTP to negotiate the WebSocket, plus a  
> dummy CONNECT that's known to defend against further interpretation.

On the face of it, that sounds a reasonable plan.

Why I was only looking a few hours ago at a proxy toolkit (CPAN/Perl's
HTTP::Proxy) which ignores the Upgrade header.

What about sending repeated CONNECTs with WS negotiation headers,
until the reply says it's got through to a final WebSocket server
with a proper handshake?  I think that's fair game for pedantic HTTP
semanticists if we declare that the WS server _is_ logically a HTTP
proxy known as such to the client.  It's even got a standardised place
to authorise the connection, if that is relevant.

> But, the argument goes, this isn't needed if you do masking, and  
> masking is based on maths, rather than experimental testing.

Obviously masking doesn't help if the objective is to definitely work
or fail through whatever proxies live on the path.  It's good for
causing undefined behaviour, which we're assuming (unmathematically)
is not message corruption & frozen connections.

For the legitimate concern of browser script attacks, it's a good idea
(though expensive to implement compared with the alternative), and
randomness is not as strong for this type of security as
randomness+escaping.

-- Jamie

From derhoermi@gmx.net  Tue Jan 18 03:35:17 2011
Return-Path: <derhoermi@gmx.net>
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 2CCA43A6E87 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 03:35:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.407
X-Spam-Level: 
X-Spam-Status: No, score=-3.407 tagged_above=-999 required=5 tests=[AWL=-0.808, BAYES_00=-2.599]
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 eCxYrEPUNVQM for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 03:35:16 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id B7F5A3A6DBE for <hybi@ietf.org>; Tue, 18 Jan 2011 03:35:15 -0800 (PST)
Received: (qmail invoked by alias); 18 Jan 2011 11:37:51 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp067) with SMTP; 18 Jan 2011 12:37:51 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX19kdVYw+odkWXQLIfxax57aI5clFtOI6R6j4m3ylT 8NnBDOBr3U85bk
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Jamie Lokier <jamie@shareable.org>
Date: Tue, 18 Jan 2011 12:37:46 +0100
Message-ID: <g8naj6ho8r0qrh15lal1m208i16j8djiim@hive.bjoern.hoehrmann.de>
References: <20110117054541.GI13161@1wt.eu> <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <20110117135912.GA16684@1wt.eu> <20110117200031.GB30268@shareable.org>
In-Reply-To: <20110117200031.GB30268@shareable.org>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Tue, 18 Jan 2011 11:35:17 -0000

* Jamie Lokier wrote:
>I would really like to see a better effort to "fast fail reliably"
>with bogus proxies so it's quicker to fallback to a different method
>than WebSocket, and a CRC, MAC or something to protect against any
>which mostly forward the data (so connection appears to work) but
>randomly mangle it later.

Well obviously we'll require browser clients to check that the handshake
response does not include Content-Length, Transfer-Encoding and maybe a
couple of other headers, and we'll probably change the framing so that
if the first octet the server sends is white space or "H" the connection
is closed by the client, but if you need more integrity than that, you
can code your own. You'd likely do that anyway so you can recover from
it gracefully.

>The solution to both concerns is to *combine* strong hashing (AES-CTR
>etc.)  *and* escaping plausible HTTP request character sequences.

Masking does that already, pre-scan the masked frame for bad patterns
like "http" and "host" and pick a different key if you find it, and if
you cannot find a key within some resource limit, fragment the frame.
Not pretty, but then browser developers can figure out on their own how
they balance their performance requirements against their paranoia and
frustrating sloppy server developers who don't expect fragmentation.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From derhoermi@gmx.net  Tue Jan 18 03:43:05 2011
Return-Path: <derhoermi@gmx.net>
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 2DEED3A6DBE for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 03:43:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.39
X-Spam-Level: 
X-Spam-Status: No, score=-3.39 tagged_above=-999 required=5 tests=[AWL=-0.791,  BAYES_00=-2.599]
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 vbOIRQk51qh7 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 03:43:04 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id A94833A6FBD for <hybi@ietf.org>; Tue, 18 Jan 2011 03:43:03 -0800 (PST)
Received: (qmail invoked by alias); 18 Jan 2011 11:45:39 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp015) with SMTP; 18 Jan 2011 12:45:39 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX19Bg8sY3oJBP0QuTtogbM6mUoMKoNtF66OxWv7J/K fRYEhnT7+epMDP
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Willy Tarreau <w@1wt.eu>
Date: Tue, 18 Jan 2011 12:45:35 +0100
Message-ID: <vsuaj69ulf1cc4bcl7630kg7n8ofnhcppn@hive.bjoern.hoehrmann.de>
References: <20110115001609.GE6872@1wt.eu>
In-Reply-To: <20110115001609.GE6872@1wt.eu>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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: Tue, 18 Jan 2011 11:43:05 -0000

* Willy Tarreau wrote:
>after some thoughts on the various proposals, I figured that increasing
>the encoding slightly should not be a problem for small frames compared
>to current proposals where they're inflated by at least 32-bit for the
>key anyway, without offering total protection even at the beginning of
>the stream. Thus it was worth giving a try to an encoding which totally
>prevents an intermediary from finding an HTTP request *by design*.

If adding some overhead proportional to the message size is okay, we can
also add another byte of randomness every 8 byte block or so. That might
be preferable as it gives the attacker less control over the bits on the
wire and is easier to implement efficiently. Not that I've given it any
thought though.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From gmonte@microsoft.com  Tue Jan 18 09:39:13 2011
Return-Path: <gmonte@microsoft.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 205573A6F0B for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 09:39:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.485
X-Spam-Level: 
X-Spam-Status: No, score=-10.485 tagged_above=-999 required=5 tests=[AWL=0.114, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
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 lVz6qtMsyMB6 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 09:39:12 -0800 (PST)
Received: from smtp.microsoft.com (mail1.microsoft.com [131.107.115.212]) by core3.amsl.com (Postfix) with ESMTP id 418F43A6E78 for <hybi@ietf.org>; Tue, 18 Jan 2011 09:39:12 -0800 (PST)
Received: from TK5EX14MLTC102.redmond.corp.microsoft.com (157.54.79.180) by TK5-EXGWY-E801.partners.extranet.microsoft.com (10.251.56.50) with Microsoft SMTP Server (TLS) id 8.2.176.0; Tue, 18 Jan 2011 09:41:49 -0800
Received: from TK5EX14MLTW651.wingroup.windeploy.ntdev.microsoft.com (157.54.71.39) by TK5EX14MLTC102.redmond.corp.microsoft.com (157.54.79.180) with Microsoft SMTP Server (TLS) id 14.1.255.3; Tue, 18 Jan 2011 09:41:49 -0800
Received: from TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com ([169.254.4.151]) by TK5EX14MLTW651.wingroup.windeploy.ntdev.microsoft.com ([157.54.71.39]) with mapi; Tue, 18 Jan 2011 09:41:50 -0800
From: Gabriel Montenegro <gmonte@microsoft.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>, "hybi@ietf.org" <hybi@ietf.org>
Thread-Topic: [hybi] Straw-poll on Masking options
Thread-Index: AQHLspNzL4SDXxzCSkqEkHcVEbJVl5PXBz8w
Date: Tue, 18 Jan 2011 17:41:48 +0000
Message-ID: <CA566BAEAD6B3F4E8B5C5C4F61710C110FD2B37A@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
References: <4D2E0863.2040804@ericsson.com>
In-Reply-To: <4D2E0863.2040804@ericsson.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>
Subject: Re: [hybi] Straw-poll on Masking options
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: Tue, 18 Jan 2011 17:39:13 -0000

Hi Sal,

> 1. a fixed mask carried entirely in the packet.

+1. Session-less is good. This is cheap and allows wide deployment.=20

>=20
> 2. A longish repeated mask computed from the packet. For concreteness,
>     suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> <packet-key>), but
>     obviously there's flexibility here.
>=20
> 3. A fully generated mask (if so specify also what you would like to use =
e.g. AES-
> CTR or HMAC-SHA).
>=20
>=20
> Please indicate your preference(s) or the one can meet your bar for "I
> could live with that";
> In the case you have more then one, please put the choices in a
> preference order.

As others have said, I won't cut my wrists over #2 or #3 (in that order of =
preference), but see no real need to go there.

From salvatore.loreto@ericsson.com  Tue Jan 18 10:10:14 2011
Return-Path: <salvatore.loreto@ericsson.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 13B813A6F0B for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 10:10:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.543
X-Spam-Level: 
X-Spam-Status: No, score=-106.543 tagged_above=-999 required=5 tests=[AWL=0.056, BAYES_00=-2.599, 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 ALpsSjI0HtyT for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 10:10:13 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id B195F28C154 for <hybi@ietf.org>; Tue, 18 Jan 2011 10:10:12 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-ca-4d35d8213080
Received: from esessmw0197.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id 43.77.23694.128D53D4; Tue, 18 Jan 2011 19:12:49 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0197.eemea.ericsson.se (153.88.115.88) with Microsoft SMTP Server id 8.2.234.1; Tue, 18 Jan 2011 19:12:49 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 6B54F2595	for <hybi@ietf.org>; Tue, 18 Jan 2011 20:12:49 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 2EAC650678	for <hybi@ietf.org>; Tue, 18 Jan 2011 20:12:49 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id B0DF3505A4	for <hybi@ietf.org>; Tue, 18 Jan 2011 20:12:48 +0200 (EET)
Message-ID: <4D35D820.2090104@ericsson.com>
Date: Tue, 18 Jan 2011 19:12:48 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D2E0863.2040804@ericsson.com>
In-Reply-To: <4D2E0863.2040804@ericsson.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: [hybi] reminder: Straw-poll on Masking options
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: Tue, 18 Jan 2011 18:10:14 -0000

This poll ends today (January 18th),
if you haven't cast a vote, please do it now!

cheers
/Sal


-- 
Salvatore Loreto
www.sloreto.com



On 1/12/11 9:00 PM, Salvatore Loreto wrote:
> Hi all,
>
>
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce
> security risks.
>
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been
> deeply discussed.
>
> In order to settle the question of masking and find a way forward that
> has a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and
> summarized at
> some point in the mailing list by Eric Rescorla)
>
>
> 1. a fixed mask carried entirely in the packet.
>
> 2. A longish repeated mask computed from the packet. For concreteness,
>      suppose HMAC-SHA1(<uuid>,<server-conn-key>  ||<client-conn-key>  ||
> <packet-key>), but
>      obviously there's flexibility here.
>
> 3. A fully generated mask (if so specify also what you would like to use
> e.g. AES-CTR or HMAC-SHA).
>
>
> Please indicate your preference(s) or the one can meet your bar for "I
> could live with that";
> In the case you have more then one, please put the choices in a
> preference order.
>
> This poll will run until January 18th.
>
> cheers
> /Sal

From godjonez@codepad.info  Tue Jan 18 10:31:00 2011
Return-Path: <godjonez@codepad.info>
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 5C6843A7075 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 10:31:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.487
X-Spam-Level: 
X-Spam-Status: No, score=-2.487 tagged_above=-999 required=5 tests=[AWL=0.113,  BAYES_00=-2.599]
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 RPz1245HbeIo for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 10:30:59 -0800 (PST)
Received: from smtpout.kotinet.com (smtpout.kotinet.com [212.50.215.77]) by core3.amsl.com (Postfix) with ESMTP id D90F53A7058 for <hybi@ietf.org>; Tue, 18 Jan 2011 10:30:58 -0800 (PST)
Received: from codepad.info (codepad.info [62.240.71.135]) by smtpout.kotinet.com (Postfix) with ESMTP id E6C434775E for <hybi@ietf.org>; Tue, 18 Jan 2011 20:33:25 +0200 (EET)
Received: from overwatchnexus.combinet (overwatchnexus.combinet [192.168.2.7]) by codepad.info (Postfix) with ESMTPSA id 5DF6FF44003 for <hybi@ietf.org>; Tue, 18 Jan 2011 20:33:25 +0200 (EET)
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
In-Reply-To: <4D2E0863.2040804@ericsson.com>
References: <4D2E0863.2040804@ericsson.com>
To: "hybi@ietf.org" <hybi@ietf.org>
Date: Tue, 18 Jan 2011 20:33:27 +0200
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: "Joonas Lehtolahti" <godjonez@codepad.info>
Message-ID: <op.vpioh1kuuykfxw@overwatchnexus.combinet>
User-Agent: Opera Mail/11.01 (Win32)
Subject: Re: [hybi] Straw-poll on Masking options
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: Tue, 18 Jan 2011 18:31:00 -0000

On Wed, 12 Jan 2011 22:00:35 +0200, Salvatore Loreto
<salvatore.loreto@ericsson.com> wrote:

> 1. a fixed mask carried entirely in the packet.
>
> 2. A longish repeated mask computed from the packet. For concreteness,
>     suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||  
> <packet-key>), but
>     obviously there's flexibility here.
>
> 3. A fully generated mask (if so specify also what you would like to use  
> e.g. AES-CTR or HMAC-SHA).

While I still personally would prefer no masking at all, of those three
options my vote goes to number 1. The most important point for me would be
just getting WebSocket out to be usable in a real world applications, so
if other options are what's required to get this protocol into state where
it will be again deployed in web browsers, then I will not try to stop you.

- Joonas

PS. Sorry Sal, looks like the mailing list address dropped out of the  
original message.

From ifette@google.com  Tue Jan 18 11:14:53 2011
Return-Path: <ifette@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 C5DBD3A6F6C for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 11:14:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.92
X-Spam-Level: 
X-Spam-Status: No, score=-103.92 tagged_above=-999 required=5 tests=[AWL=-1.244, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 xt0hjnGrSqDp for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 11:14:52 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 0780B3A6F54 for <hybi@ietf.org>; Tue, 18 Jan 2011 11:14:51 -0800 (PST)
Received: from kpbe20.cbf.corp.google.com (kpbe20.cbf.corp.google.com [172.25.105.84]) by smtp-out.google.com with ESMTP id p0IJHSRk027240 for <hybi@ietf.org>; Tue, 18 Jan 2011 11:17:28 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295378249; bh=yrqOCngcHBjKaIltwg7sukGa9Og=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=t0xPQhvZjYO7MzVREq8owJji4BuJPXlHlcbxVdeu1oZKHQCGHW2ggWma1JKQWC6P9 F7bUgmsrt4EsWIPG+Ly5g==
Received: from iyi42 (iyi42.prod.google.com [10.241.51.42]) by kpbe20.cbf.corp.google.com with ESMTP id p0IJHK6R018567 for <hybi@ietf.org>; Tue, 18 Jan 2011 11:17:27 -0800
Received: by iyi42 with SMTP id 42so6549750iyi.17 for <hybi@ietf.org>; Tue, 18 Jan 2011 11:17:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=78tNIs8zxZyevb/pAjbou5Rp31yyBKLVH2jW2enhtVA=; b=ughrMIzmO55/JTytt5FSHFIlDjJ98xZGm0nDnHaVdoo0mBsXELLbn2ca6uCD+3g9TM 1VlmZ9B99FFFTgEWpupg==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=Z3hi3X0vqSpx/8R1Ekw97c9XZRUJv9BogHNlcr7TgGAY+c+jaKbJQ2IeMlSEFBii8u xWk0ce5WEd7g6RVhztfA==
MIME-Version: 1.0
Received: by 10.231.39.71 with SMTP id f7mr6501301ibe.182.1295378104322; Tue, 18 Jan 2011 11:15:04 -0800 (PST)
Received: by 10.231.20.69 with HTTP; Tue, 18 Jan 2011 11:15:04 -0800 (PST)
In-Reply-To: <4D2E0863.2040804@ericsson.com>
References: <4D2E0863.2040804@ericsson.com>
Date: Tue, 18 Jan 2011 11:15:04 -0800
Message-ID: <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: multipart/alternative; boundary=000325575956c20db5049a23b7c6
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Tue, 18 Jan 2011 19:14:53 -0000

--000325575956c20db5049a23b7c6
Content-Type: text/plain; charset=UTF-8

I am not entirely sure what people mean by a fixed mask. For it to be worth
while, the mask would have to change every frame so that the attacker
doesn't have advanced knowledge of the mask.

So, for me to live with it, we have to have something that changes every
frame if it's worth doing at all.

As for whether we use XOR(SHA(c-nonce, s-nonce, rand)) or AES, I could live
with either. Frankly I don't think that either are prohibitively expensive,
especially compared to something that would cause us to significantly
increase bandwidth requirements (base64).

-Ian

On Wed, Jan 12, 2011 at 12:00 PM, Salvatore Loreto <
salvatore.loreto@ericsson.com> wrote:

> Hi all,
>
>
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce
> security risks.
>
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been deeply
> discussed.
>
> In order to settle the question of masking and find a way forward that has
> a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and summarized
> at
> some point in the mailing list by Eric Rescorla)
>
>
> 1. a fixed mask carried entirely in the packet.
>
> 2. A longish repeated mask computed from the packet. For concreteness,
>   suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> <packet-key>), but
>   obviously there's flexibility here.
>
> 3. A fully generated mask (if so specify also what you would like to use
> e.g. AES-CTR or HMAC-SHA).
>
>
> Please indicate your preference(s) or the one can meet your bar for "I
> could live with that";
> In the case you have more then one, please put the choices in a preference
> order.
>
> This poll will run until January 18th.
>
> cheers
> /Sal
>
> --
> Salvatore Loreto
> www.sloreto.com
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--000325575956c20db5049a23b7c6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I am not entirely sure what people mean by a fixed mask. For it to be worth=
 while, the mask would have to change every frame so that the attacker does=
n&#39;t have advanced knowledge of the mask.<div><br></div><div>So, for me =
to live with it, we have to have something that changes every frame if it&#=
39;s worth doing at all.</div>
<div><br></div><div>As for whether we use XOR(SHA(c-nonce, s-nonce, rand)) =
or AES, I could live with either. Frankly I don&#39;t think that either are=
 prohibitively expensive, especially compared to something that would cause=
 us to significantly increase bandwidth requirements (base64).</div>
<div><br></div><div>-Ian<br><br><div class=3D"gmail_quote">On Wed, Jan 12, =
2011 at 12:00 PM, Salvatore Loreto <span dir=3D"ltr">&lt;<a href=3D"mailto:=
salvatore.loreto@ericsson.com">salvatore.loreto@ericsson.com</a>&gt;</span>=
 wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">Hi all,<br>
<br>
<br>
Masking from the client to the server<br>
has reached strong consensus within this wg as a mechanism to reduce securi=
ty risks.<br>
<br>
However there is disagreement on the actual method for masking.<br>
The technical differences, pro and cons, advantages and disadvantages,<br>
as well as the legal implications of each method have already been deeply d=
iscussed.<br>
<br>
In order to settle the question of masking and find a way forward that has =
a wide acceptance,<br>
Joe and I, as HyBi chairs, want to check where the consensus is<br>
on the following relevant options that have been discussed (and summarized =
at<br>
some point in the mailing list by Eric Rescorla)<br>
<br>
<br>
1. a fixed mask carried entirely in the packet.<br>
<br>
2. A longish repeated mask computed from the packet. For concreteness,<br>
 =C2=A0 suppose HMAC-SHA1(&lt;uuid&gt;, &lt;server-conn-key&gt; || &lt;clie=
nt-conn-key&gt; || &lt;packet-key&gt;), but<br>
 =C2=A0 obviously there&#39;s flexibility here.<br>
<br>
3. A fully generated mask (if so specify also what you would like to use e.=
g. AES-CTR or HMAC-SHA).<br>
<br>
<br>
Please indicate your preference(s) or the one can meet your bar for &quot;I=
 could live with that&quot;;<br>
In the case you have more then one, please put the choices in a preference =
order.<br>
<br>
This poll will run until January 18th.<br>
<br>
cheers<br>
/Sal<br><font color=3D"#888888">
<br>
-- <br>
Salvatore Loreto<br>
<a href=3D"http://www.sloreto.com" target=3D"_blank">www.sloreto.com</a><br=
>
<br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</font></blockquote></div><br></div>

--000325575956c20db5049a23b7c6--

From gmonte@microsoft.com  Tue Jan 18 11:29:09 2011
Return-Path: <gmonte@microsoft.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 8A9233A7028 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 11:29:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.489
X-Spam-Level: 
X-Spam-Status: No, score=-10.489 tagged_above=-999 required=5 tests=[AWL=0.109, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
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 geotqYUZdfmi for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 11:29:08 -0800 (PST)
Received: from smtp.microsoft.com (mail3.microsoft.com [131.107.115.214]) by core3.amsl.com (Postfix) with ESMTP id BC5693A7021 for <hybi@ietf.org>; Tue, 18 Jan 2011 11:29:08 -0800 (PST)
Received: from TK5EX14HUBC103.redmond.corp.microsoft.com (157.54.86.9) by TK5-EXGWY-E803.partners.extranet.microsoft.com (10.251.56.169) with Microsoft SMTP Server (TLS) id 8.2.176.0; Tue, 18 Jan 2011 11:31:46 -0800
Received: from TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com (157.54.71.68) by TK5EX14HUBC103.redmond.corp.microsoft.com (157.54.86.9) with Microsoft SMTP Server (TLS) id 14.1.255.3; Tue, 18 Jan 2011 11:31:46 -0800
Received: from TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com ([169.254.4.151]) by TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com ([157.54.71.68]) with mapi; Tue, 18 Jan 2011 11:31:46 -0800
From: Gabriel Montenegro <gmonte@microsoft.com>
To: "ifette@google.com" <ifette@google.com>, Salvatore Loreto <salvatore.loreto@ericsson.com>
Thread-Topic: [hybi] Straw-poll on Masking options
Thread-Index: AQHLspNzL4SDXxzCSkqEkHcVEbJVl5PXqPoA//9927A=
Date: Tue, 18 Jan 2011 19:31:45 +0000
Message-ID: <CA566BAEAD6B3F4E8B5C5C4F61710C110FD2B988@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
References: <4D2E0863.2040804@ericsson.com> <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com>
In-Reply-To: <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Content-Type: multipart/alternative; boundary="_000_CA566BAEAD6B3F4E8B5C5C4F61710C110FD2B988TK5EX14MBXW604w_"
MIME-Version: 1.0
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Tue, 18 Jan 2011 19:29:09 -0000

--_000_CA566BAEAD6B3F4E8B5C5C4F61710C110FD2B988TK5EX14MBXW604w_
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64

SSBhbSBub3QgZW50aXJlbHkgc3VyZSB3aGF0IHBlb3BsZSBtZWFuIGJ5IGEgZml4ZWQgbWFzay4g
Rm9yIGl0IHRvIGJlIHdvcnRoIHdoaWxlLCB0aGUgbWFzayB3b3VsZCBoYXZlIHRvIGNoYW5nZSBl
dmVyeSBmcmFtZSBzbyB0aGF0IHRoZSBhdHRhY2tlciBkb2Vzbid0IGhhdmUgYWR2YW5jZWQga25v
d2xlZGdlIG9mIHRoZSBtYXNrLg0KDQpTbywgZm9yIG1lIHRvIGxpdmUgd2l0aCBpdCwgd2UgaGF2
ZSB0byBoYXZlIHNvbWV0aGluZyB0aGF0IGNoYW5nZXMgZXZlcnkgZnJhbWUgaWYgaXQncyB3b3J0
aCBkb2luZyBhdCBhbGwuDQoNCltnYWJdIEFncmVlLiBNeSB1bmRlcnN0YW5kaW5nIGlzIHRoYXQg
dGhpcyBpcyBvcHRpb24gIzEsIGEgcGVyLWZyYW1lIGtleS4NCg==

--_000_CA566BAEAD6B3F4E8B5C5C4F61710C110FD2B988TK5EX14MBXW604w_
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: base64

PGh0bWwgeG1sbnM6dj0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp2bWwiIHhtbG5zOm89InVy
bjpzY2hlbWFzLW1pY3Jvc29mdC1jb206b2ZmaWNlOm9mZmljZSIgeG1sbnM6dz0idXJuOnNjaGVt
YXMtbWljcm9zb2Z0LWNvbTpvZmZpY2U6d29yZCIgeG1sbnM6bT0iaHR0cDovL3NjaGVtYXMubWlj
cm9zb2Z0LmNvbS9vZmZpY2UvMjAwNC8xMi9vbW1sIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
VFIvUkVDLWh0bWw0MCI+PGhlYWQ+PG1ldGEgaHR0cC1lcXVpdj1Db250ZW50LVR5cGUgY29udGVu
dD0idGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij48bWV0YSBuYW1lPUdlbmVyYXRvciBjb250ZW50
PSJNaWNyb3NvZnQgV29yZCAxNCAoZmlsdGVyZWQgbWVkaXVtKSI+PHN0eWxlPjwhLS0NCi8qIEZv
bnQgRGVmaW5pdGlvbnMgKi8NCkBmb250LWZhY2UNCgl7Zm9udC1mYW1pbHk6Ik1TIE1pbmNobyI7
DQoJcGFub3NlLTE6MiAyIDYgOSA0IDIgNSA4IDMgNDt9DQpAZm9udC1mYWNlDQoJe2ZvbnQtZmFt
aWx5OiJNUyBNaW5jaG8iOw0KCXBhbm9zZS0xOjIgMiA2IDkgNCAyIDUgOCAzIDQ7fQ0KQGZvbnQt
ZmFjZQ0KCXtmb250LWZhbWlseTpDYWxpYnJpOw0KCXBhbm9zZS0xOjIgMTUgNSAyIDIgMiA0IDMg
MiA0O30NCkBmb250LWZhY2UNCgl7Zm9udC1mYW1pbHk6IlxATVMgTWluY2hvIjsNCglwYW5vc2Ut
MToyIDIgNiA5IDQgMiA1IDggMyA0O30NCi8qIFN0eWxlIERlZmluaXRpb25zICovDQpwLk1zb05v
cm1hbCwgbGkuTXNvTm9ybWFsLCBkaXYuTXNvTm9ybWFsDQoJe21hcmdpbjowaW47DQoJbWFyZ2lu
LWJvdHRvbTouMDAwMXB0Ow0KCWZvbnQtc2l6ZToxMi4wcHQ7DQoJZm9udC1mYW1pbHk6IlRpbWVz
IE5ldyBSb21hbiIsInNlcmlmIjt9DQphOmxpbmssIHNwYW4uTXNvSHlwZXJsaW5rDQoJe21zby1z
dHlsZS1wcmlvcml0eTo5OTsNCgljb2xvcjpibHVlOw0KCXRleHQtZGVjb3JhdGlvbjp1bmRlcmxp
bmU7fQ0KYTp2aXNpdGVkLCBzcGFuLk1zb0h5cGVybGlua0ZvbGxvd2VkDQoJe21zby1zdHlsZS1w
cmlvcml0eTo5OTsNCgljb2xvcjpwdXJwbGU7DQoJdGV4dC1kZWNvcmF0aW9uOnVuZGVybGluZTt9
DQpzcGFuLkVtYWlsU3R5bGUxNw0KCXttc28tc3R5bGUtdHlwZTpwZXJzb25hbC1yZXBseTsNCglm
b250LWZhbWlseToiQ2FsaWJyaSIsInNhbnMtc2VyaWYiOw0KCWNvbG9yOiMxRjQ5N0Q7fQ0KLk1z
b0NocERlZmF1bHQNCgl7bXNvLXN0eWxlLXR5cGU6ZXhwb3J0LW9ubHk7DQoJZm9udC1mYW1pbHk6
IkNhbGlicmkiLCJzYW5zLXNlcmlmIjt9DQpAcGFnZSBXb3JkU2VjdGlvbjENCgl7c2l6ZTo4LjVp
biAxMS4waW47DQoJbWFyZ2luOjEuMGluIDEuMGluIDEuMGluIDEuMGluO30NCmRpdi5Xb3JkU2Vj
dGlvbjENCgl7cGFnZTpXb3JkU2VjdGlvbjE7fQ0KLS0+PC9zdHlsZT48IS0tW2lmIGd0ZSBtc28g
OV0+PHhtbD4NCjxvOnNoYXBlZGVmYXVsdHMgdjpleHQ9ImVkaXQiIHNwaWRtYXg9IjEwMjYiIC8+
DQo8L3htbD48IVtlbmRpZl0tLT48IS0tW2lmIGd0ZSBtc28gOV0+PHhtbD4NCjxvOnNoYXBlbGF5
b3V0IHY6ZXh0PSJlZGl0Ij4NCjxvOmlkbWFwIHY6ZXh0PSJlZGl0IiBkYXRhPSIxIiAvPg0KPC9v
OnNoYXBlbGF5b3V0PjwveG1sPjwhW2VuZGlmXS0tPjwvaGVhZD48Ym9keSBsYW5nPUVOLVVTIGxp
bms9Ymx1ZSB2bGluaz1wdXJwbGU+PGRpdiBjbGFzcz1Xb3JkU2VjdGlvbjE+PGRpdiBzdHlsZT0n
Ym9yZGVyOm5vbmU7Ym9yZGVyLWxlZnQ6c29saWQgYmx1ZSAxLjVwdDtwYWRkaW5nOjBpbiAwaW4g
MGluIDQuMHB0Jz48cCBjbGFzcz1Nc29Ob3JtYWw+SSBhbSBub3QgZW50aXJlbHkgc3VyZSB3aGF0
IHBlb3BsZSBtZWFuIGJ5IGEgZml4ZWQgbWFzay4gRm9yIGl0IHRvIGJlIHdvcnRoIHdoaWxlLCB0
aGUgbWFzayB3b3VsZCBoYXZlIHRvIGNoYW5nZSBldmVyeSBmcmFtZSBzbyB0aGF0IHRoZSBhdHRh
Y2tlciBkb2Vzbid0IGhhdmUgYWR2YW5jZWQga25vd2xlZGdlIG9mIHRoZSBtYXNrLjxvOnA+PC9v
OnA+PC9wPjxkaXY+PHAgY2xhc3M9TXNvTm9ybWFsPjxvOnA+Jm5ic3A7PC9vOnA+PC9wPjwvZGl2
PjxkaXY+PHAgY2xhc3M9TXNvTm9ybWFsPlNvLCBmb3IgbWUgdG8gbGl2ZSB3aXRoIGl0LCB3ZSBo
YXZlIHRvIGhhdmUgc29tZXRoaW5nIHRoYXQgY2hhbmdlcyBldmVyeSBmcmFtZSBpZiBpdCdzIHdv
cnRoIGRvaW5nIGF0IGFsbC48bzpwPjwvbzpwPjwvcD48L2Rpdj48ZGl2PjxwIGNsYXNzPU1zb05v
cm1hbD48bzpwPiZuYnNwOzwvbzpwPjwvcD48L2Rpdj48ZGl2PjxwIGNsYXNzPU1zb05vcm1hbD48
Yj48aT48c3BhbiBzdHlsZT0nZm9udC1zaXplOjExLjBwdDtmb250LWZhbWlseToiQ2FsaWJyaSIs
InNhbnMtc2VyaWYiO2NvbG9yOiMxRjQ5N0QnPltnYWJdIEFncmVlLiBNeSB1bmRlcnN0YW5kaW5n
IGlzIHRoYXQgdGhpcyBpcyBvcHRpb24gIzEsIGEgcGVyLWZyYW1lIGtleS4gPC9zcGFuPjwvaT48
L2I+PHNwYW4gc3R5bGU9J2ZvbnQtc2l6ZToxMS4wcHQ7Zm9udC1mYW1pbHk6IkNhbGlicmkiLCJz
YW5zLXNlcmlmIjtjb2xvcjojMUY0OTdEJz7CoDxvOnA+PC9vOnA+PC9zcGFuPjwvcD48L2Rpdj48
L2Rpdj48L2Rpdj48L2JvZHk+PC9odG1sPg==

--_000_CA566BAEAD6B3F4E8B5C5C4F61710C110FD2B988TK5EX14MBXW604w_--

From w@1wt.eu  Tue Jan 18 11:31:43 2011
Return-Path: <w@1wt.eu>
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 45D653A7066 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 11:31:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.065
X-Spam-Level: 
X-Spam-Status: No, score=-2.065 tagged_above=-999 required=5 tests=[AWL=-0.022, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 MJAvdZ1siufd for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 11:31:42 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id F22663A7028 for <hybi@ietf.org>; Tue, 18 Jan 2011 11:31:41 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0IJYFIj027049; Tue, 18 Jan 2011 20:34:15 +0100
Date: Tue, 18 Jan 2011 20:34:14 +0100
From: Willy Tarreau <w@1wt.eu>
To: "Ian Fette (????????????????????????)" <ifette@google.com>
Message-ID: <20110118193414.GA26811@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: [hybi] CPU vs bandwidth (was Straw-poll on Masking options)
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: Tue, 18 Jan 2011 19:31:43 -0000

Hi Ian,

On Tue, Jan 18, 2011 at 11:15:04AM -0800, Ian Fette (????????????????????????) wrote:
> I am not entirely sure what people mean by a fixed mask. For it to be worth
> while, the mask would have to change every frame so that the attacker
> doesn't have advanced knowledge of the mask.

That was point "1.5" which was not kept in the poll.

> So, for me to live with it, we have to have something that changes every
> frame if it's worth doing at all.
> 
> As for whether we use XOR(SHA(c-nonce, s-nonce, rand)) or AES, I could live
> with either. Frankly I don't think that either are prohibitively expensive,
> especially compared to something that would cause us to significantly
> increase bandwidth requirements (base64).

It depends on how you see it. Speaking as someone who develop intermediaries,
having a 3 GHz CPU not being able to process 1 Gbps of traffic is a big
concern, considering that the same machine has no issue at 10 Gbps of HTTP.

If we have to make the trade-off, I'd say that "base128" is "only" 14%
network overhead for frames above around a hundred bytes, while AES-CTR
is a >1000% CPU overhead for all frame sizes. XOR(HMAC/SHA) is even a
much higher overhead for small frames which should be our main target.

That's something to keep in mind. We could try to think how much time it
will take for network speeds to increase by our overhead and how much time
it will take for CPU speeds to increase by our overhead. In the first case
it's just a matter of few months, maybe only one, in the second case it's
a matter of several years.

I'm not much for causing network overheads but I'm comparing two costs
if we have to choose an alternative.

The simple XOR has none of them though.

Regards,
Willy


From jat@google.com  Tue Jan 18 11:35:13 2011
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 70DFF3A7078 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 11:35:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.505
X-Spam-Level: 
X-Spam-Status: No, score=-104.505 tagged_above=-999 required=5 tests=[AWL=-1.529, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 gzxjLU3uzyTq for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 11:35:12 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 55BF03A7021 for <hybi@ietf.org>; Tue, 18 Jan 2011 11:35:12 -0800 (PST)
Received: from hpaq13.eem.corp.google.com (hpaq13.eem.corp.google.com [172.25.149.13]) by smtp-out.google.com with ESMTP id p0IJbnjo023625 for <hybi@ietf.org>; Tue, 18 Jan 2011 11:37:49 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295379469; bh=lUOpYVq0eHt3myIV7YpFGkJnE8k=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=nS21ybHGWHbh2N61Rd/tViXd3+2DcrXM9IXBtZfcANGPwPkaG/ZGAL7HAuMv1g/pv DKkJGX7BlGfNo93/8BSHQ==
Received: from qyk32 (qyk32.prod.google.com [10.241.83.160]) by hpaq13.eem.corp.google.com with ESMTP id p0IJWS2p018702 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Tue, 18 Jan 2011 11:37:48 -0800
Received: by qyk32 with SMTP id 32so2977541qyk.9 for <hybi@ietf.org>; Tue, 18 Jan 2011 11:37:48 -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=FCW7vMXkUnHYVTTjwu0cg4JZz+IKftlvSYSTeHyE+ZA=; b=sRGhCA+1SCwDpwqwdZjq2yZNQ7RgiaRWFMd3bsm6gtU4VlpS8UA0D/SMT5CI/8tck/ 57vd13FEsqgcp/Im5rOg==
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=KGuPf5M014BFUkb9kUa3Nbt+0BHu6Bn58bygTk6Tn2vrUhK4kDS37AwVKE8dp4dCuM O95KzOHWpR5FdJKmXang==
Received: by 10.229.224.136 with SMTP id io8mr5059039qcb.250.1295379467919; Tue, 18 Jan 2011 11:37:47 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.78.96 with HTTP; Tue, 18 Jan 2011 11:37:25 -0800 (PST)
In-Reply-To: <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com>
References: <4D2E0863.2040804@ericsson.com> <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Tue, 18 Jan 2011 14:37:25 -0500
Message-ID: <AANLkTinU7ZL1GuCABvWmSNgSFbCXn4sDHP_6UkyE20Li@mail.gmail.com>
To: ifette@google.com
Content-Type: multipart/alternative; boundary=0016364d2e3108e200049a24094e
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Tue, 18 Jan 2011 19:35:13 -0000

--0016364d2e3108e200049a24094e
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 18, 2011 at 2:15 PM, Ian Fette (=E3=82=A4=E3=82=A2=E3=83=B3=E3=
=83=95=E3=82=A7=E3=83=83=E3=83=86=E3=82=A3) <ifette@google.com>wrote:

> I am not entirely sure what people mean by a fixed mask. For it to be wor=
th
> while, the mask would have to change every frame so that the attacker
> doesn't have advanced knowledge of the mask.
>
> So, for me to live with it, we have to have something that changes every
> frame if it's worth doing at all.
>

I believe #1 means simply a random per-frame mask which does not depend on
any information outside the frame to interpret it, as opposed to requiring
client-nonce or server-nonce (which means any interpretation of the framing
requires keeping extra state).

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

--0016364d2e3108e200049a24094e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Jan 18, 2011 at 2:15 PM, Ian Fette (=E3=
=82=A4=E3=82=A2=E3=83=B3=E3=83=95=E3=82=A7=E3=83=83=E3=83=86=E3=82=A3) <spa=
n dir=3D"ltr">&lt;<a href=3D"mailto:ifette@google.com">ifette@google.com</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I am not entirely sure what people mean by a fixed mask. For it to be worth=
 while, the mask would have to change every frame so that the attacker does=
n&#39;t have advanced knowledge of the mask.<div><br></div><div>So, for me =
to live with it, we have to have something that changes every frame if it&#=
39;s worth doing at all.</div>

</blockquote><div><br></div><div>I believe #1 means simply a random per-fra=
me mask which does not depend on any information outside the frame to inter=
pret it, as opposed to requiring client-nonce or server-nonce (which means =
any interpretation of the framing requires keeping extra state).</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--0016364d2e3108e200049a24094e--

From ifette@google.com  Tue Jan 18 12:25:37 2011
Return-Path: <ifette@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 5ABBB3A7070 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 12:25:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.87
X-Spam-Level: 
X-Spam-Status: No, score=-103.87 tagged_above=-999 required=5 tests=[AWL=-1.194, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 SD3UmhbEmbpo for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 12:25:36 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 2C9B43A7069 for <hybi@ietf.org>; Tue, 18 Jan 2011 12:25:36 -0800 (PST)
Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id p0IKSDIZ029422 for <hybi@ietf.org>; Tue, 18 Jan 2011 12:28:13 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295382493; bh=pi9QPbX4mq2DQitzCvBJIZlqqcY=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=P4NiOiryjlYFplGW/DT9yS4hBg/8NVLR0N3R2Ed9m+LJlTgWYZ6kFL2V7fyZU/BQj vmx76MNo7s1gaL6zBDBow==
Received: from iwn9 (iwn9.prod.google.com [10.241.68.73]) by wpaz1.hot.corp.google.com with ESMTP id p0IKOiKI024013 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Tue, 18 Jan 2011 12:28:11 -0800
Received: by iwn9 with SMTP id 9so48635iwn.5 for <hybi@ietf.org>; Tue, 18 Jan 2011 12:28:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Q+GEBfsxdNXgjwlLDLRAI7F/xf2M76yemv6aMiO1L8c=; b=TpV7R7iowMzZRgMS6KZkor75gzVZN1FWzDt1u+PvB3hQj6jMPibMes6MPVZcMbj105 PKeGUaZuMkBFf+e1u4VA==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=pwYixLNNhWxhpubjPLTgIWzT/6ZOZKs4D8dmSwfR8/RBNvAqx3TrIuadMXJZG3FFby BRxwmIZEjd62q9MCUpew==
MIME-Version: 1.0
Received: by 10.231.37.136 with SMTP id x8mr6636639ibd.132.1295382491512; Tue, 18 Jan 2011 12:28:11 -0800 (PST)
Received: by 10.231.20.69 with HTTP; Tue, 18 Jan 2011 12:28:11 -0800 (PST)
In-Reply-To: <AANLkTinU7ZL1GuCABvWmSNgSFbCXn4sDHP_6UkyE20Li@mail.gmail.com>
References: <4D2E0863.2040804@ericsson.com> <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com> <AANLkTinU7ZL1GuCABvWmSNgSFbCXn4sDHP_6UkyE20Li@mail.gmail.com>
Date: Tue, 18 Jan 2011 12:28:11 -0800
Message-ID: <AANLkTinQac9yJLF9y2mO_u+FYa1pdG+YH7YidxYUzGzB@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: John Tamplin <jat@google.com>
Content-Type: multipart/alternative; boundary=00032557459e4140aa049a24bdf6
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Tue, 18 Jan 2011 20:25:37 -0000

--00032557459e4140aa049a24bdf6
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 18, 2011 at 11:37 AM, John Tamplin <jat@google.com> wrote:

> On Tue, Jan 18, 2011 at 2:15 PM, Ian Fette (=E3=82=A4=E3=82=A2=E3=83=B3=
=E3=83=95=E3=82=A7=E3=83=83=E3=83=86=E3=82=A3) <ifette@google.com>wrote:
>
>> I am not entirely sure what people mean by a fixed mask. For it to be
>> worth while, the mask would have to change every frame so that the attac=
ker
>> doesn't have advanced knowledge of the mask.
>>
>> So, for me to live with it, we have to have something that changes every
>> frame if it's worth doing at all.
>>
>
> I believe #1 means simply a random per-frame mask which does not depend o=
n
> any information outside the frame to interpret it, as opposed to requirin=
g
> client-nonce or server-nonce (which means any interpretation of the frami=
ng
> requires keeping extra state).
>
>
In that case, I can live with all three. I have a preference for AES as it'=
s
easier to reason about its security properties and I don't really think tha=
t
the "export restriction" barriers are that big a deal, indeed SSL seems to
be deployed all over the place.

-Ian


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

--00032557459e4140aa049a24bdf6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Jan 18, 2011 at 11:37 AM, John Tamplin <=
span dir=3D"ltr">&lt;<a href=3D"mailto:jat@google.com">jat@google.com</a>&g=
t;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"gmail_quote"><div class=3D"im">On Tue, Jan 18, 2011 at 2:15 P=
M, Ian Fette (=E3=82=A4=E3=82=A2=E3=83=B3=E3=83=95=E3=82=A7=E3=83=83=E3=83=
=86=E3=82=A3) <span dir=3D"ltr">&lt;<a href=3D"mailto:ifette@google.com" ta=
rget=3D"_blank">ifette@google.com</a>&gt;</span> wrote:<br><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pad=
ding-left:1ex">


I am not entirely sure what people mean by a fixed mask. For it to be worth=
 while, the mask would have to change every frame so that the attacker does=
n&#39;t have advanced knowledge of the mask.<div><br></div><div>So, for me =
to live with it, we have to have something that changes every frame if it&#=
39;s worth doing at all.</div>


</blockquote><div><br></div></div><div>I believe #1 means simply a random p=
er-frame mask which does not depend on any information outside the frame to=
 interpret it, as opposed to requiring client-nonce or server-nonce (which =
means any interpretation of the framing requires keeping extra state).</div=
>


</div><div><div></div><div class=3D"h5"><br></div></div></blockquote><div><=
br></div><div>In that case, I can live with all three. I have a preference =
for AES as it&#39;s easier to reason about its security properties and I do=
n&#39;t really think that the &quot;export restriction&quot; barriers are t=
hat big a deal, indeed SSL seems to be deployed all over the place.</div>
<div><br></div><div>-Ian</div><div>=C2=A0</div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x;"><div><div class=3D"h5">-- <br>John A. Tamplin<br>Software Engineer (GWT=
), Google<br>

</div></div></blockquote></div><br>

--00032557459e4140aa049a24bdf6--

From senthilkumar.peelikkampatti@gmail.com  Tue Jan 18 14:27:01 2011
Return-Path: <senthilkumar.peelikkampatti@gmail.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 6CC4C3A6DCE for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 14:27:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.598
X-Spam-Level: 
X-Spam-Status: No, score=-3.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 SlHj9qxiaYHZ for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 14:26:59 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 71B4B3A6F05 for <hybi@ietf.org>; Tue, 18 Jan 2011 14:26:58 -0800 (PST)
Received: by wyf23 with SMTP id 23so166449wyf.31 for <hybi@ietf.org>; Tue, 18 Jan 2011 14:29:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=P0vaq5RAQ3ZpQtgWM2B5O4TBLsP6cJBlmET6Tt/hg7Q=; b=Qf9TiL80NoMSZ9ZF2SF2YJRq7kry/Ej1KhwDnC7AK9MSxpInayuAVnc5KPYNAAZR99 9fBNdispaOYiP+LZ+EH1TxmwzuV/MjzSAkuYcXbPfF0A0lDbOFIaPf12vy7VeZuM0Rsi 6KtomtY4DtFVm3d8ILMg37Y5kconZ9pXGZWi0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=qjw3pYxvY4XFsLlXOx0TVa5bjnVLJ4XPGVzqIJ/8bAzJBErVspPdVfgFU8kbmyLgLI hZ92Bb2BfrgehfgrR+UNXUenie2ISJEa/AhaT+5CRyMzGaLYgggxEJo6t2fExOihdCXu oHnL+Etxuonyiy3gPVjc4QfJAJBTQfWuHNIGU=
MIME-Version: 1.0
Received: by 10.227.144.12 with SMTP id x12mr6305288wbu.102.1295389775667; Tue, 18 Jan 2011 14:29:35 -0800 (PST)
Received: by 10.227.151.133 with HTTP; Tue, 18 Jan 2011 14:29:35 -0800 (PST)
In-Reply-To: <4D2E0863.2040804@ericsson.com>
References: <4D2E0863.2040804@ericsson.com>
Date: Tue, 18 Jan 2011 16:29:35 -0600
Message-ID: <AANLkTimgc2294ZaknsfTj7mUvSbBe-zRP+wRT6PxGAP2@mail.gmail.com>
From: Senthilkumar Peelikkampatti <senthilkumar.peelikkampatti@gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: multipart/alternative; boundary=0016e659f7f26ca23f049a266f8f
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Tue, 18 Jan 2011 22:27:02 -0000

--0016e659f7f26ca23f049a266f8f
Content-Type: text/plain; charset=ISO-8859-1

I prefer option 1, though I wish to have no masking, anyway it makes better
trade off for me.

Other than having WS and WSS, we can split WS into masked and unmasked
variant,

1) WSS for secured connection (wss://)
2) WSMASKED for masked  (wsmask://)
3) WS for  (ws://) no masking

When we move on to perfect defect free intermediaries we can stick to WS,
this gives the application developer  option to choose based on what kind of
intermediary they have.

When we talk to about Browser ----> Intermediary ------> http server
--------> Websocket server, architecture choice is with app developer for
everything but browser. If we provide that option, it would definitely help
next million users chat/websocket app developer option to choose.

Senthilkumar Peelikkampatti,
https://github.com/sendtopms/Erlwebsockserver.


On Wed, Jan 12, 2011 at 2:00 PM, Salvatore Loreto <
salvatore.loreto@ericsson.com> wrote:

> Hi all,
>
>
> Masking from the client to the server
> has reached strong consensus within this wg as a mechanism to reduce
> security risks.
>
> However there is disagreement on the actual method for masking.
> The technical differences, pro and cons, advantages and disadvantages,
> as well as the legal implications of each method have already been deeply
> discussed.
>
> In order to settle the question of masking and find a way forward that has
> a wide acceptance,
> Joe and I, as HyBi chairs, want to check where the consensus is
> on the following relevant options that have been discussed (and summarized
> at
> some point in the mailing list by Eric Rescorla)
>
>
> 1. a fixed mask carried entirely in the packet.
>
> 2. A longish repeated mask computed from the packet. For concreteness,
>   suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
> <packet-key>), but
>   obviously there's flexibility here.
>
> 3. A fully generated mask (if so specify also what you would like to use
> e.g. AES-CTR or HMAC-SHA).
>
>
> Please indicate your preference(s) or the one can meet your bar for "I
> could live with that";
> In the case you have more then one, please put the choices in a preference
> order.
>
> This poll will run until January 18th.
>
> cheers
> /Sal
>
> --
> Salvatore Loreto
> www.sloreto.com
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>



-- 
Regards,
Senthilkumar Peelikkampatti,
http://pmsenthilkumar.blogspot.com/

--0016e659f7f26ca23f049a266f8f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I prefer option 1, though I wish to have no masking, anyway it makes better=
 trade off for me.<br><br>Other than having WS and WSS, we can split WS int=
o masked and unmasked variant,=A0 <br><br>1) WSS for secured connection (ws=
s://)<br>
2) WSMASKED for masked=A0 (wsmask://)<br>3) WS for=A0 (ws://) no masking<br=
><br>When we move on to perfect defect free intermediaries we can stick to =
WS, this gives the application developer=A0 option to choose based on what =
kind of intermediary they have. <br>
<br>When we talk to about Browser ----&gt; Intermediary ------&gt; http ser=
ver --------&gt; Websocket server, architecture choice is with app develope=
r for everything but browser. If we provide that option, it would definitel=
y help next million users chat/websocket app developer option to choose. <b=
r>
<br>Senthilkumar Peelikkampatti,<br><a href=3D"https://github.com/sendtopms=
/Erlwebsockserver">https://github.com/sendtopms/Erlwebsockserver</a>.<br><b=
r><br><div class=3D"gmail_quote">On Wed, Jan 12, 2011 at 2:00 PM, Salvatore=
 Loreto <span dir=3D"ltr">&lt;<a href=3D"mailto:salvatore.loreto@ericsson.c=
om">salvatore.loreto@ericsson.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">Hi all,<br>
<br>
<br>
Masking from the client to the server<br>
has reached strong consensus within this wg as a mechanism to reduce securi=
ty risks.<br>
<br>
However there is disagreement on the actual method for masking.<br>
The technical differences, pro and cons, advantages and disadvantages,<br>
as well as the legal implications of each method have already been deeply d=
iscussed.<br>
<br>
In order to settle the question of masking and find a way forward that has =
a wide acceptance,<br>
Joe and I, as HyBi chairs, want to check where the consensus is<br>
on the following relevant options that have been discussed (and summarized =
at<br>
some point in the mailing list by Eric Rescorla)<br>
<br>
<br>
1. a fixed mask carried entirely in the packet.<br>
<br>
2. A longish repeated mask computed from the packet. For concreteness,<br>
 =A0 suppose HMAC-SHA1(&lt;uuid&gt;, &lt;server-conn-key&gt; || &lt;client-=
conn-key&gt; || &lt;packet-key&gt;), but<br>
 =A0 obviously there&#39;s flexibility here.<br>
<br>
3. A fully generated mask (if so specify also what you would like to use e.=
g. AES-CTR or HMAC-SHA).<br>
<br>
<br>
Please indicate your preference(s) or the one can meet your bar for &quot;I=
 could live with that&quot;;<br>
In the case you have more then one, please put the choices in a preference =
order.<br>
<br>
This poll will run until January 18th.<br>
<br>
cheers<br>
/Sal<br><font color=3D"#888888">
<br>
-- <br>
Salvatore Loreto<br>
<a href=3D"http://www.sloreto.com" target=3D"_blank">www.sloreto.com</a><br=
>
<br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>Regards,<br>Sent=
hilkumar Peelikkampatti,<br><a href=3D"http://pmsenthilkumar.blogspot.com/"=
>http://pmsenthilkumar.blogspot.com/</a><br><br>

--0016e659f7f26ca23f049a266f8f--

From ifette@google.com  Tue Jan 18 14:29:49 2011
Return-Path: <ifette@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 B15D33A6F67 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 14:29:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.448
X-Spam-Level: 
X-Spam-Status: No, score=-105.448 tagged_above=-999 required=5 tests=[AWL=0.228, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, 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 E09MXw8EvdKg for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 14:29:47 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id B59B43A6F58 for <hybi@ietf.org>; Tue, 18 Jan 2011 14:29:47 -0800 (PST)
Received: from kpbe11.cbf.corp.google.com (kpbe11.cbf.corp.google.com [172.25.105.75]) by smtp-out.google.com with ESMTP id p0IMWPkw027446 for <hybi@ietf.org>; Tue, 18 Jan 2011 14:32:25 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295389945; bh=l2nJXBrgfKNxjknXSJfP2tmQcL4=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=du1NToOJpdoObd3SIBobAq8Yq6GuUG4MxdkRZT/oqxMRR26rMy+00xrhlJ5+N5+2f HJ5v2/6kFLTJjWTNP7rdg==
Received: from iye19 (iye19.prod.google.com [10.241.50.19]) by kpbe11.cbf.corp.google.com with ESMTP id p0IMVuSr016986 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Tue, 18 Jan 2011 14:32:24 -0800
Received: by iye19 with SMTP id 19so151630iye.24 for <hybi@ietf.org>; Tue, 18 Jan 2011 14:32:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=W6sZM1NGRXl6VwDqfilGifoyGolJiKjsfQIbVPTwNBA=; b=Zk6KidwrNOnKRVI0jvucR5DiWi54FOeeMhnr87og7Lrfw2nU3tZ3ONVQz9pjAts3/m BJe9BVpypKqeozO21YUw==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=TFV4FkNxgM0nKkLLYKBoTEu42tLtutRN5mRxf/GOEZnS7Ws9/JZMukzIc0ZFkKxH8k puW92KsEqVttNibgYHoA==
MIME-Version: 1.0
Received: by 10.231.39.71 with SMTP id f7mr6774384ibe.182.1295389908464; Tue, 18 Jan 2011 14:31:48 -0800 (PST)
Received: by 10.231.20.69 with HTTP; Tue, 18 Jan 2011 14:31:48 -0800 (PST)
In-Reply-To: <20110118193414.GA26811@1wt.eu>
References: <4D2E0863.2040804@ericsson.com> <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com> <20110118193414.GA26811@1wt.eu>
Date: Tue, 18 Jan 2011 14:31:48 -0800
Message-ID: <AANLkTik=vZmtgDYGmbEyWV9t2b8Zv0agS7jq-bOKe5gR@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=000325575956571c5a049a26770d
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CPU vs bandwidth (was Straw-poll on Masking options)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Tue, 18 Jan 2011 22:29:49 -0000

--000325575956571c5a049a26770d
Content-Type: text/plain; charset=UTF-8

That depends. A ton of processors are adding in new instructions (and
hardware support) for AES. A list of Intel processors, as an example:
http://ark.intel.com/MySearch.aspx?AESTech=true

On Tue, Jan 18, 2011 at 11:34 AM, Willy Tarreau <w@1wt.eu> wrote:

> Hi Ian,
>
> On Tue, Jan 18, 2011 at 11:15:04AM -0800, Ian Fette
> (????????????????????????) wrote:
> > I am not entirely sure what people mean by a fixed mask. For it to be
> worth
> > while, the mask would have to change every frame so that the attacker
> > doesn't have advanced knowledge of the mask.
>
> That was point "1.5" which was not kept in the poll.
>
> > So, for me to live with it, we have to have something that changes every
> > frame if it's worth doing at all.
> >
> > As for whether we use XOR(SHA(c-nonce, s-nonce, rand)) or AES, I could
> live
> > with either. Frankly I don't think that either are prohibitively
> expensive,
> > especially compared to something that would cause us to significantly
> > increase bandwidth requirements (base64).
>
> It depends on how you see it. Speaking as someone who develop
> intermediaries,
> having a 3 GHz CPU not being able to process 1 Gbps of traffic is a big
> concern, considering that the same machine has no issue at 10 Gbps of HTTP.
>
> If we have to make the trade-off, I'd say that "base128" is "only" 14%
> network overhead for frames above around a hundred bytes, while AES-CTR
> is a >1000% CPU overhead for all frame sizes. XOR(HMAC/SHA) is even a
> much higher overhead for small frames which should be our main target.
>
> That's something to keep in mind. We could try to think how much time it
> will take for network speeds to increase by our overhead and how much time
> it will take for CPU speeds to increase by our overhead. In the first case
> it's just a matter of few months, maybe only one, in the second case it's
> a matter of several years.
>
> I'm not much for causing network overheads but I'm comparing two costs
> if we have to choose an alternative.
>
> The simple XOR has none of them though.
>
> Regards,
> Willy
>
>

--000325575956571c5a049a26770d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

That depends. A ton of processors are adding in new instructions (and hardw=
are support) for AES. A list of Intel processors, as an example:=C2=A0<a hr=
ef=3D"http://ark.intel.com/MySearch.aspx?AESTech=3Dtrue">http://ark.intel.c=
om/MySearch.aspx?AESTech=3Dtrue</a><br>
<br><div class=3D"gmail_quote">On Tue, Jan 18, 2011 at 11:34 AM, Willy Tarr=
eau <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</spa=
n> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex;">
Hi Ian,<br>
<br>
On Tue, Jan 18, 2011 at 11:15:04AM -0800, Ian Fette (??????????????????????=
??) wrote:<br>
&gt; I am not entirely sure what people mean by a fixed mask. For it to be =
worth<br>
&gt; while, the mask would have to change every frame so that the attacker<=
br>
&gt; doesn&#39;t have advanced knowledge of the mask.<br>
<br>
That was point &quot;1.5&quot; which was not kept in the poll.<br>
<br>
&gt; So, for me to live with it, we have to have something that changes eve=
ry<br>
&gt; frame if it&#39;s worth doing at all.<br>
&gt;<br>
&gt; As for whether we use XOR(SHA(c-nonce, s-nonce, rand)) or AES, I could=
 live<br>
&gt; with either. Frankly I don&#39;t think that either are prohibitively e=
xpensive,<br>
&gt; especially compared to something that would cause us to significantly<=
br>
&gt; increase bandwidth requirements (base64).<br>
<br>
It depends on how you see it. Speaking as someone who develop intermediarie=
s,<br>
having a 3 GHz CPU not being able to process 1 Gbps of traffic is a big<br>
concern, considering that the same machine has no issue at 10 Gbps of HTTP.=
<br>
<br>
If we have to make the trade-off, I&#39;d say that &quot;base128&quot; is &=
quot;only&quot; 14%<br>
network overhead for frames above around a hundred bytes, while AES-CTR<br>
is a &gt;1000% CPU overhead for all frame sizes. XOR(HMAC/SHA) is even a<br=
>
much higher overhead for small frames which should be our main target.<br>
<br>
That&#39;s something to keep in mind. We could try to think how much time i=
t<br>
will take for network speeds to increase by our overhead and how much time<=
br>
it will take for CPU speeds to increase by our overhead. In the first case<=
br>
it&#39;s just a matter of few months, maybe only one, in the second case it=
&#39;s<br>
a matter of several years.<br>
<br>
I&#39;m not much for causing network overheads but I&#39;m comparing two co=
sts<br>
if we have to choose an alternative.<br>
<br>
The simple XOR has none of them though.<br>
<br>
Regards,<br>
<font color=3D"#888888">Willy<br>
<br>
</font></blockquote></div><br>

--000325575956571c5a049a26770d--

From senthilkumar.peelikkampatti@gmail.com  Tue Jan 18 14:56:06 2011
Return-Path: <senthilkumar.peelikkampatti@gmail.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 0082A28C0FC for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 14:56:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.722
X-Spam-Level: 
X-Spam-Status: No, score=-2.722 tagged_above=-999 required=5 tests=[AWL=-0.876, BAYES_00=-2.599, HTML_MESSAGE=0.001, MIME_BASE64_TEXT=1.753, RCVD_IN_DNSWL_LOW=-1]
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 cVvQlabQtFql for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 14:56:04 -0800 (PST)
Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by core3.amsl.com (Postfix) with ESMTP id 42B0828C0D7 for <hybi@ietf.org>; Tue, 18 Jan 2011 14:56:04 -0800 (PST)
Received: by wwi17 with SMTP id 17so3808446wwi.1 for <hybi@ietf.org>; Tue, 18 Jan 2011 14:58:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=KxOhWewkA4G2a36Jdm2gFWch1a/IlhlT/KG61oj8tyE=; b=vEs5vqYItC/f4HnCQ3fD/dnulXp5r4b87xW48MjshUsPxisEq/IktUoiH/7izsEUNJ Hz/p0d3WdsFgnwfg///bl8v4aJVksXctuQa5G+bg1qbV+kvcNJSv8uPGO/lDSRzfsNLa I+Cg/oOM+W8w/y+4rve8nd0rijOr7XpBkAPJU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=BizuliTJQgieLbDpWjZ8S/G45jpoyxM5udnNCzOkLPbZEx4S3j8TRlMFHBGIX6/qFx e/OTdoW+sFn9YLrNySQ+VjJo/lQ9MlcSYyZDq1b3W6NOtWN1RyZJNU1hkDDCEMoqdDeb 4yFGUtpgcK1lY1wDgEjqhBV2GYPQVO0qR0dFE=
MIME-Version: 1.0
Received: by 10.227.143.194 with SMTP id w2mr6361115wbu.44.1295391521121; Tue, 18 Jan 2011 14:58:41 -0800 (PST)
Received: by 10.227.151.133 with HTTP; Tue, 18 Jan 2011 14:58:41 -0800 (PST)
In-Reply-To: <AANLkTik=vZmtgDYGmbEyWV9t2b8Zv0agS7jq-bOKe5gR@mail.gmail.com>
References: <4D2E0863.2040804@ericsson.com> <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com> <20110118193414.GA26811@1wt.eu> <AANLkTik=vZmtgDYGmbEyWV9t2b8Zv0agS7jq-bOKe5gR@mail.gmail.com>
Date: Tue, 18 Jan 2011 16:58:41 -0600
Message-ID: <AANLkTik=o5vCv8pu+uAU8t4AHJCtQP-FWZHMfR8N8yBe@mail.gmail.com>
From: Senthilkumar Peelikkampatti <senthilkumar.peelikkampatti@gmail.com>
To: ifette@google.com
Content-Type: multipart/alternative; boundary=0016e65b60647624e3049a26d79a
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CPU vs bandwidth (was Straw-poll on Masking options)
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: Tue, 18 Jan 2011 22:56:06 -0000

--0016e65b60647624e3049a26d79a
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

There are AMDs and upcoming ARM based systems going to invade datacenters.
We can't count on this list perhaps 5 years down the line we would get
hardware accelerated crypto.


2011/1/18 Ian Fette ($B%$%"%s%U%'%C%F%#(B) <ifette@google.com>

> That depends. A ton of processors are adding in new instructions (and
> hardware support) for AES. A list of Intel processors, as an example:
> http://ark.intel.com/MySearch.aspx?AESTech=true
>
>
> On Tue, Jan 18, 2011 at 11:34 AM, Willy Tarreau <w@1wt.eu> wrote:
>
>> Hi Ian,
>>
>> On Tue, Jan 18, 2011 at 11:15:04AM -0800, Ian Fette
>> (????????????????????????) wrote:
>> > I am not entirely sure what people mean by a fixed mask. For it to be
>> worth
>> > while, the mask would have to change every frame so that the attacker
>> > doesn't have advanced knowledge of the mask.
>>
>> That was point "1.5" which was not kept in the poll.
>>
>> > So, for me to live with it, we have to have something that changes every
>> > frame if it's worth doing at all.
>> >
>> > As for whether we use XOR(SHA(c-nonce, s-nonce, rand)) or AES, I could
>> live
>> > with either. Frankly I don't think that either are prohibitively
>> expensive,
>> > especially compared to something that would cause us to significantly
>> > increase bandwidth requirements (base64).
>>
>> It depends on how you see it. Speaking as someone who develop
>> intermediaries,
>> having a 3 GHz CPU not being able to process 1 Gbps of traffic is a big
>> concern, considering that the same machine has no issue at 10 Gbps of
>> HTTP.
>>
>> If we have to make the trade-off, I'd say that "base128" is "only" 14%
>> network overhead for frames above around a hundred bytes, while AES-CTR
>> is a >1000% CPU overhead for all frame sizes. XOR(HMAC/SHA) is even a
>> much higher overhead for small frames which should be our main target.
>>
>> That's something to keep in mind. We could try to think how much time it
>> will take for network speeds to increase by our overhead and how much time
>> it will take for CPU speeds to increase by our overhead. In the first case
>> it's just a matter of few months, maybe only one, in the second case it's
>> a matter of several years.
>>
>> I'm not much for causing network overheads but I'm comparing two costs
>> if we have to choose an alternative.
>>
>> The simple XOR has none of them though.
>>
>> Regards,
>> Willy
>>
>>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>


-- 
Regards,
Senthilkumar Peelikkampatti,
http://pmsenthilkumar.blogspot.com/

--0016e65b60647624e3049a26d79a
Content-Type: text/html; charset=ISO-2022-JP
Content-Transfer-Encoding: base64

VGhlcmUgYXJlIEFNRHMgYW5kIHVwY29taW5nIEFSTSBiYXNlZCBzeXN0ZW1zIGdvaW5nIHRvIGlu
dmFkZSBkYXRhY2VudGVycy4gV2UgY2FuJiMzOTt0IGNvdW50IG9uIHRoaXMgbGlzdCBwZXJoYXBz
IDUgeWVhcnMgZG93biB0aGUgbGluZSB3ZSB3b3VsZCBnZXQgaGFyZHdhcmUgYWNjZWxlcmF0ZWQg
Y3J5cHRvLiA8YnI+PGJyPjxicj48ZGl2IGNsYXNzPSJnbWFpbF9xdW90ZSI+MjAxMS8xLzE4IElh
biBGZXR0ZSAoGyRCJSQlIiVzJVUlJyVDJUYlIxsoQikgPHNwYW4gZGlyPSJsdHIiPiZsdDs8YSBo
cmVmPSJtYWlsdG86aWZldHRlQGdvb2dsZS5jb20iPmlmZXR0ZUBnb29nbGUuY29tPC9hPiZndDs8
L3NwYW4+PGJyPgo8YmxvY2txdW90ZSBjbGFzcz0iZ21haWxfcXVvdGUiIHN0eWxlPSJtYXJnaW46
MCAwIDAgLjhleDtib3JkZXItbGVmdDoxcHggI2NjYyBzb2xpZDtwYWRkaW5nLWxlZnQ6MWV4OyI+
VGhhdCBkZXBlbmRzLiBBIHRvbiBvZiBwcm9jZXNzb3JzIGFyZSBhZGRpbmcgaW4gbmV3IGluc3Ry
dWN0aW9ucyAoYW5kIGhhcmR3YXJlIHN1cHBvcnQpIGZvciBBRVMuIEEgbGlzdCBvZiBJbnRlbCBw
cm9jZXNzb3JzLCBhcyBhbiBleGFtcGxlOiZuYnNwOzxhIGhyZWY9Imh0dHA6Ly9hcmsuaW50ZWwu
Y29tL015U2VhcmNoLmFzcHg/QUVTVGVjaD10cnVlIiB0YXJnZXQ9Il9ibGFuayI+aHR0cDovL2Fy
ay5pbnRlbC5jb20vTXlTZWFyY2guYXNweD9BRVNUZWNoPXRydWU8L2E+PGRpdj4KPGRpdj48L2Rp
dj48ZGl2IGNsYXNzPSJoNSI+PGJyPgo8YnI+PGRpdiBjbGFzcz0iZ21haWxfcXVvdGUiPk9uIFR1
ZSwgSmFuIDE4LCAyMDExIGF0IDExOjM0IEFNLCBXaWxseSBUYXJyZWF1IDxzcGFuIGRpcj0ibHRy
Ij4mbHQ7PGEgaHJlZj0ibWFpbHRvOndAMXd0LmV1IiB0YXJnZXQ9Il9ibGFuayI+d0Axd3QuZXU8
L2E+Jmd0Ozwvc3Bhbj4gd3JvdGU6PGJyPjxibG9ja3F1b3RlIGNsYXNzPSJnbWFpbF9xdW90ZSIg
c3R5bGU9Im1hcmdpbjowIDAgMCAuOGV4O2JvcmRlci1sZWZ0OjFweCAjY2NjIHNvbGlkO3BhZGRp
bmctbGVmdDoxZXgiPgoKSGkgSWFuLDxicj4KPGJyPgpPbiBUdWUsIEphbiAxOCwgMjAxMSBhdCAx
MToxNTowNEFNIC0wODAwLCBJYW4gRmV0dGUgKD8/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8/Pykgd3Jv
dGU6PGJyPgomZ3Q7IEkgYW0gbm90IGVudGlyZWx5IHN1cmUgd2hhdCBwZW9wbGUgbWVhbiBieSBh
IGZpeGVkIG1hc2suIEZvciBpdCB0byBiZSB3b3J0aDxicj4KJmd0OyB3aGlsZSwgdGhlIG1hc2sg
d291bGQgaGF2ZSB0byBjaGFuZ2UgZXZlcnkgZnJhbWUgc28gdGhhdCB0aGUgYXR0YWNrZXI8YnI+
CiZndDsgZG9lc24mIzM5O3QgaGF2ZSBhZHZhbmNlZCBrbm93bGVkZ2Ugb2YgdGhlIG1hc2suPGJy
Pgo8YnI+ClRoYXQgd2FzIHBvaW50ICZxdW90OzEuNSZxdW90OyB3aGljaCB3YXMgbm90IGtlcHQg
aW4gdGhlIHBvbGwuPGJyPgo8YnI+CiZndDsgU28sIGZvciBtZSB0byBsaXZlIHdpdGggaXQsIHdl
IGhhdmUgdG8gaGF2ZSBzb21ldGhpbmcgdGhhdCBjaGFuZ2VzIGV2ZXJ5PGJyPgomZ3Q7IGZyYW1l
IGlmIGl0JiMzOTtzIHdvcnRoIGRvaW5nIGF0IGFsbC48YnI+CiZndDs8YnI+CiZndDsgQXMgZm9y
IHdoZXRoZXIgd2UgdXNlIFhPUihTSEEoYy1ub25jZSwgcy1ub25jZSwgcmFuZCkpIG9yIEFFUywg
SSBjb3VsZCBsaXZlPGJyPgomZ3Q7IHdpdGggZWl0aGVyLiBGcmFua2x5IEkgZG9uJiMzOTt0IHRo
aW5rIHRoYXQgZWl0aGVyIGFyZSBwcm9oaWJpdGl2ZWx5IGV4cGVuc2l2ZSw8YnI+CiZndDsgZXNw
ZWNpYWxseSBjb21wYXJlZCB0byBzb21ldGhpbmcgdGhhdCB3b3VsZCBjYXVzZSB1cyB0byBzaWdu
aWZpY2FudGx5PGJyPgomZ3Q7IGluY3JlYXNlIGJhbmR3aWR0aCByZXF1aXJlbWVudHMgKGJhc2U2
NCkuPGJyPgo8YnI+Ckl0IGRlcGVuZHMgb24gaG93IHlvdSBzZWUgaXQuIFNwZWFraW5nIGFzIHNv
bWVvbmUgd2hvIGRldmVsb3AgaW50ZXJtZWRpYXJpZXMsPGJyPgpoYXZpbmcgYSAzIEdIeiBDUFUg
bm90IGJlaW5nIGFibGUgdG8gcHJvY2VzcyAxIEdicHMgb2YgdHJhZmZpYyBpcyBhIGJpZzxicj4K
Y29uY2VybiwgY29uc2lkZXJpbmcgdGhhdCB0aGUgc2FtZSBtYWNoaW5lIGhhcyBubyBpc3N1ZSBh
dCAxMCBHYnBzIG9mIEhUVFAuPGJyPgo8YnI+CklmIHdlIGhhdmUgdG8gbWFrZSB0aGUgdHJhZGUt
b2ZmLCBJJiMzOTtkIHNheSB0aGF0ICZxdW90O2Jhc2UxMjgmcXVvdDsgaXMgJnF1b3Q7b25seSZx
dW90OyAxNCU8YnI+Cm5ldHdvcmsgb3ZlcmhlYWQgZm9yIGZyYW1lcyBhYm92ZSBhcm91bmQgYSBo
dW5kcmVkIGJ5dGVzLCB3aGlsZSBBRVMtQ1RSPGJyPgppcyBhICZndDsxMDAwJSBDUFUgb3Zlcmhl
YWQgZm9yIGFsbCBmcmFtZSBzaXplcy4gWE9SKEhNQUMvU0hBKSBpcyBldmVuIGE8YnI+Cm11Y2gg
aGlnaGVyIG92ZXJoZWFkIGZvciBzbWFsbCBmcmFtZXMgd2hpY2ggc2hvdWxkIGJlIG91ciBtYWlu
IHRhcmdldC48YnI+Cjxicj4KVGhhdCYjMzk7cyBzb21ldGhpbmcgdG8ga2VlcCBpbiBtaW5kLiBX
ZSBjb3VsZCB0cnkgdG8gdGhpbmsgaG93IG11Y2ggdGltZSBpdDxicj4Kd2lsbCB0YWtlIGZvciBu
ZXR3b3JrIHNwZWVkcyB0byBpbmNyZWFzZSBieSBvdXIgb3ZlcmhlYWQgYW5kIGhvdyBtdWNoIHRp
bWU8YnI+Cml0IHdpbGwgdGFrZSBmb3IgQ1BVIHNwZWVkcyB0byBpbmNyZWFzZSBieSBvdXIgb3Zl
cmhlYWQuIEluIHRoZSBmaXJzdCBjYXNlPGJyPgppdCYjMzk7cyBqdXN0IGEgbWF0dGVyIG9mIGZl
dyBtb250aHMsIG1heWJlIG9ubHkgb25lLCBpbiB0aGUgc2Vjb25kIGNhc2UgaXQmIzM5O3M8YnI+
CmEgbWF0dGVyIG9mIHNldmVyYWwgeWVhcnMuPGJyPgo8YnI+CkkmIzM5O20gbm90IG11Y2ggZm9y
IGNhdXNpbmcgbmV0d29yayBvdmVyaGVhZHMgYnV0IEkmIzM5O20gY29tcGFyaW5nIHR3byBjb3N0
czxicj4KaWYgd2UgaGF2ZSB0byBjaG9vc2UgYW4gYWx0ZXJuYXRpdmUuPGJyPgo8YnI+ClRoZSBz
aW1wbGUgWE9SIGhhcyBub25lIG9mIHRoZW0gdGhvdWdoLjxicj4KPGJyPgpSZWdhcmRzLDxicj4K
PGZvbnQgY29sb3I9IiM4ODg4ODgiPldpbGx5PGJyPgo8YnI+CjwvZm9udD48L2Jsb2NrcXVvdGU+
PC9kaXY+PGJyPgo8L2Rpdj48L2Rpdj48YnI+X19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX188YnI+Cmh5YmkgbWFpbGluZyBsaXN0PGJyPgo8YSBocmVmPSJtYWls
dG86aHliaUBpZXRmLm9yZyI+aHliaUBpZXRmLm9yZzwvYT48YnI+CjxhIGhyZWY9Imh0dHBzOi8v
d3d3LmlldGYub3JnL21haWxtYW4vbGlzdGluZm8vaHliaSIgdGFyZ2V0PSJfYmxhbmsiPmh0dHBz
Oi8vd3d3LmlldGYub3JnL21haWxtYW4vbGlzdGluZm8vaHliaTwvYT48YnI+Cjxicj48L2Jsb2Nr
cXVvdGU+PC9kaXY+PGJyPjxiciBjbGVhcj0iYWxsIj48YnI+LS0gPGJyPlJlZ2FyZHMsPGJyPlNl
bnRoaWxrdW1hciBQZWVsaWtrYW1wYXR0aSw8YnI+PGEgaHJlZj0iaHR0cDovL3Btc2VudGhpbGt1
bWFyLmJsb2dzcG90LmNvbS8iPmh0dHA6Ly9wbXNlbnRoaWxrdW1hci5ibG9nc3BvdC5jb20vPC9h
Pjxicj48YnI+Cg==
--0016e65b60647624e3049a26d79a--

From jamie@shareable.org  Tue Jan 18 16:24:30 2011
Return-Path: <jamie@shareable.org>
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 D664E3A6DB6 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 16:24:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.691
X-Spam-Level: 
X-Spam-Status: No, score=-2.691 tagged_above=-999 required=5 tests=[AWL=-0.092, BAYES_00=-2.599]
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 W2-2oeVPz62t for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 16:24:30 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 81E713A7053 for <hybi@ietf.org>; Tue, 18 Jan 2011 16:24:26 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PfLt7-0002Uj-2F; Wed, 19 Jan 2011 00:27:01 +0000
Date: Wed, 19 Jan 2011 00:27:01 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Message-ID: <20110119002700.GH30268@shareable.org>
References: <4D2E0863.2040804@ericsson.com> <4D35D820.2090104@ericsson.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D35D820.2090104@ericsson.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] reminder: Straw-poll on Masking options
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, 19 Jan 2011 00:24:31 -0000

Salvatore Loreto wrote:
> 
> This poll ends today (January 18th),
> if you haven't cast a vote, please do it now!

Of the three options on the table, I prefer #1 or something more like
it than the other two options.

I don't see the point of half-baked "security" that is not a secure
channel, just encryption to randomise the data.  I think people would
treat the presence of encryption in WebSocket as though that makes it
a secure channel, when it is only weakly so.

And I dislike the cost of repeated AES or SHA just to make it still an
insecure channel; mainly the CPU cost.  As well as the cost to
intermediaries that do any more than forwarding TCP blind, and
possible user-visible latency and network costs following from that.

When you want proper security, use TLS (wss:), and when you don't (or
you know it's over a VPN etc.), use only the simplest thing necessary
to prevent browser script attacks.  Especially when there's a cost.

However, I would not necessarily object if someone finds (or designs)
a lower-overhead, strong random XOR sequence (with LF escaping perhaps)
that is strong against future browser script attacks but doesn't cost
much to handle at low-power intermediaries and endpoints, presumably
by them having access to more hidden state than attackers.

-- Jamie

From jamie@shareable.org  Tue Jan 18 16:50:26 2011
Return-Path: <jamie@shareable.org>
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 4D4A93A6FDB for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 16:50:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.688
X-Spam-Level: 
X-Spam-Status: No, score=-2.688 tagged_above=-999 required=5 tests=[AWL=-0.089, BAYES_00=-2.599]
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 WCvOY8cMHn-i for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 16:50:24 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id BB62F3A6F68 for <hybi@ietf.org>; Tue, 18 Jan 2011 16:50:24 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PfMII-0002Zt-9e; Wed, 19 Jan 2011 00:53:02 +0000
Date: Wed, 19 Jan 2011 00:53:02 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Message-ID: <20110119005302.GI30268@shareable.org>
References: <20110112221206.GG25018@1wt.eu> <8A647327-C614-40FB-9936-5F47970EFEA3@tomasf.se> <AANLkTim7PQ-GTPG=ztWUM5O7mmzizxcQs+RJm29iop5W@mail.gmail.com> <20110114203304.GA6872@1wt.eu> <6551F684-3619-4969-B2A7-093E91BF7FA1@apple.com> <20110114211802.GC6872@1wt.eu> <F3A5BD8C-5B3F-425D-AF5D-F9470330826D@apple.com> <AANLkTikOwLmc8ZJdJTS2zdnp4VP4LtNOoB-znN5_8cE3@mail.gmail.com> <554DB69D-0498-496C-923C-E59D24122A1B@apple.com> <gmv6j613ua5p3m0p576hkumgjgr1pec928@hive.bjoern.hoehrmann.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <gmv6j613ua5p3m0p576hkumgjgr1pec928@hive.bjoern.hoehrmann.de>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Security doesn't end here (was: Re: Straw-poll on Masking options)
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, 19 Jan 2011 00:50:26 -0000

Bjoern Hoehrmann wrote:
> * Maciej Stachowiak wrote:
> >If security is really the top priority, and in particular if it's a
> >higher priority than computational complexity, then a making scheme that
> >produces data indistinguishable from random is the best choice.

No, we have shown that is false in this case.

Don't confuse different types of security.

In this case, the "security" being talked about is _not_ for making
secure communications!

(If you want that, you should use the wss: scheme, which uses TLS and
everyone seems to be fine with that.)

In this case, the "security" is about preventing particular kinds of
browser-based Javascript attacks on intermediaries.

For that, a scheme which produces data indistinguishable from random
has been shown _not_ to be the best choice - even if security has
absolute priority over computational complexity.

It has been shown, with thought experiments and some knowledge of real
current proxies, how it might be exploitable, now or in future.  It's
not a very realistic attack, but not totally implausible either.  Even
if it were, it is good practice to try to avoid plausible holes,
instead of considering only specific attacks known at design time.

That is completely different from the type of security provided by
SSL/TLS, for which indistinguishability from random is one of the
desirable factors (but not enough by itself).

> Limiting an attacker's ability to confuse intermediaries is just one
> aspect of security; limiting confusion about the protocol's security
> properties is another. We can take for granted that if we were to use
> AES in the protocol that some people will make incorrect assumptions
> about the security properties that provides; we've seen people on this
> list who've closely followed the discussions do that, for instance.
> AES may very well be the worst option as far as overall security goes.

I agree.  I predict if AES is used prominently and the traffic "looks
encrypted", many people will mistakenly treat ws: as a secure channel,
or perhaps even not by mistake but just because it's easy to use and
"good enough" against low-grade attackers.

I prefer that TLS is used where security is considered worth the
effort.  It's not that expensive if you were planning on encrypting
anyway, and wss: should be no more difficult to set up than https:.

-- Jamie

From jamie@shareable.org  Tue Jan 18 17:20:26 2011
Return-Path: <jamie@shareable.org>
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 14CCC3A700F for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 17:20:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.685
X-Spam-Level: 
X-Spam-Status: No, score=-2.685 tagged_above=-999 required=5 tests=[AWL=-0.086, BAYES_00=-2.599]
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 vHciRglRedCq for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 17:20:25 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id D9A013A6F73 for <hybi@ietf.org>; Tue, 18 Jan 2011 17:20:24 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PfMlL-0005u8-3Z; Wed, 19 Jan 2011 01:23:03 +0000
Date: Wed, 19 Jan 2011 01:23:03 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Message-ID: <20110119012303.GL30268@shareable.org>
References: <E7C13D4F-F807-46E8-A666-37FF9EE8A617@apple.com> <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <20110117135912.GA16684@1wt.eu> <20110117200031.GB30268@shareable.org> <g8naj6ho8r0qrh15lal1m208i16j8djiim@hive.bjoern.hoehrmann.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <g8naj6ho8r0qrh15lal1m208i16j8djiim@hive.bjoern.hoehrmann.de>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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, 19 Jan 2011 01:20:26 -0000

Bjoern Hoehrmann wrote:
> * Jamie Lokier wrote:
> >I would really like to see a better effort to "fast fail reliably"
> >with bogus proxies so it's quicker to fallback to a different method
> >than WebSocket, and a CRC, MAC or something to protect against any
> >which mostly forward the data (so connection appears to work) but
> >randomly mangle it later.
> 
> Well obviously we'll require browser clients to check that the handshake
> response does not include Content-Length, Transfer-Encoding and maybe a
> couple of other headers, and we'll probably change the framing so that
> if the first octet the server sends is white space or "H" the connection
> is closed by the client, but if you need more integrity than that, you
> can code your own. You'd likely do that anyway so you can recover from
> it gracefully.

I've read that some proxies go into "tunnelling mode" when they see
data that doesn't look like proper HTTP they understand (such as very
broken HTTP headers sent by some Microsoft IIS servers a while ago).
In that mode, they just forward what they see without adding headers.
and I would worry a little about those mangling data later on due to
implementation bugs/quirks, hence the musing over a CRC or MAC.

Making sure the response doesn't contain headers that might be added
by a normal HTTP proxy seems reasonable, although I wouldn't expect
proxies to add any headers (except some of them add Via):

Absence of both Content-Length and Transfer-Encoding has a specific,
valid meaning in HTTP responses, so proxies shouldn't add them unless
they are changing to a different Transfer-Encoding.

> >The solution to both concerns is to *combine* strong hashing (AES-CTR
> >etc.)  *and* escaping plausible HTTP request character sequences.
> 
> Masking does that already, pre-scan the masked frame for bad patterns
> like "http" and "host" and pick a different key if you find it, and if
> you cannot find a key within some resource limit, fragment the frame.
> Not pretty, but then browser developers can figure out on their own how
> they balance their performance requirements against their paranoia and
> frustrating sloppy server developers who don't expect fragmentation.

That's an interesting idea, though escaping LF seems much easier.

-- Jamie




From ifette@google.com  Tue Jan 18 17:54:46 2011
Return-Path: <ifette@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 AC5263A7034 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 17:54:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.824
X-Spam-Level: 
X-Spam-Status: No, score=-103.824 tagged_above=-999 required=5 tests=[AWL=-1.148, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 LqLKb6uZQIgV for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 17:54:45 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id EEA343A6F34 for <hybi@ietf.org>; Tue, 18 Jan 2011 17:54:44 -0800 (PST)
Received: from hpaq1.eem.corp.google.com (hpaq1.eem.corp.google.com [172.25.149.1]) by smtp-out.google.com with ESMTP id p0J1vMuE032340 for <hybi@ietf.org>; Tue, 18 Jan 2011 17:57:22 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295402242; bh=E/3VjOZqz0T+3cWJMdSXzKiTZI8=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=WDEM47SaKA6X4btluWwwPYLOe3Y+nGQEWYNaAzFOxTu2Fmc33ZJi+iRxb5YWvt8ft tSGEYP4c7kEJBfOOLfXwQ==
Received: from iyj18 (iyj18.prod.google.com [10.241.51.82]) by hpaq1.eem.corp.google.com with ESMTP id p0J1vK1Y016028 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Tue, 18 Jan 2011 17:57:21 -0800
Received: by iyj18 with SMTP id 18so287233iyj.34 for <hybi@ietf.org>; Tue, 18 Jan 2011 17:57:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=AXNFq/jj0jhMjpIoAXCdbGITOyg4M/AT6KtMbRJWHIs=; b=ro0fdhxmiJKU5m0Ue6d1sAPYlvoBIItlLhCSJ5TJ6CkavbSNlCsdaGMoQ60LJFW8sy rz0L15wggX0HLmI+l50w==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=xrJfwSQSDr3T8JSqV2TK2azQ9s98N01OKzpOOWkw5Y2c30XakcuyVA3FecrbMElMC3 TBIKZbQnxsGGB+ByCJZA==
MIME-Version: 1.0
Received: by 10.231.206.7 with SMTP id fs7mr85686ibb.82.1295402239939; Tue, 18 Jan 2011 17:57:19 -0800 (PST)
Received: by 10.231.20.69 with HTTP; Tue, 18 Jan 2011 17:57:19 -0800 (PST)
In-Reply-To: <AANLkTik=o5vCv8pu+uAU8t4AHJCtQP-FWZHMfR8N8yBe@mail.gmail.com>
References: <4D2E0863.2040804@ericsson.com> <AANLkTi=GbuoPf-_yTTBMdm00e-pE_rDLEKkCxnz6vV+R@mail.gmail.com> <20110118193414.GA26811@1wt.eu> <AANLkTik=vZmtgDYGmbEyWV9t2b8Zv0agS7jq-bOKe5gR@mail.gmail.com> <AANLkTik=o5vCv8pu+uAU8t4AHJCtQP-FWZHMfR8N8yBe@mail.gmail.com>
Date: Tue, 18 Jan 2011 17:57:19 -0800
Message-ID: <AANLkTimV5F6TgcP_-ryN9hBTz3u1HsDGS2gx9GGonPGr@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: Senthilkumar Peelikkampatti <senthilkumar.peelikkampatti@gmail.com>
Content-Type: multipart/alternative; boundary=00248c0501e55a5360049a295645
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CPU vs bandwidth (was Straw-poll on Masking options)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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, 19 Jan 2011 01:54:46 -0000

--00248c0501e55a5360049a295645
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I hope this is obvious, but I did not intend that list to be complete,
merely to indicate a trend in newer hardware.

-Ian

2011/1/18 Senthilkumar Peelikkampatti <senthilkumar.peelikkampatti@gmail.co=
m
>

> There are AMDs and upcoming ARM based systems going to invade datacenters=
.
> We can't count on this list perhaps 5 years down the line we would get
> hardware accelerated crypto.
>
>
> 2011/1/18 Ian Fette (=E3=82=A4=E3=82=A2=E3=83=B3=E3=83=95=E3=82=A7=E3=83=
=83=E3=83=86=E3=82=A3) <ifette@google.com>
>
>> That depends. A ton of processors are adding in new instructions (and
>> hardware support) for AES. A list of Intel processors, as an example:
>> http://ark.intel.com/MySearch.aspx?AESTech=3Dtrue
>>
>>
>> On Tue, Jan 18, 2011 at 11:34 AM, Willy Tarreau <w@1wt.eu> wrote:
>>
>>> Hi Ian,
>>>
>>> On Tue, Jan 18, 2011 at 11:15:04AM -0800, Ian Fette
>>> (????????????????????????) wrote:
>>> > I am not entirely sure what people mean by a fixed mask. For it to be
>>> worth
>>> > while, the mask would have to change every frame so that the attacker
>>> > doesn't have advanced knowledge of the mask.
>>>
>>> That was point "1.5" which was not kept in the poll.
>>>
>>> > So, for me to live with it, we have to have something that changes
>>> every
>>> > frame if it's worth doing at all.
>>> >
>>> > As for whether we use XOR(SHA(c-nonce, s-nonce, rand)) or AES, I coul=
d
>>> live
>>> > with either. Frankly I don't think that either are prohibitively
>>> expensive,
>>> > especially compared to something that would cause us to significantly
>>> > increase bandwidth requirements (base64).
>>>
>>> It depends on how you see it. Speaking as someone who develop
>>> intermediaries,
>>> having a 3 GHz CPU not being able to process 1 Gbps of traffic is a big
>>> concern, considering that the same machine has no issue at 10 Gbps of
>>> HTTP.
>>>
>>> If we have to make the trade-off, I'd say that "base128" is "only" 14%
>>> network overhead for frames above around a hundred bytes, while AES-CTR
>>> is a >1000% CPU overhead for all frame sizes. XOR(HMAC/SHA) is even a
>>> much higher overhead for small frames which should be our main target.
>>>
>>> That's something to keep in mind. We could try to think how much time i=
t
>>> will take for network speeds to increase by our overhead and how much
>>> time
>>> it will take for CPU speeds to increase by our overhead. In the first
>>> case
>>> it's just a matter of few months, maybe only one, in the second case it=
's
>>> a matter of several years.
>>>
>>> I'm not much for causing network overheads but I'm comparing two costs
>>> if we have to choose an alternative.
>>>
>>> The simple XOR has none of them though.
>>>
>>> Regards,
>>> Willy
>>>
>>>
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>>
>>
>
>
> --
> Regards,
> Senthilkumar Peelikkampatti,
> http://pmsenthilkumar.blogspot.com/
>
>

--00248c0501e55a5360049a295645
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I hope this is obvious, but I did not intend that list to be complete, mere=
ly to indicate a trend in newer hardware.<div><br></div><div>-Ian<br><br><d=
iv class=3D"gmail_quote">2011/1/18 Senthilkumar Peelikkampatti <span dir=3D=
"ltr">&lt;<a href=3D"mailto:senthilkumar.peelikkampatti@gmail.com">senthilk=
umar.peelikkampatti@gmail.com</a>&gt;</span><br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">There are AMDs and upcoming ARM based syste=
ms going to invade datacenters. We can&#39;t count on this list perhaps 5 y=
ears down the line we would get hardware accelerated crypto. <br>
<br><br><div class=3D"gmail_quote">2011/1/18 Ian Fette (=E3=82=A4=E3=82=A2=
=E3=83=B3=E3=83=95=E3=82=A7=E3=83=83=E3=83=86=E3=82=A3) <span dir=3D"ltr">&=
lt;<a href=3D"mailto:ifette@google.com" target=3D"_blank">ifette@google.com=
</a>&gt;</span><br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div><div></div><div class=3D"h5">That depen=
ds. A ton of processors are adding in new instructions (and hardware suppor=
t) for AES. A list of Intel processors, as an example:=C2=A0<a href=3D"http=
://ark.intel.com/MySearch.aspx?AESTech=3Dtrue" target=3D"_blank">http://ark=
.intel.com/MySearch.aspx?AESTech=3Dtrue</a><div>

<div></div><div><br>
<br><div class=3D"gmail_quote">On Tue, Jan 18, 2011 at 11:34 AM, Willy Tarr=
eau <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu" target=3D"_blank">w@1=
wt.eu</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi Ian,<br>
<br>
On Tue, Jan 18, 2011 at 11:15:04AM -0800, Ian Fette (??????????????????????=
??) wrote:<br>
&gt; I am not entirely sure what people mean by a fixed mask. For it to be =
worth<br>
&gt; while, the mask would have to change every frame so that the attacker<=
br>
&gt; doesn&#39;t have advanced knowledge of the mask.<br>
<br>
That was point &quot;1.5&quot; which was not kept in the poll.<br>
<br>
&gt; So, for me to live with it, we have to have something that changes eve=
ry<br>
&gt; frame if it&#39;s worth doing at all.<br>
&gt;<br>
&gt; As for whether we use XOR(SHA(c-nonce, s-nonce, rand)) or AES, I could=
 live<br>
&gt; with either. Frankly I don&#39;t think that either are prohibitively e=
xpensive,<br>
&gt; especially compared to something that would cause us to significantly<=
br>
&gt; increase bandwidth requirements (base64).<br>
<br>
It depends on how you see it. Speaking as someone who develop intermediarie=
s,<br>
having a 3 GHz CPU not being able to process 1 Gbps of traffic is a big<br>
concern, considering that the same machine has no issue at 10 Gbps of HTTP.=
<br>
<br>
If we have to make the trade-off, I&#39;d say that &quot;base128&quot; is &=
quot;only&quot; 14%<br>
network overhead for frames above around a hundred bytes, while AES-CTR<br>
is a &gt;1000% CPU overhead for all frame sizes. XOR(HMAC/SHA) is even a<br=
>
much higher overhead for small frames which should be our main target.<br>
<br>
That&#39;s something to keep in mind. We could try to think how much time i=
t<br>
will take for network speeds to increase by our overhead and how much time<=
br>
it will take for CPU speeds to increase by our overhead. In the first case<=
br>
it&#39;s just a matter of few months, maybe only one, in the second case it=
&#39;s<br>
a matter of several years.<br>
<br>
I&#39;m not much for causing network overheads but I&#39;m comparing two co=
sts<br>
if we have to choose an alternative.<br>
<br>
The simple XOR has none of them though.<br>
<br>
Regards,<br>
<font color=3D"#888888">Willy<br>
<br>
</font></blockquote></div><br>
</div></div><br></div></div>_______________________________________________=
<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
<br></blockquote></div><font color=3D"#888888"><br><br clear=3D"all"><br>--=
 <br>Regards,<br>Senthilkumar Peelikkampatti,<br><a href=3D"http://pmsenthi=
lkumar.blogspot.com/" target=3D"_blank">http://pmsenthilkumar.blogspot.com/=
</a><br>
<br>
</font></blockquote></div><br></div>

--00248c0501e55a5360049a295645--

From derhoermi@gmx.net  Tue Jan 18 19:11:42 2011
Return-Path: <derhoermi@gmx.net>
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 3431328B23E for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 19:11:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.374
X-Spam-Level: 
X-Spam-Status: No, score=-3.374 tagged_above=-999 required=5 tests=[AWL=-0.775, BAYES_00=-2.599]
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 IeD6QDUec1D2 for <hybi@core3.amsl.com>; Tue, 18 Jan 2011 19:11:40 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 1D5F628C0D0 for <hybi@ietf.org>; Tue, 18 Jan 2011 19:11:39 -0800 (PST)
Received: (qmail invoked by alias); 19 Jan 2011 03:14:16 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp064) with SMTP; 19 Jan 2011 04:14:16 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX19BQXpth5BBpVsYxEenNT2DSo3CrYdiI+D4rwjEjV oQ6T96me3fP6wS
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Jamie Lokier <jamie@shareable.org>
Date: Wed, 19 Jan 2011 04:14:13 +0100
Message-ID: <uigcj6tf41lrh2lro3kuh4fv8q7ibrhcrb@hive.bjoern.hoehrmann.de>
References: <20110117073721.GJ13161@1wt.eu> <AANLkTim6hMggxdgiQcGzraZUgTj3GTkA1rGDomqJvsOn@mail.gmail.com> <20110117091755.GA15349@1wt.eu> <AANLkTikCSSAsizjxNmbgFcWS-qfKCfYzYKVGtniXxzYh@mail.gmail.com> <20110117104718.GA16088@1wt.eu> <AANLkTing-qrcmpMtN-9zGGUhMdQkTHQEwQib=r=kS4pQ@mail.gmail.com> <20110117135912.GA16684@1wt.eu> <20110117200031.GB30268@shareable.org> <g8naj6ho8r0qrh15lal1m208i16j8djiim@hive.bjoern.hoehrmann.de> <20110119012303.GL30268@shareable.org>
In-Reply-To: <20110119012303.GL30268@shareable.org>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] CRLF-less masking proposal
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, 19 Jan 2011 03:11:42 -0000

* Jamie Lokier wrote:
>I've read that some proxies go into "tunnelling mode" when they see
>data that doesn't look like proper HTTP they understand (such as very
>broken HTTP headers sent by some Microsoft IIS servers a while ago).
>In that mode, they just forward what they see without adding headers.
>and I would worry a little about those mangling data later on due to
>implementation bugs/quirks, hence the musing over a CRC or MAC.

Well, the typical error people make when trying to write parsers by hand
is turning specifications formulated in the positive into code that is
formulated in the negative. HTTP method names cannot contain white space
so you skip white space preceding them and read them until you encounter
white space after them. If you follow that reasoning you can arrive at a
mostly blind forwarder. That is the underlying reasoning for masking and
if you consider that intermediaries sometimes modify things, like adding
a header, your concern is quite plausible even if very limited in scope.

However, support for this in the base protocol, or even in a standard
extension does not buy you much, if the data does get corrupted you'll
likely get some exception in your own client-side code or experience a
strange hang or an error event you didn't account for properly, whether
the browser detects the failure or not. If you make checksums part of
your own sub-protocol and have a way to, say, re-transmit broken stuff,
you would seem to be much better off, without having to persuade browser
vendors to adopt your integrity scheme and without making matters worse
for people who don't really need their "latest tweets" widget to work
perfectly all the time.

>Making sure the response doesn't contain headers that might be added
>by a normal HTTP proxy seems reasonable, although I wouldn't expect
>proxies to add any headers (except some of them add Via):
>
>Absence of both Content-Length and Transfer-Encoding has a specific,
>valid meaning in HTTP responses, so proxies shouldn't add them unless
>they are changing to a different Transfer-Encoding.

The idea is to capture proxy-generated error messages (since the first
thing they see after the handshake is random junk, they may complain
about the request being malformed, exceeding buffer limits, lacking a
Host header, and so on) and deliberate attempts by a server to send
something that looks like a HTTP response and also a valid Websocket
frame, as they might need in a brute force attack against the masking
key to keep the connection alive. An intermediary might take a response
without "HTTP" at the beginning as HTTP/0.9 response and not read any
more requests until the server closes the connection, for instance.

>> Masking does that already, pre-scan the masked frame for bad patterns
>> like "http" and "host" and pick a different key if you find it, and if
>> you cannot find a key within some resource limit, fragment the frame.
>> Not pretty, but then browser developers can figure out on their own how
>> they balance their performance requirements against their paranoia and
>> frustrating sloppy server developers who don't expect fragmentation.
>
>That's an interesting idea, though escaping LF seems much easier.

Well, port 80 is not a safe place, I would take it for granted that you
have components there with integer overflows if you'd allow large form
posts from browsers, buffer overflows if you allow long method names or
long paths or long header values, you might have components that attempt
to autodetect TLS or EBCDIC even, some might ignore the top bit of any
byte they see, it's easy to see how randomness helps you sleep at night,
even if there are any number of other vectors through which you can ex-
ploit such hypothetical and obviously silly setups.

Since the proponents of the more elaborate masking schemes didn't feel
like carefully explaining why the most basic masking scheme isn't good
enough when I suggested they do so back in december, I did experiment
http://lists.w3.org/Archives/Public/www-archive/2011Jan/0014.html with
this, and the numbers don't come out that badly. Certainly not something
you'd do permanently, but it gives people time to find and fix bugs and
then you can turn this off. Due diligence.

And in any case, masking LFs would increase the frame length, and as I 
mentioned earlier, if that is okay, you can also add randomness in pro-
portion to the message length. That may be the solution to make every-
one unhappy but too exhausted to object. What we should have done is
come up with a decent set of requirements and then have people skilled
in the arts of cryptography design us a solution along with an argument
why their solution makes good tradeoffs, or tell us to drop some of the
requirements.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From salvatore.loreto@ericsson.com  Thu Jan 20 11:25:18 2011
Return-Path: <salvatore.loreto@ericsson.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 B07B03A67CF for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 11:25:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.545
X-Spam-Level: 
X-Spam-Status: No, score=-106.545 tagged_above=-999 required=5 tests=[AWL=0.053, BAYES_00=-2.599, 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 ZE96wHaL766t for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 11:25:17 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id 853F53A67D0 for <hybi@ietf.org>; Thu, 20 Jan 2011 11:25:15 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-95-4d388cbe4b74
Received: from esessmw0247.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id A9.2F.23694.EBC883D4; Thu, 20 Jan 2011 20:27:58 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0247.eemea.ericsson.se (153.88.115.94) with Microsoft SMTP Server id 8.2.234.1; Thu, 20 Jan 2011 20:27:58 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 378CC2754	for <hybi@ietf.org>; Thu, 20 Jan 2011 21:27:58 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id E4914506BE	for <hybi@ietf.org>; Thu, 20 Jan 2011 21:27:57 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 76D87506BD	for <hybi@ietf.org>; Thu, 20 Jan 2011 21:27:57 +0200 (EET)
Message-ID: <4D388CBD.4040708@ericsson.com>
Date: Thu, 20 Jan 2011 20:27:57 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: multipart/alternative; boundary="------------030107050201010806010104"
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: [hybi] consensus result on Straw Poll: Masking options
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: Thu, 20 Jan 2011 19:25:18 -0000

--------------030107050201010806010104
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit

(as co-chair)

The straw poll on "*Masking options*" is over:
http://www.ietf.org/mail-archive/web/hybi/current/msg05871.html
Thanks to all the people (I have counted around 30) that have answered it
and contributed to the discussion.


The mailing list discussion generated by the straw-poll has showed a 
large consensus
to option #1

where option #1 means simply
"/a random per-frame mask (of fix length) which does not depend on any 
information outside the frame to interpret it/"


The text in the next version (05) of the WebSocket protocol draft will 
reflect this consensus!


best regards
/Sal

-- 
Salvatore Loreto
www.sloreto.com


--------------030107050201010806010104
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    (as co-chair)<br>
    <br>
    The straw poll on "<b>Masking options</b>" is over:<br>
    <a class="moz-txt-link-freetext"
      href="http://www.ietf.org/mail-archive/web/hybi/current/msg05426.html">http://www.ietf.org/mail-archive/web/hybi/current/msg05871.html</a><br>
    Thanks to all the people (I have counted around 30) that have
    answered it<br>
    and contributed to the discussion.<br>
    <br>
    <br>
    The mailing list discussion generated by the straw-poll has showed a
    large consensus<br>
    to option #1&nbsp;<br>
    <br>
    where option #1&nbsp;means simply <br>
    "<i>a random per-frame mask (of fix length) which does not depend on
      any information outside the frame to interpret it</i>"<br>
    <br>
    <br>
    The text in the next version&nbsp;(05) of the WebSocket protocol draft
    will reflect this consensus!<br>
    <br>
    <br>
    best regards<br>
    /Sal
    <pre class="moz-signature" cols="72">-- 
Salvatore Loreto
<a class="moz-txt-link-abbreviated" href="http://www.sloreto.com">www.sloreto.com</a></pre>
  </body>
</html>

--------------030107050201010806010104--

From jat@google.com  Thu Jan 20 11:32:35 2011
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 35E653A67EF for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 11:32:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.484
X-Spam-Level: 
X-Spam-Status: No, score=-104.484 tagged_above=-999 required=5 tests=[AWL=-1.508, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 H5ch57tC5y4L for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 11:32:34 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 11A513A67EB for <hybi@ietf.org>; Thu, 20 Jan 2011 11:32:33 -0800 (PST)
Received: from hpaq13.eem.corp.google.com (hpaq13.eem.corp.google.com [172.25.149.13]) by smtp-out.google.com with ESMTP id p0KJZGpm015825 for <hybi@ietf.org>; Thu, 20 Jan 2011 11:35:16 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295552117; bh=6Gklk7Qmfc3t91ZbnERFWx0dHQU=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=TP94pIEcSTFu+mj2OZEO8y9zteo1p4/VcNY/hdJ7ZTOY8F/VfzhTetUj7HzFN7LaG B1CdquW6QnGP6H0ugs5mg==
Received: from gwj21 (gwj21.prod.google.com [10.200.10.21]) by hpaq13.eem.corp.google.com with ESMTP id p0KJYtWe002236 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Thu, 20 Jan 2011 11:35:15 -0800
Received: by gwj21 with SMTP id 21so297907gwj.13 for <hybi@ietf.org>; Thu, 20 Jan 2011 11:35:15 -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=c/DIr5Z33u2Odb8AMnp0fjRIU9fPczZV+gSTOtR2wIE=; b=DbCunXWSp6QQAEPYMj1RhLu0Rfi1BXBjIyLZEVc4Z3ok9TNG9JoNWFZwf6mBc/3MDb swuHEMXvzNYEyl34zkAA==
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=xUM6GkTBRjhdSZiiWOxVB2DBZpMTky4Hamrydwv2VFcLGMwugwYJxxkvYAvd+EI2Tt hM2fJR9UzXmxcqeE64Ow==
Received: by 10.150.195.18 with SMTP id s18mr3008664ybf.92.1295552115329; Thu, 20 Jan 2011 11:35:15 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Thu, 20 Jan 2011 11:34:54 -0800 (PST)
In-Reply-To: <4D388CBD.4040708@ericsson.com>
References: <4D388CBD.4040708@ericsson.com>
From: John Tamplin <jat@google.com>
Date: Thu, 20 Jan 2011 14:34:54 -0500
Message-ID: <AANLkTinfzMEC0xaeXKMm6qUkx4SBFZVnusvcDqqZS5B8@mail.gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: multipart/alternative; boundary=000e0cd4d83c9f4f6b049a4c3b5c
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Thu, 20 Jan 2011 19:32:35 -0000

--000e0cd4d83c9f4f6b049a4c3b5c
Content-Type: text/plain; charset=UTF-8

On Thu, Jan 20, 2011 at 2:27 PM, Salvatore Loreto <
salvatore.loreto@ericsson.com> wrote:

> The mailing list discussion generated by the straw-poll has showed a large
> consensus
> to option #1
>
> where option #1 means simply
> "*a random per-frame mask (of fix length) which does not depend on any
> information outside the frame to interpret it*"
>
> The text in the next version (05) of the WebSocket protocol draft will
> reflect this consensus!
>

While I agree more people agreed to that option, there seemed to be quite a
few with very strongly held opinions against it -- how do we resolve those
objections?

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

--000e0cd4d83c9f4f6b049a4c3b5c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Jan 20, 2011 at 2:27 PM, Salvatore Loret=
o <span dir=3D"ltr">&lt;<a href=3D"mailto:salvatore.loreto@ericsson.com">sa=
lvatore.loreto@ericsson.com</a>&gt;</span> wrote:<br><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex;">



 =20

   =20
 =20
  <div bgcolor=3D"#ffffff" text=3D"#000000">The mailing list discussion gen=
erated by the straw-poll has showed a
    large consensus<br>
    to option #1=C2=A0<br>
    <br>
    where option #1=C2=A0means simply <br>
    &quot;<i>a random per-frame mask (of fix length) which does not depend =
on
      any information outside the frame to interpret it</i>&quot;<br>
   =20
    <br>
    The text in the next version=C2=A0(05) of the WebSocket protocol draft
    will reflect this consensus!<br></div></blockquote><div><br></div><div>=
While I agree more people agreed to that option, there seemed to be quite a=
 few with very strongly held opinions against it -- how do we resolve those=
 objections?=C2=A0</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--000e0cd4d83c9f4f6b049a4c3b5c--

From mjs@apple.com  Thu Jan 20 11:47:59 2011
Return-Path: <mjs@apple.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 A40E13A67F5 for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 11:47:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.551
X-Spam-Level: 
X-Spam-Status: No, score=-106.551 tagged_above=-999 required=5 tests=[AWL=0.047, BAYES_00=-2.599, 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 3K1WFnAUSQL5 for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 11:47:58 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 7C4203A67BD for <hybi@ietf.org>; Thu, 20 Jan 2011 11:47:58 -0800 (PST)
Received: from relay12.apple.com (relay12.apple.com [17.128.113.53]) by mail-out3.apple.com (Postfix) with ESMTP id 673A1C8D12A4 for <hybi@ietf.org>; Thu, 20 Jan 2011 11:50:42 -0800 (PST)
X-AuditID: 11807135-b7be9ae000006bf6-25-4d3892124ad4
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay12.apple.com (Apple SCV relay) with SMTP id EA.8D.27638.212983D4; Thu, 20 Jan 2011 11:50:42 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_KrYTDkD2nTdzgJwSmyI0uQ)"
Received: from [17.153.106.175] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LFC00LYR74H2Z40@elliott.apple.com> for hybi@ietf.org; Thu, 20 Jan 2011 11:50:42 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D388CBD.4040708@ericsson.com>
Date: Thu, 20 Jan 2011 11:50:41 -0800
Message-id: <1248F7C0-A615-43C1-AE65-09E48E2DE8FE@apple.com>
References: <4D388CBD.4040708@ericsson.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Thu, 20 Jan 2011 19:47:59 -0000

--Boundary_(ID_KrYTDkD2nTdzgJwSmyI0uQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


If the actual process we're using is just majority vote, then let's not call it "consensus".

 - Maciej

On Jan 20, 2011, at 11:27 AM, Salvatore Loreto wrote:

> (as co-chair)
> 
> The straw poll on "Masking options" is over:
> http://www.ietf.org/mail-archive/web/hybi/current/msg05871.html
> Thanks to all the people (I have counted around 30) that have answered it
> and contributed to the discussion.
> 
> 
> The mailing list discussion generated by the straw-poll has showed a large consensus
> to option #1 
> 
> where option #1 means simply 
> "a random per-frame mask (of fix length) which does not depend on any information outside the frame to interpret it"
> 
> 
> The text in the next version (05) of the WebSocket protocol draft will reflect this consensus!
> 
> 
> best regards
> /Sal
> -- 
> Salvatore Loreto
> www.sloreto.com
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


--Boundary_(ID_KrYTDkD2nTdzgJwSmyI0uQ)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>If the actual process we're using is just majority vote, then let's not call it "consensus".<div><br></div><div>&nbsp;- Maciej</div><div><br><div><div>On Jan 20, 2011, at 11:27 AM, Salvatore Loreto wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div bgcolor="#ffffff" text="#000000">
    (as co-chair)<br>
    <br>
    The straw poll on "<b>Masking options</b>" is over:<br>
    <a class="moz-txt-link-freetext" href="http://www.ietf.org/mail-archive/web/hybi/current/msg05426.html">http://www.ietf.org/mail-archive/web/hybi/current/msg05871.html</a><br>
    Thanks to all the people (I have counted around 30) that have
    answered it<br>
    and contributed to the discussion.<br>
    <br>
    <br>
    The mailing list discussion generated by the straw-poll has showed a
    large consensus<br>
    to option #1&nbsp;<br>
    <br>
    where option #1&nbsp;means simply <br>
    "<i>a random per-frame mask (of fix length) which does not depend on
      any information outside the frame to interpret it</i>"<br>
    <br>
    <br>
    The text in the next version&nbsp;(05) of the WebSocket protocol draft
    will reflect this consensus!<br>
    <br>
    <br>
    best regards<br>
    /Sal
    <pre class="moz-signature" cols="72">-- 
Salvatore Loreto
<a class="moz-txt-link-abbreviated" href="http://www.sloreto.com/">www.sloreto.com</a></pre>
  </div>

_______________________________________________<br>hybi mailing list<br><a href="mailto:hybi@ietf.org">hybi@ietf.org</a><br>https://www.ietf.org/mailman/listinfo/hybi<br></blockquote></div><br></div></body></html>

--Boundary_(ID_KrYTDkD2nTdzgJwSmyI0uQ)--

From salvatore.loreto@ericsson.com  Thu Jan 20 12:07:03 2011
Return-Path: <salvatore.loreto@ericsson.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 E2F333A67EF for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 12:07:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.546
X-Spam-Level: 
X-Spam-Status: No, score=-106.546 tagged_above=-999 required=5 tests=[AWL=0.052, BAYES_00=-2.599, 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 KuzOC7xA82sL for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 12:07:02 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id 671F03A67E2 for <hybi@ietf.org>; Thu, 20 Jan 2011 12:07:02 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-9e-4d389689d3ac
Received: from esessmw0191.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id 16.51.23694.986983D4; Thu, 20 Jan 2011 21:09:45 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0191.eemea.ericsson.se (153.88.115.85) with Microsoft SMTP Server id 8.2.234.1; Thu, 20 Jan 2011 21:09:45 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 1B9EA2754; Thu, 20 Jan 2011 22:09:45 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id D9415506BE; Thu, 20 Jan 2011 22:09:44 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 514F4506BD; Thu, 20 Jan 2011 22:09:44 +0200 (EET)
Message-ID: <4D389687.2080307@ericsson.com>
Date: Thu, 20 Jan 2011 21:09:43 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: Maciej Stachowiak <mjs@apple.com>
References: <4D388CBD.4040708@ericsson.com> <1248F7C0-A615-43C1-AE65-09E48E2DE8FE@apple.com>
In-Reply-To: <1248F7C0-A615-43C1-AE65-09E48E2DE8FE@apple.com>
Content-Type: multipart/alternative; boundary="------------080709070705060307080003"
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Thu, 20 Jan 2011 20:07:04 -0000

--------------080709070705060307080003
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit

sorry I should have said "rough consensus"...

/Sal

On 1/20/11 8:50 PM, Maciej Stachowiak wrote:
>
> If the actual process we're using is just majority vote, then let's 
> not call it "consensus".
>
>  - Maciej
>
> On Jan 20, 2011, at 11:27 AM, Salvatore Loreto wrote:
>
>> (as co-chair)
>>
>> The straw poll on "*Masking options*" is over:
>> http://www.ietf.org/mail-archive/web/hybi/current/msg05871.html
>> Thanks to all the people (I have counted around 30) that have answered it
>> and contributed to the discussion.
>>
>>
>> The mailing list discussion generated by the straw-poll has showed a 
>> large consensus
>> to option #1
>>
>> where option #1 means simply
>> "/a random per-frame mask (of fix length) which does not depend on 
>> any information outside the frame to interpret it/"
>>
>>
>> The text in the next version (05) of the WebSocket protocol draft 
>> will reflect this consensus!
>>
>>
>> best regards
>> /Sal
>> -- 
>> Salvatore Loreto
>> www.sloreto.com
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org <mailto:hybi@ietf.org>
>> https://www.ietf.org/mailman/listinfo/hybi

--------------080709070705060307080003
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    sorry I should have said "rough consensus"...<br>
    <br>
    /Sal<br>
    <br>
    On 1/20/11 8:50 PM, Maciej Stachowiak wrote:
    <blockquote
      cite="mid:1248F7C0-A615-43C1-AE65-09E48E2DE8FE@apple.com"
      type="cite">
      <div><br>
      </div>
      If the actual process we're using is just majority vote, then
      let's not call it "consensus".
      <div><br>
      </div>
      <div>&nbsp;- Maciej</div>
      <div><br>
        <div>
          <div>On Jan 20, 2011, at 11:27 AM, Salvatore Loreto wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">
            <div bgcolor="#ffffff" text="#000000"> (as co-chair)<br>
              <br>
              The straw poll on "<b>Masking options</b>" is over:<br>
              <a moz-do-not-send="true" class="moz-txt-link-freetext"
                href="http://www.ietf.org/mail-archive/web/hybi/current/msg05426.html">http://www.ietf.org/mail-archive/web/hybi/current/msg05871.html</a><br>
              Thanks to all the people (I have counted around 30) that
              have answered it<br>
              and contributed to the discussion.<br>
              <br>
              <br>
              The mailing list discussion generated by the straw-poll
              has showed a large consensus<br>
              to option #1&nbsp;<br>
              <br>
              where option #1&nbsp;means simply <br>
              "<i>a random per-frame mask (of fix length) which does not
                depend on any information outside the frame to interpret
                it</i>"<br>
              <br>
              <br>
              The text in the next version&nbsp;(05) of the WebSocket
              protocol draft will reflect this consensus!<br>
              <br>
              <br>
              best regards<br>
              /Sal
              <pre class="moz-signature" cols="72">-- 
Salvatore Loreto
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.sloreto.com/">www.sloreto.com</a></pre>
            </div>
            _______________________________________________<br>
            hybi mailing list<br>
            <a moz-do-not-send="true" href="mailto:hybi@ietf.org">hybi@ietf.org</a><br>
            <a class="moz-txt-link-freetext" href="https://www.ietf.org/mailman/listinfo/hybi">https://www.ietf.org/mailman/listinfo/hybi</a><br>
          </blockquote>
        </div>
      </div>
    </blockquote>
  </body>
</html>

--------------080709070705060307080003--

From sm@elandsys.com  Thu Jan 20 12:56:03 2011
Return-Path: <sm@elandsys.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 0DF033A6827 for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 12:56:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.48
X-Spam-Level: 
X-Spam-Status: No, score=-102.48 tagged_above=-999 required=5 tests=[AWL=0.119, BAYES_00=-2.599, 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 9wVHcAp0mCNm for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 12:56:02 -0800 (PST)
Received: from mail.elandsys.com (mail.elandsys.com [208.69.177.125]) by core3.amsl.com (Postfix) with ESMTP id 197C13A6824 for <hybi@ietf.org>; Thu, 20 Jan 2011 12:56:01 -0800 (PST)
Received: from SUBMAN.elandsys.com ([41.136.238.65]) (authenticated bits=0) by mail.elandsys.com (8.13.8/8.13.8) with ESMTP id p0KKwYdC029006; Thu, 20 Jan 2011 12:58:39 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=elandsys.com; s=mail; t=1295557121; bh=K2TwssveH8Hj4kenWXuU1QGQv5Q=; h=Message-Id:Date:To:From:Subject:Cc:In-Reply-To:References: Mime-Version:Content-Type; b=lReW4ImsJ3iC3yu9PQHRA/cMCzcclxn+ufdcxqGrm9BjRZThDfso67v2tmeue0Len bgE1Cr2W85JbxMZW+vxl7Q0tkIjZp1cqUWBWip9B1D6aJiaX1JMegZ8pzvZ2OvVSes cF2gHmEQdh1/Z5EFqkde8O4Tn0zUIB3Wydi9Zy5c=
Message-Id: <6.2.5.6.2.20110120121534.0cead638@resistor.net>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.5.6
Date: Thu, 20 Jan 2011 12:56:53 -0800
To: hybi@ietf.org
From: SM <sm+ietf@elandsys.com>
In-Reply-To: <4D388CBD.4040708@ericsson.com>
References: <4D388CBD.4040708@ericsson.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Thu, 20 Jan 2011 20:56:03 -0000

Hello,

The Hybi Working Group co-chair announced that there was rough 
consensus for option #1 based on the discussions generated by the 
straw-poll [2].  Please note that it is not based on the principle of 
majority vote; or that it is a vote as such.

Consensus-building requires significant amounts of discussion.  It is 
a way for objections to be resolved.  When consensus cannot be 
reached, alternative methods such as rough consensus can be used to 
reach a decision.

If anyone believes that the process has not been followed in reaching 
the decision, they can contact the Hybi Working Group Chairs.

Regards,
S. Moonesamy
HyBi WG Secretary

1. http://www.ietf.org/mail-archive/web/hybi/current/msg06028.html


From ietf@adambarth.com  Thu Jan 20 13:44:49 2011
Return-Path: <ietf@adambarth.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 9B73A3A6836 for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 13:44:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.78
X-Spam-Level: 
X-Spam-Status: No, score=-3.78 tagged_above=-999 required=5 tests=[AWL=-0.803,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 8eNzKAq7Yppw for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 13:44:47 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id C7A7E3A6831 for <hybi@ietf.org>; Thu, 20 Jan 2011 13:44:46 -0800 (PST)
Received: by wyf23 with SMTP id 23so1146641wyf.31 for <hybi@ietf.org>; Thu, 20 Jan 2011 13:47:30 -0800 (PST)
Received: by 10.227.161.13 with SMTP id p13mr3000268wbx.164.1295560049387; Thu, 20 Jan 2011 13:47:29 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id b54sm352299wer.45.2011.01.20.13.47.27 (version=SSLv3 cipher=RC4-MD5); Thu, 20 Jan 2011 13:47:28 -0800 (PST)
Received: by iwn40 with SMTP id 40so1143917iwn.31 for <hybi@ietf.org>; Thu, 20 Jan 2011 13:47:26 -0800 (PST)
Received: by 10.231.173.12 with SMTP id n12mr3217424ibz.77.1295560046744; Thu, 20 Jan 2011 13:47:26 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.38.5 with HTTP; Thu, 20 Jan 2011 13:46:56 -0800 (PST)
In-Reply-To: <6.2.5.6.2.20110120121534.0cead638@resistor.net>
References: <4D388CBD.4040708@ericsson.com> <6.2.5.6.2.20110120121534.0cead638@resistor.net>
From: Adam Barth <ietf@adambarth.com>
Date: Thu, 20 Jan 2011 13:46:56 -0800
Message-ID: <AANLkTikrVdO+0aY0m_XXM9aGh39_+D71eEQAFu4WbYXJ@mail.gmail.com>
To: SM <sm+ietf@elandsys.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Thu, 20 Jan 2011 21:44:49 -0000

My read of the poll responses is that several folks had strong
technical objections to #1 and that most respondents said that they
could live with #2 if there were technical reasons why #1 was
insufficient.

Frankly, I'm surprised the chairs chose to declare consensus around #1
as that seems contrary to the messages sent to the list.

Adam


On Thu, Jan 20, 2011 at 12:56 PM, SM <sm+ietf@elandsys.com> wrote:
> Hello,
>
> The Hybi Working Group co-chair announced that there was rough consensus =
for
> option #1 based on the discussions generated by the straw-poll [2]. =A0Pl=
ease
> note that it is not based on the principle of majority vote; or that it i=
s a
> vote as such.
>
> Consensus-building requires significant amounts of discussion. =A0It is a=
 way
> for objections to be resolved. =A0When consensus cannot be reached,
> alternative methods such as rough consensus can be used to reach a decisi=
on.
>
> If anyone believes that the process has not been followed in reaching the
> decision, they can contact the Hybi Working Group Chairs.
>
> Regards,
> S. Moonesamy
> HyBi WG Secretary
>
> 1. http://www.ietf.org/mail-archive/web/hybi/current/msg06028.html
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From sm@elandsys.com  Thu Jan 20 15:02:13 2011
Return-Path: <sm@elandsys.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 850183A6870 for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 15:02:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.485
X-Spam-Level: 
X-Spam-Status: No, score=-102.485 tagged_above=-999 required=5 tests=[AWL=0.114, BAYES_00=-2.599, 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 CJ2Utqd6OCDN for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 15:02:12 -0800 (PST)
Received: from mail.elandsys.com (mail.elandsys.com [208.69.177.125]) by core3.amsl.com (Postfix) with ESMTP id A51E63A686C for <hybi@ietf.org>; Thu, 20 Jan 2011 15:02:12 -0800 (PST)
Received: from SUBMAN.elandsys.com ([41.136.238.65]) (authenticated bits=0) by mail.elandsys.com (8.13.8/8.13.8) with ESMTP id p0KN4k9C005988; Thu, 20 Jan 2011 15:04:52 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=elandsys.com; s=mail; t=1295564693; bh=XefJ9lS97U1A+vKwa9rodLNsHQY=; h=Message-Id:Date:To:From:Subject:Cc:In-Reply-To:References: Mime-Version:Content-Type; b=E3RrOAgoMJkPO1W01g3PP9UlYjtAbUdSewRk9Mrv7ahzB0urbHTuLpyEFCDWA1u7f K+ZVNGKcxPNfG9GFt11OEx7zwUybVqeDp9BHXqJpGXM5277JYkiuqsfQs8VZJamsdl ZGdasWLPDVReoqOnKYGWfVrpy4MMs7FrO6aT+L6A=
Message-Id: <6.2.5.6.2.20110120144556.07a1b468@elandnews.com>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.5.6
Date: Thu, 20 Jan 2011 15:04:14 -0800
To: Adam Barth <ietf@adambarth.com>
From: S Moonesamy <sm+ietf@elandsys.com>
In-Reply-To: <AANLkTikrVdO+0aY0m_XXM9aGh39_+D71eEQAFu4WbYXJ@mail.gmail.c om>
References: <4D388CBD.4040708@ericsson.com> <6.2.5.6.2.20110120121534.0cead638@resistor.net> <AANLkTikrVdO+0aY0m_XXM9aGh39_+D71eEQAFu4WbYXJ@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Cc: hybi@ietf.org
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Thu, 20 Jan 2011 23:02:13 -0000

Hi Adam,
At 13:46 20-01-11, Adam Barth wrote:
>My read of the poll responses is that several folks had strong
>technical objections to #1 and that most respondents said that they
>could live with #2 if there were technical reasons why #1 was
>insufficient.
>
>Frankly, I'm surprised the chairs chose to declare consensus around #1
>as that seems contrary to the messages sent to the list.

Sal mentioned that it was rough consensus.

If there are any concerns about the declaration, it would be helpful 
if there is a detailed description of those concerns together with 
the action requested, i.e. any comments that were ignored, etc.

Regards,
S. Moonesamy
HyBi WG Secretary 


From ietf@adambarth.com  Thu Jan 20 15:24:27 2011
Return-Path: <ietf@adambarth.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 D22C83A6872 for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 15:24:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.776
X-Spam-Level: 
X-Spam-Status: No, score=-3.776 tagged_above=-999 required=5 tests=[AWL=-0.799, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 rB8it9kf+hYJ for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 15:24:27 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id C5B6F3A686C for <hybi@ietf.org>; Thu, 20 Jan 2011 15:24:26 -0800 (PST)
Received: by vws7 with SMTP id 7so516059vws.31 for <hybi@ietf.org>; Thu, 20 Jan 2011 15:27:10 -0800 (PST)
Received: by 10.220.199.193 with SMTP id et1mr711076vcb.158.1295566029584; Thu, 20 Jan 2011 15:27:09 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id b6sm2968834vci.24.2011.01.20.15.27.07 (version=SSLv3 cipher=RC4-MD5); Thu, 20 Jan 2011 15:27:08 -0800 (PST)
Received: by iyi42 with SMTP id 42so1207260iyi.31 for <hybi@ietf.org>; Thu, 20 Jan 2011 15:27:07 -0800 (PST)
Received: by 10.231.192.7 with SMTP id do7mr3305667ibb.102.1295566026945; Thu, 20 Jan 2011 15:27:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.38.5 with HTTP; Thu, 20 Jan 2011 15:26:35 -0800 (PST)
In-Reply-To: <6.2.5.6.2.20110120144556.07a1b468@elandnews.com>
References: <4D388CBD.4040708@ericsson.com> <6.2.5.6.2.20110120121534.0cead638@resistor.net> <AANLkTikrVdO+0aY0m_XXM9aGh39_+D71eEQAFu4WbYXJ@mail.gmail.com> <6.2.5.6.2.20110120144556.07a1b468@elandnews.com>
From: Adam Barth <ietf@adambarth.com>
Date: Thu, 20 Jan 2011 15:26:35 -0800
Message-ID: <AANLkTi=KNiZ3KodiOS4Wvr5CHf=_4i8kWS9WDFr1T8ae@mail.gmail.com>
To: S Moonesamy <sm+ietf@elandsys.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi@ietf.org
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Thu, 20 Jan 2011 23:24:27 -0000

On Thu, Jan 20, 2011 at 3:04 PM, S Moonesamy <sm+ietf@elandsys.com> wrote:
> At 13:46 20-01-11, Adam Barth wrote:
>> My read of the poll responses is that several folks had strong
>> technical objections to #1 and that most respondents said that they
>> could live with #2 if there were technical reasons why #1 was
>> insufficient.
>>
>> Frankly, I'm surprised the chairs chose to declare consensus around #1
>> as that seems contrary to the messages sent to the list.
>
> Sal mentioned that it was rough consensus.

Perhaps I'm not versed in the finer distinctions among the different
types of consensus.

> If there are any concerns about the declaration, it would be helpful if
> there is a detailed description of those concerns together with the action
> requested, i.e. any comments that were ignored, etc.

It appears the chair might have overlooked this message:

http://www.ietf.org/mail-archive/web/hybi/current/msg05884.html

On Wed, Jan 12, 2011 at 2:23 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> On Jan 12, 2011, at 12:00 PM, Salvatore Loreto wrote:
>> 1. a fixed mask carried entirely in the packet.
>
> I can't live with this option. It does not address the HTTP vs. WebSocket threat model.

Specifically, we should not specify a protocol that Maciej cannot live
with.  More generally, ignoring the HTTP vs. WebSocket threat model is
unwise.

Adam

From dave@cridland.net  Thu Jan 20 15:54:15 2011
Return-Path: <dave@cridland.net>
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 B66303A687D for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 15:54:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.547
X-Spam-Level: 
X-Spam-Status: No, score=-2.547 tagged_above=-999 required=5 tests=[AWL=0.052,  BAYES_00=-2.599]
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 yWC3iM4SDNfs for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 15:54:14 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 751953A6877 for <hybi@ietf.org>; Thu, 20 Jan 2011 15:54:14 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 5370111680BC; Thu, 20 Jan 2011 23:56:57 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lxFi3XLKuGfX; Thu, 20 Jan 2011 23:56:55 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id C262211680BA; Thu, 20 Jan 2011 23:56:55 +0000 (GMT)
References: <4D388CBD.4040708@ericsson.com> <6.2.5.6.2.20110120121534.0cead638@resistor.net> <AANLkTikrVdO+0aY0m_XXM9aGh39_+D71eEQAFu4WbYXJ@mail.gmail.com> <6.2.5.6.2.20110120144556.07a1b468@elandnews.com> <AANLkTi=KNiZ3KodiOS4Wvr5CHf=_4i8kWS9WDFr1T8ae@mail.gmail.com>
In-Reply-To: <AANLkTi=KNiZ3KodiOS4Wvr5CHf=_4i8kWS9WDFr1T8ae@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <28835.1295567815.671531@puncture>
Date: Thu, 20 Jan 2011 23:56:55 +0000
From: Dave Cridland <dave@cridland.net>
To: Adam Barth <ietf@adambarth.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Thu, 20 Jan 2011 23:54:15 -0000

On Thu Jan 20 23:26:35 2011, Adam Barth wrote:
> Specifically, we should not specify a protocol that Maciej cannot  
> live
> with.  More generally, ignoring the HTTP vs. WebSocket threat model  
> is
> unwise.

I certainly agree with the latter statement, but I felt Maciej's  
issues were amply addressed by preventing that kind of cross-protocol  
attack within the handshake - that is, making it impossible to spoof  
a websocket handshake via Browser sandboxed APIs by usage of Sec-*  
headers, which are a restricted feature.

If this is *not* the case - that is, if one can write arbitrary data  
to sockets - then masking presence or type is rather moot, since one  
can generate AES, if pushed, in JavaScript.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From sm@elandsys.com  Thu Jan 20 16:08:33 2011
Return-Path: <sm@elandsys.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 8675C3A6890 for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 16:08:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.489
X-Spam-Level: 
X-Spam-Status: No, score=-102.489 tagged_above=-999 required=5 tests=[AWL=0.110, BAYES_00=-2.599, 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 mrlnpLU+qupl for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 16:08:32 -0800 (PST)
Received: from mail.elandsys.com (mail.elandsys.com [208.69.177.125]) by core3.amsl.com (Postfix) with ESMTP id 95D7D3A688C for <hybi@ietf.org>; Thu, 20 Jan 2011 16:08:32 -0800 (PST)
Received: from SUBMAN.elandsys.com ([41.136.238.65]) (authenticated bits=0) by mail.elandsys.com (8.13.8/8.13.8) with ESMTP id p0L0B4wh009825; Thu, 20 Jan 2011 16:11:09 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=elandsys.com; s=mail; t=1295568671; bh=k/ZiVLS9gcM5ACxmu6ikYcOIiU8=; h=Message-Id:Date:To:From:Subject:Cc:In-Reply-To:References: Mime-Version:Content-Type; b=467sDSdulnzq5afpMO0pGvFGxd0MAGQ/D7F+IY+A6pQDOjbnKbsME1SfOcWj/eWN5 tlzPucxU06yZ9N+wdSt/OhnCUuJhQkOgPBzwczSjLIGgZGhCY/jPyfqVr6uopj8dxF hkg5EofYv9+b7Gy40EzJ9FPEcEBrPOJ/4PMaMToI=
Message-Id: <6.2.5.6.2.20110120153346.07b705e8@elandnews.com>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.5.6
Date: Thu, 20 Jan 2011 16:10:55 -0800
To: Adam Barth <ietf@adambarth.com>
From: S Moonesamy <sm+ietf@elandsys.com>
In-Reply-To: <AANLkTi=KNiZ3KodiOS4Wvr5CHf=_4i8kWS9WDFr1T8ae@mail.gmail.c om>
References: <4D388CBD.4040708@ericsson.com> <6.2.5.6.2.20110120121534.0cead638@resistor.net> <AANLkTikrVdO+0aY0m_XXM9aGh39_+D71eEQAFu4WbYXJ@mail.gmail.com> <6.2.5.6.2.20110120144556.07a1b468@elandnews.com> <AANLkTi=KNiZ3KodiOS4Wvr5CHf=_4i8kWS9WDFr1T8ae@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Cc: hybi@ietf.org
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Fri, 21 Jan 2011 00:08:33 -0000

Hi Adam,
At 15:26 20-01-11, Adam Barth wrote:
>Perhaps I'm not versed in the finer distinctions among the different
>types of consensus.

I'll go by the following:

    IETF consensus does not require that all participants agree although
    this is, of course, preferred.  In general, the dominant view of the
    working group shall prevail.  (However, it must be noted that
    "dominance" is not to be determined on the basis of volume or
    persistence, but rather a more general sense of agreement.) Consensus
    can be determined by a show of hands, humming, or any other means on
    which the WG agrees (by rough consensus, of course).  Note that 51%
    of the working group does not qualify as "rough consensus" and 99% is
    better than rough.  It is up to the Chair to determine if rough
    consensus has been reached.

>It appears the chair might have overlooked this message:
>
>http://www.ietf.org/mail-archive/web/hybi/current/msg05884.html

[snip]


>On Wed, Jan 12, 2011 at 2:23 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> > On Jan 12, 2011, at 12:00 PM, Salvatore Loreto wrote:
> >> 1. a fixed mask carried entirely in the packet.
> >
> > I can't live with this option. It does not address the HTTP vs. 
> WebSocket threat model.
>
>Specifically, we should not specify a protocol that Maciej cannot live
>with.  More generally, ignoring the HTTP vs. WebSocket threat model is
>unwise.

Thanks, I'll forward your comments to the HyBi WG Chairs.

Best regards,
S. Moonesamy
HyBi WG Secretary 


From derhoermi@gmx.net  Thu Jan 20 17:34:52 2011
Return-Path: <derhoermi@gmx.net>
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 AF3273A6898 for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 17:34:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.359
X-Spam-Level: 
X-Spam-Status: No, score=-3.359 tagged_above=-999 required=5 tests=[AWL=-0.760, BAYES_00=-2.599]
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 9wjc5lJ2cBDA for <hybi@core3.amsl.com>; Thu, 20 Jan 2011 17:34:50 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 1FF633A680E for <hybi@ietf.org>; Thu, 20 Jan 2011 17:34:49 -0800 (PST)
Received: (qmail invoked by alias); 21 Jan 2011 01:37:32 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp062) with SMTP; 21 Jan 2011 02:37:32 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX18gu3Q663cgC4/S/B518ttkGHqLhZ1t6EjgnSih8d /QF5QpNx7TKg4U
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: John Tamplin <jat@google.com>
Date: Fri, 21 Jan 2011 02:37:31 +0100
Message-ID: <o8jhj6lfgq1h6i0b0ulr8uft82buegi091@hive.bjoern.hoehrmann.de>
References: <4D388CBD.4040708@ericsson.com> <AANLkTinfzMEC0xaeXKMm6qUkx4SBFZVnusvcDqqZS5B8@mail.gmail.com>
In-Reply-To: <AANLkTinfzMEC0xaeXKMm6qUkx4SBFZVnusvcDqqZS5B8@mail.gmail.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Fri, 21 Jan 2011 01:34:52 -0000

* John Tamplin wrote:
>While I agree more people agreed to that option, there seemed to be quite a
>few with very strongly held opinions against it -- how do we resolve those
>objections?

Well, there were mainly two objections. One, that the protocol does not
look random enough with the simple masking scheme. Assuming that if you
have sufficient control over some service to fake the handshake, it does
not matter whether you can use a Websocket client to send semi-random
data to it, then the only concern there is that the semi-random data may
be picked up by some HTTP-ish intermediary as HTTP traffic, which would
mean, since the best known attack against the simple masking scheme does
work just as well against the simple scheme as it does against the more
complex masking schemes, that the simple masking scheme can be made much
weaker somehow.

So, people can run this by someone who knows their mathematics; if you
can show that very significant impact seems quite plausible, there would
be some in the Working Group to reconsider their position based on this
new information. Alternatively or in addition, gather data on how common
intermediaries are that skip junk and then do something dangerous which
cannot be easily detected. Re-run Adam et al.'s experiment, use a test-
bed browser, talk to antivirus vendors to include checks in their pro-
ducts and share their results, and so on. Showing that there are many of
these intermediaries would also cast significant doubt.

You can also come up with an alternative proposal that makes things more
random but performs much better than what has been proposed. I've looked
at that myself, but if you want something that's easy to implement and
does not increase the message length and performs much better than what
has been proposed, you seem to be kinda out of luck, which isn't so sur-
prising, N bits of randomness take you only so and so far.

The second objection is an alleged lack of protection against absuing a
HTTP client that can be controlled by an attacker just enough to fake a
Websocket handshake but not enough to also properly fake the protocol.
People can prove this exists and make an argument that clients that are
broken in this manner cannot be fixed in sufficient time and numbers to
provide adequate protection, and also provide an argument why we really
should care about Websocket server implementers who cannot be bothered
to validate the handshake as coming from a Websocket client, and offer
an argument that there is an adequate solution that does not draw the
objections against solutions for the first objection here.

It seems from a brief look the people objecting are: James Graham; I've
not been able to find where he detailed his requirements and he did not
say what's wrong with the option favoured by most, so that's nothing I
think could be resolved through discussion; Eric Rescorla suggested the
straw poll because he felt all that could be said had been said, so it
seems there is no opportunity for progress either; Adam Barth seems to
share that sentiment, that's at least what I gathered from him chanting
"ship it", "ship it", "good enough", "good enough" and his eloquent one
liners like "that's a bunch of bunk".

That seems to leave Maciej Stachowiak. He is editor of our requirements
document and the text in that document about cross protocol attacks is
the text he proposed for it. He did not feel like properly proposing a
requirement for his amateur programmer concern, hasn't shown that there
is an actual problem, and hasn't shown that there is a solution that'd
address other people's concerns. Given that no attack is known against
the designs implied by the simple masking scheme that would make it un-
acceptable compared to apparently acceptable proposals, I do think his
requirement, lower-case "should consider and mitigate", is met.

It would seem the the ball is in their court. We've talked about this
for a month, exchanged hundreds of mails over it, but we've not really
learned anything new. We ultimately can't do much when the arguments do
not extend far beyond "I don't like this". Even if you said we have se-
curity concerns on the one hand, and performance concerns on the other,
we wouldn't agree on that. Some seem to think AES is the most secure
scheme because it seems to offer the highest degree of randomness, while
others think that would lead people to falsely assume the protocol
offers confidentiality or message integrity, making it less secure if
randomness does not compensate enough.

Some months back we had people more or less object to "masking" due to
performance considerations; we could not find an alternative, so we did
decided to adopt "masking". Masking schemes that come with orders of
magnitude performance penalties obviously were not easy to sell, and I
suggested people advocating them explain them very carefully. I did not
think resolving this issue through a straw poll that let people select
several out of a few masking schemes was a good idea. Now, people did
not try hard to sell their masking schemes, and people happily did vote
for the options they liked in the poll; at some point we'll have to
allow people to have their objections on record while moving on.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From salvatore.loreto@ericsson.com  Fri Jan 21 00:58:26 2011
Return-Path: <salvatore.loreto@ericsson.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 5F37D3A68F4 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 00:58:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.547
X-Spam-Level: 
X-Spam-Status: No, score=-106.547 tagged_above=-999 required=5 tests=[AWL=0.052, BAYES_00=-2.599, 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 QhfpIMIi+noJ for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 00:58:25 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id 223483A68F0 for <hybi@ietf.org>; Fri, 21 Jan 2011 00:58:24 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-ec-4d394b55c4e2
Received: from esessmw0237.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id 0A.1C.23694.55B493D4; Fri, 21 Jan 2011 10:01:09 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0237.eemea.ericsson.se (153.88.115.91) with Microsoft SMTP Server id 8.2.234.1; Fri, 21 Jan 2011 10:01:06 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id A15622754; Fri, 21 Jan 2011 11:01:06 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 6A50B50542; Fri, 21 Jan 2011 11:01:06 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id C289A5052D; Fri, 21 Jan 2011 11:01:05 +0200 (EET)
Message-ID: <4D394B51.2060105@ericsson.com>
Date: Fri, 21 Jan 2011 10:01:05 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, SM <sm+ietf@elandsys.com>
Subject: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 08:58:26 -0000

Hi there,

after the result of the first straw-poll on GET+Upgrade+Masking,
there were a discussion about GET not being the only method to "Upgrade" 
the connection;
other methods such as OPTIONS 
(http://www.ietf.org/mail-archive/web/hybi/current/msg05721.html)
and perhaps a completely new method could be used (as proposed months ago).

All the possibilities have pro and cons.

The mail thread(s) started to discuss the alternatives,
convinced Joe and myself, as HyBi wg co-chairs, that it make sense to 
run a straw-poll
to get as much information as we can  from people about technical reason 
(pro and cons)
for their preference(s).

So please provide your choices (if more then one, please rank them or if 
only one specify
"I can live only with") among the following

#1 - GET
#2 - OPTIONS
#3 - a complete new method (e.g. WEBSOCKET)

This poll will run until January 31st

cheers
/Sal

-- 
Salvatore Loreto
www.sloreto.com


From Achuth.Alakkad@ge.com  Fri Jan 21 01:23:55 2011
Return-Path: <Achuth.Alakkad@ge.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 F15923A68F7 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 01:23:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.598
X-Spam-Level: 
X-Spam-Status: No, score=-6.598 tagged_above=-999 required=5 tests=[AWL=-0.000, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4]
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 ggPM-OVsDirJ for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 01:23:53 -0800 (PST)
Received: from exprod5og107.obsmtp.com (exprod5og107.obsmtp.com [64.18.0.184]) by core3.amsl.com (Postfix) with ESMTP id 98B693A68F4 for <hybi@ietf.org>; Fri, 21 Jan 2011 01:23:51 -0800 (PST)
Received: from source ([4.78.218.129]) (using TLSv1) by exprod5ob107.postini.com ([64.18.4.12]) with SMTP ID DSNKTTlRTHGmQRr5GWpKbwDQn/yWbw1qB7G2@postini.com; Fri, 21 Jan 2011 01:26:37 PST
Received: from unknown (HELO alpmlef01.e2k.ad.ge.com) ([3.159.18.10]) by Cinmlip04.e2k.ad.ge.com with ESMTP; 21 Jan 2011 04:26:34 -0500
Received: from BANMLVEM07.e2k.ad.ge.com ([3.159.220.56]) by alpmlef01.e2k.ad.ge.com with Microsoft SMTPSVC(6.0.3790.4675);  Fri, 21 Jan 2011 04:26:35 -0500
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CBB94D.437F4EFA"
Date: Fri, 21 Jan 2011 14:56:18 +0530
Message-ID: <4590EC7E9324CF43A2B37F81AFD63570089C4309@BANMLVEM07.e2k.ad.ge.com>
In-Reply-To: <AANLkTimgc2294ZaknsfTj7mUvSbBe-zRP+wRT6PxGAP2@mail.gmail.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [hybi] Straw-poll on Masking options
thread-index: Acu3XzlC8g9HzkWATfO/VzppVgq6RgB7PQyw
References: <4D2E0863.2040804@ericsson.com> <AANLkTimgc2294ZaknsfTj7mUvSbBe-zRP+wRT6PxGAP2@mail.gmail.com>
From: "Alakkad, Achuth (GE Healthcare)" <Achuth.Alakkad@ge.com>
To: "Senthilkumar Peelikkampatti" <senthilkumar.peelikkampatti@gmail.com>, "Salvatore Loreto" <salvatore.loreto@ericsson.com>
X-OriginalArrivalTime: 21 Jan 2011 09:26:35.0527 (UTC) FILETIME=[4C618170:01CBB94D]
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, hybi@ietf.org
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 21 Jan 2011 09:23:55 -0000

This is a multi-part message in MIME format.

------_=_NextPart_001_01CBB94D.437F4EFA
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

If masking is a means for allowing the packet to pass through
intermediaries without any trouble, then I am not sure why we are
concerned about the data security.
If anyone is keen on content security he should use wss rather than ws.
Am not sure why we are concerned about which algorithm to use for
masking as its process intensive, rather will use a very simple
universal static mask to bypass intermediaries.
=20
ws is similar to http, any one can sniff data from network.

________________________________

From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
Senthilkumar Peelikkampatti
Sent: Wednesday, January 19, 2011 4:00 AM
To: Salvatore Loreto
Cc: Joe Hildebrand; hybi@ietf.org
Subject: Re: [hybi] Straw-poll on Masking options


I prefer option 1, though I wish to have no masking, anyway it makes
better trade off for me.

Other than having WS and WSS, we can split WS into masked and unmasked
variant, =20

1) WSS for secured connection (wss://)
2) WSMASKED for masked  (wsmask://)
3) WS for  (ws://) no masking

When we move on to perfect defect free intermediaries we can stick to
WS, this gives the application developer  option to choose based on what
kind of intermediary they have.=20

When we talk to about Browser ----> Intermediary ------> http server
--------> Websocket server, architecture choice is with app developer
for everything but browser. If we provide that option, it would
definitely help next million users chat/websocket app developer option
to choose.=20

Senthilkumar Peelikkampatti,
https://github.com/sendtopms/Erlwebsockserver.



On Wed, Jan 12, 2011 at 2:00 PM, Salvatore Loreto
<salvatore.loreto@ericsson.com> wrote:


	Hi all,
=09
=09
	Masking from the client to the server
	has reached strong consensus within this wg as a mechanism to
reduce security risks.
=09
	However there is disagreement on the actual method for masking.
	The technical differences, pro and cons, advantages and
disadvantages,
	as well as the legal implications of each method have already
been deeply discussed.
=09
	In order to settle the question of masking and find a way
forward that has a wide acceptance,
	Joe and I, as HyBi chairs, want to check where the consensus is
	on the following relevant options that have been discussed (and
summarized at
	some point in the mailing list by Eric Rescorla)
=09
=09
	1. a fixed mask carried entirely in the packet.
=09
	2. A longish repeated mask computed from the packet. For
concreteness,
	  suppose HMAC-SHA1(<uuid>, <server-conn-key> ||
<client-conn-key> || <packet-key>), but
	  obviously there's flexibility here.
=09
	3. A fully generated mask (if so specify also what you would
like to use e.g. AES-CTR or HMAC-SHA).
=09
=09
	Please indicate your preference(s) or the one can meet your bar
for "I could live with that";
	In the case you have more then one, please put the choices in a
preference order.
=09
	This poll will run until January 18th.
=09
	cheers
	/Sal
=09
	--=20
	Salvatore Loreto
	www.sloreto.com
=09
	_______________________________________________
	hybi mailing list
	hybi@ietf.org
	https://www.ietf.org/mailman/listinfo/hybi
=09




--=20
Regards,
Senthilkumar Peelikkampatti,
http://pmsenthilkumar.blogspot.com/



------_=_NextPart_001_01CBB94D.437F4EFA
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dus-ascii" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18928"></HEAD>
<BODY>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D156341809-21012011><FONT =
color=3D#0000ff=20
size=3D2 face=3DArial>If masking is a means for allowing the packet to =
pass through=20
intermediaries without any trouble, then I am not sure why&nbsp;we are =
concerned=20
about the data security.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D156341809-21012011><FONT =
color=3D#0000ff=20
size=3D2 face=3DArial>If anyone is keen on content security&nbsp;he =
should use wss=20
rather than ws. Am not sure why we are concerned about which algorithm =
to use=20
for masking as its process intensive,&nbsp;rather will use a very simple =

universal static mask to bypass intermediaries.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D156341809-21012011><FONT =
color=3D#0000ff=20
size=3D2 face=3DArial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D156341809-21012011><FONT =
color=3D#0000ff=20
size=3D2 face=3DArial>ws is similar to http, any one can sniff data from =

network.</FONT></SPAN></DIV><BR>
<DIV dir=3Dltr lang=3Den-us class=3DOutlookMessageHeader align=3Dleft>
<HR tabIndex=3D-1>
<FONT size=3D2 face=3DTahoma><B>From:</B> hybi-bounces@ietf.org=20
[mailto:hybi-bounces@ietf.org] <B>On Behalf Of </B>Senthilkumar=20
Peelikkampatti<BR><B>Sent:</B> Wednesday, January 19, 2011 4:00 =
AM<BR><B>To:</B>=20
Salvatore Loreto<BR><B>Cc:</B> Joe Hildebrand; =
hybi@ietf.org<BR><B>Subject:</B>=20
Re: [hybi] Straw-poll on Masking options<BR></FONT><BR></DIV>
<DIV></DIV>I prefer option 1, though I wish to have no masking, anyway =
it makes=20
better trade off for me.<BR><BR>Other than having WS and WSS, we can =
split WS=20
into masked and unmasked variant,&nbsp; <BR><BR>1) WSS for secured =
connection=20
(wss://)<BR>2) WSMASKED for masked&nbsp; (wsmask://)<BR>3) WS for&nbsp; =
(ws://)=20
no masking<BR><BR>When we move on to perfect defect free intermediaries =
we can=20
stick to WS, this gives the application developer&nbsp; option to choose =
based=20
on what kind of intermediary they have. <BR><BR>When we talk to about =
Browser=20
----&gt; Intermediary ------&gt; http server --------&gt; Websocket =
server,=20
architecture choice is with app developer for everything but browser. If =
we=20
provide that option, it would definitely help next million users =
chat/websocket=20
app developer option to choose. <BR><BR>Senthilkumar =
Peelikkampatti,<BR><A=20
href=3D"https://github.com/sendtopms/Erlwebsockserver">https://github.com=
/sendtopms/Erlwebsockserver</A>.<BR><BR><BR>
<DIV class=3Dgmail_quote>On Wed, Jan 12, 2011 at 2:00 PM, Salvatore =
Loreto <SPAN=20
dir=3Dltr>&lt;<A=20
href=3D"mailto:salvatore.loreto@ericsson.com">salvatore.loreto@ericsson.c=
om</A>&gt;</SPAN>=20
wrote:<BR>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; =
PADDING-LEFT: 1ex"=20
class=3Dgmail_quote>Hi all,<BR><BR><BR>Masking from the client to the=20
  server<BR>has reached strong consensus within this wg as a mechanism =
to reduce=20
  security risks.<BR><BR>However there is disagreement on the actual =
method for=20
  masking.<BR>The technical differences, pro and cons, advantages and=20
  disadvantages,<BR>as well as the legal implications of each method =
have=20
  already been deeply discussed.<BR><BR>In order to settle the question =
of=20
  masking and find a way forward that has a wide acceptance,<BR>Joe and =
I, as=20
  HyBi chairs, want to check where the consensus is<BR>on the following =
relevant=20
  options that have been discussed (and summarized at<BR>some point in =
the=20
  mailing list by Eric Rescorla)<BR><BR><BR>1. a fixed mask carried =
entirely in=20
  the packet.<BR><BR>2. A longish repeated mask computed from the =
packet. For=20
  concreteness,<BR>&nbsp; suppose HMAC-SHA1(&lt;uuid&gt;,=20
  &lt;server-conn-key&gt; || &lt;client-conn-key&gt; || =
&lt;packet-key&gt;),=20
  but<BR>&nbsp; obviously there's flexibility here.<BR><BR>3. A fully =
generated=20
  mask (if so specify also what you would like to use e.g. AES-CTR or=20
  HMAC-SHA).<BR><BR><BR>Please indicate your preference(s) or the one =
can meet=20
  your bar for "I could live with that";<BR>In the case you have more =
then one,=20
  please put the choices in a preference order.<BR><BR>This poll will =
run until=20
  January 18th.<BR><BR>cheers<BR>/Sal<BR><FONT color=3D#888888><BR>--=20
  <BR>Salvatore Loreto<BR><A href=3D"http://www.sloreto.com"=20
  =
target=3D_blank>www.sloreto.com</A><BR><BR>______________________________=
_________________<BR>hybi=20
  mailing list<BR><A href=3D"mailto:hybi@ietf.org"=20
  target=3D_blank>hybi@ietf.org</A><BR><A=20
  href=3D"https://www.ietf.org/mailman/listinfo/hybi"=20
  =
target=3D_blank>https://www.ietf.org/mailman/listinfo/hybi</A><BR></FONT>=
</BLOCKQUOTE></DIV><BR><BR=20
clear=3Dall><BR>-- <BR>Regards,<BR>Senthilkumar Peelikkampatti,<BR><A=20
href=3D"http://pmsenthilkumar.blogspot.com/">http://pmsenthilkumar.blogsp=
ot.com/</A><BR><BR></BODY></HTML>

------_=_NextPart_001_01CBB94D.437F4EFA--

From dave@cridland.net  Fri Jan 21 01:26:34 2011
Return-Path: <dave@cridland.net>
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 C463C3A68F7 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 01:26:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.548
X-Spam-Level: 
X-Spam-Status: No, score=-2.548 tagged_above=-999 required=5 tests=[AWL=0.051,  BAYES_00=-2.599]
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 ur0TiV2hYPEf for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 01:26:33 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 842833A68F0 for <hybi@ietf.org>; Fri, 21 Jan 2011 01:26:33 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 5015A11680BC; Fri, 21 Jan 2011 09:29:17 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Je8hw4q4Y0as; Fri, 21 Jan 2011 09:29:16 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 24CE711680BA; Fri, 21 Jan 2011 09:29:16 +0000 (GMT)
References: <4D394B51.2060105@ericsson.com>
In-Reply-To: <4D394B51.2060105@ericsson.com>
MIME-Version: 1.0
Message-Id: <28835.1295602156.119839@puncture>
Date: Fri, 21 Jan 2011 09:29:16 +0000
From: Dave Cridland <dave@cridland.net>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>, Joe Hildebrand <Joe.Hildebrand@webex.com>, SM <sm+ietf@elandsys.com>, Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 09:26:34 -0000

On Fri Jan 21 09:01:05 2011, Salvatore Loreto wrote:
> #1 - GET
> #2 - OPTIONS
> #3 - a complete new method (e.g. WEBSOCKET)

It's not entirely clear to me what the significance of the method is.

In principle, a client makes a request, and includes an upgrade  
token, indicating its preference to fulfill this request by switching  
to a different protocol. If the server is unwilling or unable to make  
this switch, then the request is fulfilled as-is. That's the  
essential point of Upgrade, and so by picking Upgrade as the design,  
we've signed up for that.

So for many requests, a GET or an OPTIONS seems fine, and for others  
a POST might be more suitable - especially if, for instance, the  
request might be fulfilled by BOSH if a WebSocket upgrade fails.

So with that in mind, the existence of this poll somewhat confuses me  
- why do we want to mandate that a particular request method be used?

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From salvatore.loreto@ericsson.com  Fri Jan 21 02:15:30 2011
Return-Path: <salvatore.loreto@ericsson.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 598673A6902 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:15:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.548
X-Spam-Level: 
X-Spam-Status: No, score=-106.548 tagged_above=-999 required=5 tests=[AWL=0.051, BAYES_00=-2.599, 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 CR3W9Nw6qIPU for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:15:29 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id E1FB33A68F0 for <hybi@ietf.org>; Fri, 21 Jan 2011 02:15:28 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-8b-4d395d6574d2
Received: from esessmw0256.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id 29.CF.13987.56D593D4; Fri, 21 Jan 2011 11:18:13 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0256.eemea.ericsson.se (153.88.115.97) with Microsoft SMTP Server id 8.2.234.1; Fri, 21 Jan 2011 11:18:11 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id D47C12754; Fri, 21 Jan 2011 12:18:10 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 9D8E0506CC; Fri, 21 Jan 2011 12:18:10 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id D5A98506CB; Fri, 21 Jan 2011 12:18:09 +0200 (EET)
Message-ID: <4D395D61.8050301@ericsson.com>
Date: Fri, 21 Jan 2011 11:18:09 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: Dave Cridland <dave@cridland.net>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture>
In-Reply-To: <28835.1295602156.119839@puncture>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 10:15:30 -0000

On 1/21/11 10:29 AM, Dave Cridland wrote:
> On Fri Jan 21 09:01:05 2011, Salvatore Loreto wrote:
>> #1 - GET
>> #2 - OPTIONS
>> #3 - a complete new method (e.g. WEBSOCKET)
> It's not entirely clear to me what the significance of the method is.
>
> In principle, a client makes a request, and includes an upgrade
> token, indicating its preference to fulfill this request by switching
> to a different protocol. If the server is unwilling or unable to make
> this switch, then the request is fulfilled as-is. That's the
> essential point of Upgrade, and so by picking Upgrade as the design,
> we've signed up for that.
>
> So for many requests, a GET or an OPTIONS seems fine, and for others
> a POST might be more suitable - especially if, for instance, the
> request might be fulfilled by BOSH if a WebSocket upgrade fails.
>
> So with that in mind, the existence of this poll somewhat confuses me
> - why do we want to mandate that a particular request method be used?
>
> Dave.
Hi Dave,

while I agree with your analysis about the usage of Upgrade
and the fact that we could live with different methods

I have to say that nobody till now raised your proposal (to not mandate 
a specific method) clearly,
and indeed the current version (04) as all the previous one mandate the 
usage of GET as the method
for the handshake.
So it seems to me that the poll has already started to show its own 
utility in getting as much information
as possible as we can from people about their preferences as well as 
technical reasons for their preferences

Having said that, as individual, I see different values on mandate a 
particular method to be used
for example
- different methods interact differently with intermediaries; so mandate 
the one that has the highest
chances to fail cleanly (and fast) with upgrade-incompatible 
intermediaries will provide a better user experience
to applications using the websocket protocol
- security...
- reduce the implementation complexity
etc.

cheers
/Sal

-- 
Salvatore Loreto
www.sloreto.com


From ietf@adambarth.com  Fri Jan 21 02:24:13 2011
Return-Path: <ietf@adambarth.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 325593A6909 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:24:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.771
X-Spam-Level: 
X-Spam-Status: No, score=-3.771 tagged_above=-999 required=5 tests=[AWL=-0.794, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 QTeL4+tt9QBF for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:24:11 -0800 (PST)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by core3.amsl.com (Postfix) with ESMTP id D86203A6902 for <hybi@ietf.org>; Fri, 21 Jan 2011 02:24:10 -0800 (PST)
Received: by ywk9 with SMTP id 9so544088ywk.31 for <hybi@ietf.org>; Fri, 21 Jan 2011 02:26:56 -0800 (PST)
Received: by 10.90.98.3 with SMTP id v3mr574828agb.76.1295605615812; Fri, 21 Jan 2011 02:26:55 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id w4sm11319632anw.36.2011.01.21.02.26.53 (version=SSLv3 cipher=RC4-MD5); Fri, 21 Jan 2011 02:26:54 -0800 (PST)
Received: by iyi42 with SMTP id 42so1671378iyi.31 for <hybi@ietf.org>; Fri, 21 Jan 2011 02:26:52 -0800 (PST)
Received: by 10.231.12.132 with SMTP id x4mr472210ibx.177.1295605612555; Fri, 21 Jan 2011 02:26:52 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.38.5 with HTTP; Fri, 21 Jan 2011 02:26:22 -0800 (PST)
In-Reply-To: <4590EC7E9324CF43A2B37F81AFD63570089C4309@BANMLVEM07.e2k.ad.ge.com>
References: <4D2E0863.2040804@ericsson.com> <AANLkTimgc2294ZaknsfTj7mUvSbBe-zRP+wRT6PxGAP2@mail.gmail.com> <4590EC7E9324CF43A2B37F81AFD63570089C4309@BANMLVEM07.e2k.ad.ge.com>
From: Adam Barth <ietf@adambarth.com>
Date: Fri, 21 Jan 2011 02:26:22 -0800
Message-ID: <AANLkTi=QgMnjNgaQd7qUjzTXPfi4N6nARm5JGU8c71Fc@mail.gmail.com>
To: "Alakkad, Achuth (GE Healthcare)" <Achuth.Alakkad@ge.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, hybi@ietf.org
Subject: Re: [hybi] Straw-poll on Masking options
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: Fri, 21 Jan 2011 10:24:13 -0000

Use a universal static mask does not prevent the attacker from
choosing the bytes on the wire because if the mask is universally
known, the attack can simply pick a plaintext that becomes his desired
bytes when masked.

Adam


On Fri, Jan 21, 2011 at 1:26 AM, Alakkad, Achuth (GE Healthcare)
<Achuth.Alakkad@ge.com> wrote:
> If masking is a means for allowing the packet to pass through intermediar=
ies
> without any trouble, then I am not sure why=A0we are concerned about the =
data
> security.
> If anyone is keen on content security=A0he should use wss rather than ws.=
 Am
> not sure why we are concerned about which algorithm to use for masking as
> its process intensive,=A0rather will use a very simple universal static m=
ask
> to bypass intermediaries.
>
> ws is similar to http, any one can sniff data from network.
> ________________________________
> From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
> Senthilkumar Peelikkampatti
> Sent: Wednesday, January 19, 2011 4:00 AM
> To: Salvatore Loreto
> Cc: Joe Hildebrand; hybi@ietf.org
> Subject: Re: [hybi] Straw-poll on Masking options
>
> I prefer option 1, though I wish to have no masking, anyway it makes bett=
er
> trade off for me.
>
> Other than having WS and WSS, we can split WS into masked and unmasked
> variant,
>
> 1) WSS for secured connection (wss://)
> 2) WSMASKED for masked=A0 (wsmask://)
> 3) WS for=A0 (ws://) no masking
>
> When we move on to perfect defect free intermediaries we can stick to WS,
> this gives the application developer=A0 option to choose based on what ki=
nd of
> intermediary they have.
>
> When we talk to about Browser ----> Intermediary ------> http server
> --------> Websocket server, architecture choice is with app developer for
> everything but browser. If we provide that option, it would definitely he=
lp
> next million users chat/websocket app developer option to choose.
>
> Senthilkumar Peelikkampatti,
> https://github.com/sendtopms/Erlwebsockserver.
>
>
> On Wed, Jan 12, 2011 at 2:00 PM, Salvatore Loreto
> <salvatore.loreto@ericsson.com> wrote:
>>
>> Hi all,
>>
>>
>> Masking from the client to the server
>> has reached strong consensus within this wg as a mechanism to reduce
>> security risks.
>>
>> However there is disagreement on the actual method for masking.
>> The technical differences, pro and cons, advantages and disadvantages,
>> as well as the legal implications of each method have already been deepl=
y
>> discussed.
>>
>> In order to settle the question of masking and find a way forward that h=
as
>> a wide acceptance,
>> Joe and I, as HyBi chairs, want to check where the consensus is
>> on the following relevant options that have been discussed (and summariz=
ed
>> at
>> some point in the mailing list by Eric Rescorla)
>>
>>
>> 1. a fixed mask carried entirely in the packet.
>>
>> 2. A longish repeated mask computed from the packet. For concreteness,
>> =A0 suppose HMAC-SHA1(<uuid>, <server-conn-key> || <client-conn-key> ||
>> <packet-key>), but
>> =A0 obviously there's flexibility here.
>>
>> 3. A fully generated mask (if so specify also what you would like to use
>> e.g. AES-CTR or HMAC-SHA).
>>
>>
>> Please indicate your preference(s) or the one can meet your bar for "I
>> could live with that";
>> In the case you have more then one, please put the choices in a preferen=
ce
>> order.
>>
>> This poll will run until January 18th.
>>
>> cheers
>> /Sal
>>
>> --
>> Salvatore Loreto
>> www.sloreto.com
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>
>
>
> --
> Regards,
> Senthilkumar Peelikkampatti,
> http://pmsenthilkumar.blogspot.com/
>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>

From ietf@adambarth.com  Fri Jan 21 02:28:57 2011
Return-Path: <ietf@adambarth.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 A3AFA3A6916 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:28:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.766
X-Spam-Level: 
X-Spam-Status: No, score=-3.766 tagged_above=-999 required=5 tests=[AWL=-0.789, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 2hXEnlmk8EUG for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:28:53 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id 3434C3A6917 for <hybi@ietf.org>; Fri, 21 Jan 2011 02:28:51 -0800 (PST)
Received: by yie19 with SMTP id 19so545777yie.31 for <hybi@ietf.org>; Fri, 21 Jan 2011 02:31:36 -0800 (PST)
Received: by 10.90.1.2 with SMTP id 2mr586781aga.58.1295605896545; Fri, 21 Jan 2011 02:31:36 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id b27sm11313153ana.8.2011.01.21.02.31.35 (version=SSLv3 cipher=RC4-MD5); Fri, 21 Jan 2011 02:31:35 -0800 (PST)
Received: by iwn40 with SMTP id 40so1692807iwn.31 for <hybi@ietf.org>; Fri, 21 Jan 2011 02:31:34 -0800 (PST)
Received: by 10.231.12.132 with SMTP id x4mr476851ibx.177.1295605857109; Fri, 21 Jan 2011 02:30:57 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.38.5 with HTTP; Fri, 21 Jan 2011 02:30:27 -0800 (PST)
In-Reply-To: <4D394B51.2060105@ericsson.com>
References: <4D394B51.2060105@ericsson.com>
From: Adam Barth <ietf@adambarth.com>
Date: Fri, 21 Jan 2011 02:30:27 -0800
Message-ID: <AANLkTinWA2Y1X3-MuVHrF80QOcafF135Y0eBhHsjfHqb@mail.gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 10:28:58 -0000

On Fri, Jan 21, 2011 at 1:01 AM, Salvatore Loreto
<salvatore.loreto@ericsson.com> wrote:
> #1 - GET

This option is fine, but slightly less than ideal.

> #2 - OPTIONS

This option is semantically correct, as explained by Roy T. Fielding,
and the most secure, as I've explained before.  Note, I assume you
mean the following request-line:

OPTIONS * HTTP/1.1

> #3 - a complete new method (e.g. WEBSOCKET)

Using a novel method is unnecessary and provides little, if any,
additional benefit.

Adam

From julian.reschke@gmx.de  Fri Jan 21 02:36:17 2011
Return-Path: <julian.reschke@gmx.de>
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 D1EC93A6909 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:36:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.91
X-Spam-Level: 
X-Spam-Status: No, score=-103.91 tagged_above=-999 required=5 tests=[AWL=-1.311, BAYES_00=-2.599, 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 0dtRpG4r95-x for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:36:16 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 059F33A6902 for <hybi@ietf.org>; Fri, 21 Jan 2011 02:36:15 -0800 (PST)
Received: (qmail invoked by alias); 21 Jan 2011 10:38:58 -0000
Received: from p508FC81C.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.200.28] by mail.gmx.net (mp026) with SMTP; 21 Jan 2011 11:38:58 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/5Fr1miRj5Xsnkf69eQj+Pw96xApOkfV7a7s5Pq9 ihHaTGCYz60Fa1
Message-ID: <4D396222.7090300@gmx.de>
Date: Fri, 21 Jan 2011 11:38:26 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Adam Barth <ietf@adambarth.com>
References: <4D394B51.2060105@ericsson.com> <AANLkTinWA2Y1X3-MuVHrF80QOcafF135Y0eBhHsjfHqb@mail.gmail.com>
In-Reply-To: <AANLkTinWA2Y1X3-MuVHrF80QOcafF135Y0eBhHsjfHqb@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 10:36:17 -0000

On 21.01.2011 11:30, Adam Barth wrote:
...
>> #2 - OPTIONS
>
> This option is semantically correct, as explained by Roy T. Fielding,
> and the most secure, as I've explained before.  Note, I assume you
> mean the following request-line:
>
> OPTIONS * HTTP/1.1

I don't think this was implied, and furthermore it would be a bad idea 
(because you're losing the request path).

> ...

Best regards, Julian

From w@1wt.eu  Fri Jan 21 02:43:02 2011
Return-Path: <w@1wt.eu>
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 0727D3A6917 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:43:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.065
X-Spam-Level: 
X-Spam-Status: No, score=-2.065 tagged_above=-999 required=5 tests=[AWL=-0.022, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 2HIUP4zg6avH for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:43:01 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id E5C523A6902 for <hybi@ietf.org>; Fri, 21 Jan 2011 02:43:00 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0LAjXY1010039; Fri, 21 Jan 2011 11:45:33 +0100
Date: Fri, 21 Jan 2011 11:45:33 +0100
From: Willy Tarreau <w@1wt.eu>
To: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <20110121104533.GA10033@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <AANLkTinWA2Y1X3-MuVHrF80QOcafF135Y0eBhHsjfHqb@mail.gmail.com> <4D396222.7090300@gmx.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D396222.7090300@gmx.de>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 10:43:02 -0000

On Fri, Jan 21, 2011 at 11:38:26AM +0100, Julian Reschke wrote:
> On 21.01.2011 11:30, Adam Barth wrote:
> ...
> >>#2 - OPTIONS
> >
> >This option is semantically correct, as explained by Roy T. Fielding,
> >and the most secure, as I've explained before.  Note, I assume you
> >mean the following request-line:
> >
> >OPTIONS * HTTP/1.1
> 
> I don't think this was implied, and furthermore it would be a bad idea 
> (because you're losing the request path).

Agreed, OPTIONS for me means with the path.

Willy


From salvatore.loreto@ericsson.com  Fri Jan 21 02:43:09 2011
Return-Path: <salvatore.loreto@ericsson.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 062683A691E for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:43:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.549
X-Spam-Level: 
X-Spam-Status: No, score=-106.549 tagged_above=-999 required=5 tests=[AWL=0.050, BAYES_00=-2.599, 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 p4UdeyLswijk for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 02:43:08 -0800 (PST)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by core3.amsl.com (Postfix) with ESMTP id C03143A6902 for <hybi@ietf.org>; Fri, 21 Jan 2011 02:43:07 -0800 (PST)
X-AuditID: c1b4fb39-b7cfbae000005c8e-d2-4d3963e0249b
Received: from esessmw0237.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id 2D.3E.23694.0E3693D4; Fri, 21 Jan 2011 11:45:52 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0237.eemea.ericsson.se (153.88.115.91) with Microsoft SMTP Server id 8.2.234.1; Fri, 21 Jan 2011 11:45:51 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 0A746299D; Fri, 21 Jan 2011 12:45:49 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id CB76F5031F; Fri, 21 Jan 2011 12:45:48 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id EB48B501DD; Fri, 21 Jan 2011 12:45:47 +0200 (EET)
Message-ID: <4D3963DB.3000706@ericsson.com>
Date: Fri, 21 Jan 2011 11:45:47 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: Julian Reschke <julian.reschke@gmx.de>
References: <4D394B51.2060105@ericsson.com> <AANLkTinWA2Y1X3-MuVHrF80QOcafF135Y0eBhHsjfHqb@mail.gmail.com> <4D396222.7090300@gmx.de>
In-Reply-To: <4D396222.7090300@gmx.de>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 10:43:09 -0000

On 1/21/11 11:38 AM, Julian Reschke wrote:
> On 21.01.2011 11:30, Adam Barth wrote:
> ...
>>> #2 - OPTIONS
>> This option is semantically correct, as explained by Roy T. Fielding,
>> and the most secure, as I've explained before.  Note, I assume you
>> mean the following request-line:
>>
>> OPTIONS * HTTP/1.1
> I don't think this was implied, and furthermore it would be a bad idea
> (because you're losing the request path).
(for clarification)

#2 - OPTIONS does not imply "*" in the URI.
that can be a possibility but needs to be discussed


cheers
/Sal

-- 
Salvatore Loreto
www.sloreto.com


From fenix@google.com  Fri Jan 21 04:23:17 2011
Return-Path: <fenix@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 7173B3A693C for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 04:23:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.787
X-Spam-Level: 
X-Spam-Status: No, score=-103.787 tagged_above=-999 required=5 tests=[AWL=-0.811, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 fptoY0Tu+KBZ for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 04:23:16 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 3CB843A693B for <hybi@ietf.org>; Fri, 21 Jan 2011 04:23:16 -0800 (PST)
Received: from kpbe17.cbf.corp.google.com (kpbe17.cbf.corp.google.com [172.25.105.81]) by smtp-out.google.com with ESMTP id p0LCPwnh002269 for <hybi@ietf.org>; Fri, 21 Jan 2011 04:25:58 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295612761; bh=2GOi6f7vxygSmjnj3eQsYaPZnRo=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=s9T9bb8itTB9+bQ8uDTP2BeI8J0PgMB0qZ0YtxnuM8i6HtthhnxyDWSl+lN1hqz2z Hcq6lAUkzd6LVXgaBJ3PA==
Received: from gwj22 (gwj22.prod.google.com [10.200.10.22]) by kpbe17.cbf.corp.google.com with ESMTP id p0LCPu0w012786 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Fri, 21 Jan 2011 04:25:57 -0800
Received: by gwj22 with SMTP id 22so545437gwj.14 for <hybi@ietf.org>; Fri, 21 Jan 2011 04:25:56 -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:date :message-id:subject:from:to:cc:content-type; bh=WC5OSx3ljJT/qlVHKZjoxiI07qgHH9l/GRp6EXAnuWg=; b=QfqlJfz/zrQ34CA8Eu3Q1F9h7C09xA0nWnbBDE2HdZNgzW/Y96e7Dtun4ZLt5xpBd+ nb7JuZN7mfFHbFQl9oiA==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=rvX04xqXN0Cuw4O/Y/8weMiSzfpxun9x7mMdXcxxLMcbT26AMH7dwCTVLpgcCNztUG X625UCsPKCv3qXkfDZPA==
MIME-Version: 1.0
Received: by 10.151.78.6 with SMTP id f6mr698265ybl.41.1295612755599; Fri, 21 Jan 2011 04:25:55 -0800 (PST)
Received: by 10.150.53.3 with HTTP; Fri, 21 Jan 2011 04:25:55 -0800 (PST)
In-Reply-To: <20110121104533.GA10033@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <AANLkTinWA2Y1X3-MuVHrF80QOcafF135Y0eBhHsjfHqb@mail.gmail.com> <4D396222.7090300@gmx.de> <20110121104533.GA10033@1wt.eu>
Date: Fri, 21 Jan 2011 04:25:55 -0800
Message-ID: <AANLkTim+oiCdc65NbbVWhPJVWP_RbRE1bt-GWmyOODNB@mail.gmail.com>
From: Roberto Peon <fenix@google.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=0015174bed78106465049a5a5a25
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 12:23:17 -0000

--0015174bed78106465049a5a5a25
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Jan 21, 2011 at 2:45 AM, Willy Tarreau <w@1wt.eu> wrote:

> On Fri, Jan 21, 2011 at 11:38:26AM +0100, Julian Reschke wrote:
> > On 21.01.2011 11:30, Adam Barth wrote:
> > ...
> > >>#2 - OPTIONS
> > >
> > >This option is semantically correct, as explained by Roy T. Fielding,
> > >and the most secure, as I've explained before.  Note, I assume you
> > >mean the following request-line:
> > >
> > >OPTIONS * HTTP/1.1
> >
> > I don't think this was implied, and furthermore it would be a bad idea
> > (because you're losing the request path).
>
> Agreed, OPTIONS for me means with the path.
>

I take it that we'll always be including the Host: header (i.e. a HTTP/1.1
request, not HTTP/1.0 or "HTTP/0.9").
If so OPTIONS with path seems fine by me.
-=R

>
> Willy
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--0015174bed78106465049a5a5a25
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Fri, Jan 21, 2011 at 2:45 AM, Willy T=
arreau <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Fri, Jan 21, 2011 at 11:38:26AM +0100, Julian Reschke =
wrote:<br>
&gt; On 21.01.2011 11:30, Adam Barth wrote:<br>
&gt; ...<br>
&gt; &gt;&gt;#2 - OPTIONS<br>
&gt; &gt;<br>
&gt; &gt;This option is semantically correct, as explained by Roy T. Fieldi=
ng,<br>
&gt; &gt;and the most secure, as I&#39;ve explained before. =A0Note, I assu=
me you<br>
&gt; &gt;mean the following request-line:<br>
&gt; &gt;<br>
&gt; &gt;OPTIONS * HTTP/1.1<br>
&gt;<br>
&gt; I don&#39;t think this was implied, and furthermore it would be a bad =
idea<br>
&gt; (because you&#39;re losing the request path).<br>
<br>
</div>Agreed, OPTIONS for me means with the path.<br></blockquote><div><br>=
</div><div>I take it that we&#39;ll always be including the Host: header (i=
.e. a HTTP/1.1 request, not HTTP/1.0 or &quot;HTTP/0.9&quot;).</div><div>
If so OPTIONS with path seems fine by me.=A0</div><div>-=3DR=A0</div><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex;">
<font color=3D"#888888"><br>
Willy<br>
</font><div><div></div><div class=3D"h5"><br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br>

--0015174bed78106465049a5a5a25--

From jmason@rim.com  Fri Jan 21 06:13:46 2011
Return-Path: <jmason@rim.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 9C9843A6992 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 06:13:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.408
X-Spam-Level: 
X-Spam-Status: No, score=-5.408 tagged_above=-999 required=5 tests=[AWL=-0.205, BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_MED=-4]
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 1bMVcD+TONWf for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 06:13:45 -0800 (PST)
Received: from mhs03ykf.rim.net (mhs03ykf.rim.net [216.9.243.80]) by core3.amsl.com (Postfix) with ESMTP id A4BD43A6990 for <hybi@ietf.org>; Fri, 21 Jan 2011 06:13:44 -0800 (PST)
X-AuditID: 0a401fcb-b7ba1ae000000a54-4e-4d39953d17bd
Received: from XHT104CNC.rim.net ( [10.65.22.52]) by mhs03ykf.rim.net (RIM Mail) with SMTP id 02.99.02644.D35993D4; Fri, 21 Jan 2011 09:16:30 -0500 (EST)
Received: from XCH117CNC.rim.net ([fe80::b8df:541f:9d85:9909]) by XHT104CNC.rim.net ([fe80::9520:36d8:1c40:a506%11]) with mapi; Fri, 21 Jan 2011 09:16:30 -0500
From: Joe Mason <jmason@rim.com>
To: Dave Cridland <dave@cridland.net>, Salvatore Loreto <salvatore.loreto@ericsson.com>, Joe Hildebrand <Joe.Hildebrand@webex.com>,  SM <sm+ietf@elandsys.com>, Server-Initiated HTTP <hybi@ietf.org>
Date: Fri, 21 Jan 2011 09:16:17 -0500
Thread-Topic: [hybi] straw-poll on GET vs OPTIONS vs new method
Thread-Index: Acu5TbDInnZR8fjZTa+2e4Q74kC+kQAJd5ig
Message-ID: <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture>
In-Reply-To: <28835.1295602156.119839@puncture>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
content-transfer-encoding: quoted-printable
MIME-Version: 1.0
X-Brightmail-Tracker: AAAAAgAAAZEXM1pC
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 14:13:46 -0000

> -----Original Message-----
> From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
> Dave Cridland
>
> So for many requests, a GET or an OPTIONS seems fine, and for others
> a POST might be more suitable - especially if, for instance, the
> request might be fulfilled by BOSH if a WebSocket upgrade fails.

Using POST to fallback seems like a useful technique to me.  If possible I'd=
 like to support it.  However, if there are reasons to restrict to one other=
 method, this shouldn't take precedence.

I'd suggest the spec allow any method but recommend use of OPTIONS unless th=
e script wants to take advantage of a specific feature of another method (an=
d use POST to fallback to BOSH as an example of such a feature).

Joe

---------------------------------------------------------------------=0A=
This transmission (including any attachments) may contain confidential infor=
mation, privileged material (including material protected by the solicitor-c=
lient or other applicable privileges), or constitute non-public information.=
 Any use of this information by anyone other than the intended recipient is=
 prohibited. If you have received this transmission in error, please immedia=
tely reply to the sender and delete this information from your system. Use,=
 dissemination, distribution, or reproduction of this transmission by uninte=
nded recipients is not authorized and may be unlawful.

From mcmanus@ducksong.com  Fri Jan 21 07:57:03 2011
Return-Path: <mcmanus@ducksong.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 2A86E3A6A2D for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 07:57:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.543
X-Spam-Level: 
X-Spam-Status: No, score=-2.543 tagged_above=-999 required=5 tests=[AWL=0.056,  BAYES_00=-2.599]
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 CT6n-nQGIcgH for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 07:57:02 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 668523A6A2C for <hybi@ietf.org>; Fri, 21 Jan 2011 07:57:02 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id EA3A71030A; Fri, 21 Jan 2011 10:59:47 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id F26AA10157; Fri, 21 Jan 2011 10:59:42 -0500 (EST)
From: Patrick McManus <mcmanus@ducksong.com>
To: Joe Mason <jmason@rim.com>
In-Reply-To: <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net>
Content-Type: text/plain; charset="UTF-8"
Date: Fri, 21 Jan 2011 10:59:38 -0500
Message-ID: <1295625578.2383.10.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 15:57:03 -0000

On Fri, 2011-01-21 at 09:16 -0500, Joe Mason wrote:
> > -----Original Message-----
> > From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
> > Dave Cridland
> >
> > So for many requests, a GET or an OPTIONS seems fine, and for others
> > a POST might be more suitable - especially if, for instance, the
> > request might be fulfilled by BOSH if a WebSocket upgrade fails.
> 
> Using POST to fallback seems like a useful technique to me.  If
> possible I'd like to support it.  However, if there are reasons to
> restrict to one other method, this shouldn't take precedence.
> 
> I'd suggest the spec allow any method but recommend use of OPTIONS
> unless the script wants to take advantage of a specific feature of
> another method (and use POST to fallback to BOSH as an example of such
> a feature).

+1 - we should note OPTIONS as a useful default, but the method to use
in conjunction with Upgrade is something the app designer can consider
in the fullness of her knowledge of the whole application. I don't see
any reason why we need to tie her hands.






From ferg@caucho.com  Fri Jan 21 09:18:53 2011
Return-Path: <ferg@caucho.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 F071128C112 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 09:18:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.223
X-Spam-Level: 
X-Spam-Status: No, score=-2.223 tagged_above=-999 required=5 tests=[AWL=0.376,  BAYES_00=-2.599]
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 og10y1Snh8dq for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 09:18:53 -0800 (PST)
Received: from nm23-vm0.bullet.mail.sp2.yahoo.com (nm23-vm0.bullet.mail.sp2.yahoo.com [98.139.91.224]) by core3.amsl.com (Postfix) with SMTP id 2F4A128C10F for <hybi@ietf.org>; Fri, 21 Jan 2011 09:18:53 -0800 (PST)
Received: from [98.139.91.69] by nm23.bullet.mail.sp2.yahoo.com with NNFMP; 21 Jan 2011 17:21:39 -0000
Received: from [98.139.91.39] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 21 Jan 2011 17:21:39 -0000
Received: from [127.0.0.1] by omp1039.mail.sp2.yahoo.com with NNFMP; 21 Jan 2011 17:21:39 -0000
X-Yahoo-Newman-Id: 826906.35076.bm@omp1039.mail.sp2.yahoo.com
Received: (qmail 43018 invoked from network); 21 Jan 2011 17:21:39 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp113.biz.mail.sp1.yahoo.com with SMTP; 21 Jan 2011 09:21:39 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: DXFyBHoVM1lbHI8M.ImyWFkZibokUS0gl3H.rqGIw1enQDc zU8ZNUjQE2wT94unTwGzk.0k4Iu_XavxboYuio0FCqr5LZ84nVkZZm4XWskw qFE12jolc2NJKVWHPgMr3Ohef1u1_NFznxlxItiC1vdZd.3uZU2j0Q0nWEJQ m8cdzKxUVOedCSqkZ2PMC0bm_MSPXkkeny7aQ2W9xX8VARSKGQKgt.DQ7F6L DYIrY5vNHG9O41h_dPXKeEUlVVCgjSvBrgBxugYsA_9097BoKVON26w--
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D39C0A2.8070800@caucho.com>
Date: Fri, 21 Jan 2011 09:21:38 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
References: <4D394B51.2060105@ericsson.com>
In-Reply-To: <4D394B51.2060105@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 17:18:54 -0000

Salvatore Loreto wrote:
> So please provide your choices (if more then one, please rank them or 
> if only one specify
> "I can live only with") among the following
>
> #1 - GET
> #2 - OPTIONS
> #3 - a complete new method (e.g. WEBSOCKET)
#3 (WEBSOCKET) is preferable, but all 3 are workable.

The two advantages for WEBSOCKET on the server side are primarily 
administrative

  1. For logging, particularly access logging, marking the WebSockets 
clearly in the log is useful for debugging, statistics gathering, and 
scanning for unauthorized/unexpected use.

  2. For security/authorization configure, most servers have a 
method-based authorization configuration. With "WEBSOCKET", it's 
straightforward to configure policies specific to websockets, which fit 
into existing frameworks.

Actually, there's a third, though it's more speculative.

  3. For WebSocket web-services (generally non-browser), it may be 
useful for the "GET" to provide something like metadata about the 
WebSocket service. That pattern has been used for web-services in the past.

-- Scott

>
> This poll will run until January 31st
>
> cheers
> /Sal
>


From dave@cridland.net  Fri Jan 21 09:22:58 2011
Return-Path: <dave@cridland.net>
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 271D53A6A68 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 09:22:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.549
X-Spam-Level: 
X-Spam-Status: No, score=-2.549 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599]
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 6ZAHQRdnFDh6 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 09:22:57 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id E00D93A6A67 for <hybi@ietf.org>; Fri, 21 Jan 2011 09:22:56 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id F049011680BB; Fri, 21 Jan 2011 17:25:40 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vUeQpAsTSoak; Fri, 21 Jan 2011 17:25:39 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 9670911680BA; Fri, 21 Jan 2011 17:25:39 +0000 (GMT)
References: <4D394B51.2060105@ericsson.com> <4D39C0A2.8070800@caucho.com>
In-Reply-To: <4D39C0A2.8070800@caucho.com>
MIME-Version: 1.0
Message-Id: <28835.1295630739.621781@puncture>
Date: Fri, 21 Jan 2011 17:25:39 +0000
From: Dave Cridland <dave@cridland.net>
To: Scott Ferguson <ferg@caucho.com>, Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>, Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 17:22:58 -0000

On Fri Jan 21 17:21:38 2011, Scott Ferguson wrote:
> Actually, there's a third, though it's more speculative.
> 
>  3. For WebSocket web-services (generally non-browser), it may be  
> useful for the "GET" to provide something like metadata about the  
> WebSocket service. That pattern has been used for web-services in  
> the past.

Isn't that done by just GET *without* an Upgrade token?

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From ferg@caucho.com  Fri Jan 21 09:42:43 2011
Return-Path: <ferg@caucho.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 BFBDD28C127 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 09:42:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.234
X-Spam-Level: 
X-Spam-Status: No, score=-2.234 tagged_above=-999 required=5 tests=[AWL=0.365,  BAYES_00=-2.599]
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 dy+IkEJgXNK5 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 09:42:43 -0800 (PST)
Received: from nm14-vm0.bullet.mail.sp2.yahoo.com (nm14-vm0.bullet.mail.sp2.yahoo.com [98.139.91.246]) by core3.amsl.com (Postfix) with SMTP id 140953A6A67 for <hybi@ietf.org>; Fri, 21 Jan 2011 09:42:43 -0800 (PST)
Received: from [98.139.91.70] by nm14.bullet.mail.sp2.yahoo.com with NNFMP; 21 Jan 2011 17:45:29 -0000
Received: from [98.139.91.50] by tm10.bullet.mail.sp2.yahoo.com with NNFMP; 21 Jan 2011 17:45:29 -0000
Received: from [127.0.0.1] by omp1050.mail.sp2.yahoo.com with NNFMP; 21 Jan 2011 17:45:29 -0000
X-Yahoo-Newman-Id: 756666.39849.bm@omp1050.mail.sp2.yahoo.com
Received: (qmail 78829 invoked from network); 21 Jan 2011 17:45:29 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp111.biz.mail.sp1.yahoo.com with SMTP; 21 Jan 2011 09:45:29 -0800 PST
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: 8BDrYmMVM1mAVN5du8WHCnQnzQslAD51LQeAHx9Bnd1TCdj t9aBGEQiC5z.vdRWm.hwXK61BDzbx9hHN4y191N5dCACl8ZleAGu2D4c9.D8 h8GAk3WUhI5YWuSc3u501bXkOnKcxu2y06PTd.qP99tmLhN5rh0ScJFwyUDB ZgzxlQkaZeiU76XK43Vo.zss5SeM7ktfgxFN_WzyvMxtE.abXufvkOuFEDy5 zkAHG0ZbNuCO9q14_1W2evZbTdco3YnKrfP.ZafXkyz.xp3tjof4.nQ--
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4D39C639.70903@caucho.com>
Date: Fri, 21 Jan 2011 09:45:29 -0800
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Dave Cridland <dave@cridland.net>
References: <4D394B51.2060105@ericsson.com> <4D39C0A2.8070800@caucho.com> <28835.1295630739.621781@puncture>
In-Reply-To: <28835.1295630739.621781@puncture>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 17:42:43 -0000

Dave Cridland wrote:
> On Fri Jan 21 17:21:38 2011, Scott Ferguson wrote:
>> Actually, there's a third, though it's more speculative.
>>
>>  3. For WebSocket web-services (generally non-browser), it may be 
>> useful for the "GET" to provide something like metadata about the 
>> WebSocket service. That pattern has been used for web-services in the 
>> past.
>
> Isn't that done by just GET *without* an Upgrade token?
That helps show why I'd prefer the WEBSOCKET.

With a separate method, the logic is simple:

  If method="WEBSOCKET", start websocket channel
  If method="GET", show metadata

  (And if method="WEBSOCKET" and broken/missing Upgrade, return error.)

With the Upgrade, you have:

  If request is a valid WebSocket upgrade, start websocket channel.
  Otherwise, show metadata

When "Otherwise" is an error/broken WebSocket upgrade, not a metadata 
request, it's unclear which return is the correct one: error or metadata.

All three method systems are workable, but using a separate method 
removes any ambiguity between errors in an upgrade and something like a 
metadata GET.

-- Scott

>
> Dave.


From buskanaka@gmail.com  Fri Jan 21 10:20:44 2011
Return-Path: <buskanaka@gmail.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 A800E3A6A76 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 10:20:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level: 
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 VAl25xM3UKOx for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 10:20:43 -0800 (PST)
Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by core3.amsl.com (Postfix) with ESMTP id 5CC323A6A5D for <hybi@ietf.org>; Fri, 21 Jan 2011 10:20:43 -0800 (PST)
Received: by eyd10 with SMTP id 10so1128573eyd.31 for <hybi@ietf.org>; Fri, 21 Jan 2011 10:23:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=vQ6A/XVW/RFtBD8LCeN1ShGuN/N3vT6zBCtjKeZs1J4=; b=tmMEyB7xCAtFRnfOboj3tZe3u0FxN9tYc70ZEsD59iSngjkifvzib7zy1XOD9p9YJ2 8UIkZQf1vCvfFNNOfxJSFxiK7YMw1alr2ozBMsfpl5xnbHs0+fd7QUC2UIFEltayJGMK qxHRYRdb7FwVZHLqlyBzHSK5nRPF+dh4w2Cr0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=nq9H0HiUvZJ5eSkj/9IgSr4ux5vugWYJqEVUQqVgMPAT4etriMLyAh0N38b/5yD3Mr +6txYC1C8tFgMH64pa6JyQceyo/ZSNR6UOlb4vVRZ/4j5Je65XV9C5boh/NeoMcVgf5H l52lasIuGKM+1wDo5BRK5rldubnY8b0x1UUVM=
Received: by 10.14.11.226 with SMTP id 74mr1225539eex.5.1295634209151; Fri, 21 Jan 2011 10:23:29 -0800 (PST)
MIME-Version: 1.0
Sender: buskanaka@gmail.com
Received: by 10.14.119.136 with HTTP; Fri, 21 Jan 2011 10:23:08 -0800 (PST)
In-Reply-To: <4D394B51.2060105@ericsson.com>
References: <4D394B51.2060105@ericsson.com>
From: Joel Martin <hybi@martintribe.org>
Date: Fri, 21 Jan 2011 12:23:08 -0600
X-Google-Sender-Auth: D2uGdr645wbsuO9HAJphLuMaG_E
Message-ID: <AANLkTi=dgpjRUMuHT+UUq5oF5OjYMfBn7qzy6--bCNgo@mail.gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: multipart/alternative; boundary=0016364d1e11cb9e99049a5f58fd
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 18:20:44 -0000

--0016364d1e11cb9e99049a5f58fd
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Jan 21, 2011 at 3:01 AM, Salvatore Loreto <
salvatore.loreto@ericsson.com> wrote:

> So please provide your choices (if more then one, please rank them or if
> only one specify
> "I can live only with") among the following
>
> #1 - GET
> #2 - OPTIONS
> #3 - a complete new method (e.g. WEBSOCKET)
>

My preference order is #3, #2, #1.

GET and OPTIONS are (originally) intended as idempotent methods that don't
change the state of the server. That seems out of line with the spirit of
web sockets or at least it is ambiguous. I think #3 removes ambiguity at
many levels (logging, implementation, etc) so it's my preference. However,
it's not a strong preference so any compelling reason for the other two
(especially security) would change my vote.

Joel Martin
https://github.com/kanaka

--0016364d1e11cb9e99049a5f58fd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Fri, Jan 21, 2011 at 3:01 AM, Salvatore Loret=
o <span dir=3D"ltr">&lt;<a href=3D"mailto:salvatore.loreto@ericsson.com">sa=
lvatore.loreto@ericsson.com</a>&gt;</span> wrote:<br><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex;">

So please provide your choices (if more then one, please rank them or if on=
ly one specify<br>
&quot;I can live only with&quot;) among the following<br>
<br>
#1 - GET<br>
#2 - OPTIONS<br>
#3 - a complete new method (e.g. WEBSOCKET)<br></blockquote><div><br></div>=
<div>My preference order is #3, #2, #1.=A0</div><div><br></div><div>GET and=
 OPTIONS are (originally) intended as idempotent methods that don&#39;t cha=
nge the state of the server. That seems out of line with the spirit of web =
sockets or at least it is ambiguous. I think #3 removes ambiguity at many l=
evels (logging, implementation, etc) so it&#39;s my preference. However, it=
&#39;s not a strong preference so any compelling reason for the other two (=
especially security) would change my vote.</div>

<div><br></div><div>Joel Martin</div><div><a href=3D"https://github.com/kan=
aka">https://github.com/kanaka</a></div></div>

--0016364d1e11cb9e99049a5f58fd--

From ifette@google.com  Fri Jan 21 10:45:13 2011
Return-Path: <ifette@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 A537F28C0EA for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 10:45:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.782
X-Spam-Level: 
X-Spam-Status: No, score=-103.782 tagged_above=-999 required=5 tests=[AWL=-1.106, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 kT0ILPzRTNMI for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 10:45:12 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 2F7A728C0FA for <hybi@ietf.org>; Fri, 21 Jan 2011 10:45:12 -0800 (PST)
Received: from kpbe19.cbf.corp.google.com (kpbe19.cbf.corp.google.com [172.25.105.83]) by smtp-out.google.com with ESMTP id p0LIlvnY020238 for <hybi@ietf.org>; Fri, 21 Jan 2011 10:47:57 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295635678; bh=ysWxICSCCMRCQD37R9y4rXXiy44=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=RAss7hpaz07BR0mwJsggoP3WCIiYYhnU2Q6w7TY3x6v3cuRr7b/CEhsOWQCrctZ54 0z6TPBSeQi/P/6rXKLgig==
Received: from iwn40 (iwn40.prod.google.com [10.241.68.104]) by kpbe19.cbf.corp.google.com with ESMTP id p0LIlR9I023488 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Fri, 21 Jan 2011 10:47:55 -0800
Received: by iwn40 with SMTP id 40so2222125iwn.18 for <hybi@ietf.org>; Fri, 21 Jan 2011 10:47:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=3JQpYO2nA2OoKsYdvUePHKJnfHln9Jh2PcsqWJIA0x8=; b=bToZCxyu5Gi90gxY2VtQk99CLnjYGmtzTbsd0+kfEK9NqRUPaw9gFIzkU3rqrfWKW/ Lgj6evb4PPofJdBW/nXg==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=tVmqfZ85zCNDPCg8Oi0COSau3JzAbVPqRLnS0FXqHpmBG9e2NYERdguFnELNyPttDr CUqEkzR5RLjxktkuPa4g==
MIME-Version: 1.0
Received: by 10.231.31.1 with SMTP id w1mr1198535ibc.7.1295635675525; Fri, 21 Jan 2011 10:47:55 -0800 (PST)
Received: by 10.231.20.69 with HTTP; Fri, 21 Jan 2011 10:47:55 -0800 (PST)
In-Reply-To: <AANLkTim+oiCdc65NbbVWhPJVWP_RbRE1bt-GWmyOODNB@mail.gmail.com>
References: <4D394B51.2060105@ericsson.com> <AANLkTinWA2Y1X3-MuVHrF80QOcafF135Y0eBhHsjfHqb@mail.gmail.com> <4D396222.7090300@gmx.de> <20110121104533.GA10033@1wt.eu> <AANLkTim+oiCdc65NbbVWhPJVWP_RbRE1bt-GWmyOODNB@mail.gmail.com>
Date: Fri, 21 Jan 2011 10:47:55 -0800
Message-ID: <AANLkTik=or7P4FSeAoR+0orqcKuFR9WpKheszpjJCrmd@mail.gmail.com>
From: =?UTF-8?B?SWFuIEZldHRlICjjgqTjgqLjg7Pjg5Xjgqfjg4Pjg4bjgqMp?= <ifette@google.com>
To: Roberto Peon <fenix@google.com>
Content-Type: multipart/alternative; boundary=0022152d6d8d32b3a6049a5fb055
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Fri, 21 Jan 2011 18:45:13 -0000

--0022152d6d8d32b3a6049a5fb055
Content-Type: text/plain; charset=UTF-8

On Fri, Jan 21, 2011 at 4:25 AM, Roberto Peon <fenix@google.com> wrote:

>
>
> On Fri, Jan 21, 2011 at 2:45 AM, Willy Tarreau <w@1wt.eu> wrote:
>
>> On Fri, Jan 21, 2011 at 11:38:26AM +0100, Julian Reschke wrote:
>> > On 21.01.2011 11:30, Adam Barth wrote:
>> > ...
>> > >>#2 - OPTIONS
>> > >
>> > >This option is semantically correct, as explained by Roy T. Fielding,
>> > >and the most secure, as I've explained before.  Note, I assume you
>> > >mean the following request-line:
>> > >
>> > >OPTIONS * HTTP/1.1
>> >
>> > I don't think this was implied, and furthermore it would be a bad idea
>> > (because you're losing the request path).
>>
>> Agreed, OPTIONS for me means with the path.
>>
>
> I take it that we'll always be including the Host: header (i.e. a HTTP/1.1
> request, not HTTP/1.0 or "HTTP/0.9").
> If so OPTIONS with path seems fine by me.
> -=R
>

I also prefer OPTIONS with path. Creating a new method seems unnecessary.


>
>> Willy
>>
>> _______________________________________________
>> hybi mailing list
>> hybi@ietf.org
>> https://www.ietf.org/mailman/listinfo/hybi
>>
>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>

--0022152d6d8d32b3a6049a5fb055
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Fri, Jan 21, 2011 at 4:25 AM, Roberto Peon <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:fenix@google.com">fenix@google.com</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class=3D"gmail_quote"><div class=3D"im">On Fri, Jan 21, 2011 a=
t 2:45 AM, Willy Tarreau <span dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu" =
target=3D"_blank">w@1wt.eu</a>&gt;</span> wrote:<br><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex">

<div>On Fri, Jan 21, 2011 at 11:38:26AM +0100, Julian Reschke wrote:<br>
&gt; On 21.01.2011 11:30, Adam Barth wrote:<br>
&gt; ...<br>
&gt; &gt;&gt;#2 - OPTIONS<br>
&gt; &gt;<br>
&gt; &gt;This option is semantically correct, as explained by Roy T. Fieldi=
ng,<br>
&gt; &gt;and the most secure, as I&#39;ve explained before. =C2=A0Note, I a=
ssume you<br>
&gt; &gt;mean the following request-line:<br>
&gt; &gt;<br>
&gt; &gt;OPTIONS * HTTP/1.1<br>
&gt;<br>
&gt; I don&#39;t think this was implied, and furthermore it would be a bad =
idea<br>
&gt; (because you&#39;re losing the request path).<br>
<br>
</div>Agreed, OPTIONS for me means with the path.<br></blockquote><div><br>=
</div></div><div>I take it that we&#39;ll always be including the Host: hea=
der (i.e. a HTTP/1.1 request, not HTTP/1.0 or &quot;HTTP/0.9&quot;).</div>
<div>
If so OPTIONS with path seems fine by me.=C2=A0</div><div>-=3DR=C2=A0</div>=
</div></blockquote><div><br></div><div>I also prefer OPTIONS with path. Cre=
ating a new method seems unnecessary.</div><div>=C2=A0</div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex;">
<div class=3D"gmail_quote"><div class=3D"im"><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
>
<font color=3D"#888888"><br>
Willy<br>
</font><div><div></div><div><br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div></div><br>
<br>_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
<br></blockquote></div><br>

--0022152d6d8d32b3a6049a5fb055--

From bruce@callenish.com  Fri Jan 21 11:10:31 2011
Return-Path: <bruce@callenish.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 7431F3A6A8D for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 11:10:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.587
X-Spam-Level: 
X-Spam-Status: No, score=-2.587 tagged_above=-999 required=5 tests=[AWL=0.011,  BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 yt5dzB8ONrVm for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 11:10:30 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 9A9463A6A8B for <hybi@ietf.org>; Fri, 21 Jan 2011 11:10:30 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PgMQ8-0007P3-DD for hybi@ietf.org; Fri, 21 Jan 2011 11:13:16 -0800
Message-ID: <4D39DACA.6080803@callenish.com>
Date: Fri, 21 Jan 2011 11:13:14 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <4D394B51.2060105@ericsson.com> <AANLkTi=dgpjRUMuHT+UUq5oF5OjYMfBn7qzy6--bCNgo@mail.gmail.com>
In-Reply-To: <AANLkTi=dgpjRUMuHT+UUq5oF5OjYMfBn7qzy6--bCNgo@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------090407080806020201000202"
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 19:10:31 -0000

This is a multi-part message in MIME format.
--------------090407080806020201000202
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 21/01/2011 10:23 AM, Joel Martin wrote:
> On Fri, Jan 21, 2011 at 3:01 AM, Salvatore Loreto 
> <salvatore.loreto@ericsson.com <mailto:salvatore.loreto@ericsson.com>> 
> wrote:
>
>     So please provide your choices (if more then one, please rank them
>     or if only one specify
>     "I can live only with") among the following
>
>     #1 - GET
>     #2 - OPTIONS
>     #3 - a complete new method (e.g. WEBSOCKET)
>
>
> My preference order is #3, #2, #1.
>
> GET and OPTIONS are (originally) intended as idempotent methods that 
> don't change the state of the server. That seems out of line with the 
> spirit of web sockets or at least it is ambiguous. I think #3 removes 
> ambiguity at many levels (logging, implementation, etc) so it's my 
> preference. However, it's not a strong preference so any compelling 
> reason for the other two (especially security) would change my vote.

+1.


--------------090407080806020201000202
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 21/01/2011 10:23 AM, Joel Martin wrote:
    <blockquote
      cite="mid:AANLkTi=dgpjRUMuHT+UUq5oF5OjYMfBn7qzy6--bCNgo@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">On Fri, Jan 21, 2011 at 3:01 AM,
        Salvatore Loreto <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:salvatore.loreto@ericsson.com">salvatore.loreto@ericsson.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          So please provide your choices (if more then one, please rank
          them or if only one specify<br>
          "I can live only with") among the following<br>
          <br>
          #1 - GET<br>
          #2 - OPTIONS<br>
          #3 - a complete new method (e.g. WEBSOCKET)<br>
        </blockquote>
        <div><br>
        </div>
        <div>My preference order is #3, #2, #1.&nbsp;</div>
        <div><br>
        </div>
        <div>GET and OPTIONS are (originally) intended as idempotent
          methods that don't change the state of the server. That seems
          out of line with the spirit of web sockets or at least it is
          ambiguous. I think #3 removes ambiguity at many levels
          (logging, implementation, etc) so it's my preference. However,
          it's not a strong preference so any compelling reason for the
          other two (especially security) would change my vote.</div>
      </div>
    </blockquote>
    <br>
    +1.<br>
    <br>
  </body>
</html>

--------------090407080806020201000202--

From godjonez@codepad.info  Fri Jan 21 11:14:54 2011
Return-Path: <godjonez@codepad.info>
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 7E7B43A6A7E for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 11:14:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.024
X-Spam-Level: 
X-Spam-Status: No, score=-3.024 tagged_above=-999 required=5 tests=[AWL=0.575,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 ct8bC7VwigiA for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 11:14:53 -0800 (PST)
Received: from smtpout.kotinet.com (smtpout.kotinet.com [212.50.215.76]) by core3.amsl.com (Postfix) with ESMTP id 89A333A6A16 for <hybi@ietf.org>; Fri, 21 Jan 2011 11:14:53 -0800 (PST)
Received: from codepad.info (codepad.info [62.240.71.135]) by smtpout.kotinet.com (Postfix) with ESMTP id 3BC9C4776B for <hybi@ietf.org>; Fri, 21 Jan 2011 21:17:29 +0200 (EET)
Received: from overwatchnexus.combinet (overwatchnexus.combinet [192.168.2.7]) by codepad.info (Postfix) with ESMTPSA id 478D6F44003 for <hybi@ietf.org>; Fri, 21 Jan 2011 21:17:28 +0200 (EET)
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
To: "hybi@ietf.org" <hybi@ietf.org>
References: <4D394B51.2060105@ericsson.com> <AANLkTi=dgpjRUMuHT+UUq5oF5OjYMfBn7qzy6--bCNgo@mail.gmail.com> <4D39DACA.6080803@callenish.com>
Date: Fri, 21 Jan 2011 21:17:31 +0200
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: "Joonas Lehtolahti" <godjonez@codepad.info>
Message-ID: <op.vpoajhs3uykfxw@overwatchnexus.combinet>
In-Reply-To: <4D39DACA.6080803@callenish.com>
User-Agent: Opera Mail/11.01 (Win32)
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 19:14:54 -0000

On Fri, 21 Jan 2011 21:13:14 +0200, Bruce Atherton <bruce@callenish.com>  
wrote:

> On 21/01/2011 10:23 AM, Joel Martin wrote:
>> On Fri, Jan 21, 2011 at 3:01 AM, Salvatore Loreto
>> <salvatore.loreto@ericsson.com <mailto:salvatore.loreto@ericsson.com>>
>> wrote:
>>
>>     So please provide your choices (if more then one, please rank them
>>     or if only one specify
>>     "I can live only with") among the following
>>
>>     #1 - GET
>>     #2 - OPTIONS
>>     #3 - a complete new method (e.g. WEBSOCKET)
>>
>>
>> My preference order is #3, #2, #1.
>>
>> GET and OPTIONS are (originally) intended as idempotent methods that
>> don't change the state of the server. That seems out of line with the
>> spirit of web sockets or at least it is ambiguous. I think #3 removes
>> ambiguity at many levels (logging, implementation, etc) so it's my
>> preference. However, it's not a strong preference so any compelling
>> reason for the other two (especially security) would change my vote.
>
> +1.

I agree with this too. WEBSOCKET method is clear on what it is for. What  
WebSocket is used for doesn't exactly match the usage of GET or OPTIONS  
methods so "semantically" using them for WebSocket is kind of wrong. But  
then again, one of the key points of WebSocket was that it is compatible  
with HTTP infrastructure, so in that view it could be more practical to  
reuse existing methods. And of course if there is any security issues that  
using one method over another has, that would also be a good point. So  
personally I would prefer #3, but I have no problem with the other options  
either.

From jat@google.com  Fri Jan 21 11:38:42 2011
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 1078F3A6A8D for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 11:38:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.246
X-Spam-Level: 
X-Spam-Status: No, score=-105.246 tagged_above=-999 required=5 tests=[AWL=0.730, 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 qQJtohYB61tK for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 11:38:41 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 269813A67B8 for <hybi@ietf.org>; Fri, 21 Jan 2011 11:38:37 -0800 (PST)
Received: from kpbe18.cbf.corp.google.com (kpbe18.cbf.corp.google.com [172.25.105.82]) by smtp-out.google.com with ESMTP id p0LJfOY0011125 for <hybi@ietf.org>; Fri, 21 Jan 2011 11:41:24 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295638884; bh=ErJNMbmhNgTXZVI29+r0MCr77MU=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=F0/TfDHk2zYHzggcQ3TPtc5/3FahPc0GAMMZRLkPSnddir8H9DvDq4EycRqnQB0lw nbDwyRXLhzJLwZ4gwVeyw==
Received: from qwj8 (qwj8.prod.google.com [10.241.195.72]) by kpbe18.cbf.corp.google.com with ESMTP id p0LJdw5R024858 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Fri, 21 Jan 2011 11:41:22 -0800
Received: by qwj8 with SMTP id 8so2158076qwj.38 for <hybi@ietf.org>; Fri, 21 Jan 2011 11:41:22 -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=vb53JbbMROMQCS0gX9+8xdUsBZ78BEJIyCIEw9MRHgY=; b=IFI9nTLMJfaGAJowsWl3K/ujpNqbDcfRtr7/stYyb5MBgGVyQA4/glmfW2F4HpLGmm tPBhzHzSi1r8KX1S7TTA==
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=eOE151zOwusS8szhxu70+UrU2dzyOugH+GttQkBE61W2MqQgocaxxUHRK1qyP3p5dZ su4BzCsCPQ9jqPGr9M4Q==
Received: by 10.229.224.136 with SMTP id io8mr832015qcb.250.1295638730267; Fri, 21 Jan 2011 11:38:50 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.78.96 with HTTP; Fri, 21 Jan 2011 11:38:30 -0800 (PST)
In-Reply-To: <4D394B51.2060105@ericsson.com>
References: <4D394B51.2060105@ericsson.com>
From: John Tamplin <jat@google.com>
Date: Fri, 21 Jan 2011 14:38:30 -0500
Message-ID: <AANLkTinDPTawWtnPn+JLm8nL3P7nZPVx5iTSeDd__qwb@mail.gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: multipart/alternative; boundary=0016364d2e31465b6f049a60668a
X-System-Of-Record: true
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 19:38:42 -0000

--0016364d2e31465b6f049a60668a
Content-Type: text/plain; charset=UTF-8

On Fri, Jan 21, 2011 at 4:01 AM, Salvatore Loreto <
salvatore.loreto@ericsson.com> wrote:

> So please provide your choices (if more then one, please rank them or if
> only one specify
> "I can live only with") among the following
>
> #1 - GET
> #2 - OPTIONS
> #3 - a complete new method (e.g. WEBSOCKET)
>

I personally would be happy with any of these (assuming we use a real path
with OPTIONS).

However, I would slightly prefer to not create a new WEBSOCKET method, since
I suspect many existing implementations would treat it as equivalent to GET
anyway.

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

--0016364d2e31465b6f049a60668a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Fri, Jan 21, 2011 at 4:01 AM, Salvatore Loret=
o <span dir=3D"ltr">&lt;<a href=3D"mailto:salvatore.loreto@ericsson.com">sa=
lvatore.loreto@ericsson.com</a>&gt;</span> wrote:<br><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex;">

So please provide your choices (if more then one, please rank them or if on=
ly one specify<br>
&quot;I can live only with&quot;) among the following<br>
<br>
#1 - GET<br>
#2 - OPTIONS<br>
#3 - a complete new method (e.g. WEBSOCKET)<br></blockquote><div><br></div>=
<div>I personally would be happy with any of these (assuming we use a real =
path with OPTIONS).</div><div><br></div><div>However, I would slightly pref=
er to not create a new WEBSOCKET method, since I suspect many existing impl=
ementations would treat it as equivalent to GET anyway.</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--0016364d2e31465b6f049a60668a--

From dave@cridland.net  Fri Jan 21 11:39:04 2011
Return-Path: <dave@cridland.net>
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 48EC628C110 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 11:39:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.55
X-Spam-Level: 
X-Spam-Status: No, score=-2.55 tagged_above=-999 required=5 tests=[AWL=0.049,  BAYES_00=-2.599]
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 Ubb7iaqYGXtc for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 11:39:03 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 2AE0D28C10B for <hybi@ietf.org>; Fri, 21 Jan 2011 11:39:03 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 3199411680BC; Fri, 21 Jan 2011 19:41:48 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 330U9o49OUEb; Fri, 21 Jan 2011 19:41:46 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id D9BE711680BA; Fri, 21 Jan 2011 19:41:46 +0000 (GMT)
References: <4D394B51.2060105@ericsson.com> <4D39C0A2.8070800@caucho.com> <28835.1295630739.621781@puncture> <4D39C639.70903@caucho.com>
In-Reply-To: <4D39C639.70903@caucho.com>
MIME-Version: 1.0
Message-Id: <28835.1295638906.902556@puncture>
Date: Fri, 21 Jan 2011 19:41:46 +0000
From: Dave Cridland <dave@cridland.net>
To: Scott Ferguson <ferg@caucho.com>, Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>, Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 19:39:04 -0000

On Fri Jan 21 17:45:29 2011, Scott Ferguson wrote:
> Dave Cridland wrote:
>> On Fri Jan 21 17:21:38 2011, Scott Ferguson wrote:
>>> Actually, there's a third, though it's more speculative.
>>> 
>>>  3. For WebSocket web-services (generally non-browser), it may be  
>>> useful for the "GET" to provide something like metadata about the  
>>> WebSocket service. That pattern has been used for web-services in  
>>> the past.
>> 
>> Isn't that done by just GET *without* an Upgrade token?
> That helps show why I'd prefer the WEBSOCKET.
> 
> With a separate method, the logic is simple:
> 
>  If method="WEBSOCKET", start websocket channel
>  If method="GET", show metadata
> 
>  (And if method="WEBSOCKET" and broken/missing Upgrade, return  
> error.)
> 
> With the Upgrade, you have:
> 
>  If request is a valid WebSocket upgrade, start websocket channel.
>  Otherwise, show metadata
> 
> When "Otherwise" is an error/broken WebSocket upgrade, not a  
> metadata request, it's unclear which return is the correct one:  
> error or metadata.
> 
> All three method systems are workable, but using a separate method  
> removes any ambiguity between errors in an upgrade and something  
> like a metadata GET.

No, there are three cases:

1) No Upgrade => Do metadata (or fallback, or whatever - it is at  
this stage "just" an HTTP request).
2) Upgrade, but no Sec-* => Error!
3) Upgrade and Sec-* => Transition to WebSocket.

With a different method, you still have three cases, but you also  
have an interesting range of silly states, such as WEBSOCKET with no  
Upgrade token.

The point of Upgrade is precisely to switch protocol to satisfy the  
request. Putting in a new method is a tortology if you're already  
using Upgrade.

Others are quite right when they say that GET would be idempotent and  
a WebSocket might not be. Luckily, after the Upgrade, we're no longer  
in HTTP so this wouldn't matter, but if it did due to the fallback  
method, then you could just pick the right method.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From john.fallows@kaazing.com  Fri Jan 21 13:43:01 2011
Return-Path: <john.fallows@kaazing.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 EC0F23A6AA6 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 13:43:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level: 
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 ywV71tTfsvqg for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 13:43:01 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by core3.amsl.com (Postfix) with ESMTP id 14E513A6A51 for <hybi@ietf.org>; Fri, 21 Jan 2011 13:43:01 -0800 (PST)
Received: by iyi42 with SMTP id 42so2322852iyi.31 for <hybi@ietf.org>; Fri, 21 Jan 2011 13:45:48 -0800 (PST)
MIME-Version: 1.0
Received: by 10.42.178.70 with SMTP id bl6mr1497086icb.28.1295646347859; Fri, 21 Jan 2011 13:45:47 -0800 (PST)
Received: by 10.42.146.202 with HTTP; Fri, 21 Jan 2011 13:45:47 -0800 (PST)
X-Originating-IP: [108.65.76.174]
In-Reply-To: <4D394B51.2060105@ericsson.com>
References: <4D394B51.2060105@ericsson.com>
Date: Fri, 21 Jan 2011 13:45:47 -0800
Message-ID: <AANLkTi=_1Qx_xkEWUnAjAokP0JuKQ1MMhiaq+pWjC17p@mail.gmail.com>
From: John Fallows <john.fallows@kaazing.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: multipart/alternative; boundary=90e6ba6e83685195d3049a622c44
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Fri, 21 Jan 2011 21:43:02 -0000

--90e6ba6e83685195d3049a622c44
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Jan 21, 2011 at 1:01 AM, Salvatore Loreto <
salvatore.loreto@ericsson.com> wrote:

> #1 - GET
> #2 - OPTIONS
> #3 - a complete new method (e.g. WEBSOCKET)
>

I prefer OPTIONS (with path).  A new method seems unnecessary.

John
-- 
>|< Kaazing Corporation >|<
John Fallows | CTO | +1.650.960.8148
444 Castro St, Suite 1100 | Mountain View, CA 94041, USA

--90e6ba6e83685195d3049a622c44
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Fri, Jan 21, 2011 at 1:01 AM, Salvatore Loret=
o <span dir=3D"ltr">&lt;<a href=3D"mailto:salvatore.loreto@ericsson.com">sa=
lvatore.loreto@ericsson.com</a>&gt;</span> wrote:<br><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex;">
#1 - GET<br>
#2 - OPTIONS<br>
#3 - a complete new method (e.g. WEBSOCKET)<br></blockquote></div><div><br>=
</div><div>I prefer OPTIONS (with path). =A0A new method seems unnecessary.=
</div><div><br></div><div>John</div>-- <br>&gt;|&lt; Kaazing Corporation &g=
t;|&lt;<br>
John Fallows | CTO | +1.650.960.8148<div>444 Castro St, Suite 1100=A0| Moun=
tain View, CA 94041, USA</div><br>

--90e6ba6e83685195d3049a622c44--

From senthilkumar.peelikkampatti@gmail.com  Fri Jan 21 21:07:01 2011
Return-Path: <senthilkumar.peelikkampatti@gmail.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 C3BCB3A6B12 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 21:07:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.718
X-Spam-Level: 
X-Spam-Status: No, score=-2.718 tagged_above=-999 required=5 tests=[AWL=-0.004, BAYES_00=-2.599, HTML_FONT_FACE_BAD=0.884, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 abB47LIMlK01 for <hybi@core3.amsl.com>; Fri, 21 Jan 2011 21:07:00 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 3CAD83A6B0F for <hybi@ietf.org>; Fri, 21 Jan 2011 21:06:59 -0800 (PST)
Received: by wwa36 with SMTP id 36so3061636wwa.13 for <hybi@ietf.org>; Fri, 21 Jan 2011 21:09:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=5Xn2EklXlPvmH1jbSiwp4dq1Tlc0X3JH7rRzlAZ/WN4=; b=t2i9zZinrAReGNm3ZWylBcXhHA7QBvbM+BRIpaP9FpcD8TSV+S+D5LWZHvGu1OmcTx UmSQmtqVZP5+0x32Lzq11LgzJ4PNBFmzZx3KSiJUeDb22vExeX4783Gzr51ew2cGzltW tMbDd4ahBbc38P6AsPOseqG2ILjjImbubhHy0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=JrSixVL3Qv8ShcxnCFKT+wlbMrCsHRjVsLU++PniY0gogcSwrIwmPHJaZK3V+PKGqM CTBlpD3hPM3wLA682SzQvYkTjmpUMk+n7iUi1oM9bZY0gbxfg7tLxQYH/JMg9hMNKIRW mlvbq3/2fr01HrTB1pryb0lVRiI5JfNLOrSgo=
MIME-Version: 1.0
Received: by 10.227.127.84 with SMTP id f20mr981710wbs.160.1295672987014; Fri, 21 Jan 2011 21:09:47 -0800 (PST)
Received: by 10.227.151.133 with HTTP; Fri, 21 Jan 2011 21:09:46 -0800 (PST)
In-Reply-To: <4D394B51.2060105@ericsson.com>
References: <4D394B51.2060105@ericsson.com>
Date: Fri, 21 Jan 2011 23:09:46 -0600
Message-ID: <AANLkTi=yWMv887UE5eiCYE+tgywMkGDQJh1XXMc7pLov@mail.gmail.com>
From: Senthilkumar Peelikkampatti <senthilkumar.peelikkampatti@gmail.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: multipart/alternative; boundary=0016367fa53422d92b049a686026
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sat, 22 Jan 2011 05:07:01 -0000

--0016367fa53422d92b049a686026
Content-Type: text/plain; charset=ISO-8859-1

I prefer #2 OPTIONS
         OPTIONS method description fits more than others -- "The OPTIONS
method represents a request for information about the communication options
available on the request/response chain identified by the Request-URI. This
method allows the client to determine the options and/or requirements
associated with a resource, or the capabilities of a server, without
implying a resource action or initiating a resource retrieval.".

--Senthil


On Fri, Jan 21, 2011 at 3:01 AM, Salvatore Loreto <
salvatore.loreto@ericsson.com> wrote:

>
> Hi there,
>
> after the result of the first straw-poll on GET+Upgrade+Masking,
> there were a discussion about GET not being the only method to "Upgrade"
> the connection;
> other methods such as OPTIONS (
> http://www.ietf.org/mail-archive/web/hybi/current/msg05721.html)
> and perhaps a completely new method could be used (as proposed months ago).
>
> All the possibilities have pro and cons.
>
> The mail thread(s) started to discuss the alternatives,
> convinced Joe and myself, as HyBi wg co-chairs, that it make sense to run a
> straw-poll
> to get as much information as we can  from people about technical reason
> (pro and cons)
> for their preference(s).
>
> So please provide your choices (if more then one, please rank them or if
> only one specify
> "I can live only with") among the following
>
> #1 - GET
> #2 - OPTIONS
> #3 - a complete new method (e.g. WEBSOCKET)
>
> This poll will run until January 31st
>
> cheers
> /Sal
>
> --
> Salvatore Loreto
> www.sloreto.com
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>



-- 
Regards,
Senthilkumar Peelikkampatti,
http://pmsenthilkumar.blogspot.com/

--0016367fa53422d92b049a686026
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I prefer #2 OPTIONS=A0<div>=A0=A0 =A0 =A0 =A0 OPTIONS method description fi=
ts more than others -- &quot;<span class=3D"Apple-style-span" style=3D"font=
-family: &#39;Times New Roman&#39;; font-size: medium; ">The OPTIONS method=
 represents a request for information about the communication options avail=
able on the request/response chain identified by the Request-URI. This meth=
od allows the client to determine the options and/or requirements associate=
d with a resource, or the capabilities of a server, without implying a reso=
urce action or initiating a resource retrieval.&quot;. =A0</span></div>
<div><span class=3D"Apple-style-span" style=3D"font-family: &#39;Times New =
Roman&#39;; font-size: medium; "><br></span></div><div><font class=3D"Apple=
-style-span" face=3D"&#39;Times New Roman&#39;" size=3D"3">--Senthil</font>=
</div>
<div><span class=3D"Apple-style-span" style=3D"font-family: &#39;Times New =
Roman&#39;; font-size: medium; "><br></span></div><div><br><div class=3D"gm=
ail_quote">On Fri, Jan 21, 2011 at 3:01 AM, Salvatore Loreto <span dir=3D"l=
tr">&lt;<a href=3D"mailto:salvatore.loreto@ericsson.com">salvatore.loreto@e=
ricsson.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><br>
Hi there,<br>
<br>
after the result of the first straw-poll on GET+Upgrade+Masking,<br>
there were a discussion about GET not being the only method to &quot;Upgrad=
e&quot; the connection;<br>
other methods such as OPTIONS (<a href=3D"http://www.ietf.org/mail-archive/=
web/hybi/current/msg05721.html" target=3D"_blank">http://www.ietf.org/mail-=
archive/web/hybi/current/msg05721.html</a>)<br>
and perhaps a completely new method could be used (as proposed months ago).=
<br>
<br>
All the possibilities have pro and cons.<br>
<br>
The mail thread(s) started to discuss the alternatives,<br>
convinced Joe and myself, as HyBi wg co-chairs, that it make sense to run a=
 straw-poll<br>
to get as much information as we can =A0from people about technical reason =
(pro and cons)<br>
for their preference(s).<br>
<br>
So please provide your choices (if more then one, please rank them or if on=
ly one specify<br>
&quot;I can live only with&quot;) among the following<br>
<br>
#1 - GET<br>
#2 - OPTIONS<br>
#3 - a complete new method (e.g. WEBSOCKET)<br>
<br>
This poll will run until January 31st<br>
<br>
cheers<br>
/Sal<br><font color=3D"#888888">
<br>
-- <br>
Salvatore Loreto<br>
<a href=3D"http://www.sloreto.com" target=3D"_blank">www.sloreto.com</a><br=
>
<br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org" target=3D"_blank">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>Regards,<br>Sent=
hilkumar Peelikkampatti,<br><a href=3D"http://pmsenthilkumar.blogspot.com/"=
>http://pmsenthilkumar.blogspot.com/</a><br><br>
</div>

--0016367fa53422d92b049a686026--

From derhoermi@gmx.net  Sat Jan 22 01:36:21 2011
Return-Path: <derhoermi@gmx.net>
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 762913A6823 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 01:36:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.344
X-Spam-Level: 
X-Spam-Status: No, score=-3.344 tagged_above=-999 required=5 tests=[AWL=-0.745, BAYES_00=-2.599]
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 9KN5WvPgCrOs for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 01:36:20 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 144C03A67FD for <hybi@ietf.org>; Sat, 22 Jan 2011 01:36:19 -0800 (PST)
Received: (qmail invoked by alias); 22 Jan 2011 09:39:05 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp058) with SMTP; 22 Jan 2011 10:39:05 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1+EttZorC+EvtmN69A6splnjZdiORV57kRZGA74PO s3us2RpBlhYqjl
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Date: Sat, 22 Jan 2011 10:38:58 +0100
Message-ID: <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de>
References: <4D394B51.2060105@ericsson.com>
In-Reply-To: <4D394B51.2060105@ericsson.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sat, 22 Jan 2011 09:36:21 -0000

* Salvatore Loreto wrote:
>So please provide your choices (if more then one, please rank them or if 
>only one specify "I can live only with") among the following
>
>#1 - GET
>#2 - OPTIONS
>#3 - a complete new method (e.g. WEBSOCKET)

When implementations fail to agree to switch protocols, that's pretty
much a fatal condition. The browser API does not account for that, and
it would probably be unwise to even attempt to re-use the existing HTTP
connection after an upgrade attempt failed while the connection remains
open. Our current draft even recommends closing the connection instead
of generating some HTTP error response if the server refuses to upgrade
for some reason. That does not fit very well with the Upgrade design in
HTTP, and so none of the options seem very appealing.

It seems unlikely the working group would agree to OPTIONS if it does
not include a path, and it seems nobody is advocating for keeping GET,
or a fourth option not included in the poll (well, not mandating but
merely suggesting a method has been proposed; that seems sound design
to me, but in practise it would lead to interoperability and other
failures, so I do think the specification needs to communicate clearly
that failure should be expected if different methods are used, whether
we make this a conformance issue or not).

That basically leaves OPTIONS with path and WEBSOCKET with path. To me
it seems the benefits of OPTIONS are vague and minor, while the bene-
fits with WEBSOCKET are pretty clear and noticable. Scott Ferguson has
summarized some of them already.

I would add that combining the OPTIONS method with Upgrade strikes me
as a bit of a hack, "The OPTIONS method represents a request for
information about the communication options available" like you'd do
for instance to find out if a server is willing to handle certain kinds
of cross-origin requests, like http://www.w3.org/TR/cors/ uses OPTIONS
for that purpose. Adding to that "Oh, it's also how Websocket clients
connect to your server" would certainly lead to confusion.

A particular worry is that some people might mistake this to mean they
should put the "CORS" headers in the handshake to make the Websocket
service available to third parties, which could lead to security issues
(though I haven't thought through the implications of this yet.)

I am open to arguments why OPTIONS is best, or that there is a very
significant cost associated with introducing a new method, but so far
it seems clear that WEBSOCKET would be best.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From w@1wt.eu  Sat Jan 22 02:18:15 2011
Return-Path: <w@1wt.eu>
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 58E1D3A68F5 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 02:18:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.065
X-Spam-Level: 
X-Spam-Status: No, score=-2.065 tagged_above=-999 required=5 tests=[AWL=-0.022, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 731SmTAM5zlU for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 02:18:14 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 2DC523A68F3 for <hybi@ietf.org>; Sat, 22 Jan 2011 02:18:14 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0MAKwqV015524; Sat, 22 Jan 2011 11:20:58 +0100
Date: Sat, 22 Jan 2011 11:20:58 +0100
From: Willy Tarreau <w@1wt.eu>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Message-ID: <20110122102058.GD12837@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sat, 22 Jan 2011 10:18:15 -0000

Hi Bjoern,

On Sat, Jan 22, 2011 at 10:38:58AM +0100, Bjoern Hoehrmann wrote:
> That basically leaves OPTIONS with path and WEBSOCKET with path. To me
> it seems the benefits of OPTIONS are vague and minor, while the bene-
> fits with WEBSOCKET are pretty clear and noticable. Scott Ferguson has
> summarized some of them already.

In fact I find the benefits around WEBSOCKET very small, especially since
they were compared to GET. We could as well argue that OPTIONS provides
the same advantages.

> I would add that combining the OPTIONS method with Upgrade strikes me
> as a bit of a hack,

It is not a hack, it's even how the Upgrade mechanism was documented.

(...)
> I am open to arguments why OPTIONS is best, or that there is a very
> significant cost associated with introducing a new method, but so far
> it seems clear that WEBSOCKET would be best.

I still see some advantages to using OPTIONS over the two other ones :

1) more chances of cleaner failure than GET on non-compatible intermediaries ;
   some of them might even respond themselves.
2) ensure that no intermediary will cache the response
3) ability to return 200 to indicate supported options when an
   alternative scheme might be considered
4) no need to update the equipments that already support the Upgrade
   mechanism but which block unknown methods

The big disadvantage I see in having a new method is that from a product
editor's point of view, it's a new feature and this will take much more
time to integrate into their products. If you own a product that does not
work with Upgrade+101, you can contact you vendor and report a bug that
blocks WS traffic due to their blatant incompatibility with existing HTTP
specs. The fix is simple and might very well happen in a minor release.

Now if you contact them saying "I noticed that your product does not
support the new WEBSOCKET method, can you tell me when it's available",
they'll obviously respond "it will be the shiny new feature of version
4.x that's planned for next year".

Sticking to existing standards is often more efficient when your goal
is to get things to work.

Thus I'd select OPTIONS first, otherwise GET.

Regards,
Willy


From w@1wt.eu  Sat Jan 22 02:24:12 2011
Return-Path: <w@1wt.eu>
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 9CAF13A68FC for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 02:24:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.064
X-Spam-Level: 
X-Spam-Status: No, score=-2.064 tagged_above=-999 required=5 tests=[AWL=-0.021, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 aaZDCv9Ypar0 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 02:24:11 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 80C763A68EA for <hybi@ietf.org>; Sat, 22 Jan 2011 02:24:11 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0MAQoBF015542; Sat, 22 Jan 2011 11:26:50 +0100
Date: Sat, 22 Jan 2011 11:26:50 +0100
From: Willy Tarreau <w@1wt.eu>
To: Joe Mason <jmason@rim.com>
Message-ID: <20110122102650.GE12837@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sat, 22 Jan 2011 10:24:12 -0000

On Fri, Jan 21, 2011 at 09:16:17AM -0500, Joe Mason wrote:
> > -----Original Message-----
> > From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
> > Dave Cridland
> >
> > So for many requests, a GET or an OPTIONS seems fine, and for others
> > a POST might be more suitable - especially if, for instance, the
> > request might be fulfilled by BOSH if a WebSocket upgrade fails.
> 
> Using POST to fallback seems like a useful technique to me.  If possible I'd like to support it.  However, if there are reasons to restrict to one other method, this shouldn't take precedence.
> 
> I'd suggest the spec allow any method but recommend use of OPTIONS unless the script wants to take advantage of a specific feature of another method (and use POST to fallback to BOSH as an example of such a feature).

We should avoid mixing POST with any request that's expected to return
a 101 response. Some intermediaries just forward the request with an
"Expect: 100-continue" header, waiting for the server to return 100
and only then they forward the data, waiting for a response.

This can cause some "HTTP/1.1 100 Continue" responses to appear on the
response path where the client would only expect a 101. It could also
confuse those intermediaries if the WS server immediately responds 101
disregarding the Expect header. The intermediary might also very well
consider the 101 as a 1xx response validating the Expect then wait for
any additional data to be sent as the final response.

There is a number of undesirable situations this can cause and I think
we'd prefer to stay away from those.

Regards,
Willy


From julian.reschke@gmx.de  Sat Jan 22 02:29:32 2011
Return-Path: <julian.reschke@gmx.de>
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 A0A093A68EA for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 02:29:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.892
X-Spam-Level: 
X-Spam-Status: No, score=-103.892 tagged_above=-999 required=5 tests=[AWL=-1.293, BAYES_00=-2.599, 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 XXMt1uH4wMYI for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 02:29:32 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 51FA23A68FC for <hybi@ietf.org>; Sat, 22 Jan 2011 02:29:30 -0800 (PST)
Received: (qmail invoked by alias); 22 Jan 2011 10:32:18 -0000
Received: from p508FD23A.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.210.58] by mail.gmx.net (mp063) with SMTP; 22 Jan 2011 11:32:18 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/KFl8POd3KXmGgaJiLEGQ8bQlobPpvcTSCESc0iY kQYZFBTKPgsXlz
Message-ID: <4D3AB21D.9040509@gmx.de>
Date: Sat, 22 Jan 2011 11:31:57 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <4D394B51.2060105@ericsson.com>	<e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu>
In-Reply-To: <20110122102058.GD12837@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sat, 22 Jan 2011 10:29:32 -0000

On 22.01.2011 11:20, Willy Tarreau wrote:
> ...
> Now if you contact them saying "I noticed that your product does not
> support the new WEBSOCKET method, can you tell me when it's available",
> they'll obviously respond "it will be the shiny new feature of version
> 4.x that's planned for next year".
> ...

I'd argue that intermediates are supposed to handle extension methods, 
thus not handling them can be considered a bug as well.

Best regards, Julian

From w@1wt.eu  Sat Jan 22 02:37:08 2011
Return-Path: <w@1wt.eu>
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 88B573A68F0 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 02:37:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.064
X-Spam-Level: 
X-Spam-Status: No, score=-2.064 tagged_above=-999 required=5 tests=[AWL=-0.021, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 ir5toQWA95s9 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 02:37:07 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 89F713A68EA for <hybi@ietf.org>; Sat, 22 Jan 2011 02:37:06 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0MAdscc015584 for hybi@ietf.org; Sat, 22 Jan 2011 11:39:54 +0100
Date: Sat, 22 Jan 2011 11:39:54 +0100
From: Willy Tarreau <w@1wt.eu>
To: "hybi@ietf.org" <hybi@ietf.org>
Message-ID: <20110122103954.GF12837@1wt.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.3i
Subject: [hybi] Suggesting adding Content-length: 0 to responses
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: Sat, 22 Jan 2011 10:37:08 -0000

Hi,

I noticed that Apache as an intermediary considers 101 as 1xx and waits for
a final response. However, if the response contains a "Content-length: 0",
then it immediately sends the response and closes.

Note that it does not forward the Upgrade header anyway, so the WS server
should normally not return a 101.

My point is that it does not cost much to add "Content-length: 0" in
responses (and some broken intermediaries will probably do it anyway), and
it makes some known incompatible intermediaries fail early and cleanly.

Any opinion ?

Regards,
Willy


From derhoermi@gmx.net  Sat Jan 22 03:01:10 2011
Return-Path: <derhoermi@gmx.net>
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 EA3C03A6904 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 03:01:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.179
X-Spam-Level: 
X-Spam-Status: No, score=-2.179 tagged_above=-999 required=5 tests=[AWL=-1.880, BAYES_00=-2.599, MANGLED_SFTWRE=2.3]
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 ADl-bY9mzhgQ for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 03:01:09 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 4895F3A68FC for <hybi@ietf.org>; Sat, 22 Jan 2011 03:01:08 -0800 (PST)
Received: (qmail invoked by alias); 22 Jan 2011 11:03:56 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp033) with SMTP; 22 Jan 2011 12:03:56 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX18DS2UTK/MDA5t20f3jKjX0txVga2WQgPsFCALWVn pP8OnU+2JuEsYo
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Willy Tarreau <w@1wt.eu>
Date: Sat, 22 Jan 2011 12:03:49 +0100
Message-ID: <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu>
In-Reply-To: <20110122102058.GD12837@1wt.eu>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sat, 22 Jan 2011 11:01:11 -0000

* Willy Tarreau wrote:
>On Sat, Jan 22, 2011 at 10:38:58AM +0100, Bjoern Hoehrmann wrote:
>> I would add that combining the OPTIONS method with Upgrade strikes me
>> as a bit of a hack,
>
>It is not a hack, it's even how the Upgrade mechanism was documented.

(RFC 2068 does not seem to mention using OPTIONS+Upgrade specifically.)

>I still see some advantages to using OPTIONS over the two other ones :
>
>1) more chances of cleaner failure than GET on non-compatible intermediaries ;
>   some of them might even respond themselves.
>2) ensure that no intermediary will cache the response
>3) ability to return 200 to indicate supported options when an
>   alternative scheme might be considered
>4) no need to update the equipments that already support the Upgrade
>   mechanism but which block unknown methods

You would have to put some argument or data behind that (for the sake of
argument, let's say I don't understand the first point with respect to
WEBSOCKET, find bad caching behavior equally likely between WEBSOCKET
and OPTIONS, you could use a 200 response with WEBSOCKET aswell, and not
supporting some unknown method might be a policy decision that should
not be worked around by using a supposedly known method.)

>The big disadvantage I see in having a new method is that from a product
>editor's point of view, it's a new feature and this will take much more
>time to integrate into their products. If you own a product that does not
>work with Upgrade+101, you can contact you vendor and report a bug that
>blocks WS traffic due to their blatant incompatibility with existing HTTP
>specs. The fix is simple and might very well happen in a minor release.

Adding a method to a white list is easy compared to figuring out how to
properly support the Upgrade mechanism, I would in fact expect there to
be a configuration file that permits people actually running the soft-
ware to do that. A vendor that requires you to wait for the next version
of their product whenever you'd like to use a new method also does not
seem likely to patch Upgrade support right in for you without making you
wait for the next version.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From derhoermi@gmx.net  Sat Jan 22 03:09:38 2011
Return-Path: <derhoermi@gmx.net>
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 C35633A6907 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 03:09:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.294
X-Spam-Level: 
X-Spam-Status: No, score=-3.294 tagged_above=-999 required=5 tests=[AWL=-0.695, BAYES_00=-2.599]
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 x8jnFd57cjrY for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 03:09:37 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 2D3EA3A6905 for <hybi@ietf.org>; Sat, 22 Jan 2011 03:09:36 -0800 (PST)
Received: (qmail invoked by alias); 22 Jan 2011 11:12:23 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp020) with SMTP; 22 Jan 2011 12:12:23 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX18IZEVPoq0IfCWZS7BqV4Pc/O6neSTod3OSeMUcvt 0KtjDRx9YrNtsn
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Willy Tarreau <w@1wt.eu>
Date: Sat, 22 Jan 2011 12:12:16 +0100
Message-ID: <8delj6hvot6913j48kgkm93djhqitg4cv1@hive.bjoern.hoehrmann.de>
References: <20110122103954.GF12837@1wt.eu>
In-Reply-To: <20110122103954.GF12837@1wt.eu>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Suggesting adding Content-length: 0 to responses
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: Sat, 22 Jan 2011 11:09:38 -0000

* Willy Tarreau wrote:
>I noticed that Apache as an intermediary considers 101 as 1xx and waits for
>a final response. However, if the response contains a "Content-length: 0",
>then it immediately sends the response and closes.

That is likely because such a message is malformed: 1xx responses do not
have a message body by definition and must not include one, but Content-
Length would indicate the presence of a message body. Websocket clients
should rather abort the connection attempt if they see a Content-Length
or Transfer-Encoding header on the 101 response, as I suggested earlier.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From w@1wt.eu  Sat Jan 22 03:48:10 2011
Return-Path: <w@1wt.eu>
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 077473A690B for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 03:48:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.914
X-Spam-Level: 
X-Spam-Status: No, score=-0.914 tagged_above=-999 required=5 tests=[AWL=-1.171, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, MANGLED_SFTWRE=2.3]
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 4RFVjQAiGlKr for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 03:48:09 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id AC28A3A690A for <hybi@ietf.org>; Sat, 22 Jan 2011 03:48:07 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0MBojSS015732; Sat, 22 Jan 2011 12:50:45 +0100
Date: Sat, 22 Jan 2011 12:50:45 +0100
From: Willy Tarreau <w@1wt.eu>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Message-ID: <20110122115045.GG12837@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs OPTIONS vs new method)
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: Sat, 22 Jan 2011 11:48:10 -0000

[changed the subject to ease counting for Chairs]

On Sat, Jan 22, 2011 at 12:03:49PM +0100, Bjoern Hoehrmann wrote:
> * Willy Tarreau wrote:
> >On Sat, Jan 22, 2011 at 10:38:58AM +0100, Bjoern Hoehrmann wrote:
> >> I would add that combining the OPTIONS method with Upgrade strikes me
> >> as a bit of a hack,
> >
> >It is not a hack, it's even how the Upgrade mechanism was documented.
> 
> (RFC 2068 does not seem to mention using OPTIONS+Upgrade specifically.)

I meant the first reference to an Upgrade handshake appeared in RFC2817
coupled with OPTIONS.

> >I still see some advantages to using OPTIONS over the two other ones :
> >
> >1) more chances of cleaner failure than GET on non-compatible intermediaries ;
> >   some of them might even respond themselves.
> >2) ensure that no intermediary will cache the response
> >3) ability to return 200 to indicate supported options when an
> >   alternative scheme might be considered
> >4) no need to update the equipments that already support the Upgrade
> >   mechanism but which block unknown methods
> 
> You would have to put some argument or data behind that (for the sake of
> argument, let's say I don't understand the first point with respect to
> WEBSOCKET, find bad caching behavior equally likely between WEBSOCKET
> and OPTIONS, you could use a 200 response with WEBSOCKET aswell, and not
> supporting some unknown method might be a policy decision that should
> not be worked around by using a supposedly known method.)

For the first point, OPTIONS and WEBSOCKET are equivalent, that's why I
compared that to GET. I'm not sure what arguments you need for the other
points though.

> >The big disadvantage I see in having a new method is that from a product
> >editor's point of view, it's a new feature and this will take much more
> >time to integrate into their products. If you own a product that does not
> >work with Upgrade+101, you can contact you vendor and report a bug that
> >blocks WS traffic due to their blatant incompatibility with existing HTTP
> >specs. The fix is simple and might very well happen in a minor release.
> 
> Adding a method to a white list is easy

I would agree with you if it was just a matter of adding a method to a white
list. Unfortunately it's not always the case, as some products support a
predefined list of methods. For instance Pound seems to support various
sets of methods but does not appear to offer support for unknown methods.
Nginx also has a set of predefined methods and does not appear to offer
any option to add more.

> compared to figuring out how to
> properly support the Upgrade mechanism,

Having a specific method is not an alternative for getting the Upgrade to
work as designed. The later is a prerequisite anyway, and it's quite easy
to do in intermediaries that are susceptible to work transparently because
they already have to support tunnel-like behaviours when they're installed
in front of proxies. I had to do it for haproxy and basically at minima,
it's just a matter of adding a check for 101 in responses where you already
check for 200 in response to CONNECT. This is really easy to do in this
type of product and can be done in a minor release (as I did).

> I would in fact expect there to
> be a configuration file that permits people actually running the soft-
> ware to do that.

A configuration file will unfortunately not implement behaviours that a
product does not have. HTTP methods follow some semantics. There is one
message in response to one request message. Opening a tunnel is different,
either it was already implemented and we can already use it, or it was not
and the configuration itself will not make that possible without code
changes.

I feel like what you liked in the WEBSOCKET method was the ability to
*just* have to configure it to make an intermediary comply with its
semantics, but unfortunately, this will not be the case, and it will
require more code in more products (having to implement tunnelling plus
support for the method in some of them).

> A vendor that requires you to wait for the next version
> of their product whenever you'd like to use a new method also does not
> seem likely to patch Upgrade support right in for you without making you
> wait for the next version.

Then you have never worked with vendors :-)

Vendors are always looking for new features to advertise with new versions.
Putting a big "WEBSOCKET" stamp on a new version is fine, it requires little
marketting to sell it. Since it cannot be demonstrated there is a bug in the
version without it, there is no reason why they'd offer you with a fix for
your version.

As Julian said, it could be argued that the lack of support for unknown
methods is a bug, but that's harder to use to make a vendor move, especially
when this method comes with a different use than other ones.

Regards,
Willy


From w@1wt.eu  Sat Jan 22 03:49:09 2011
Return-Path: <w@1wt.eu>
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 C076C3A690B for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 03:49:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.058
X-Spam-Level: 
X-Spam-Status: No, score=-2.058 tagged_above=-999 required=5 tests=[AWL=-0.015, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 DjSKCAANgdSP for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 03:49:09 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id ADB853A690A for <hybi@ietf.org>; Sat, 22 Jan 2011 03:49:08 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0MBptxH015743; Sat, 22 Jan 2011 12:51:55 +0100
Date: Sat, 22 Jan 2011 12:51:55 +0100
From: Willy Tarreau <w@1wt.eu>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Message-ID: <20110122115155.GH12837@1wt.eu>
References: <20110122103954.GF12837@1wt.eu> <8delj6hvot6913j48kgkm93djhqitg4cv1@hive.bjoern.hoehrmann.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8delj6hvot6913j48kgkm93djhqitg4cv1@hive.bjoern.hoehrmann.de>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Suggesting adding Content-length: 0 to responses
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: Sat, 22 Jan 2011 11:49:10 -0000

On Sat, Jan 22, 2011 at 12:12:16PM +0100, Bjoern Hoehrmann wrote:
> * Willy Tarreau wrote:
> >I noticed that Apache as an intermediary considers 101 as 1xx and waits for
> >a final response. However, if the response contains a "Content-length: 0",
> >then it immediately sends the response and closes.
> 
> That is likely because such a message is malformed: 1xx responses do not
> have a message body by definition and must not include one, but Content-
> Length would indicate the presence of a message body. Websocket clients
> should rather abort the connection attempt if they see a Content-Length
> or Transfer-Encoding header on the 101 response, as I suggested earlier.

I agree. The problem here is that the client gets nothing after the handshake !
My concern precisely is to inform the client it should abort.

Willy


From julian.reschke@gmx.de  Sat Jan 22 04:39:17 2011
Return-Path: <julian.reschke@gmx.de>
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 C5B953A691D for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 04:39:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.885
X-Spam-Level: 
X-Spam-Status: No, score=-103.885 tagged_above=-999 required=5 tests=[AWL=-1.286, BAYES_00=-2.599, 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 rgzPJ2yOQRKU for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 04:39:17 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 9BD573A68F1 for <hybi@ietf.org>; Sat, 22 Jan 2011 04:39:16 -0800 (PST)
Received: (qmail invoked by alias); 22 Jan 2011 12:42:03 -0000
Received: from p508FD23A.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.210.58] by mail.gmx.net (mp009) with SMTP; 22 Jan 2011 13:42:03 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX196OsoHdnl6zt30tXOabQhgsiFjPYvxKRpx1LymC+ vYsD19FUFQBApu
Message-ID: <4D3AD086.6040700@gmx.de>
Date: Sat, 22 Jan 2011 13:41:42 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <4D394B51.2060105@ericsson.com>	<e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de>	<20110122102058.GD12837@1wt.eu>	<k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu>
In-Reply-To: <20110122115045.GG12837@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Sat, 22 Jan 2011 12:39:17 -0000

On 22.01.2011 12:50, Willy Tarreau wrote:
> ...
> As Julian said, it could be argued that the lack of support for unknown
> methods is a bug, but that's harder to use to make a vendor move, especially
> when this method comes with a different use than other ones.
> ...

We probably should clarify whether, when we say WEBSOCKET, we mean 
*just* the new method, or that new method + Upgrade.

I think Roy mentioned once that just a new method, with both sides just 
sending using chunked encoding, might be good enough. However I believe 
this is less likely to work though intermediaries (due to the chunked 
request body).

Best regards, Julian

From derhoermi@gmx.net  Sat Jan 22 04:53:31 2011
Return-Path: <derhoermi@gmx.net>
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 81E863A6928 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 04:53:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.281
X-Spam-Level: 
X-Spam-Status: No, score=-3.281 tagged_above=-999 required=5 tests=[AWL=-0.682, BAYES_00=-2.599]
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 U92cWMKfhAdR for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 04:53:30 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 82E063A6924 for <hybi@ietf.org>; Sat, 22 Jan 2011 04:53:29 -0800 (PST)
Received: (qmail invoked by alias); 22 Jan 2011 12:56:17 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp037) with SMTP; 22 Jan 2011 13:56:17 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1/t9VNARP3tcZ6IqWyssj+MfEKKsTdXAzidwac+MG BonZ2LH5wPE0wh
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Willy Tarreau <w@1wt.eu>
Date: Sat, 22 Jan 2011 13:56:10 +0100
Message-ID: <ljhlj6tuk3pumlk2f8idasah77fu2teor0@hive.bjoern.hoehrmann.de>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu>
In-Reply-To: <20110122115045.GG12837@1wt.eu>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs OPTIONS vs new method)
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: Sat, 22 Jan 2011 12:53:31 -0000

* Willy Tarreau wrote:
>For the first point, OPTIONS and WEBSOCKET are equivalent, that's why I
>compared that to GET. I'm not sure what arguments you need for the other
>points though.

You said, for instance, that OPTIONS helps making sure intermediaries
will not cache the response. Why can't we make WEBSOCKET ensure that
just as much? I can see that OPTIONS is defined as non-cacheable and
that WEBSOCKET has yet to be defined, but beyond that I don't see
much difference. Why would a 101 response to an unknown method ever
be put in a cache, why can't we use Cache-Control to work around it?
Would you agree that if caching is a concern, GET is probably worse
than the other two?

>I feel like what you liked in the WEBSOCKET method was the ability to
>*just* have to configure it to make an intermediary comply with its
>semantics, but unfortunately, this will not be the case, and it will
>require more code in more products (having to implement tunnelling plus
>support for the method in some of them).

Intermediaries so far don't play much of a role in my preference in
the poll. My point was that supporting the Websocket protocol using
method X in the handshake should not be much harder than supporting
the Websocket protocol using method Y in the handshake, and how the
marketing dynamics in "bug vs feature" work out is rather unclear.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From w@1wt.eu  Sat Jan 22 04:57:03 2011
Return-Path: <w@1wt.eu>
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 5515F3A6928 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 04:57:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.058
X-Spam-Level: 
X-Spam-Status: No, score=-2.058 tagged_above=-999 required=5 tests=[AWL=-0.015, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 HyQn5-l-Biwm for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 04:57:02 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 0A9F63A6925 for <hybi@ietf.org>; Sat, 22 Jan 2011 04:57:01 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0MCxmvg015969; Sat, 22 Jan 2011 13:59:48 +0100
Date: Sat, 22 Jan 2011 13:59:48 +0100
From: Willy Tarreau <w@1wt.eu>
To: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <20110122125948.GJ12837@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <4D3AD086.6040700@gmx.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4D3AD086.6040700@gmx.de>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Sat, 22 Jan 2011 12:57:03 -0000

On Sat, Jan 22, 2011 at 01:41:42PM +0100, Julian Reschke wrote:
> On 22.01.2011 12:50, Willy Tarreau wrote:
> >...
> >As Julian said, it could be argued that the lack of support for unknown
> >methods is a bug, but that's harder to use to make a vendor move, 
> >especially
> >when this method comes with a different use than other ones.
> >...
> 
> We probably should clarify whether, when we say WEBSOCKET, we mean 
> *just* the new method, or that new method + Upgrade.

I agree with your point. But having a new method without the Upgrade will
definitely require upgrading *all* intermediaries, which is what we've been
trying to avoid since the beginning by remaining HTTP-compliant.

> I think Roy mentioned once that just a new method, with both sides just 
> sending using chunked encoding, might be good enough. However I believe 
> this is less likely to work though intermediaries (due to the chunked 
> request body).

This will also cause other new issues, mainly intermediaries which don't
forward the response until all the request is sent, or inversely stop
forwarding the request as soon as the server starts to respond. Also
another issue with chunked encoding is that any intermediary is free to
bufferize a complete request before forwarding it, possibly changing
the chunking or even replacing it with a content-length. The variety
of issues depending on implementations makes this solution look scary
to me, to be honnest. Probably that if it worked well enough we wouldn't
be trying to define a tunneling protocol to work over HTTP :-/
One could also argue that the chunked encoding still adds bytes to the
framing :-)

Regards,
Willy


From julian.reschke@gmx.de  Sat Jan 22 05:00:06 2011
Return-Path: <julian.reschke@gmx.de>
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 2EFB13A692E for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 05:00:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.871
X-Spam-Level: 
X-Spam-Status: No, score=-103.871 tagged_above=-999 required=5 tests=[AWL=-1.272, BAYES_00=-2.599, 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 vYf6qwYUgvg9 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 05:00:05 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id CE2983A6924 for <hybi@ietf.org>; Sat, 22 Jan 2011 05:00:04 -0800 (PST)
Received: (qmail invoked by alias); 22 Jan 2011 13:02:51 -0000
Received: from p508FD23A.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.210.58] by mail.gmx.net (mp060) with SMTP; 22 Jan 2011 14:02:51 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX19y/6xz1mtyMyTaBfAcoY2hCzLnuP7yt0CNkH/5dD PrD6PNdDm9JIDf
Message-ID: <4D3AD564.4010708@gmx.de>
Date: Sat, 22 Jan 2011 14:02:28 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <4D3AD086.6040700@gmx.de> <20110122125948.GJ12837@1wt.eu>
In-Reply-To: <20110122125948.GJ12837@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Sat, 22 Jan 2011 13:00:06 -0000

On 22.01.2011 13:59, Willy Tarreau wrote:
> On Sat, Jan 22, 2011 at 01:41:42PM +0100, Julian Reschke wrote:
>> On 22.01.2011 12:50, Willy Tarreau wrote:
>>> ...
>>> As Julian said, it could be argued that the lack of support for unknown
>>> methods is a bug, but that's harder to use to make a vendor move,
>>> especially
>>> when this method comes with a different use than other ones.
>>> ...
>>
>> We probably should clarify whether, when we say WEBSOCKET, we mean
>> *just* the new method, or that new method + Upgrade.
>
> I agree with your point. But having a new method without the Upgrade will
> definitely require upgrading *all* intermediaries, which is what we've been
> trying to avoid since the beginning by remaining HTTP-compliant.
>
>> I think Roy mentioned once that just a new method, with both sides just
>> sending using chunked encoding, might be good enough. However I believe
>> this is less likely to work though intermediaries (due to the chunked
>> request body).
>
> This will also cause other new issues, mainly intermediaries which don't
> forward the response until all the request is sent, or inversely stop
> forwarding the request as soon as the server starts to respond. Also
> another issue with chunked encoding is that any intermediary is free to
> bufferize a complete request before forwarding it, possibly changing
> the chunking or even replacing it with a content-length. The variety
> of issues depending on implementations makes this solution look scary
> to me, to be honnest. Probably that if it worked well enough we wouldn't
> be trying to define a tunneling protocol to work over HTTP :-/
> One could also argue that the chunked encoding still adds bytes to the
> framing :-)
> ...

I agree with all you said -- just wanted to make sure that it's clear 
what people are talking about (similar to the OPTIONS * discussion).

Best regards, Julian

From w@1wt.eu  Sat Jan 22 05:09:09 2011
Return-Path: <w@1wt.eu>
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 6574F3A6922 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 05:09:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.058
X-Spam-Level: 
X-Spam-Status: No, score=-2.058 tagged_above=-999 required=5 tests=[AWL=-0.015, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 O7YtJAFc+4ct for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 05:09:08 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id DDE8C3A6921 for <hybi@ietf.org>; Sat, 22 Jan 2011 05:09:07 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0MDBttC015998; Sat, 22 Jan 2011 14:11:55 +0100
Date: Sat, 22 Jan 2011 14:11:55 +0100
From: Willy Tarreau <w@1wt.eu>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Message-ID: <20110122131155.GK12837@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <ljhlj6tuk3pumlk2f8idasah77fu2teor0@hive.bjoern.hoehrmann.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <ljhlj6tuk3pumlk2f8idasah77fu2teor0@hive.bjoern.hoehrmann.de>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs OPTIONS vs new method)
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: Sat, 22 Jan 2011 13:09:09 -0000

On Sat, Jan 22, 2011 at 01:56:10PM +0100, Bjoern Hoehrmann wrote:
> * Willy Tarreau wrote:
> >For the first point, OPTIONS and WEBSOCKET are equivalent, that's why I
> >compared that to GET. I'm not sure what arguments you need for the other
> >points though.
> 
> You said, for instance, that OPTIONS helps making sure intermediaries
> will not cache the response. Why can't we make WEBSOCKET ensure that
> just as much? I can see that OPTIONS is defined as non-cacheable and
> that WEBSOCKET has yet to be defined, but beyond that I don't see
> much difference.

That's what I said above too. For that point, OPTIONS and WEBSOCKET are
equivalent.

> Why would a 101 response to an unknown method ever be put in a cache,
> why can't we use Cache-Control to work around it?

When thinking about intermediaries, you should always think about having
two of them in the path, no just one. So you have this :

   Client  --->  intermediary 1  --->  intermediary 2  ---->  server

This is what makes the worst scenario happen. For instance, a GET from
client 1 might be forwarded to the server without the Upgrade headers,
and the 101 response might not be understood by intermediary 2 and be
replaced with a 200, in turn transferred to intermediary 1 which could
cache it. That's just an example of course.

> Would you agree that if caching is a concern, GET is probably worse
> than the other two?

Yes, that's what I said twice (three times if we count this mail :-)).
That's what I'm not much fond of GET compared to others. GET could cause
some caching to occur while others will not.

> >I feel like what you liked in the WEBSOCKET method was the ability to
> >*just* have to configure it to make an intermediary comply with its
> >semantics, but unfortunately, this will not be the case, and it will
> >require more code in more products (having to implement tunnelling plus
> >support for the method in some of them).
> 
> Intermediaries so far don't play much of a role in my preference in
> the poll.

It's your choice but I pretty sure you won't find that many WebSocket server
deployments without a load balancer in front of them. The two products I gave
as example of intermediaries are used as load balancers and don't support
adding new methods by configuration.

> My point was that supporting the Websocket protocol using
> method X in the handshake should not be much harder than supporting
> the Websocket protocol using method Y in the handshake,

As explained above, it's not method X vs method Y, it's existing method
vs new method which sometimes will require new code to be written.

> and how the
> marketing dynamics in "bug vs feature" work out is rather unclear.

When a customer asks a vendor to develop something, it's better for the
vendor to be able to justify that he won't do it for free. If it's a fix
for a bug, he will have to do it for free. If it's a new feature, he will
charge for the work and most often delay it to the next major release.
That's not something new, all products work that way. Obviously there are
variations everywhere, such as editors who don't fix bugs and others who
accept to provide minor feature improvements in minor versions. But adding
a new method with new semantics (and possibly security impacts) certainly
is something that can justify delaying to a new major version.

Regards,
Willy


From derhoermi@gmx.net  Sat Jan 22 05:48:16 2011
Return-Path: <derhoermi@gmx.net>
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 1205F3A6946 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 05:48:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.269
X-Spam-Level: 
X-Spam-Status: No, score=-3.269 tagged_above=-999 required=5 tests=[AWL=-0.670, BAYES_00=-2.599]
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 bMmS3Psh7tQn for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 05:48:15 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 82B423A6944 for <hybi@ietf.org>; Sat, 22 Jan 2011 05:48:13 -0800 (PST)
Received: (qmail invoked by alias); 22 Jan 2011 13:51:01 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp007) with SMTP; 22 Jan 2011 14:51:01 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1/mirt+KL/mvk3vGp2Dr/fRJ4QKuMpW+1kc7yOWCj hEjc3Q9bg8nyqT
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Willy Tarreau <w@1wt.eu>
Date: Sat, 22 Jan 2011 14:50:54 +0100
Message-ID: <52nlj61hap63p134s1m73sfo23oaaup11d@hive.bjoern.hoehrmann.de>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <ljhlj6tuk3pumlk2f8idasah77fu2teor0@hive.bjoern.hoehrmann.de> <20110122131155.GK12837@1wt.eu>
In-Reply-To: <20110122131155.GK12837@1wt.eu>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs OPTIONS vs new method)
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: Sat, 22 Jan 2011 13:48:16 -0000

* Willy Tarreau wrote:
>On Sat, Jan 22, 2011 at 01:56:10PM +0100, Bjoern Hoehrmann wrote:
>> * Willy Tarreau wrote:
>> >For the first point, OPTIONS and WEBSOCKET are equivalent, that's why I
>> >compared that to GET. I'm not sure what arguments you need for the other
>> >points though.
>> 
>> You said, for instance, that OPTIONS helps making sure intermediaries
>> will not cache the response. Why can't we make WEBSOCKET ensure that
>> just as much? I can see that OPTIONS is defined as non-cacheable and
>> that WEBSOCKET has yet to be defined, but beyond that I don't see
>> much difference.
>
>That's what I said above too. For that point, OPTIONS and WEBSOCKET are
>equivalent.

We seem to be talking past each other. I agree with you that there are
certain setups where using WEBSOCKET would make things more difficult
compared to using OPTIONS due to different types of necessary software
changes, including no necessary software changes with OPTIONS. Are
there other significant points in the comparison between OPTIONS and
WEBSOCKET? I am not sure whether you are saying among the four points
you listed, the first three don't make much of a difference with these
two methods specifically.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From w@1wt.eu  Sat Jan 22 06:21:33 2011
Return-Path: <w@1wt.eu>
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 5E0E33A694F for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 06:21:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.058
X-Spam-Level: 
X-Spam-Status: No, score=-2.058 tagged_above=-999 required=5 tests=[AWL=-0.015, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 I6K3HMH5r7h5 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 06:21:32 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id B68423A694A for <hybi@ietf.org>; Sat, 22 Jan 2011 06:21:31 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0MEOHY7016312; Sat, 22 Jan 2011 15:24:17 +0100
Date: Sat, 22 Jan 2011 15:24:17 +0100
From: Willy Tarreau <w@1wt.eu>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Message-ID: <20110122142417.GL12837@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <ljhlj6tuk3pumlk2f8idasah77fu2teor0@hive.bjoern.hoehrmann.de> <20110122131155.GK12837@1wt.eu> <52nlj61hap63p134s1m73sfo23oaaup11d@hive.bjoern.hoehrmann.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <52nlj61hap63p134s1m73sfo23oaaup11d@hive.bjoern.hoehrmann.de>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs OPTIONS vs new method)
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: Sat, 22 Jan 2011 14:21:33 -0000

On Sat, Jan 22, 2011 at 02:50:54PM +0100, Bjoern Hoehrmann wrote:
> * Willy Tarreau wrote:
> >On Sat, Jan 22, 2011 at 01:56:10PM +0100, Bjoern Hoehrmann wrote:
> >> * Willy Tarreau wrote:
> >> >For the first point, OPTIONS and WEBSOCKET are equivalent, that's why I
> >> >compared that to GET. I'm not sure what arguments you need for the other
> >> >points though.
> >> 
> >> You said, for instance, that OPTIONS helps making sure intermediaries
> >> will not cache the response. Why can't we make WEBSOCKET ensure that
> >> just as much? I can see that OPTIONS is defined as non-cacheable and
> >> that WEBSOCKET has yet to be defined, but beyond that I don't see
> >> much difference.
> >
> >That's what I said above too. For that point, OPTIONS and WEBSOCKET are
> >equivalent.
> 
> We seem to be talking past each other. I agree with you that there are
> certain setups where using WEBSOCKET would make things more difficult
> compared to using OPTIONS due to different types of necessary software
> changes, including no necessary software changes with OPTIONS. Are
> there other significant points in the comparison between OPTIONS and
> WEBSOCKET? I am not sure whether you are saying among the four points
> you listed, the first three don't make much of a difference with these
> two methods specifically.

Indeed, the 3 first points are somewhat equivalent between OPTIONS and
any unknown method. The 3rd one already corresponds to OPTIONS however,
so it's probably not worth reimplementing it with another method.

Regards,
Willy


From jmason@rim.com  Sat Jan 22 08:28:37 2011
Return-Path: <jmason@rim.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 9A62B3A6977 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 08:28:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.398
X-Spam-Level: 
X-Spam-Status: No, score=-5.398 tagged_above=-999 required=5 tests=[AWL=-0.195, BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_MED=-4]
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 KLlm08EdEUjl for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 08:28:36 -0800 (PST)
Received: from mhs03ykf.rim.net (mhs03ykf.rim.net [216.9.243.80]) by core3.amsl.com (Postfix) with ESMTP id 72D7F3A6965 for <hybi@ietf.org>; Sat, 22 Jan 2011 08:28:36 -0800 (PST)
X-AuditID: 0a401fcb-b7ba1ae000000a54-3e-4d3b065c6534
Received: from XHT105CNC.rim.net ( [10.65.12.216]) by mhs03ykf.rim.net (RIM Mail) with SMTP id 8C.25.02644.C560B3D4; Sat, 22 Jan 2011 11:31:25 -0500 (EST)
Received: from XCH117CNC.rim.net ([fe80::b8df:541f:9d85:9909]) by XHT105CNC.rim.net ([fe80::24dd:699b:a19e:2bcc%11]) with mapi; Sat, 22 Jan 2011 11:31:25 -0500
From: Joe Mason <jmason@rim.com>
To: "'w@1wt.eu'" <w@1wt.eu>
Date: Sat, 22 Jan 2011 11:31:23 -0500
Thread-Topic: [hybi] straw-poll on GET vs OPTIONS vs new method
Thread-Index: Acu6HujZjwTcJQJgT2GNJt0TDjdPlQAMuXbj
Message-ID: <BB31C4AB95A70042A256109D461991260535C346@XCH117CNC.rim.net>
In-Reply-To: <20110122102650.GE12837@1wt.eu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="iso-8859-1"
content-transfer-encoding: quoted-printable
MIME-Version: 1.0
X-Brightmail-Tracker: AAAAAgAAAZEXM1pC
Cc: "'Joe.Hildebrand@webex.com'" <Joe.Hildebrand@webex.com>, "'hybi@ietf.org'" <hybi@ietf.org>, "'sm+ietf@elandsys.com'" <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sat, 22 Jan 2011 16:28:37 -0000

That's a good reason to avoid it, and points out a general drawback to allow=
ing any method: some of them have non-obvious semantics.

I change my vote to requiring one specific method. OPTIONS is my first choic=
e but I can see the benefits in clarity of WEBSOCKET.

Joe

----- Original Message -----
From: Willy Tarreau [mailto:w@1wt.eu]
Sent: Saturday, January 22, 2011 05:26 AM=0A=
To: Joe Mason
Cc: Dave Cridland <dave@cridland.net>; Salvatore Loreto <salvatore.loreto@er=
icsson.com>; Joe Hildebrand <Joe.Hildebrand@webex.com>; SM <sm+ietf@elandsys=
.com>; Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method

On Fri, Jan 21, 2011 at 09:16:17AM -0500, Joe Mason wrote:
> > -----Original Message-----
> > From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
> > Dave Cridland
> >
> > So for many requests, a GET or an OPTIONS seems fine, and for others
> > a POST might be more suitable - especially if, for instance, the
> > request might be fulfilled by BOSH if a WebSocket upgrade fails.
> 
> Using POST to fallback seems like a useful technique to me.  If possible I=
'd like to support it.  However, if there are reasons to restrict to one oth=
er method, this shouldn't take precedence.
> 
> I'd suggest the spec allow any method but recommend use of OPTIONS unless=
 the script wants to take advantage of a specific feature of another method=
 (and use POST to fallback to BOSH as an example of such a feature).

We should avoid mixing POST with any request that's expected to return
a 101 response. Some intermediaries just forward the request with an
"Expect: 100-continue" header, waiting for the server to return 100
and only then they forward the data, waiting for a response.

This can cause some "HTTP/1.1 100 Continue" responses to appear on the
response path where the client would only expect a 101. It could also
confuse those intermediaries if the WS server immediately responds 101
disregarding the Expect header. The intermediary might also very well
consider the 101 as a 1xx response validating the Expect then wait for
any additional data to be sent as the final response.

There is a number of undesirable situations this can cause and I think
we'd prefer to stay away from those.

Regards,
Willy


---------------------------------------------------------------------=0A=
This transmission (including any attachments) may contain confidential infor=
mation, privileged material (including material protected by the solicitor-c=
lient or other applicable privileges), or constitute non-public information.=
 Any use of this information by anyone other than the intended recipient is=
 prohibited. If you have received this transmission in error, please immedia=
tely reply to the sender and delete this information from your system. Use,=
 dissemination, distribution, or reproduction of this transmission by uninte=
nded recipients is not authorized and may be unlawful.

From emmanuel.buu@free.fr  Sat Jan 22 09:08:10 2011
Return-Path: <emmanuel.buu@free.fr>
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 826FE3A6974 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 09:08:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.606
X-Spam-Level: 
X-Spam-Status: No, score=-0.606 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_FR=0.35, RCVD_IN_NJABL_PROXY=1.643]
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 lTvuM2GgY3rH for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 09:08:09 -0800 (PST)
Received: from smtp2.ives.fr (smtp2.ives.fr [87.98.144.159]) by core3.amsl.com (Postfix) with ESMTP id 575403A697F for <hybi@ietf.org>; Sat, 22 Jan 2011 09:08:09 -0800 (PST)
Received: from smtp.ives.fr (LMontsouris-152-61-32-90.w80-13.abo.wanadoo.fr [80.13.159.90]) by smtp2.ives.fr (Postfix) with ESMTP id 77E952BEC433 for <hybi@ietf.org>; Sat, 22 Jan 2011 18:10:57 +0100 (CET)
Received: by smtp.ives.fr (Postfix, from userid 502) id 33DC2261226; Sat, 22 Jan 2011 18:10:57 +0100 (CET)
Received: from petit-manu.local (unknown [172.19.1.14]) (Authenticated sender: emmanuel.buu) by smtp.ives.fr (Postfix) with ESMTP id E4DBB26123C for <hybi@ietf.org>; Sat, 22 Jan 2011 18:10:52 +0100 (CET)
Message-ID: <4D3B0F9B.4080602@free.fr>
Date: Sat, 22 Jan 2011 18:10:51 +0100
From: Emmanuel BUU <emmanuel.buu@free.fr>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2
MIME-Version: 1.0
To: hybi@ietf.org
References: <4D394B51.2060105@ericsson.com>	<e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de>	<20110122102058.GD12837@1wt.eu>	<k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de>	<20110122115045.GG12837@1wt.eu>	<ljhlj6tuk3pumlk2f8idasah77fu2teor0@hive.bjoern.hoehrmann.de> <20110122131155.GK12837@1wt.eu>
In-Reply-To: <20110122131155.GK12837@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Subject: [hybi] Naive questions about WebSocket design
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: Sat, 22 Jan 2011 17:08:10 -0000

  Hello everybody,

I am studying WebSocket as part of a research project. I subscribed 
recenctly to the mailing list and did not have the occasion to follow 
all the standard devepment. I have a couple of questions:

1/ Is WebSocket is a message oriented protocol or a stream oriented 
protocol.

2/ Authentication: is there a standard way for a WebSocket client to 
authenticate against a WebSocket server?

3/ WebSocket may be seen as a replacement for the use of Flash remoting, 
shared objects and RTMP (and RTPMT protocol) for HTML5. What are the 
possible comparison between the two worlds?

4/ What lead to the decision to build a simple "transport" protocol vs 
to provide higher level primitives such  remote procedure call and event 
notification?

Emmanuel BUU
IVèS
http://www.ives.fr/

From ietf@adambarth.com  Sat Jan 22 11:22:07 2011
Return-Path: <ietf@adambarth.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 887A93A69F7 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 11:22:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.762
X-Spam-Level: 
X-Spam-Status: No, score=-3.762 tagged_above=-999 required=5 tests=[AWL=-0.785, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 WPTyeeuwXMBT for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 11:22:06 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 9EB483A69F8 for <hybi@ietf.org>; Sat, 22 Jan 2011 11:22:06 -0800 (PST)
Received: by yxt33 with SMTP id 33so997619yxt.31 for <hybi@ietf.org>; Sat, 22 Jan 2011 11:24:55 -0800 (PST)
Received: by 10.90.25.13 with SMTP id 13mr2690887agy.33.1295724295202; Sat, 22 Jan 2011 11:24:55 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id t23sm13388245ano.6.2011.01.22.11.24.52 (version=SSLv3 cipher=RC4-MD5); Sat, 22 Jan 2011 11:24:53 -0800 (PST)
Received: by iwn40 with SMTP id 40so3033884iwn.31 for <hybi@ietf.org>; Sat, 22 Jan 2011 11:24:51 -0800 (PST)
Received: by 10.231.147.149 with SMTP id l21mr2489915ibv.152.1295724291817; Sat, 22 Jan 2011 11:24:51 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.38.5 with HTTP; Sat, 22 Jan 2011 11:24:20 -0800 (PST)
In-Reply-To: <4D3B0F9B.4080602@free.fr>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <ljhlj6tuk3pumlk2f8idasah77fu2teor0@hive.bjoern.hoehrmann.de> <20110122131155.GK12837@1wt.eu> <4D3B0F9B.4080602@free.fr>
From: Adam Barth <ietf@adambarth.com>
Date: Sat, 22 Jan 2011 11:24:20 -0800
Message-ID: <AANLkTim_-jL-J1DAbLqEpeVfF=OCatO2Q1seJTv8dU21@mail.gmail.com>
To: Emmanuel BUU <emmanuel.buu@free.fr>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Naive questions about WebSocket design
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: Sat, 22 Jan 2011 19:22:07 -0000

On Sat, Jan 22, 2011 at 9:10 AM, Emmanuel BUU <emmanuel.buu@free.fr> wrote:
> =A0Hello everybody,
>
> I am studying WebSocket as part of a research project. I subscribed
> recenctly to the mailing list and did not have the occasion to follow all
> the standard devepment. I have a couple of questions:
>
> 1/ Is WebSocket is a message oriented protocol or a stream oriented
> protocol.

Message.

> 2/ Authentication: is there a standard way for a WebSocket client to
> authenticate against a WebSocket server?

Nope.

> 3/ WebSocket may be seen as a replacement for the use of Flash remoting,
> shared objects and RTMP (and RTPMT protocol) for HTML5. What are the
> possible comparison between the two worlds?

Not sure.

> 4/ What lead to the decision to build a simple "transport" protocol vs to
> provide higher level primitives such =A0remote procedure call and event
> notification?

You can build the a high performance version of the later with the
former but not the reverse.  We're in the business of providing
simple, hard-working primitives that authors can use to create new,
innovative applications.  The more genearl a tool we provide, the
better off the ecosystem is.

Adam

From senthilkumar.peelikkampatti@gmail.com  Sat Jan 22 13:54:28 2011
Return-Path: <senthilkumar.peelikkampatti@gmail.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 A180D3A6A93 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 13:54:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.159
X-Spam-Level: 
X-Spam-Status: No, score=-3.159 tagged_above=-999 required=5 tests=[AWL=0.440,  BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 FQWX5brOPrQm for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 13:54:27 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 402403A6A92 for <hybi@ietf.org>; Sat, 22 Jan 2011 13:54:26 -0800 (PST)
Received: by wwa36 with SMTP id 36so3643520wwa.13 for <hybi@ietf.org>; Sat, 22 Jan 2011 13:57:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=K9ciMKJ5zrAZGooHUs+KHGdpPk2Y1Ek8GAhi2eDEWX4=; b=litf/lO9RRY+81lX8bIZTK+oD55ziirInl0g/3vWQSchG8kFQ9Gv/bj7LsOpMK3kty E96RZ7qaKkpXZVko9M0Kg50Zwyn42OQFulLNhBtgAH/+lueBH1NVrk7DZ/YR6VeLymf8 A/Rwn1ZA91tZ7UHmFH20se416ZIYebGbVDhCM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=S3NbhABMt41hWzt0vgbb1H8DNolaTXFMjxtIQEeYqV9gtT0XOpU7jReyteK8yV69lG NDhjPIm4qicgOrA6ZJUbWjNN/5EqQrtf+ktNuVBdptRLbfe7PEd/9wVRwJ3NLr5S+mg2 4mqqsUCnwBTFABnYOhQ33I21qANQf4/aieOhk=
MIME-Version: 1.0
Received: by 10.227.182.68 with SMTP id cb4mr2475191wbb.218.1295733435685; Sat, 22 Jan 2011 13:57:15 -0800 (PST)
Received: by 10.227.151.133 with HTTP; Sat, 22 Jan 2011 13:57:15 -0800 (PST)
In-Reply-To: <20110122142417.GL12837@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <ljhlj6tuk3pumlk2f8idasah77fu2teor0@hive.bjoern.hoehrmann.de> <20110122131155.GK12837@1wt.eu> <52nlj61hap63p134s1m73sfo23oaaup11d@hive.bjoern.hoehrmann.de> <20110122142417.GL12837@1wt.eu>
Date: Sat, 22 Jan 2011 15:57:15 -0600
Message-ID: <AANLkTikhPMh0OhBROCqdAKD6amCyBgYb10Z+X8YWJyGM@mail.gmail.com>
From: Senthilkumar Peelikkampatti <senthilkumar.peelikkampatti@gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: multipart/alternative; boundary=20cf30025df4285bb5049a767318
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs OPTIONS vs new method)
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: Sat, 22 Jan 2011 21:54:28 -0000

--20cf30025df4285bb5049a767318
Content-Type: text/plain; charset=ISO-8859-1

I am thinking of another issue with new method (WEBSOCKET), it needs to be
defined and added to http spec, it crosses different boundary.

On Sat, Jan 22, 2011 at 8:24 AM, Willy Tarreau <w@1wt.eu> wrote:

> On Sat, Jan 22, 2011 at 02:50:54PM +0100, Bjoern Hoehrmann wrote:
> > * Willy Tarreau wrote:
> > >On Sat, Jan 22, 2011 at 01:56:10PM +0100, Bjoern Hoehrmann wrote:
> > >> * Willy Tarreau wrote:
> > >> >For the first point, OPTIONS and WEBSOCKET are equivalent, that's why
> I
> > >> >compared that to GET. I'm not sure what arguments you need for the
> other
> > >> >points though.
> > >>
> > >> You said, for instance, that OPTIONS helps making sure intermediaries
> > >> will not cache the response. Why can't we make WEBSOCKET ensure that
> > >> just as much? I can see that OPTIONS is defined as non-cacheable and
> > >> that WEBSOCKET has yet to be defined, but beyond that I don't see
> > >> much difference.
> > >
> > >That's what I said above too. For that point, OPTIONS and WEBSOCKET are
> > >equivalent.
> >
> > We seem to be talking past each other. I agree with you that there are
> > certain setups where using WEBSOCKET would make things more difficult
> > compared to using OPTIONS due to different types of necessary software
> > changes, including no necessary software changes with OPTIONS. Are
> > there other significant points in the comparison between OPTIONS and
> > WEBSOCKET? I am not sure whether you are saying among the four points
> > you listed, the first three don't make much of a difference with these
> > two methods specifically.
>
> Indeed, the 3 first points are somewhat equivalent between OPTIONS and
> any unknown method. The 3rd one already corresponds to OPTIONS however,
> so it's probably not worth reimplementing it with another method.
>
> Regards,
> Willy
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>



-- 
Regards,
Senthilkumar Peelikkampatti,
http://pmsenthilkumar.blogspot.com/

--20cf30025df4285bb5049a767318
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I am thinking of another issue with new method (WEBSOCKET), it needs to be =
defined and added to http spec, it crosses different boundary.=A0<br><br><d=
iv class=3D"gmail_quote">On Sat, Jan 22, 2011 at 8:24 AM, Willy Tarreau <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:w@1wt.eu">w@1wt.eu</a>&gt;</span> wrot=
e:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div class=3D"im">On Sat, Jan 22, 2011 at 0=
2:50:54PM +0100, Bjoern Hoehrmann wrote:<br>
&gt; * Willy Tarreau wrote:<br>
&gt; &gt;On Sat, Jan 22, 2011 at 01:56:10PM +0100, Bjoern Hoehrmann wrote:<=
br>
&gt; &gt;&gt; * Willy Tarreau wrote:<br>
&gt; &gt;&gt; &gt;For the first point, OPTIONS and WEBSOCKET are equivalent=
, that&#39;s why I<br>
&gt; &gt;&gt; &gt;compared that to GET. I&#39;m not sure what arguments you=
 need for the other<br>
&gt; &gt;&gt; &gt;points though.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; You said, for instance, that OPTIONS helps making sure interm=
ediaries<br>
&gt; &gt;&gt; will not cache the response. Why can&#39;t we make WEBSOCKET =
ensure that<br>
&gt; &gt;&gt; just as much? I can see that OPTIONS is defined as non-cachea=
ble and<br>
&gt; &gt;&gt; that WEBSOCKET has yet to be defined, but beyond that I don&#=
39;t see<br>
&gt; &gt;&gt; much difference.<br>
&gt; &gt;<br>
&gt; &gt;That&#39;s what I said above too. For that point, OPTIONS and WEBS=
OCKET are<br>
&gt; &gt;equivalent.<br>
&gt;<br>
&gt; We seem to be talking past each other. I agree with you that there are=
<br>
&gt; certain setups where using WEBSOCKET would make things more difficult<=
br>
&gt; compared to using OPTIONS due to different types of necessary software=
<br>
&gt; changes, including no necessary software changes with OPTIONS. Are<br>
&gt; there other significant points in the comparison between OPTIONS and<b=
r>
&gt; WEBSOCKET? I am not sure whether you are saying among the four points<=
br>
&gt; you listed, the first three don&#39;t make much of a difference with t=
hese<br>
&gt; two methods specifically.<br>
<br>
</div>Indeed, the 3 first points are somewhat equivalent between OPTIONS an=
d<br>
any unknown method. The 3rd one already corresponds to OPTIONS however,<br>
so it&#39;s probably not worth reimplementing it with another method.<br>
<br>
Regards,<br>
<font color=3D"#888888">Willy<br>
</font><div><div></div><div class=3D"h5"><br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br>Regards,<br=
>Senthilkumar Peelikkampatti,<br><a href=3D"http://pmsenthilkumar.blogspot.=
com/">http://pmsenthilkumar.blogspot.com/</a><br><br>

--20cf30025df4285bb5049a767318--

From fielding@gbiv.com  Sat Jan 22 14:17:49 2011
Return-Path: <fielding@gbiv.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 2BEAD3A6B52 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 14:17:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.062
X-Spam-Level: 
X-Spam-Status: No, score=-103.062 tagged_above=-999 required=5 tests=[AWL=-0.462, BAYES_00=-2.599, 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 5DScQoJhtzB7 for <hybi@core3.amsl.com>; Sat, 22 Jan 2011 14:17:48 -0800 (PST)
Received: from homiemail-a32.g.dreamhost.com (caiajhbdcbhh.dreamhost.com [208.97.132.177]) by core3.amsl.com (Postfix) with ESMTP id 1E99C3A6B4F for <hybi@ietf.org>; Sat, 22 Jan 2011 14:17:48 -0800 (PST)
Received: from homiemail-a32.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a32.g.dreamhost.com (Postfix) with ESMTP id 0D2C4584058; Sat, 22 Jan 2011 14:20:38 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gbiv.com; h=subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to; q=dns; s=gbiv.com; b=uw/jCzgYvXrf2Jjt PHu4h0zxMpcoc9ukMRtSkUq6ZD1L/P90f94E9ieCxPAb9w3OmOdXnCM4xD/qWiq/ UUU1z8nycf8pAInTR6fbKShzIFCt6NAurEPu04c5f1OcHJpiQxsE66OBwk5/J3Vh 5tL8Qew0Bdk8leABxXQK8Xel5QU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gbiv.com; h=subject :mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=gbiv.com; bh=zBBPU6pO5k92tAA2tIsN841qPxc=; b=VVb25tw85UN9LqCtjTMwjNCWPxJY a/YtgttkIksturFRgB5rbuaGKQK1KjDLPzcHh2Ojvb2k2crP9PFs9R0327uyIXj1 jKVDSsiYnyWIIYlbJJpMoKQ8u+/9UcEGaafZ6aqeFS9yKY7BOhmiyERhNrZdE6ca 1wp08dbN5RNfQc8=
Received: from [192.168.1.84] (99-21-208-82.lightspeed.irvnca.sbcglobal.net [99.21.208.82]) (Authenticated sender: fielding@gbiv.com) by homiemail-a32.g.dreamhost.com (Postfix) with ESMTPA id E2857584057;  Sat, 22 Jan 2011 14:20:37 -0800 (PST)
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset=us-ascii
From: "Roy T. Fielding" <fielding@gbiv.com>
In-Reply-To: <AANLkTikhPMh0OhBROCqdAKD6amCyBgYb10Z+X8YWJyGM@mail.gmail.com>
Date: Sat, 22 Jan 2011 14:20:44 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <D1709B19-7C4E-4496-8E8B-61EF7911654A@gbiv.com>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <ljhlj6tuk3pumlk2f8idasah77fu2teor0@hive.bjoern.hoehrmann.de> <20110122131155.GK12837@1wt.eu> <52nlj61hap63p134s1m73sfo23oaaup11d@hive.bjoern.hoehrmann.de> <20110122142417.GL12837@1wt.eu> <AANLkTikhPMh0OhBROCqdAKD6amCyBgYb10Z+X8YWJyGM@mail.gmail.com>
To: Senthilkumar Peelikkampatti <senthilkumar.peelikkampatti@gmail.com>
X-Mailer: Apple Mail (2.1082)
Cc: Hybi HTTP <hybi@ietf.org>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs OPTIONS vs new method)
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: Sat, 22 Jan 2011 22:17:49 -0000

On Jan 22, 2011, at 1:57 PM, Senthilkumar Peelikkampatti wrote:

> I am thinking of another issue with new method (WEBSOCKET), it needs =
to be defined and added to http spec, it crosses different boundary.=20

HTTP methods are extensible -- any document can define a new one.

HTTP methods do not evolve -- no document can change an already
defined method's meaning once that meaning is deployed on the Internet,
since we have no means of updating the already deployed servers.

We can, however, optionally tweak the meaning of methods via request
header fields like If-Modified-Since, but only when the tweak remains
inside the scope of the original method definition (i.e., nothing
breaks if any intermediary or the origin server do not understand
the tweak).

....Roy


From ibc@aliax.net  Sun Jan 23 06:06:44 2011
Return-Path: <ibc@aliax.net>
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 037B63A68E9 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 06:06:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.216
X-Spam-Level: 
X-Spam-Status: No, score=-2.216 tagged_above=-999 required=5 tests=[AWL=0.461,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 PYA1OUU+oNnW for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 06:06:43 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 1F4053A68E7 for <hybi@ietf.org>; Sun, 23 Jan 2011 06:06:42 -0800 (PST)
Received: by qyj19 with SMTP id 19so3323624qyj.10 for <hybi@ietf.org>; Sun, 23 Jan 2011 06:09:34 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.249.203 with SMTP id ml11mr2742185qcb.199.1295791773161; Sun, 23 Jan 2011 06:09:33 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Sun, 23 Jan 2011 06:09:33 -0800 (PST)
Date: Sun, 23 Jan 2011 15:09:33 +0100
Message-ID: <AANLkTimd17qAWjPKXuM4MBAy79jc+d7y3NaJz0VYi0ZM@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: hybi@ietf.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Mailman-Approved-At: Sun, 23 Jan 2011 08:45:39 -0800
Subject: [hybi] draft-ietf-hybi-thewebsocketprotocol-04: The example in section 1.2 is wrong
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: Sun, 23 Jan 2011 14:06:44 -0000

Hi, WebSocket handshake given as example in section 1.2 of
draft-ietf-hybi-thewebsocketprotocol-04 has a wrong
Sec-WebSocket-Accept value in the 101 response:

   The handshake from the client looks as follows:

        GET /chat HTTP/1.1
        Host: server.example.com
        Upgrade: websocket
        Connection: Upgrade
        Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ=3D=3D
        Sec-WebSocket-Origin: http://example.com
        Sec-WebSocket-Protocol: chat, superchat
        Sec-WebSocket-Version: 4

   The handshake from the server looks as follows:

        HTTP/1.1 101 Switching Protocols
        Upgrade: websocket
        Connection: Upgrade
        Sec-WebSocket-Accept: me89jWimTRKTWwrS3aRrL53YZSo=3D
        Sec-WebSocket-Nonce: AQIDBAUGBwgJCgsMDQ4PEC=3D=3D
        Sec-WebSocket-Protocol: chat


Sec-WebSocket-Accept value should be "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=3D".
Note that such value is also computed in point 3 of section 5.2.2
"Sending the server's opening handshake".

Regards.


--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From ibc@aliax.net  Sun Jan 23 11:15:32 2011
Return-Path: <ibc@aliax.net>
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 7F2F53A6941 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:15:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.23
X-Spam-Level: 
X-Spam-Status: No, score=-2.23 tagged_above=-999 required=5 tests=[AWL=0.447,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 jOd-n3lb58EB for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:15:31 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id A6F7E3A6940 for <hybi@ietf.org>; Sun, 23 Jan 2011 11:15:31 -0800 (PST)
Received: by qyk34 with SMTP id 34so2156951qyk.10 for <hybi@ietf.org>; Sun, 23 Jan 2011 11:18:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.249.203 with SMTP id ml11mr2999886qcb.199.1295810303781; Sun, 23 Jan 2011 11:18:23 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Sun, 23 Jan 2011 11:18:23 -0800 (PST)
In-Reply-To: <AANLkTimd17qAWjPKXuM4MBAy79jc+d7y3NaJz0VYi0ZM@mail.gmail.com>
References: <AANLkTimd17qAWjPKXuM4MBAy79jc+d7y3NaJz0VYi0ZM@mail.gmail.com>
Date: Sun, 23 Jan 2011 20:18:23 +0100
Message-ID: <AANLkTiks9L8qTd3z9gSv1VzR_ddV8s7PqETpq9dXiEVL@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: hybi@ietf.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: [hybi] draft-ietf-hybi-thewebsocketprotocol-04: The example in section 1.2 is wrong
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: Sun, 23 Jan 2011 19:15:32 -0000

Hi, WebSocket handshake given as example in section 1.2 of
draft-ietf-hybi-thewebsocketprotocol-04 has a wrong
Sec-WebSocket-Accept value in the 101 response:

=C2=A0 The handshake from the client looks as follows:

=C2=A0 =C2=A0 =C2=A0 =C2=A0GET /chat HTTP/1.1
=C2=A0 =C2=A0 =C2=A0 =C2=A0Host: server.example.com
=C2=A0 =C2=A0 =C2=A0 =C2=A0Upgrade: websocket
=C2=A0 =C2=A0 =C2=A0 =C2=A0Connection: Upgrade
=C2=A0 =C2=A0 =C2=A0 =C2=A0Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ=3D=3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0Sec-WebSocket-Origin: http://example.com
=C2=A0 =C2=A0 =C2=A0 =C2=A0Sec-WebSocket-Protocol: chat, superchat
=C2=A0 =C2=A0 =C2=A0 =C2=A0Sec-WebSocket-Version: 4

=C2=A0 The handshake from the server looks as follows:

=C2=A0 =C2=A0 =C2=A0 =C2=A0HTTP/1.1 101 Switching Protocols
=C2=A0 =C2=A0 =C2=A0 =C2=A0Upgrade: websocket
=C2=A0 =C2=A0 =C2=A0 =C2=A0Connection: Upgrade
=C2=A0 =C2=A0 =C2=A0 =C2=A0Sec-WebSocket-Accept: me89jWimTRKTWwrS3aRrL53YZS=
o=3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0Sec-WebSocket-Nonce: AQIDBAUGBwgJCgsMDQ4PEC=3D=
=3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0Sec-WebSocket-Protocol: chat


Sec-WebSocket-Accept value should be "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=3D".
Note that such value is also computed in point 3 of section 5.2.2
"Sending the server's opening handshake".

Regards.


--
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From jat@google.com  Sun Jan 23 11:19:53 2011
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 122613A6947 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:19:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.258
X-Spam-Level: 
X-Spam-Status: No, score=-105.258 tagged_above=-999 required=5 tests=[AWL=0.719, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, 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 fCv+HEERFW-7 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:19:52 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 0A7353A6930 for <hybi@ietf.org>; Sun, 23 Jan 2011 11:19:51 -0800 (PST)
Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id p0NJMigx002410 for <hybi@ietf.org>; Sun, 23 Jan 2011 11:22:44 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295810564; bh=Wq5C6eoh1vbsbJgCUGlFu9+LSZE=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Content-Type:Content-Transfer-Encoding; b=SUUkMBX96CWZkysCzlD3g1i7mgOrEMY0Cvc/WKpLGocfnxCIQrBhyW2bARXI4nz2A +pyU3XF0EmPedb/u0P9jw==
Received: from yxd30 (yxd30.prod.google.com [10.190.1.222]) by wpaz1.hot.corp.google.com with ESMTP id p0NJMgXe005718 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Sun, 23 Jan 2011 11:22:43 -0800
Received: by yxd30 with SMTP id 30so685551yxd.36 for <hybi@ietf.org>; Sun, 23 Jan 2011 11:22:42 -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:content-type:content-transfer-encoding; bh=puDFS3NEjPhgfqhw+RUTe6sssg6O0d52VdV3IB/dUf4=; b=t4tIbjDV9s1nm4OG9mVeEWgKOZeDAPKE8ItJHWsHMfon5BoVejcqB+a5S9FKOeqZQl i3FlaObm34AIOruDqOxw==
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 :content-type:content-transfer-encoding; b=pHTY0W/6Cr8XKiMU6MUzrqkrodhSlmusnWyg7rsCmDPKlP7XX3AXbXCzpKM5FYm5y+ m+UBuhs4YAg29FC7tcEg==
Received: by 10.150.217.15 with SMTP id p15mr3423174ybg.206.1295810562704; Sun, 23 Jan 2011 11:22:42 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Sun, 23 Jan 2011 11:22:22 -0800 (PST)
In-Reply-To: <20101212224437.GT22787@shareable.org>
References: <AANLkTikLQgGnvjRtMBMiwfdaOYcjwZqnnZ3PnRBEkVd2@mail.gmail.com> <AANLkTimRO=G90pO6nFjpc+z4K4Z3AOwP8O4Z78G7bYuu@mail.gmail.com> <2850.1289253214.101081@puncture> <AANLkTi=8cMckgtEbDatMbf4dnvtVo0c8hnU+HTGTYfqj@mail.gmail.com> <20101212224437.GT22787@shareable.org>
From: John Tamplin <jat@google.com>
Date: Sun, 23 Jan 2011 14:22:22 -0500
Message-ID: <AANLkTikAuxP7eWU0wyYrZYwHLKSN0OXwsq7u=ingwCoa@mail.gmail.com>
To: Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Subject: Re: [hybi] header for negotiating extensions
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: Sun, 23 Jan 2011 19:19:53 -0000

I brought this up before and there seemed to be general agreement, but
it never made its way into the draft, so I thought I would write up a
proposal of how the discussion ended up for defining the extension
header and parameters.

- In section 4.7, add a reference to section 8 to the sentence talking
about negotiating extensions during the handshake.


- In section 5.1, step #44, add an entry:

-> If the entry's name is "sec-websocket-extension":
Parse the value of the field as described in section 8.1 into a list
of extension tokens and a possibly empty set of parameters for each.
If any extension token was received which was not advertised by this
client during this handshake, the client MUST fail the connection and
abort these steps. =C2=A0Otherwise, process the accepted extensions and
their parameters as defined for each extension.


- In section 5.2.1, add an entry:

|Sec-WebSocket-Extension|
The value is a list of extensions offered by the client, with a
possibly empty set of parameters for each (see 8.1).


- In section 5.2.2, step #11, add:

|Sec-WebSocket-Extension|
The value is a list of accepted extensions and parameters for each
which the server understands and is willing to use on this connection
(see 8.1).  Extensions not listed by the client MUST NOT be included.
Note that the parameters do not have to be the same as sent by the
client; their meaning and how the returned value should be calculated
is defined by each extension.


- Renumber the existing section 8 to 8.2, and add section 8
"Extensions".   The intro for section 8 is:

WebSocket clients MAY request extensions to this specification,
and WebSocket servers MAY accept some or all extensions
requested by the client.  A server MUST NOT respond with any
extension not requested by the client, and any extension
parameters sent from the server MUST be chosen in accordance
with the specification defining that extension.


- Add section 8.1 "Sec-WebSocket-Extension Header"

A client requests extensions by including a "Sec-WebSocket-Extension"
header, which follows the normal rules for HTTP headers (see RFC2616
section 4.2) and the value of the header is defined by the following BNF:

extension-list =3D 1#extension
extension =3D extension-token *( ";" extension-param )
extension-token =3D registered-token | private-use-token
registered-token =3D token
private-use-token =3D "x-" token
extension-param =3D token [ "=3D" ( token | quoted-string ) ]

Note that like other HTTP headers, this header may be split or
combined across multiple lines.

That is,

=C2=A0=C2=A0Sec-WebSocket-Extension: foo
=C2=A0=C2=A0Sec-WebSocket-Extension: bar; baz=3D2

is exactly equivalent to

=C2=A0=C2=A0Sec-WebSocket-Extension: foo, bar; baz=3D2

Any extension-token used must either be a registered token
(registration TBD), or have a prefix of "x-" to indicate a private-use
token. =C2=A0The parameters supplied with any given extension MUST be
defined for that extension. =C2=A0Note that the client is only offering to
use any advertised extensions, and MUST NOT use them unless the server
accepts the extension.

Note that the order of extensions is not important - any interactions betwe=
en
multiple extensions MUST be defined in the documents defining the
extensions.

Non-normative examples of acceptable extension headers:
- Sec-WebSocket-Extension: deflate-stream
- Sec-WebSocket-Extension: mux; max-channels=3D4; flow-control, deflate-str=
eam
- Sec-WebSocket-Extension: x-private-extension

A server accepts one or more extensions by including a
Sec-WebSocket-Extension header containing one or more
extensions which were requested by the client.  For each such
extension, the parameters returned by the server (if any) are as
defined in the document specifying that extension (for example,
compressing before multiplexing or after).

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

From ibc@aliax.net  Sun Jan 23 11:25:39 2011
Return-Path: <ibc@aliax.net>
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 1DF743A6947 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:25:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.244
X-Spam-Level: 
X-Spam-Status: No, score=-2.244 tagged_above=-999 required=5 tests=[AWL=0.433,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 Tn1Kl1T6+-Jq for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:25:38 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 556413A6946 for <hybi@ietf.org>; Sun, 23 Jan 2011 11:25:38 -0800 (PST)
Received: by qwi2 with SMTP id 2so3539408qwi.31 for <hybi@ietf.org>; Sun, 23 Jan 2011 11:28:30 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.99.76 with SMTP id t12mr2972847qcn.275.1295810910596; Sun, 23 Jan 2011 11:28:30 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Sun, 23 Jan 2011 11:28:30 -0800 (PST)
Date: Sun, 23 Jan 2011 20:28:30 +0100
Message-ID: <AANLkTi=M+HoJei_5WHXfb9YZ=SvyFVqQ-xyHAORjKc1a@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: hybi@ietf.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: [hybi] draft-ietf-hybi-thewebsocketprotocol-04: Sec-WebSocket-Location header is missing
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: Sun, 23 Jan 2011 19:25:39 -0000

Hi, Sec-WebSocket-Location header is just mentioned in IANA section
(section 10.5). There it's written:

    The |Sec-WebSocket-Location| header is used in the WebSocket
    handshake.

However the rest of the draft doesn't mention such header at all. Is it cor=
rect?

Regards.


--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From jamie@shareable.org  Sun Jan 23 11:26:34 2011
Return-Path: <jamie@shareable.org>
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 1D0023A6946 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:26:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.682
X-Spam-Level: 
X-Spam-Status: No, score=-2.682 tagged_above=-999 required=5 tests=[AWL=-0.083, BAYES_00=-2.599]
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 lzl7FC+hgJF3 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:26:33 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 2558E3A6953 for <hybi@ietf.org>; Sun, 23 Jan 2011 11:26:33 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Ph5cm-0003mp-9R; Sun, 23 Jan 2011 19:29:20 +0000
Date: Sun, 23 Jan 2011 19:29:20 +0000
From: Jamie Lokier <jamie@shareable.org>
To: "Alakkad, Achuth (GE Healthcare)" <Achuth.Alakkad@ge.com>
Message-ID: <20110123192920.GC13494@shareable.org>
References: <4D2E0863.2040804@ericsson.com> <AANLkTimgc2294ZaknsfTj7mUvSbBe-zRP+wRT6PxGAP2@mail.gmail.com> <4590EC7E9324CF43A2B37F81AFD63570089C4309@BANMLVEM07.e2k.ad.ge.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4590EC7E9324CF43A2B37F81AFD63570089C4309@BANMLVEM07.e2k.ad.ge.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, hybi@ietf.org
Subject: Re: [hybi] Straw-poll on Masking options
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: Sun, 23 Jan 2011 19:26:34 -0000

Alakkad, Achuth (GE Healthcare) wrote:
> 
>    If masking is a means for allowing the packet to pass through
>    intermediaries without any trouble, then I am not sure why we are
>    concerned about the data security.
>
>    If anyone is keen on content security he should use wss rather than
>    ws. Am not sure why we are concerned about which algorithm to use for
>    masking as its process intensive, rather will use a very simple
>    universal static mask to bypass intermediaries.

The discussion is talking about different kinds of security, using the
word "security" for all of them, which appears to have confused several people.

You are talking about the ability to sniff data, for which wss: is effective.

Other uses of "securiry" in this discussion are the ability to (a)
attack servers using scripts running in browsers, and (b) poison
intermediary caches using scripts running in browsers collaborating
with the attacker's server.  wss: doesn't help with those.

It's possible the type of masking makes a difference to attacks, but
there is no consensus about it.  There are no actual tests indicating
one clearly superior approach, but there are tests showing that
various attacks can be done, or in some cases are plausible but have
not been done.  The choice of algorithm to use is mostly theoretical,
but none of the theories is watertight.

-- Jamie

From jamie@shareable.org  Sun Jan 23 11:36:41 2011
Return-Path: <jamie@shareable.org>
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 0E2D03A6947 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:36:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.679
X-Spam-Level: 
X-Spam-Status: No, score=-2.679 tagged_above=-999 required=5 tests=[AWL=-0.080, BAYES_00=-2.599]
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 ZhUWMk3c2QtK for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:36:40 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 998BB3A6930 for <hybi@ietf.org>; Sun, 23 Jan 2011 11:36:39 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Ph5mc-0003oT-PL; Sun, 23 Jan 2011 19:39:30 +0000
Date: Sun, 23 Jan 2011 19:39:30 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Senthilkumar Peelikkampatti <senthilkumar.peelikkampatti@gmail.com>
Message-ID: <20110123193930.GD13494@shareable.org>
References: <4D2E0863.2040804@ericsson.com> <AANLkTimgc2294ZaknsfTj7mUvSbBe-zRP+wRT6PxGAP2@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTimgc2294ZaknsfTj7mUvSbBe-zRP+wRT6PxGAP2@mail.gmail.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Straw-poll on Masking options
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: Sun, 23 Jan 2011 19:36:41 -0000

Senthilkumar Peelikkampatti wrote:
> 
>    I prefer option 1, though I wish to have no masking, anyway it makes
>    better trade off for me.
>    Other than having WS and WSS, we can split WS into masked and unmasked
>    variant,
>    1) WSS for secured connection (wss://)
>    2) WSMASKED for masked  (wsmask://)
>    3) WS for  (ws://) no masking
>    When we move on to perfect defect free intermediaries we can stick to
>    WS, this gives the application developer  option to choose based on
>    what kind of intermediary they have.

The app developer doesn't know what kind of intermediaries there are.

>    When we talk to about Browser ----> Intermediary ------> http server
>    --------> Websocket server, architecture choice is with app developer
>    for everything but browser.

Senthilkumar, the above is incorrect.

The app developer does not control intermediaries on the client's own
machine (there are such products), on the client's network (e.g. their
cache and/or corporate/school filtering), at their ISP(s), and
government-level filter if there is one (great firewall of...)

-- Jamie

From jamie@shareable.org  Sun Jan 23 11:53:00 2011
Return-Path: <jamie@shareable.org>
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 A64D73A6946 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:53:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.677
X-Spam-Level: 
X-Spam-Status: No, score=-2.677 tagged_above=-999 required=5 tests=[AWL=-0.078, BAYES_00=-2.599]
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 uRYnKUyZaU8S for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 11:52:59 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 2258B3A6932 for <hybi@ietf.org>; Sun, 23 Jan 2011 11:52:59 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Ph62L-0003s7-OM; Sun, 23 Jan 2011 19:55:45 +0000
Date: Sun, 23 Jan 2011 19:55:45 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <w@1wt.eu>
Message-ID: <20110123195545.GE13494@shareable.org>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <4D3AD086.6040700@gmx.de> <20110122125948.GJ12837@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110122125948.GJ12837@1wt.eu>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Sun, 23 Jan 2011 19:53:00 -0000

Willy Tarreau wrote:
> On Sat, Jan 22, 2011 at 01:41:42PM +0100, Julian Reschke wrote:
> > On 22.01.2011 12:50, Willy Tarreau wrote:
> > >...
> > >As Julian said, it could be argued that the lack of support for unknown
> > >methods is a bug, but that's harder to use to make a vendor move, 
> > >especially
> > >when this method comes with a different use than other ones.
> > >...
> > 
> > We probably should clarify whether, when we say WEBSOCKET, we mean 
> > *just* the new method, or that new method + Upgrade.
> 
> I agree with your point. But having a new method without the Upgrade will
> definitely require upgrading *all* intermediaries, which is what we've been
> trying to avoid since the beginning by remaining HTTP-compliant.
> 
> > I think Roy mentioned once that just a new method, with both sides just 
> > sending using chunked encoding, might be good enough. However I believe 
> > this is less likely to work though intermediaries (due to the chunked 
> > request body).
> 
> This will also cause other new issues, mainly intermediaries which don't
> forward the response until all the request is sent, or inversely stop
> forwarding the request as soon as the server starts to respond. Also
> another issue with chunked encoding is that any intermediary is free to
> bufferize a complete request before forwarding it, possibly changing
> the chunking or even replacing it with a content-length. The variety
> of issues depending on implementations makes this solution look scary
> to me, to be honnest. Probably that if it worked well enough we wouldn't
> be trying to define a tunneling protocol to work over HTTP :-/
> One could also argue that the chunked encoding still adds bytes to the
> framing :-)

It could be sent with a large Content-Length (e.g. 2^31-1)
Content-Length.  That removes request chunking issues, but the other
concerns about buffering or stopping forwarding still apply.

But then again, neither WebSocket nor HTTP specify what kind of
buffering to expect with Upgrade, so unintended buffering could occur
with method+Upgrade too.

Has anyone done any actual tests with chunked requests, and/or
simultaneous streaming request+response?

I've done some tests like that with browsers and other clients, and
the behaviour was quite varied.  But I haven't had the occasion to do
those tests with intermediaries.

-- Jamie

From jamie@shareable.org  Sun Jan 23 12:12:31 2011
Return-Path: <jamie@shareable.org>
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 580E33A697C for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 12:12:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.375
X-Spam-Level: 
X-Spam-Status: No, score=-2.375 tagged_above=-999 required=5 tests=[AWL=-0.376, BAYES_00=-2.599, J_CHICKENPOX_47=0.6]
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 cj5ypLlNY7V9 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 12:12:30 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 6FA6E3A697A for <hybi@ietf.org>; Sun, 23 Jan 2011 12:12:30 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Ph6Kv-0003vb-1x; Sun, 23 Jan 2011 20:14:57 +0000
Date: Sun, 23 Jan 2011 20:14:57 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <w@1wt.eu>
Message-ID: <20110123201456.GF13494@shareable.org>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net> <20110122102650.GE12837@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110122102650.GE12837@1wt.eu>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sun, 23 Jan 2011 20:12:31 -0000

Willy Tarreau wrote:
> On Fri, Jan 21, 2011 at 09:16:17AM -0500, Joe Mason wrote:
> > > -----Original Message-----
> > > From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
> > > Dave Cridland
> > >
> > > So for many requests, a GET or an OPTIONS seems fine, and for others
> > > a POST might be more suitable - especially if, for instance, the
> > > request might be fulfilled by BOSH if a WebSocket upgrade fails.
> > 
> > Using POST to fallback seems like a useful technique to me.  If possible I'd like to support it.  However, if there are reasons to restrict to one other method, this shouldn't take precedence.
> > 
> > I'd suggest the spec allow any method but recommend use of OPTIONS unless the script wants to take advantage of a specific feature of another method (and use POST to fallback to BOSH as an example of such a feature).
> 
> We should avoid mixing POST with any request that's expected to return
> a 101 response. Some intermediaries just forward the request with an
> "Expect: 100-continue" header, waiting for the server to return 100
> and only then they forward the data, waiting for a response.
> 
> This can cause some "HTTP/1.1 100 Continue" responses to appear on the
> response path where the client would only expect a 101.

That should not be visible at the client.  If the intermediary
generates Expect: 100-continue itself, it should be prepared to absorb
the first 100 response; it is wrong to forward it.  If it's generating
it because the client sent Expect: 100-continue, then the client will
see it but that is correct.

In the case of POST+Upgrade, a client may actually choose to send
Expect: 100-continue, if it wants the semantics associated with that.
That's fine, there's nothing wrong with that; it's a client choice.

Do you know of buggy intermediaries which generate Expect: 100-continue
(when the client hasn't sent it), and then forward the 100 response
back to the client even though the client hasn't sent the Expect header?

We could always add another variable to the mix: Expect: 101-websocket
:-) (Except we know that intermediadiaries/servers don't all implement
the mandatory HTTP spec about unrecognised expectations :-/)

> It could also confuse those intermediaries if the WS server
> immediately responds 101 disregarding the Expect header. The
> intermediary might also very well consider the 101 as a 1xx response
> validating the Expect then wait for any additional data to be sent
> as the final response.

I agree, that might be a problem.

The WS server should probably send 100 first in this scenario.  It
could be specified or recommended that way.

Bearing that in mind, do you know if it's a problem with any
intermediary (that you know of), after the intermediary has received
100, that it'll misinterpret or fail to forward the _subsequent_ 101?

In which case, do you think such intermediaries will forward 101
fine in the first place, with non-POST requests and no 100?

What about intermediaries which send Expect: 100-continue when
forwarding *any* request that has a body (perfectly reasonable)?

-- Jamie

From jamie@shareable.org  Sun Jan 23 12:19:53 2011
Return-Path: <jamie@shareable.org>
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 92B273A6971 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 12:19:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.663
X-Spam-Level: 
X-Spam-Status: No, score=-2.663 tagged_above=-999 required=5 tests=[AWL=-0.064, BAYES_00=-2.599]
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 Xne0PfPfmIKS for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 12:19:52 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 86D883A697A for <hybi@ietf.org>; Sun, 23 Jan 2011 12:19:52 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Ph6SJ-0003wa-59; Sun, 23 Jan 2011 20:22:35 +0000
Date: Sun, 23 Jan 2011 20:22:35 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Patrick McManus <mcmanus@ducksong.com>
Message-ID: <20110123202235.GG13494@shareable.org>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net> <1295625578.2383.10.camel@ds9.ducksong.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1295625578.2383.10.camel@ds9.ducksong.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sun, 23 Jan 2011 20:19:53 -0000

Patrick McManus wrote:
> On Fri, 2011-01-21 at 09:16 -0500, Joe Mason wrote:
> > > -----Original Message-----
> > > From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
> > > Dave Cridland
> > >
> > > So for many requests, a GET or an OPTIONS seems fine, and for others
> > > a POST might be more suitable - especially if, for instance, the
> > > request might be fulfilled by BOSH if a WebSocket upgrade fails.
> > 
> > Using POST to fallback seems like a useful technique to me.  If
> > possible I'd like to support it.  However, if there are reasons to
> > restrict to one other method, this shouldn't take precedence.
> > 
> > I'd suggest the spec allow any method but recommend use of OPTIONS
> > unless the script wants to take advantage of a specific feature of
> > another method (and use POST to fallback to BOSH as an example of such
> > a feature).
> 
> +1 - we should note OPTIONS as a useful default, but the method to use
> in conjunction with Upgrade is something the app designer can consider
> in the fullness of her knowledge of the whole application. I don't see
> any reason why we need to tie her hands.

+1 to this.

There is no reason to tie the implementors hands on this.  Instead,
specify that WebSocket *servers* should accept any reasonable method
provided it has the right headers (and a path), and clients may use
any reasonable method, including POST, OPTIONS, WEBSOCKET if they wish.

Browsers will no doubt settle on a single method at first, but if the
method turns out to have intermediary problems (which we can't be sure
of until it's more widely used), it can be changed with a browser
upgrade - only if the WS servers are accepting connections that use
any reasonable method.

So for maximum plausible compatibility I favour

   (a) tell servers to accept any reasonable method, with a path and
       the right headers.
   (b) tell clients they can use any reasonable method as in (a)
   (c) see what happens; clients can be narrowed down if necessary
       as a result of experience.

-- Jamie

From jat@google.com  Sun Jan 23 12:23:32 2011
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 2DE5C3A698E for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 12:23:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.465
X-Spam-Level: 
X-Spam-Status: No, score=-104.465 tagged_above=-999 required=5 tests=[AWL=-1.488, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 Eweu8pvAX2cG for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 12:23:31 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id E42263A697A for <hybi@ietf.org>; Sun, 23 Jan 2011 12:23:30 -0800 (PST)
Received: from hpaq6.eem.corp.google.com (hpaq6.eem.corp.google.com [172.25.149.6]) by smtp-out.google.com with ESMTP id p0NKQMQL029674 for <hybi@ietf.org>; Sun, 23 Jan 2011 12:26:22 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295814382; bh=X84eHzMOGpsE0G9ywiBwmyqkLh0=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=B/unNuda1MCxBnNPqy75Fg7sR96ETdWiqR2V9SOisRvtev8KuuUdww91lyye5R9NA nuyCUUAX017hoPQ9pbQpA==
Received: from gyg8 (gyg8.prod.google.com [10.243.50.136]) by hpaq6.eem.corp.google.com with ESMTP id p0NKQKmn012168 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Sun, 23 Jan 2011 12:26:21 -0800
Received: by gyg8 with SMTP id 8so1038990gyg.10 for <hybi@ietf.org>; Sun, 23 Jan 2011 12:26:20 -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:content-transfer-encoding; bh=z3wRVQloH2vxQ8MJ+IvN/jywi21hOdDDhaKXuKmKqK4=; b=vrEsyLjEzAbLdQo8G/nD9O98Nz3esp+SjbvtG0j3Ssn7AYRjbFArSwmzUTJ2s2bzqd 8XGw/9tgDXXyrdsVHZPw==
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:content-transfer-encoding; b=qJk7XXu6INUygAMinyulR4X9Bpom7+mJa4a7smXpxwn506M43t5uj+f2PYcnglMuuO xoNRbD5gUqodqh6aGCwg==
Received: by 10.151.112.2 with SMTP id p2mr3645331ybm.263.1295814380152; Sun, 23 Jan 2011 12:26:20 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Sun, 23 Jan 2011 12:26:00 -0800 (PST)
In-Reply-To: <20110123202235.GG13494@shareable.org>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net> <1295625578.2383.10.camel@ds9.ducksong.com> <20110123202235.GG13494@shareable.org>
From: John Tamplin <jat@google.com>
Date: Sun, 23 Jan 2011 15:26:00 -0500
Message-ID: <AANLkTinjxgi-joeR2rKFakRw8Bc=5KHAA=aJFaAQUJYo@mail.gmail.com>
To: Jamie Lokier <jamie@shareable.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>, Joe Hildebrand <Joe.Hildebrand@webex.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sun, 23 Jan 2011 20:23:32 -0000

On Sun, Jan 23, 2011 at 3:22 PM, Jamie Lokier <jamie@shareable.org> wrote:
>> +1 - we should note OPTIONS as a useful default, but the method to use
>> in conjunction with Upgrade is something the app designer can consider
>> in the fullness of her knowledge of the whole application. I don't see
>> any reason why we need to tie her hands.
>
> +1 to this.
>
> There is no reason to tie the implementors hands on this. =C2=A0Instead,
> specify that WebSocket *servers* should accept any reasonable method
> provided it has the right headers (and a path), and clients may use
> any reasonable method, including POST, OPTIONS, WEBSOCKET if they wish.
>
> Browsers will no doubt settle on a single method at first, but if the
> method turns out to have intermediary problems (which we can't be sure
> of until it's more widely used), it can be changed with a browser
> upgrade - only if the WS servers are accepting connections that use
> any reasonable method.
>
> So for maximum plausible compatibility I favour
>
> =C2=A0 (a) tell servers to accept any reasonable method, with a path and
> =C2=A0 =C2=A0 =C2=A0 the right headers.
> =C2=A0 (b) tell clients they can use any reasonable method as in (a)
> =C2=A0 (c) see what happens; clients can be narrowed down if necessary
> =C2=A0 =C2=A0 =C2=A0 as a result of experience.

For this to be useful, the JS API would have to expose the method
choice to the app, which it doesn't currently.

I would prefer this spec to pick one, and then later if it is deemed
useful, we could change this spec and the JS API simultaneously to
expose the method choice to the app.

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

From dave@cridland.net  Sun Jan 23 12:42:05 2011
Return-Path: <dave@cridland.net>
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 D58A73A699E for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 12:42:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.551
X-Spam-Level: 
X-Spam-Status: No, score=-2.551 tagged_above=-999 required=5 tests=[AWL=0.048,  BAYES_00=-2.599]
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 KJVNG+c+mHlC for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 12:42:04 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 7E9673A697F for <hybi@ietf.org>; Sun, 23 Jan 2011 12:42:04 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 046AA11680BB; Sun, 23 Jan 2011 20:44:55 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7A3jotVd0WFL; Sun, 23 Jan 2011 20:44:52 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id C830C11680BA; Sun, 23 Jan 2011 20:44:52 +0000 (GMT)
References: <BB31C4AB95A70042A256109D461991260535C346@XCH117CNC.rim.net>
In-Reply-To: <BB31C4AB95A70042A256109D461991260535C346@XCH117CNC.rim.net>
MIME-Version: 1.0
Message-Id: <28835.1295815492.816221@puncture>
Date: Sun, 23 Jan 2011 20:44:52 +0000
From: Dave Cridland <dave@cridland.net>
To: Joe Mason <jmason@rim.com>, Salvatore Loreto <salvatore.loreto@ericsson.com>, Joe Hildebrand <Joe.Hildebrand@webex.com>, SM <sm+ietf@elandsys.com>, Server-Initiated HTTP <hybi@ietf.org>, Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; delsp="yes"; charset="iso-8859-1"; format="flowed"
Content-Transfer-Encoding: 8Bit
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sun, 23 Jan 2011 20:42:05 -0000

On Sat Jan 22 16:31:23 2011, Joe Mason wrote:
> That's a good reason to avoid it, and points out a general drawback  
> to allowing any method: some of them have non-obvious semantics.
> 
> I change my vote to requiring one specific method. OPTIONS is my  
> first choice but I can see the benefits in clarity of WEBSOCKET.

Right, I've been convinced too - I'm happy with recommending OPTIONS,  
although I'd prefer the choice of method to be SHOULD and not MUST,  
and the text to alert the implementor of the pitfalls of using GET or  
POST with naïve intermediaries.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From dave@cridland.net  Sun Jan 23 12:48:41 2011
Return-Path: <dave@cridland.net>
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 E228E3A697E for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 12:48:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.552
X-Spam-Level: 
X-Spam-Status: No, score=-2.552 tagged_above=-999 required=5 tests=[AWL=0.047,  BAYES_00=-2.599]
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 mpQtvWRpF2hN for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 12:48:41 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id A0E1C3A6969 for <hybi@ietf.org>; Sun, 23 Jan 2011 12:48:40 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 8034011680BB; Sun, 23 Jan 2011 20:51:32 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lsXjKo-L0Cms; Sun, 23 Jan 2011 20:51:31 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 5097811680BA; Sun, 23 Jan 2011 20:51:31 +0000 (GMT)
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net> <1295625578.2383.10.camel@ds9.ducksong.com> <20110123202235.GG13494@shareable.org> <AANLkTinjxgi-joeR2rKFakRw8Bc=5KHAA=aJFaAQUJYo@mail.gmail.com>
In-Reply-To: <AANLkTinjxgi-joeR2rKFakRw8Bc=5KHAA=aJFaAQUJYo@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <28835.1295815891.333408@puncture>
Date: Sun, 23 Jan 2011 20:51:31 +0000
From: Dave Cridland <dave@cridland.net>
To: John Tamplin <jat@google.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>, Joe Hildebrand <Joe.Hildebrand@webex.com>, Jamie Lokier <jamie@shareable.org>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sun, 23 Jan 2011 20:48:42 -0000

On Sun Jan 23 20:26:00 2011, John Tamplin wrote:
> For this to be useful, the JS API would have to expose the method
> choice to the app, which it doesn't currently.
> 
> 
Client SHOULD use OPTIONS, but servers MUST accept any method?


> I would prefer this spec to pick one, and then later if it is deemed
> useful, we could change this spec and the JS API simultaneously to
> expose the method choice to the app.

I think Jamie Lokier is suggesting that we should require servers to  
be flexible on the method choice, but clients can choose a single  
fixed one if that makes sense - and I'd expect all browsers to use  
the RECOMMENDED method we select.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From w@1wt.eu  Sun Jan 23 13:37:27 2011
Return-Path: <w@1wt.eu>
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 624FD3A6996 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 13:37:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.058
X-Spam-Level: 
X-Spam-Status: No, score=-2.058 tagged_above=-999 required=5 tests=[AWL=-0.015, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 hkLF+V733j-M for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 13:37:26 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id BD1AA3A696F for <hybi@ietf.org>; Sun, 23 Jan 2011 13:37:25 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0NLeDTp027505; Sun, 23 Jan 2011 22:40:13 +0100
Date: Sun, 23 Jan 2011 22:40:13 +0100
From: Willy Tarreau <w@1wt.eu>
To: Jamie Lokier <jamie@shareable.org>
Message-ID: <20110123214013.GF19855@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <4D3AD086.6040700@gmx.de> <20110122125948.GJ12837@1wt.eu> <20110123195545.GE13494@shareable.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110123195545.GE13494@shareable.org>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Sun, 23 Jan 2011 21:37:27 -0000

On Sun, Jan 23, 2011 at 07:55:45PM +0000, Jamie Lokier wrote:
> Willy Tarreau wrote:
> > On Sat, Jan 22, 2011 at 01:41:42PM +0100, Julian Reschke wrote:
> > > On 22.01.2011 12:50, Willy Tarreau wrote:
> > > >...
> > > >As Julian said, it could be argued that the lack of support for unknown
> > > >methods is a bug, but that's harder to use to make a vendor move, 
> > > >especially
> > > >when this method comes with a different use than other ones.
> > > >...
> > > 
> > > We probably should clarify whether, when we say WEBSOCKET, we mean 
> > > *just* the new method, or that new method + Upgrade.
> > 
> > I agree with your point. But having a new method without the Upgrade will
> > definitely require upgrading *all* intermediaries, which is what we've been
> > trying to avoid since the beginning by remaining HTTP-compliant.
> > 
> > > I think Roy mentioned once that just a new method, with both sides just 
> > > sending using chunked encoding, might be good enough. However I believe 
> > > this is less likely to work though intermediaries (due to the chunked 
> > > request body).
> > 
> > This will also cause other new issues, mainly intermediaries which don't
> > forward the response until all the request is sent, or inversely stop
> > forwarding the request as soon as the server starts to respond. Also
> > another issue with chunked encoding is that any intermediary is free to
> > bufferize a complete request before forwarding it, possibly changing
> > the chunking or even replacing it with a content-length. The variety
> > of issues depending on implementations makes this solution look scary
> > to me, to be honnest. Probably that if it worked well enough we wouldn't
> > be trying to define a tunneling protocol to work over HTTP :-/
> > One could also argue that the chunked encoding still adds bytes to the
> > framing :-)
> 
> It could be sent with a large Content-Length (e.g. 2^31-1)
> Content-Length.  That removes request chunking issues, but the other
> concerns about buffering or stopping forwarding still apply.
> 
> But then again, neither WebSocket nor HTTP specify what kind of
> buffering to expect with Upgrade, so unintended buffering could occur
> with method+Upgrade too.

I disagree here Jamie. Upgrade is supposed to offer us with an equivalent
tunnel as it does with CONNECT through proxies. So it leaves the scope of
HTTP messaging and is bidirectional by nature.

> Has anyone done any actual tests with chunked requests, and/or
> simultaneous streaming request+response?
> 
> I've done some tests like that with browsers and other clients, and
> the behaviour was quite varied.  But I haven't had the occasion to do
> those tests with intermediaries.

Same here. I used to abuse proxies in the past by passing them POST
requests with very large content lengths in order to telnet through
them. At that time it was possible to get anything in return through
some proxies as long as you did not hit the content-length limit,
even if the response did not look like HTTP at all.

There are some which like to re-chunk the response stream eventhough
there's a content-length. And I've seen some immediately stop sending
data to the server once the server started to respond.

Regards,
Willy


From andy.warmcat.com@googlemail.com  Sun Jan 23 13:51:53 2011
Return-Path: <andy.warmcat.com@googlemail.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 5D6D73A6990 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 13:51:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.549
X-Spam-Level: 
X-Spam-Status: No, score=-3.549 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 GCqGzuHep51i for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 13:51:52 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 079AC3A6932 for <hybi@ietf.org>; Sun, 23 Jan 2011 13:51:51 -0800 (PST)
Received: by wyf23 with SMTP id 23so3667220wyf.31 for <hybi@ietf.org>; Sun, 23 Jan 2011 13:54:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:subject:content-type:content-transfer-encoding; bh=5q2UYtG/bbE6CR5oaOak3+79GVIBgDoBdgfgjswACEY=; b=QrrHec57HSV75L9E9BAOjBGxpUJvKBvFa0oup9/zTSmbyCIAyth3XhqpONgQhmyVCN sHSh8ursmoDrm2hb5LQOML5DQl1ghNtIiH2Iwwn07njFcO8GdamtIVxXvYjMh3d50yM3 Jq/yOrrAJT1jAJX4U0cDSffl+pTYtbHEg1xZA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; b=ts8zCO2EKW78HlJkdzTt349l8b+1NtKzNb9h3Z4Xeb71MC6azm0n03vfUrf83p69Oa 2E45FcKMN5mfcfAC4tlc0PKq59EHMi3f7FJ8iUK6AnH0ulwjNWWh0gqrpP0HPPVZjaiZ lyPnOINdnQIqP4Q8nyJaR4AEEzxUv/78IXtMg=
Received: by 10.227.132.208 with SMTP id c16mr3469314wbt.72.1295819683480; Sun, 23 Jan 2011 13:54:43 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id q18sm8783389wbe.17.2011.01.23.13.54.41 (version=SSLv3 cipher=RC4-MD5); Sun, 23 Jan 2011 13:54:41 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3CA39B.5060203@warmcat.com>
Date: Sun, 23 Jan 2011 21:54:35 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [hybi] libwebsockets C library updated to 04
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Sun, 23 Jan 2011 21:51:53 -0000

Hi -

The libwebsockets C library now supports the 04 protocol.

http://git.warmcat.com/cgi-bin/cgit/libwebsockets/

For server mode sockets it supports 76/00 and 04 dynamically 
per-connection depending on what was sent from the client.  The 
application using the library can send a single packet to multiple 
clients which are using a mixture of protocol levels without having to 
deal with any detail.

It now also supports sockets being opened in client mode integrated into 
the same polling loop as sockets we are serving to.  When it is making a 
connection to another websocket server, it always uses 04 protocol. 
(SSL isn't supported yet on client mode sockets; it is supported for 
server mode sockets.)

I don't have an 04 browser implementation to test it against so I tested 
it against itself since it supports both client and server and that is 
working well.  Maybe it can serve as a test for others.

In the supplied example applications using the library there is a server 
app that provides both html and then two websocket connections using 
different protocols:

http://git.warmcat.com/cgi-bin/cgit/libwebsockets/tree/test-server/test-server.c

and a client app which also opens two websockets with different 
protocols to the server and does things that can be seen in a browser 
also connected to the same server

http://git.warmcat.com/cgi-bin/cgit/libwebsockets/tree/test-server/test-client.c

-Andy

From w@1wt.eu  Sun Jan 23 14:00:20 2011
Return-Path: <w@1wt.eu>
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 B1A133A69B1 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 14:00:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.757
X-Spam-Level: 
X-Spam-Status: No, score=-1.757 tagged_above=-999 required=5 tests=[AWL=-0.314, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, J_CHICKENPOX_47=0.6]
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 ZH02rKHTw4-y for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 14:00:19 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 3C0DB3A69B0 for <hybi@ietf.org>; Sun, 23 Jan 2011 14:00:19 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0NM34gK027554; Sun, 23 Jan 2011 23:03:04 +0100
Date: Sun, 23 Jan 2011 23:03:04 +0100
From: Willy Tarreau <w@1wt.eu>
To: Jamie Lokier <jamie@shareable.org>
Message-ID: <20110123220304.GG19855@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net> <20110122102650.GE12837@1wt.eu> <20110123201456.GF13494@shareable.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110123201456.GF13494@shareable.org>
User-Agent: Mutt/1.4.2.3i
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sun, 23 Jan 2011 22:00:20 -0000

Hi Jamie,

On Sun, Jan 23, 2011 at 08:14:57PM +0000, Jamie Lokier wrote:
> > This can cause some "HTTP/1.1 100 Continue" responses to appear on the
> > response path where the client would only expect a 101.
> 
> That should not be visible at the client.  If the intermediary
> generates Expect: 100-continue itself, it should be prepared to absorb
> the first 100 response; it is wrong to forward it.  If it's generating
> it because the client sent Expect: 100-continue, then the client will
> see it but that is correct.

I agree with the principle, but given the numerous conditions around
the 1xx status handling in RFC2616, I'm pretty sure all combinations
do happen depending on the components. For instance, it's said in
section 10.1 that a proxy must forward 1xx to the client unless it
adds it itself, in which case it "need not" forward the response.
You can see that nothing prevents it from doing so, and for
implementers, this keeps the requirement to forward 1xx if the
client put it anyway, so the easiest implementation consist in
unconditionally setting it in the request and always letting it
pass in the response as long as the client talks 1.1.

> In the case of POST+Upgrade, a client may actually choose to send
> Expect: 100-continue, if it wants the semantics associated with that.
> That's fine, there's nothing wrong with that; it's a client choice.
> 
> Do you know of buggy intermediaries which generate Expect: 100-continue
> (when the client hasn't sent it), and then forward the 100 response
> back to the client even though the client hasn't sent the Expect header?

I'm pretty sure I've encountered this behaviour in the context of a
webservice-based application about 2 years ago, but I can't put names
on the components involved. I remember that because it was my first
encounter with a 100 that was causing failures through haproxy and I
had to implement it there. Also, I would not say the intermediaries
are necessarily buggy if they do that considering it's not forbidden.
I'd just say they're lazy.

(...)
> The WS server should probably send 100 first in this scenario.  It
> could be specified or recommended that way.

You see, we're progressively complexifying the protocol with this design.

> Bearing that in mind, do you know if it's a problem with any
> intermediary (that you know of), after the intermediary has received
> 100, that it'll misinterpret or fail to forward the _subsequent_ 101?

Those who correctly process 100 (ie don't forward it to the client)
but don't know about 101 will consider it as 1xx (= 100) and will
eat it.

> In which case, do you think such intermediaries will forward 101
> fine in the first place, with non-POST requests and no 100?

I have no idea. The principle of laziness implies that all the responses
should be forwarded to the client, which would let the client see 100
and 101. I'd bet that most of those which forward 101 will forward 100,
but that's a pure guess from someone who would proceed like this would
the situation appear.

> What about intermediaries which send Expect: 100-continue when
> forwarding *any* request that has a body (perfectly reasonable)?

Those are the ones I'm worried about precisely. We're talking about
POST because most often it's POST which holds a body, but we can
have it with PUT as well as many other methods. That's why I'd
really prefer avoiding to rely on the body and establish a tunnel
instead. That really matches the purpose we're looking for.

Regards,
Willy


From gregw@intalio.com  Sun Jan 23 16:02:03 2011
Return-Path: <gregw@intalio.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 1B5D73A69D4 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 16:02:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.933
X-Spam-Level: 
X-Spam-Status: No, score=-2.933 tagged_above=-999 required=5 tests=[AWL=0.044,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 x+nauFsNopEG for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 16:02:02 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by core3.amsl.com (Postfix) with ESMTP id 54BEB3A69D1 for <hybi@ietf.org>; Sun, 23 Jan 2011 16:02:02 -0800 (PST)
Received: by iyi42 with SMTP id 42so3808995iyi.31 for <hybi@ietf.org>; Sun, 23 Jan 2011 16:04:55 -0800 (PST)
MIME-Version: 1.0
Received: by 10.42.172.130 with SMTP id n2mr3908921icz.246.1295827495066; Sun, 23 Jan 2011 16:04:55 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.42.218.137 with HTTP; Sun, 23 Jan 2011 16:04:54 -0800 (PST)
In-Reply-To: <AANLkTinfzMEC0xaeXKMm6qUkx4SBFZVnusvcDqqZS5B8@mail.gmail.com>
References: <4D388CBD.4040708@ericsson.com> <AANLkTinfzMEC0xaeXKMm6qUkx4SBFZVnusvcDqqZS5B8@mail.gmail.com>
Date: Mon, 24 Jan 2011 11:04:54 +1100
X-Google-Sender-Auth: JgDdTMzZGphF8LylNEEeTcDuMO8
Message-ID: <AANLkTi=spu7VtryYamd_=iMge2p5oOTcJQ2LOtNwB=u0@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Mon, 24 Jan 2011 00:02:03 -0000

On 21 January 2011 06:34, John Tamplin <jat@google.com> wrote:

> While I agree more people agreed to that option, there seemed to be quite a
> few with very strongly held opinions against it -- how do we resolve those
> objections?

We make the masking an extension, so that anybody with a strongly held
belief that XOR is insufficient can implement something stronger as an
extension.

For example, if the browser vendors want AES, then they should be able
to implement their clients so that they will insist on an AES masking
extension.

regards

From gregw@intalio.com  Sun Jan 23 16:10:42 2011
Return-Path: <gregw@intalio.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 AE29B3A69D8 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 16:10:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.933
X-Spam-Level: 
X-Spam-Status: No, score=-2.933 tagged_above=-999 required=5 tests=[AWL=0.044,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 F1UEv4Lu8epC for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 16:10:41 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by core3.amsl.com (Postfix) with ESMTP id 9618E3A69D7 for <hybi@ietf.org>; Sun, 23 Jan 2011 16:10:41 -0800 (PST)
Received: by iyi42 with SMTP id 42so3813509iyi.31 for <hybi@ietf.org>; Sun, 23 Jan 2011 16:13:34 -0800 (PST)
MIME-Version: 1.0
Received: by 10.42.241.68 with SMTP id ld4mr3891705icb.447.1295828014674; Sun, 23 Jan 2011 16:13:34 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.42.218.137 with HTTP; Sun, 23 Jan 2011 16:13:34 -0800 (PST)
In-Reply-To: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com>
Date: Mon, 24 Jan 2011 11:13:34 +1100
X-Google-Sender-Auth: y_g5Vl74FoerOsI7dJS-xZCQUwM
Message-ID: <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: hybi@ietf.org
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Mon, 24 Jan 2011 00:10:42 -0000

On 15 January 2011 08:59, Adam Barth <ietf@adambarth.com> wrote:
> Pat,
>
> Having the client and the server negotiate masking doesn't really make
> much sense. =A0The malicious server will just ask for whichever masking
> it knows how to break.

and the well intentioned browser will reject any connections that
don't support masking extensions that the browser implementers believe
are secure.

If the browser implementers can maintain disciplines like not sending
secure cookies over HTTP connections, then surely you can exercise
enough self control to insist on masking extensions that you believe
are secure.   This smacks of the naive programmer arguments, which we
have dismissed.

From jamie@shareable.org  Sun Jan 23 17:14:18 2011
Return-Path: <jamie@shareable.org>
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 7A1043A69E1 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 17:14:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.662
X-Spam-Level: 
X-Spam-Status: No, score=-2.662 tagged_above=-999 required=5 tests=[AWL=-0.063, BAYES_00=-2.599]
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 l1fvHayitJ5F for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 17:14:17 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 5C9603A6947 for <hybi@ietf.org>; Sun, 23 Jan 2011 17:14:16 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PhB37-0004a2-MP; Mon, 24 Jan 2011 01:16:53 +0000
Date: Mon, 24 Jan 2011 01:16:53 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Dave Cridland <dave@cridland.net>
Message-ID: <20110124011653.GH13494@shareable.org>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net> <1295625578.2383.10.camel@ds9.ducksong.com> <20110123202235.GG13494@shareable.org> <AANLkTinjxgi-joeR2rKFakRw8Bc=5KHAA=aJFaAQUJYo@mail.gmail.com> <28835.1295815891.333408@puncture>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <28835.1295815891.333408@puncture>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Mon, 24 Jan 2011 01:14:18 -0000

Dave Cridland wrote:
> On Sun Jan 23 20:26:00 2011, John Tamplin wrote:
> >For this to be useful, the JS API would have to expose the method
> >choice to the app, which it doesn't currently.
> >
> >
> Client SHOULD use OPTIONS, but servers MUST accept any method?
> 
> 
> >I would prefer this spec to pick one, and then later if it is deemed
> >useful, we could change this spec and the JS API simultaneously to
> >expose the method choice to the app.
> 
> I think Jamie Lokier is suggesting that we should require servers to  
> be flexible on the method choice, but clients can choose a single  
> fixed one if that makes sense - and I'd expect all browsers to use  
> the RECOMMENDED method we select.

Yes exactly.

If a server goes ahead with WebSocket, it SHOULD NOT use the method to
in deciding WebSocket negotiation or behaviour, except what might be
necessary to satisfy HTTP (e.g. consuming a request-body or not), or
if there is any security consideration.

At the client, a pure WebSocket app should not be selecting the method
choice.  That should be up to the client's WS implementation, and
would, as Dave says, be the recommended method unless some good
technical reason is discovered after deployment why a different method
should be used.

It's intended that if there is a reason to change the recommended
method, ideally it would be done by the rollout of new WS expert
implementation updates (e.g. in browsers), not changing all the apps.

Although this is a reason not to give apps a choice, it must be said
that if some apps (browser or non-browser) would like a way to fall
back to BOSH over POST, (or WebSocketProprietaryAlternative etc.)
when a WS request is refused, if a client WS implementation wants to
connect the WebSocket and XHR APIs somehow to make that possible, that
would expose the method via XHR.  Obviously pure WS apps still
shouldn't care about the method, and if there's a WS method ("for
debugging or special cases"), they should avoid using it without a
specific reason to use it.

-- Jamie

From jamie@shareable.org  Sun Jan 23 19:07:03 2011
Return-Path: <jamie@shareable.org>
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 2A33A3A6A26 for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 19:07:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.04
X-Spam-Level: 
X-Spam-Status: No, score=-2.04 tagged_above=-999 required=5 tests=[AWL=-0.681,  BAYES_00=-2.599, SARE_LWSHORTT=1.24]
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 VK05duH0GQ0f for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 19:07:02 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 35C4F3A6A1C for <hybi@ietf.org>; Sun, 23 Jan 2011 19:07:02 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PhCoL-0008BN-J9; Mon, 24 Jan 2011 03:09:45 +0000
Date: Mon, 24 Jan 2011 03:09:45 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <w@1wt.eu>
Message-ID: <20110124030945.GI13494@shareable.org>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <4D3AD086.6040700@gmx.de> <20110122125948.GJ12837@1wt.eu> <20110123195545.GE13494@shareable.org> <20110123214013.GF19855@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110123214013.GF19855@1wt.eu>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Mon, 24 Jan 2011 03:07:03 -0000

Willy Tarreau wrote:
> On Sun, Jan 23, 2011 at 07:55:45PM +0000, Jamie Lokier wrote:
> > Willy Tarreau wrote:
> > > On Sat, Jan 22, 2011 at 01:41:42PM +0100, Julian Reschke wrote:
> > > > On 22.01.2011 12:50, Willy Tarreau wrote:
> > > > >...
> > > > >As Julian said, it could be argued that the lack of support for unknown
> > > > >methods is a bug, but that's harder to use to make a vendor move, 
> > > > >especially
> > > > >when this method comes with a different use than other ones.
> > > > >...
> > > > 
> > > > We probably should clarify whether, when we say WEBSOCKET, we mean 
> > > > *just* the new method, or that new method + Upgrade.
> > > 
> > > I agree with your point. But having a new method without the Upgrade will
> > > definitely require upgrading *all* intermediaries, which is what we've been
> > > trying to avoid since the beginning by remaining HTTP-compliant.
> > > 
> > > > I think Roy mentioned once that just a new method, with both sides just 
> > > > sending using chunked encoding, might be good enough. However I believe 
> > > > this is less likely to work though intermediaries (due to the chunked 
> > > > request body).
> > > 
> > > This will also cause other new issues, mainly intermediaries which don't
> > > forward the response until all the request is sent, or inversely stop
> > > forwarding the request as soon as the server starts to respond. Also
> > > another issue with chunked encoding is that any intermediary is free to
> > > bufferize a complete request before forwarding it, possibly changing
> > > the chunking or even replacing it with a content-length. The variety
> > > of issues depending on implementations makes this solution look scary
> > > to me, to be honnest. Probably that if it worked well enough we wouldn't
> > > be trying to define a tunneling protocol to work over HTTP :-/
> > > One could also argue that the chunked encoding still adds bytes to the
> > > framing :-)
> > 
> > It could be sent with a large Content-Length (e.g. 2^31-1)
> > Content-Length.  That removes request chunking issues, but the other
> > concerns about buffering or stopping forwarding still apply.
> > 
> > But then again, neither WebSocket nor HTTP specify what kind of
> > buffering to expect with Upgrade, so unintended buffering could occur
> > with method+Upgrade too.
> 
> I disagree here Jamie. Upgrade is supposed to offer us with an equivalent
> tunnel as it does with CONNECT through proxies. So it leaves the scope of
> HTTP messaging and is bidirectional by nature.

You're right.

Though all implementations have _some_ kind of short term buffering
strategy, even if it's just an implicit side effect of the way they
work internally.  Nothing forwards each byte the moment it is received.

In future, a proxy which recognises WebSocket might, quite reasonably,
attempt to recognise frames and _deliberately_ hold back the first
small half of a frame when it knows a second half is due, in order to
make more efficient use of TCP and under some circumstances, reduce
the overall latency.  I don't know if that would improve latency in
practice but it's something I've thought about implementing.

I'm not suggesting any current proxy does that (obviously).  But I
think it's fair to ask if we know of any proxies doing other strange
kinds of buffering in "Upgrade tunnel mode" at the moment - or if we
can assume they forward every byte reasonably eagerly, as they are
clearly known to do for HTTPS over CONNECT?

-- Jamie

From gregw@intalio.com  Sun Jan 23 19:09:03 2011
Return-Path: <gregw@intalio.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 477F93A6A2A for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 19:09:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.933
X-Spam-Level: 
X-Spam-Status: No, score=-2.933 tagged_above=-999 required=5 tests=[AWL=0.044,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 78uHEK1DO-OK for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 19:08:37 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id C75C53A6A29 for <hybi@ietf.org>; Sun, 23 Jan 2011 19:08:37 -0800 (PST)
Received: by qwi2 with SMTP id 2so3768593qwi.31 for <hybi@ietf.org>; Sun, 23 Jan 2011 19:11:30 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.53.213 with SMTP id n21mr3604350qag.399.1295838690577; Sun, 23 Jan 2011 19:11:30 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Sun, 23 Jan 2011 19:11:30 -0800 (PST)
In-Reply-To: <AANLkTinjxgi-joeR2rKFakRw8Bc=5KHAA=aJFaAQUJYo@mail.gmail.com>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net> <1295625578.2383.10.camel@ds9.ducksong.com> <20110123202235.GG13494@shareable.org> <AANLkTinjxgi-joeR2rKFakRw8Bc=5KHAA=aJFaAQUJYo@mail.gmail.com>
Date: Mon, 24 Jan 2011 14:11:30 +1100
X-Google-Sender-Auth: UKAzF4J4HUg3vgc6ZSY3tXk5I20
Message-ID: <AANLkTi=Tip4G8BeYU8=Xk6BsskpyAn4xasrN1TpaX1-S@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Mon, 24 Jan 2011 03:09:03 -0000

On 24 January 2011 07:26, John Tamplin <jat@google.com> wrote:
>> So for maximum plausible compatibility I favour
>>
>> =A0 (a) tell servers to accept any reasonable method, with a path and
>> =A0 =A0 =A0 the right headers.
>> =A0 (b) tell clients they can use any reasonable method as in (a)
>> =A0 (c) see what happens; clients can be narrowed down if necessary
>> =A0 =A0 =A0 as a result of experience.

+1

> For this to be useful, the JS API would have to expose the method
> choice to the app, which it doesn't currently.

True - so it is unlikely to happen in the near future, but that should
not rule out future use of other methods.

> I would prefer this spec to pick one, and then later if it is deemed
> useful, we could change this spec and the JS API simultaneously to
> expose the method choice to the app.

but you would then need to change all the existing implementations
that were not aware that any method may be used.


regards

From gregw@intalio.com  Sun Jan 23 21:27:13 2011
Return-Path: <gregw@intalio.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 AA3C03A6A4B for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 21:27:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.934
X-Spam-Level: 
X-Spam-Status: No, score=-2.934 tagged_above=-999 required=5 tests=[AWL=0.043,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 IhQ6tzR0Sr5Y for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 21:27:13 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id B45643A6A47 for <hybi@ietf.org>; Sun, 23 Jan 2011 21:27:12 -0800 (PST)
Received: by qwi2 with SMTP id 2so3852919qwi.31 for <hybi@ietf.org>; Sun, 23 Jan 2011 21:30:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.214.71 with SMTP id gz7mr3719859qab.349.1295847005953; Sun, 23 Jan 2011 21:30:05 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Sun, 23 Jan 2011 21:30:05 -0800 (PST)
In-Reply-To: <AANLkTikAuxP7eWU0wyYrZYwHLKSN0OXwsq7u=ingwCoa@mail.gmail.com>
References: <AANLkTikLQgGnvjRtMBMiwfdaOYcjwZqnnZ3PnRBEkVd2@mail.gmail.com> <AANLkTimRO=G90pO6nFjpc+z4K4Z3AOwP8O4Z78G7bYuu@mail.gmail.com> <2850.1289253214.101081@puncture> <AANLkTi=8cMckgtEbDatMbf4dnvtVo0c8hnU+HTGTYfqj@mail.gmail.com> <20101212224437.GT22787@shareable.org> <AANLkTikAuxP7eWU0wyYrZYwHLKSN0OXwsq7u=ingwCoa@mail.gmail.com>
Date: Mon, 24 Jan 2011 16:30:05 +1100
X-Google-Sender-Auth: aLV6BJp1xScY66Uf64D9Jtpn7kM
Message-ID: <AANLkTinbYO-Bm3Ky5ksonaBV=EW4tvdYFxu9H5kgNSnT@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] header for negotiating extensions
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: Mon, 24 Jan 2011 05:27:13 -0000

John,

I generally agree with all that you wrote except:

On 24 January 2011 06:22, John Tamplin <jat@google.com> wrote:
> Note that the order of extensions is not important - any interactions between
> multiple extensions MUST be defined in the documents defining the
> extensions.

I think the order of the extensions should be important,  at least to
the extent that extension lists should not be reordered.
I also think that any usage of the extension data space in each frame
should be done in the same order as the extensions are specified in
the list.

regards

From jat@google.com  Sun Jan 23 21:40:21 2011
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 D36153A6A5A for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 21:40:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.445
X-Spam-Level: 
X-Spam-Status: No, score=-104.445 tagged_above=-999 required=5 tests=[AWL=-1.469, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 dTTu04LOY4rL for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 21:40:21 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id B9DB73A6A4D for <hybi@ietf.org>; Sun, 23 Jan 2011 21:40:20 -0800 (PST)
Received: from kpbe13.cbf.corp.google.com (kpbe13.cbf.corp.google.com [172.25.105.77]) by smtp-out.google.com with ESMTP id p0O5hDuv002892 for <hybi@ietf.org>; Sun, 23 Jan 2011 21:43:13 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295847793; bh=KVJat9DRgbBg4uE6O5+kn8SDmAA=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Df1n1PZixoq42wX+Reg6EchuI0pW4TGdaKdli2ETWDhPzWrN6yF8zDdhH2aDns72u rqEbmhPiUUiuR1ftdt6Iw==
Received: from gwb11 (gwb11.prod.google.com [10.200.2.11]) by kpbe13.cbf.corp.google.com with ESMTP id p0O5hB2s030414 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Sun, 23 Jan 2011 21:43:11 -0800
Received: by gwb11 with SMTP id 11so1258123gwb.11 for <hybi@ietf.org>; Sun, 23 Jan 2011 21:43:11 -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=9NMYlgfBr4YFAz+W6PTr+55ZAiBi3viRGdDaMLoK6Mw=; b=GC+DPwieoEtvB/Spb206kkXGoE++SerL7/v64CUM31kYNQWIK1qqBw/C8Ke3NyB5yu tiKnR2woEtVyr7giCIlA==
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=gE/9C39Cwpd5J9Lqcy1A8/lmFMn1ZK4pI+MPhNmScfLhVaBfm6LxcGxVVwY6Rmoufz uJ3bHJprlFTm2lZwnpzA==
Received: by 10.151.40.16 with SMTP id s16mr4153007ybj.35.1295847791211; Sun, 23 Jan 2011 21:43:11 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Sun, 23 Jan 2011 21:42:51 -0800 (PST)
In-Reply-To: <AANLkTinbYO-Bm3Ky5ksonaBV=EW4tvdYFxu9H5kgNSnT@mail.gmail.com>
References: <AANLkTikLQgGnvjRtMBMiwfdaOYcjwZqnnZ3PnRBEkVd2@mail.gmail.com> <AANLkTimRO=G90pO6nFjpc+z4K4Z3AOwP8O4Z78G7bYuu@mail.gmail.com> <2850.1289253214.101081@puncture> <AANLkTi=8cMckgtEbDatMbf4dnvtVo0c8hnU+HTGTYfqj@mail.gmail.com> <20101212224437.GT22787@shareable.org> <AANLkTikAuxP7eWU0wyYrZYwHLKSN0OXwsq7u=ingwCoa@mail.gmail.com> <AANLkTinbYO-Bm3Ky5ksonaBV=EW4tvdYFxu9H5kgNSnT@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Mon, 24 Jan 2011 00:42:51 -0500
Message-ID: <AANLkTimORcCPiwSYDpBFK+7wrbR-GoqJDRtom9AVjFYX@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: multipart/alternative; boundary=00151750edbc473607049a9113ed
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] header for negotiating extensions
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: Mon, 24 Jan 2011 05:40:21 -0000

--00151750edbc473607049a9113ed
Content-Type: text/plain; charset=UTF-8

On Mon, Jan 24, 2011 at 12:30 AM, Greg Wilkins <gregw@webtide.com> wrote:

> I think the order of the extensions should be important,  at least to
> the extent that extension lists should not be reordered.
> I also think that any usage of the extension data space in each frame
> should be done in the same order as the extensions are specified in
> the list.
>

I think that complicates implementations for no real value.  Also, I worry
about what splitting/merging multiple headers would do to the order.

In most cases, I think it will be clear which way the extensions should
compose together - for example, compression and multiplexing -- clearly
compression on the physical channel should be after multiplexing, and
compression (or lack thereof) should be negotiated separately on the logical
channels.

That said, I certainly wouldn't push hard for this if others thought
respecting the order in the header was better.

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

--00151750edbc473607049a9113ed
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Mon, Jan 24, 2011 at 12:30 AM, Greg Wilkins <=
span dir=3D"ltr">&lt;<a href=3D"mailto:gregw@webtide.com">gregw@webtide.com=
</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I think the order of the extensions should be important, =C2=A0at least to<=
br>
the extent that extension lists should not be reordered.<br>
I also think that any usage of the extension data space in each frame<br>
should be done in the same order as the extensions are specified in<br>
the list.<br></blockquote><div><br></div><div>I think that complicates impl=
ementations for no real value. =C2=A0Also, I worry about what splitting/mer=
ging multiple headers would do to the order.</div><div><br></div><div>In mo=
st cases, I think it will be clear which way the extensions should compose =
together - for example, compression and multiplexing -- clearly compression=
 on the physical channel should be after multiplexing, and compression (or =
lack thereof) should be negotiated separately on the logical channels.=C2=
=A0</div>

<div><br></div><div>That said, I certainly wouldn&#39;t push hard for this =
if others thought respecting the order in the header was better.</div></div=
><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--00151750edbc473607049a9113ed--

From tyoshino@google.com  Sun Jan 23 21:54:54 2011
Return-Path: <tyoshino@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 A64573A6A5C for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 21:54:54 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.629
X-Spam-Level: 
X-Spam-Status: No, score=-102.629 tagged_above=-999 required=5 tests=[AWL=0.047, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, 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 SYbb+vg02y-j for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 21:54:53 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 07CDF3A6A4D for <hybi@ietf.org>; Sun, 23 Jan 2011 21:54:52 -0800 (PST)
Received: from kpbe16.cbf.corp.google.com (kpbe16.cbf.corp.google.com [172.25.105.80]) by smtp-out.google.com with ESMTP id p0O5vjVl015188 for <hybi@ietf.org>; Sun, 23 Jan 2011 21:57:46 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295848666; bh=IzldKiIC6PhlzKh0FX+R3BJ9X98=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=IkzzOMwN/TubH3tMYon+aVHRUfcnc5uiskY5nf4z9/gaIRRvVoDaWjyfRrmh3heBh ddbMGmJSmuBFWj2bQFyXw==
Received: from iwn8 (iwn8.prod.google.com [10.241.68.72]) by kpbe16.cbf.corp.google.com with ESMTP id p0O5vLdi000970 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Sun, 23 Jan 2011 21:57:44 -0800
Received: by iwn8 with SMTP id 8so3873212iwn.34 for <hybi@ietf.org>; Sun, 23 Jan 2011 21:57:44 -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=qoMcf1Ajw6AtRhk1EV7FONA8bnALFtGzLqgTB6k+QWs=; b=obfwF9NucxojgxKo1PxpEK/X6Emck2xAB2S3VDZvDvhJYRkyjvqfEt5A7VJXmv/Ifh Orb6yIh6o88TzmaQK9nA==
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=vl7gr1HLeKE4cdN9yw0Ibv32quzrd7cVuL2Am/t0iU+hZsNOiGa99ZURW82WvTPQCX bgkEaGPBkHvHhA90+rtw==
Received: by 10.231.16.132 with SMTP id o4mr4192020iba.154.1295848663475; Sun, 23 Jan 2011 21:57:43 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.15.139 with HTTP; Sun, 23 Jan 2011 21:57:23 -0800 (PST)
In-Reply-To: <AANLkTiks9L8qTd3z9gSv1VzR_ddV8s7PqETpq9dXiEVL@mail.gmail.com>
References: <AANLkTimd17qAWjPKXuM4MBAy79jc+d7y3NaJz0VYi0ZM@mail.gmail.com> <AANLkTiks9L8qTd3z9gSv1VzR_ddV8s7PqETpq9dXiEVL@mail.gmail.com>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Mon, 24 Jan 2011 14:57:23 +0900
Message-ID: <AANLkTin6pin28CtJo3mODuyP0PaaqH+Nb3i3uQfZWrZj@mail.gmail.com>
To: =?ISO-8859-1?Q?I=F1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: multipart/alternative; boundary=0022152d7e0b44e74f049a914737
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] draft-ietf-hybi-thewebsocketprotocol-04: The example in section 1.2 is wrong
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: Mon, 24 Jan 2011 05:54:54 -0000

--0022152d7e0b44e74f049a914737
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Agree.

"me89jWimTRKTWwrS3aRrL53YZSo=3D" in both section 1.2 (page 4) and section 1=
.3
(page 7) should be replaced with "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=3D" that
corresponds to Sec-WebSocket-Key of "dGhlIHNhbXBsZSBub25jZQ=3D=3D". We shou=
ld
make them consistent with client handshake example not to confuse readers.

Additionally, I'd suggest that we should mention the name of the header
"Sec-WebSocket-Accept" in the paragraph starting with "Concretely, if as in
the example ...".

Takeshi


On Mon, Jan 24, 2011 at 04:18, I=F1aki Baz Castillo <ibc@aliax.net> wrote:

> Hi, WebSocket handshake given as example in section 1.2 of
> draft-ietf-hybi-thewebsocketprotocol-04 has a wrong
> Sec-WebSocket-Accept value in the 101 response:
>
>   The handshake from the client looks as follows:
>
>        GET /chat HTTP/1.1
>        Host: server.example.com
>        Upgrade: websocket
>        Connection: Upgrade
>        Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ=3D=3D
>        Sec-WebSocket-Origin: http://example.com
>        Sec-WebSocket-Protocol: chat, superchat
>        Sec-WebSocket-Version: 4
>
>   The handshake from the server looks as follows:
>
>        HTTP/1.1 101 Switching Protocols
>        Upgrade: websocket
>        Connection: Upgrade
>        Sec-WebSocket-Accept: me89jWimTRKTWwrS3aRrL53YZSo=3D
>        Sec-WebSocket-Nonce: AQIDBAUGBwgJCgsMDQ4PEC=3D=3D
>        Sec-WebSocket-Protocol: chat
>
>
> Sec-WebSocket-Accept value should be "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=3D".
> Note that such value is also computed in point 3 of section 5.2.2
> "Sending the server's opening handshake".
>
> Regards.
>
>
> --
> I=F1aki Baz Castillo
> <ibc@aliax.net>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--0022152d7e0b44e74f049a914737
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>Agree.</div><div><br></div><div>&quot;me89jWimTRKTWwrS3aRrL53YZSo=3D&q=
uot; in=A0both section 1.2 (page 4) and section 1.3 (page 7) should be repl=
aced with &quot;s3pPLMBiTxaQ9kYGzzhZRbK+xOo=3D&quot; that corresponds to Se=
c-WebSocket-Key of &quot;dGhlIHNhbXBsZSBub25jZQ=3D=3D&quot;. We should make=
 them consistent with client handshake example=A0not to confuse readers.</d=
iv>

<div><br></div><div>Additionally, I&#39;d suggest that we should mention th=
e name of the header &quot;Sec-WebSocket-Accept&quot; in the paragraph star=
ting with &quot;Concretely, if as in the example ...&quot;.</div><div>
<br clear=3D"all">
Takeshi<br>
<br><br><div class=3D"gmail_quote">On Mon, Jan 24, 2011 at 04:18, I=F1aki B=
az Castillo <span dir=3D"ltr">&lt;<a href=3D"mailto:ibc@aliax.net">ibc@alia=
x.net</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class=3D"h5">Hi, WebSocket handshake given as example =
in section 1.2 of<br>
draft-ietf-hybi-thewebsocketprotocol-04 has a wrong<br>
Sec-WebSocket-Accept value in the 101 response:<br>
<br>
=A0 The handshake from the client looks as follows:<br>
<br>
=A0 =A0 =A0 =A0GET /chat HTTP/1.1<br>
=A0 =A0 =A0 =A0Host: <a href=3D"http://server.example.com" target=3D"_blank=
">server.example.com</a><br>
=A0 =A0 =A0 =A0Upgrade: websocket<br>
=A0 =A0 =A0 =A0Connection: Upgrade<br>
=A0 =A0 =A0 =A0Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ=3D=3D<br>
=A0 =A0 =A0 =A0Sec-WebSocket-Origin: <a href=3D"http://example.com" target=
=3D"_blank">http://example.com</a><br>
=A0 =A0 =A0 =A0Sec-WebSocket-Protocol: chat, superchat<br>
=A0 =A0 =A0 =A0Sec-WebSocket-Version: 4<br>
<br>
=A0 The handshake from the server looks as follows:<br>
<br>
=A0 =A0 =A0 =A0HTTP/1.1 101 Switching Protocols<br>
=A0 =A0 =A0 =A0Upgrade: websocket<br>
=A0 =A0 =A0 =A0Connection: Upgrade<br>
=A0 =A0 =A0 =A0Sec-WebSocket-Accept: me89jWimTRKTWwrS3aRrL53YZSo=3D<br>
=A0 =A0 =A0 =A0Sec-WebSocket-Nonce: AQIDBAUGBwgJCgsMDQ4PEC=3D=3D<br>
=A0 =A0 =A0 =A0Sec-WebSocket-Protocol: chat<br>
<br>
<br>
Sec-WebSocket-Accept value should be &quot;s3pPLMBiTxaQ9kYGzzhZRbK+xOo=3D&q=
uot;.<br>
Note that such value is also computed in point 3 of section 5.2.2<br>
&quot;Sending the server&#39;s opening handshake&quot;.<br>
<br>
Regards.<br>
<br>
<br>
--<br>
I=F1aki Baz Castillo<br>
&lt;<a href=3D"mailto:ibc@aliax.net">ibc@aliax.net</a>&gt;<br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</div></div></blockquote></div><br></div>

--0022152d7e0b44e74f049a914737--

From gregw@intalio.com  Sun Jan 23 21:56:13 2011
Return-Path: <gregw@intalio.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 6B3A93A6A6E for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 21:56:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.934
X-Spam-Level: 
X-Spam-Status: No, score=-2.934 tagged_above=-999 required=5 tests=[AWL=0.043,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 lcKL+DUgwKSo for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 21:56:12 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 826073A6A5C for <hybi@ietf.org>; Sun, 23 Jan 2011 21:56:12 -0800 (PST)
Received: by qyj19 with SMTP id 19so3820141qyj.10 for <hybi@ietf.org>; Sun, 23 Jan 2011 21:59:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.47.75 with SMTP id m11mr3758691qaf.249.1295848745788; Sun, 23 Jan 2011 21:59:05 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Sun, 23 Jan 2011 21:59:05 -0800 (PST)
In-Reply-To: <AANLkTimORcCPiwSYDpBFK+7wrbR-GoqJDRtom9AVjFYX@mail.gmail.com>
References: <AANLkTikLQgGnvjRtMBMiwfdaOYcjwZqnnZ3PnRBEkVd2@mail.gmail.com> <AANLkTimRO=G90pO6nFjpc+z4K4Z3AOwP8O4Z78G7bYuu@mail.gmail.com> <2850.1289253214.101081@puncture> <AANLkTi=8cMckgtEbDatMbf4dnvtVo0c8hnU+HTGTYfqj@mail.gmail.com> <20101212224437.GT22787@shareable.org> <AANLkTikAuxP7eWU0wyYrZYwHLKSN0OXwsq7u=ingwCoa@mail.gmail.com> <AANLkTinbYO-Bm3Ky5ksonaBV=EW4tvdYFxu9H5kgNSnT@mail.gmail.com> <AANLkTimORcCPiwSYDpBFK+7wrbR-GoqJDRtom9AVjFYX@mail.gmail.com>
Date: Mon, 24 Jan 2011 16:59:05 +1100
X-Google-Sender-Auth: Pr-ADy_CdlM8rZDJc9C5xOFKUWc
Message-ID: <AANLkTikdCOVReouqmitMGFuT97X82-b36wimAhXSC1ev@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] header for negotiating extensions
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: Mon, 24 Jan 2011 05:56:13 -0000

On 24 January 2011 16:42, John Tamplin <jat@google.com> wrote:
> On Mon, Jan 24, 2011 at 12:30 AM, Greg Wilkins <gregw@webtide.com> wrote:
>>
>> I think the order of the extensions should be important, =A0at least to
>> the extent that extension lists should not be reordered.
>> I also think that any usage of the extension data space in each frame
>> should be done in the same order as the extensions are specified in
>> the list.
>
> I think that complicates implementations for no real value. =A0Also, I wo=
rry
> about what splitting/merging multiple headers would do to the order.

RFC2616 4.2 makes it clear that multiple headers of the same name are
well ordered and more over that:

  "The order in which header fields with the same field-name are
    received is therefore significant to the interpretation of the
    combined field value, and thus a proxy MUST NOT change
    the order of these field values when a message is forwarded."

> In most cases, I think it will be clear which way the extensions should
> compose together - for example, compression and multiplexing -- clearly
> compression on the physical channel should be after multiplexing, and
> compression (or lack thereof) should be negotiated separately on the logi=
cal
> channels.

I suspect that a lot of extensions will only have a single obvious
order in which they can be applied.

But I can also imagine unrelated extensions that use the extension
data space, where ordering will be necessary to decode the extension
data.  Consider an extension that signs each frame (or adds a
checksum), and another that tags each frame with some tracing
information about the client (timestamps etc.).  Both extensions will
put data into the extension data fields. As we currently do have not
defined any structure within the extension data, it will be up to each
extension to consume the extension data that is relevant to them, thus
the ordering of these unrelated extensions will be important.

The alternative is to define now the structure of extension data, so
that each extension can find it's own data without knowledge of all
other extensions.

Even if you think this situation unlikely, HTTP headers of the same
name are already well ordered, so it should cost us nothing to keep
this even if it is never used.


> That said, I certainly wouldn't push hard for this if others thought
> respecting the order in the header was better.

others??

From w@1wt.eu  Sun Jan 23 22:33:36 2011
Return-Path: <w@1wt.eu>
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 CCC2B3A6A7B for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 22:33:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.436
X-Spam-Level: 
X-Spam-Status: No, score=-1.436 tagged_above=-999 required=5 tests=[AWL=-0.633, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, SARE_LWSHORTT=1.24]
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 YE8BmPofgQGC for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 22:33:35 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 4C3FE3A6A73 for <hybi@ietf.org>; Sun, 23 Jan 2011 22:33:34 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0O6aO0J028847; Mon, 24 Jan 2011 07:36:24 +0100
Date: Mon, 24 Jan 2011 07:36:24 +0100
From: Willy Tarreau <w@1wt.eu>
To: Jamie Lokier <jamie@shareable.org>
Message-ID: <20110124063624.GK19855@1wt.eu>
References: <4D394B51.2060105@ericsson.com> <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <4D3AD086.6040700@gmx.de> <20110122125948.GJ12837@1wt.eu> <20110123195545.GE13494@shareable.org> <20110123214013.GF19855@1wt.eu> <20110124030945.GI13494@shareable.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110124030945.GI13494@shareable.org>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Mon, 24 Jan 2011 06:33:36 -0000

On Mon, Jan 24, 2011 at 03:09:45AM +0000, Jamie Lokier wrote:
> Though all implementations have _some_ kind of short term buffering
> strategy, even if it's just an implicit side effect of the way they
> work internally.  Nothing forwards each byte the moment it is received.

I obviously agree :-)

> In future, a proxy which recognises WebSocket might, quite reasonably,
> attempt to recognise frames and _deliberately_ hold back the first
> small half of a frame when it knows a second half is due, in order to
> make more efficient use of TCP and under some circumstances, reduce
> the overall latency.  I don't know if that would improve latency in
> practice but it's something I've thought about implementing.

yes this is something we will likely have, just as some proxies currently
handle HTTP with TCP_CORK / MSG_MORE : tell the system not to send an
incomplete segment when we know some data is still coming. This is
something to think about with WebSocket, especially because we'll have
many small frames. Maybe it will make sense to have an equivalent of
the TCP PUSH bit so that both ends can say "forward it now!" at the
end of a message when their output buffer is empty.

> I'm not suggesting any current proxy does that (obviously).  But I
> think it's fair to ask if we know of any proxies doing other strange
> kinds of buffering in "Upgrade tunnel mode" at the moment - or if we
> can assume they forward every byte reasonably eagerly, as they are
> clearly known to do for HTTPS over CONNECT?

They will obviously buffer, and at worst they will rely on Nagle,
occasionally causing some short delays. But that should be rare and
most proxies I've seen put a TCP_NODELAY on their sockets as soon as
they're created.

Regards,
Willy


From tyoshino@google.com  Sun Jan 23 22:41:13 2011
Return-Path: <tyoshino@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 636933A6A7A for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 22:41:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.976
X-Spam-Level: 
X-Spam-Status: No, score=-105.976 tagged_above=-999 required=5 tests=[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 fWQPBcsgITPA for <hybi@core3.amsl.com>; Sun, 23 Jan 2011 22:41:12 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 265793A6A73 for <hybi@ietf.org>; Sun, 23 Jan 2011 22:41:11 -0800 (PST)
Received: from hpaq5.eem.corp.google.com (hpaq5.eem.corp.google.com [172.25.149.5]) by smtp-out.google.com with ESMTP id p0O6i4uO008118 for <hybi@ietf.org>; Sun, 23 Jan 2011 22:44:05 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295851445; bh=Rp7NqZ5QzWwvbJLPzAcP72uONzs=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=A5KiMFCy4wZge9YHSBoM9CvPqupJhSyFcO+ysSYcvYjlccrNxH8FhiqOZT3ZKp1Pr fLFzOqL4beg05ybab+L2g==
Received: from iwn37 (iwn37.prod.google.com [10.241.68.101]) by hpaq5.eem.corp.google.com with ESMTP id p0O6i2up000614 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Sun, 23 Jan 2011 22:44:03 -0800
Received: by iwn37 with SMTP id 37so3941605iwn.39 for <hybi@ietf.org>; Sun, 23 Jan 2011 22:44:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=aO2MiTfxi5n/EiJKUzjGb2EWQMiqZrhEdh3FbWABE3U=; b=D/u0+5IGFyJyDdur1VbRIt81mmycfVI3t7Bm6zOnXqGrPb/9ufwTxNkqLZ1HOIxlLS Zo5JG9CESEJBxsqN7VXQ==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:from:date:message-id:subject:to:content-type; b=mDP5tX7NHSyXbqlxQ9EkmTjGHqajOp3ZjW8ocMCMRMOBKT+0qa3HiEYxCSFE54AOP5 8y/M4MFy4jbxxk6kqX6w==
Received: by 10.231.37.74 with SMTP id w10mr4274623ibd.4.1295851440604; Sun, 23 Jan 2011 22:44:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.15.139 with HTTP; Sun, 23 Jan 2011 22:43:36 -0800 (PST)
From: Takeshi Yoshino <tyoshino@google.com>
Date: Mon, 24 Jan 2011 15:43:36 +0900
Message-ID: <AANLkTimJReX7ebvB9CFfd6Kq879f8Ddy=M5yKFNXHy6N@mail.gmail.com>
To: hybi@ietf.org
Content-Type: multipart/alternative; boundary=000325572caecc85f4049a91ec3a
X-System-Of-Record: true
Subject: [hybi] A few trivial bugs about ABNFs in -04
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: Mon, 24 Jan 2011 06:41:13 -0000

--000325572caecc85f4049a91ec3a
Content-Type: text/plain; charset=ISO-8859-1

http://tools.ietf.org/id/draft-ietf-hybi-thewebsocketprotocol-04.txt

- In section 4.3,

      ws-frame               = frame-more...

      frame-more             = %x0 ; final frame of message
                             / %x1 ; more frames of this message follow


more bit has been renamed to fin bit and inverted. ABNF should reflect this
change.

- In section 5.1,

   10.  The request MAY include a header with the name "Sec-WebSocket-
        Protocol".  If present, this value indicates the subprotocol(s)
        the client wishes to speak.  The ABNF for the value of this
        header is 1#(token | quoted-string), where the definitions of
        /token/ and /quoted-string/ are as given in [RFC2616].

   11.  The request MAY include a header with the name "Sec-WebSocket-
        Extensions".  If present, this value indicates the protocol-
        level extension(s) the client wishes to speak.  The ABNF for the
        value of this header is 1#(token | quoted-string), where the
        definitions of /token/ and /quoted-string/ are as given in
        [RFC2616].

#rule is also given in RFC2616. Not in any of RFC5234, 4234, 2234. So, say
"#rule, /token/ and /quoted-string/ are as given ..." here.

Takeshi

--000325572caecc85f4049a91ec3a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<span class=3D"Apple-style-span" style=3D"font-family: Arial, Verdana, sans=
-serif; font-size: 13px; "><div><span class=3D"Apple-style-span" style=3D"f=
ont-family: Arial, Verdana, sans-serif; font-size: 13px; "><a href=3D"http:=
//tools.ietf.org/id/draft-ietf-hybi-thewebsocketprotocol-04.txt">http://too=
ls.ietf.org/id/draft-ietf-hybi-thewebsocketprotocol-04.txt</a></span></div>

<div><br></div><div>- In section 4.3,</div><div><br></div><div><span class=
=3D"Apple-style-span" style=3D"font-family: &#39;MS PGothic&#39;; font-size=
: medium; "><pre style=3D"word-wrap: break-word; white-space: pre-wrap; "> =
     ws-frame               =3D frame-more
<span class=3D"Apple-style-span" style=3D"font-family: &#39;MS PGothic&#39;=
; white-space: normal; ">...</span></pre><div><pre style=3D"word-wrap: brea=
k-word; white-space: pre-wrap; ">      frame-more             =3D %x0 ; fin=
al frame of message
                             / %x1 ; more frames of this message follow
</pre></div><div><br></div></span></div><div>more bit has been renamed to f=
in bit and inverted. ABNF should reflect this change.</div><div><span class=
=3D"Apple-style-span" style=3D"font-family: Arial, Verdana, sans-serif; fon=
t-size: 13px; "><br>

</span></div><div>- In section 5.1,</div></span><span class=3D"Apple-style-=
span" style=3D"font-family: &#39;MS PGothic&#39;; font-size: medium; "><pre=
 style=3D"word-wrap: break-word; white-space: pre-wrap; ">   10.  The reque=
st MAY include a header with the name &quot;Sec-WebSocket-
        Protocol&quot;.  If present, this value indicates the subprotocol(s=
)
        the client wishes to speak.  The ABNF for the value of this
        header is 1#(token | quoted-string), where the definitions of
        /token/ and /quoted-string/ are as given in [RFC2616].

   11.  The request MAY include a header with the name &quot;Sec-WebSocket-
        Extensions&quot;.  If present, this value indicates the protocol-
        level extension(s) the client wishes to speak.  The ABNF for the
        value of this header is 1#(token | quoted-string), where the
        definitions of /token/ and /quoted-string/ are as given in
        [RFC2616].
</pre><div><span class=3D"Apple-style-span" style=3D"font-family: arial; fo=
nt-size: small; ">#rule is also given in RFC2616. Not in any of RFC5234, 42=
34, 2234. So, say &quot;#rule, /token/ and /quoted-string/ are as given ...=
&quot; here.</span></div>

</span><div><div><br></div><div><div>Takeshi<br>
</div></div></div>

--000325572caecc85f4049a91ec3a--

From gregw@intalio.com  Mon Jan 24 00:12:06 2011
Return-Path: <gregw@intalio.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 03D3B3A6A88 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 00:12:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.934
X-Spam-Level: 
X-Spam-Status: No, score=-2.934 tagged_above=-999 required=5 tests=[AWL=0.043,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 HYBc+8165yBJ for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 00:12:04 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id B22103A6A08 for <hybi@ietf.org>; Mon, 24 Jan 2011 00:12:04 -0800 (PST)
Received: by qyk34 with SMTP id 34so2582842qyk.10 for <hybi@ietf.org>; Mon, 24 Jan 2011 00:14:58 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.53.213 with SMTP id n21mr3869990qag.399.1295856898274; Mon, 24 Jan 2011 00:14:58 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Mon, 24 Jan 2011 00:14:58 -0800 (PST)
In-Reply-To: <4D388CBD.4040708@ericsson.com>
References: <4D388CBD.4040708@ericsson.com>
Date: Mon, 24 Jan 2011 19:14:58 +1100
X-Google-Sender-Auth: X_EgEXlWHi4ZuEsV--GJXcJ03Lw
Message-ID: <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] consensus result on Straw Poll: Masking options
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: Mon, 24 Jan 2011 08:12:06 -0000

On 21 January 2011 06:27, Salvatore Loreto
<salvatore.loreto@ericsson.com> wrote:
> The mailing list discussion generated by the straw-poll has showed a large
> consensus
> to option #1

Will we apply masking to wss ?

cheers

From salvatore.loreto@ericsson.com  Mon Jan 24 00:27:12 2011
Return-Path: <salvatore.loreto@ericsson.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 BA55A3A63D2 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 00:27:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.55
X-Spam-Level: 
X-Spam-Status: No, score=-106.55 tagged_above=-999 required=5 tests=[AWL=0.049, BAYES_00=-2.599, 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 m8yHlYkvPjJc for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 00:27:12 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 9F3773A63CB for <hybi@ietf.org>; Mon, 24 Jan 2011 00:27:11 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-88-4d3d388c1a25
Received: from esessmw0237.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id EF.FC.13987.C883D3D4; Mon, 24 Jan 2011 09:30:05 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0237.eemea.ericsson.se (153.88.115.91) with Microsoft SMTP Server id 8.2.234.1; Mon, 24 Jan 2011 09:30:03 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id A404D294F; Mon, 24 Jan 2011 10:30:03 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 5BB2D506D6; Mon, 24 Jan 2011 10:30:03 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id C69994FB98; Mon, 24 Jan 2011 10:30:02 +0200 (EET)
Message-ID: <4D3D388A.3020803@ericsson.com>
Date: Mon, 24 Jan 2011 09:30:02 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com>
In-Reply-To: <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
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: Mon, 24 Jan 2011 08:27:12 -0000

On 1/24/11 9:14 AM, Greg Wilkins wrote:
> On 21 January 2011 06:27, Salvatore Loreto
> <salvatore.loreto@ericsson.com>  wrote:
>> The mailing list discussion generated by the straw-poll has showed a large
>> consensus
>> to option #1
> Will we apply masking to wss ?
good question!
this has not been discussed at all.

IMO, as individual,
TLS already resolves all the issues that led us to mask frames in ws.

we can choose to be consistent and apply masking to both ws and wss
or apply masking only to ws and leave framing unmasked in wss
both solutions are fine for me


cheers
/Sal

-- 
Salvatore Loreto
www.sloreto.com


From dave@cridland.net  Mon Jan 24 00:50:27 2011
Return-Path: <dave@cridland.net>
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 1F0363A6944 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 00:50:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.552
X-Spam-Level: 
X-Spam-Status: No, score=-2.552 tagged_above=-999 required=5 tests=[AWL=0.047,  BAYES_00=-2.599]
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 J32UmXPsnoVO for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 00:50:26 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 3B8913A635F for <hybi@ietf.org>; Mon, 24 Jan 2011 00:50:25 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id CE2B211680BB; Mon, 24 Jan 2011 08:53:17 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qyy-Ingled+j; Mon, 24 Jan 2011 08:53:15 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 62E7411680BA; Mon, 24 Jan 2011 08:53:15 +0000 (GMT)
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com>
In-Reply-To: <4D3D388A.3020803@ericsson.com>
MIME-Version: 1.0
Message-Id: <28835.1295859195.390502@puncture>
Date: Mon, 24 Jan 2011 08:53:15 +0000
From: Dave Cridland <dave@cridland.net>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>, Server-Initiated HTTP <hybi@ietf.org>, Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
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: Mon, 24 Jan 2011 08:50:27 -0000

On Mon Jan 24 08:30:02 2011, Salvatore Loreto wrote:
> IMO, as individual,
> TLS already resolves all the issues that led us to mask frames in  
> ws.

There are three arguments put forward in support of masking.

Firstly, that it tackles the specific case of intermediaries  
interpreting websocket traffic as HTTP request/response pairs.

Secondly, the more general argument that some other cross-protocol  
attack might be mounted, against (for example) SMTP.

Thirdly, that masking will protect against other security issues we  
have yet to conceive of.

I've never found the second argument remotely convincing, and the  
third smacks of religion, however they both apply equally to 'wss' as  
to 'ws', since:

2) SMTPS and similar do exist, although most non-HTTP protocols have  
switched to an inline TLS negotiation and encrypt opportunistically  
in their respective specifications. (Note I've repeatedly recommended  
this for WebSocket as well).

3) If we are to believe there exist security issues that we haven't  
thought of that masking mitigates, it also seems logical to assume  
that these might also affect end-points, whether or not the  
communication channel is secure.

So while I sincerely hope we won't require masking in the TLS case  
(and, I note, for cleanliness of design, this suggests we should  
consider negotiating masking in order to make ws and wss be as close  
as possible), I shall be somewhat interested to see what arguments  
are put forth against it by proponents of masking.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From jmason@rim.com  Mon Jan 24 05:52:46 2011
Return-Path: <jmason@rim.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 5CF8F3A6AD0 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 05:52:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.389
X-Spam-Level: 
X-Spam-Status: No, score=-5.389 tagged_above=-999 required=5 tests=[AWL=-0.186, BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_MED=-4]
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 ICtA1bXZENKh for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 05:52:45 -0800 (PST)
Received: from mhs04ykf.rim.net (mhs04ykf.rim.net [216.9.243.82]) by core3.amsl.com (Postfix) with ESMTP id 63DFE3A6AC4 for <hybi@ietf.org>; Mon, 24 Jan 2011 05:52:45 -0800 (PST)
X-AuditID: 0a666446-b7b8cae0000009e2-8f-4d3d84db4793
Received: from XHT109CNC.rim.net ( [10.65.12.218]) by mhs04ykf.rim.net (RIM Mail) with SMTP id F5.21.02530.BD48D3D4; Mon, 24 Jan 2011 08:55:39 -0500 (EST)
Received: from XCH117CNC.rim.net ([fe80::b8df:541f:9d85:9909]) by XHT109CNC.rim.net ([fe80::8412:4d9e:eb55:2c7b%11]) with mapi; Mon, 24 Jan 2011 08:55:39 -0500
From: Joe Mason <jmason@rim.com>
To: Willy Tarreau <w@1wt.eu>, Jamie Lokier <jamie@shareable.org>
Date: Mon, 24 Jan 2011 08:55:20 -0500
Thread-Topic: [hybi] straw-poll on GET vs OPTIONS vs new method
Thread-Index: Acu7SVVdHIsfZsaGTsWxiX1JSLDzrwAhLooQ
Message-ID: <BB31C4AB95A70042A256109D4619912605E2E802@XCH117CNC.rim.net>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net> <20110122102650.GE12837@1wt.eu> <20110123201456.GF13494@shareable.org> <20110123220304.GG19855@1wt.eu>
In-Reply-To: <20110123220304.GG19855@1wt.eu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
content-transfer-encoding: quoted-printable
MIME-Version: 1.0
X-Brightmail-Tracker: AAAAAgAAAZEXM1pC
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Mon, 24 Jan 2011 13:52:46 -0000

> -----Original Message-----
> From: Willy Tarreau [mailto:w@1wt.eu]
> 
> You see, we're progressively complexifying the protocol with this
> design.

This is my concern - even if we can convince ourselves that 100 handling wil=
l not break the protocol in this case, it's better to specify a protocol tha=
t doesn't need to be reasoned about like this.

Joe

---------------------------------------------------------------------=0A=
This transmission (including any attachments) may contain confidential infor=
mation, privileged material (including material protected by the solicitor-c=
lient or other applicable privileges), or constitute non-public information.=
 Any use of this information by anyone other than the intended recipient is=
 prohibited. If you have received this transmission in error, please immedia=
tely reply to the sender and delete this information from your system. Use,=
 dissemination, distribution, or reproduction of this transmission by uninte=
nded recipients is not authorized and may be unlawful.

From jamie@shareable.org  Mon Jan 24 09:39:23 2011
Return-Path: <jamie@shareable.org>
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 C30EC3A6918 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 09:39:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.341
X-Spam-Level: 
X-Spam-Status: No, score=-2.341 tagged_above=-999 required=5 tests=[AWL=-0.342, BAYES_00=-2.599, J_CHICKENPOX_64=0.6]
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 zny3fH8gAa+h for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 09:39:23 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id D55463A68F8 for <hybi@ietf.org>; Mon, 24 Jan 2011 09:39:22 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PhQQE-0004WG-3l; Mon, 24 Jan 2011 17:41:46 +0000
Date: Mon, 24 Jan 2011 17:41:46 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Joe Mason <jmason@rim.com>
Message-ID: <20110124174145.GJ13494@shareable.org>
References: <4D394B51.2060105@ericsson.com> <28835.1295602156.119839@puncture> <BB31C4AB95A70042A256109D4619912605D8B532@XCH117CNC.rim.net> <20110122102650.GE12837@1wt.eu> <20110123201456.GF13494@shareable.org> <20110123220304.GG19855@1wt.eu> <BB31C4AB95A70042A256109D4619912605E2E802@XCH117CNC.rim.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <BB31C4AB95A70042A256109D4619912605E2E802@XCH117CNC.rim.net>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, Server-Initiated HTTP <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Mon, 24 Jan 2011 17:39:23 -0000

Joe Mason wrote:
> > -----Original Message-----
> > From: Willy Tarreau [mailto:w@1wt.eu]
> >
> > You see, we're progressively complexifying the protocol with this
> > design.
> 
> This is my concern - even if we can convince ourselves that 100
handling will not break the protocol in this case, it's better to
specify a protocol that doesn't need to be reasoned about like this.

I agree, we should not depend on unknowns and complexities.

However I think it should be fair game if client implementors want to
experiment with POST or method+body and deal with whatever
consequences they find.  If they find it works, they should be allowed
to use it and assume WS servers will behave with it.

We can RECOMMEND something more conservative, without making it a hard
requirement, and we can specify enough of the client and server
behaviour for all methods.

In other words, don't overconstrain WS implementations from trying
things that may or may not work out.

Separate hard requirements that are needed for client-server interop
and security etc., from advice (recommendations) that doesn't need to
be rigid to achieve those goals.

We don't really know what works best yet - we won't know until it's
much more widely used - and what works best over the infrastructure
may change over time anyway.

We can't prevent proxies from sending Expect: 100-continue and
mishandling 101 for _any_ method that _may_ include a request body.
Without further data, since we can't rule it out, we shouldn't be
making hard specifications based on the presumption.  Leave that to
best practice, to be discovered, and advice refined with experience.

-- Jamie

From jamie@shareable.org  Mon Jan 24 10:50:47 2011
Return-Path: <jamie@shareable.org>
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 73FE13A6AF6 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 10:50:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.012
X-Spam-Level: 
X-Spam-Status: No, score=-2.012 tagged_above=-999 required=5 tests=[AWL=-0.653, BAYES_00=-2.599, SARE_LWSHORTT=1.24]
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 3K465T38KG6l for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 10:50:46 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 690B13A6A83 for <hybi@ietf.org>; Mon, 24 Jan 2011 10:50:46 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PhRXd-00056C-Vt; Mon, 24 Jan 2011 18:53:29 +0000
Date: Mon, 24 Jan 2011 18:53:29 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <w@1wt.eu>
Message-ID: <20110124185329.GK13494@shareable.org>
References: <e17lj69vdic93hv3o8o793s5ibv937c86q@hive.bjoern.hoehrmann.de> <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <4D3AD086.6040700@gmx.de> <20110122125948.GJ12837@1wt.eu> <20110123195545.GE13494@shareable.org> <20110123214013.GF19855@1wt.eu> <20110124030945.GI13494@shareable.org> <20110124063624.GK19855@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110124063624.GK19855@1wt.eu>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Mon, 24 Jan 2011 18:50:47 -0000

Willy Tarreau wrote:
> On Mon, Jan 24, 2011 at 03:09:45AM +0000, Jamie Lokier wrote:
> > Though all implementations have _some_ kind of short term buffering
> > strategy, even if it's just an implicit side effect of the way they
> > work internally.  Nothing forwards each byte the moment it is received.
> 
> I obviously agree :-)
> 
> > In future, a proxy which recognises WebSocket might, quite reasonably,
> > attempt to recognise frames and _deliberately_ hold back the first
> > small half of a frame when it knows a second half is due, in order to
> > make more efficient use of TCP and under some circumstances, reduce
> > the overall latency.  I don't know if that would improve latency in
> > practice but it's something I've thought about implementing.
> 
> yes this is something we will likely have, just as some proxies currently
> handle HTTP with TCP_CORK / MSG_MORE : tell the system not to send an
> incomplete segment when we know some data is still coming. This is
> something to think about with WebSocket, especially because we'll have
> many small frames. Maybe it will make sense to have an equivalent of
> the TCP PUSH bit so that both ends can say "forward it now!" at the
> end of a message when their output buffer is empty.

Don't we have a message-fragment "more/done" bit already?  Maybe I'm
confusing framing proposals :-)

(Related: I discussed here last year why it would make sense to be
_two_ bits: "forward eagerly" (like TCP PUSH) and "message finished",
so that remuxing/rebuffering intermediaries can safely coalesce
message fragments as well as splitting them.  With only one bit,
coalescing wrecks the forwarding guarantees and timing of byte
stream-like messages, such as would be needed for generic
HTTP-over-WebSocket (muxed) or TCP-over-WebSocket, so coalescing would
have to be forbidden at proxies (causing pointless excessive framing
overhead), or the sender would have to use fine-grained messages in
the first place (also causing unnecessary framing overhead)).

> > I'm not suggesting any current proxy does that (obviously).  But I
> > think it's fair to ask if we know of any proxies doing other strange
> > kinds of buffering in "Upgrade tunnel mode" at the moment - or if we
> > can assume they forward every byte reasonably eagerly, as they are
> > clearly known to do for HTTPS over CONNECT?
> 
> They will obviously buffer, and at worst they will rely on Nagle,
> occasionally causing some short delays. But that should be rare and
> most proxies I've seen put a TCP_NODELAY on their sockets as soon as
> they're created.

I'm thinking of eager forwarding of incomplete message parts causing
longer TCP stalls.  WebSocket advertising on the net likes to talk
about how it's going to be nice for low latency... so let's aim for that.

Background, Google for (I have no browser right now, sorry):

    "Performance Interactions Between P-HTTP and TCP Implementations",
    John Heidemann, USC / Information Sciences Institute, May 19, 1997.

    Abstract (partial):

    "This document describes several performance problems resulting
    from interactions between implementations of persistent-HTTP
    (P-HTTP) and TCP. Two of these problems tie P-HTTP performance to
    TCP delayed- acknowledgments, thus adding up to 200ms to each P-
    HTTP transaction. A third results in multiple slow-starts per TCP
    connection. Unresolved, these problems result in P-HTTP
    transactions which are 14 times slower than standard HTTP and 20
    times slower than potential P-HTTP over a 10 Mb/s Ethernet."..

The paper's a bit dated (1997) and modern TCP implementations are
better at avoiding the various problems described.

But still, I'm not happy to assume that eager forwarding of all
partial-frame bytes is a good low-latency strategy for WS-optimised
proxies.  Timing-wise, TCP does not behave like a simple byte pipe
with fixed latency - and this is generally true of similar protocols.

-- Jamie

From w@1wt.eu  Mon Jan 24 11:13:57 2011
Return-Path: <w@1wt.eu>
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 7CC163A6B1F for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 11:13:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.053
X-Spam-Level: 
X-Spam-Status: No, score=-2.053 tagged_above=-999 required=5 tests=[AWL=-0.010, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 1Rb07GD-pXW3 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 11:13:56 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 3B74E3A6919 for <hybi@ietf.org>; Mon, 24 Jan 2011 11:13:55 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0OJGkBR032065; Mon, 24 Jan 2011 20:16:46 +0100
Date: Mon, 24 Jan 2011 20:16:46 +0100
From: Willy Tarreau <w@1wt.eu>
To: Jamie Lokier <jamie@shareable.org>
Message-ID: <20110124191646.GA32006@1wt.eu>
References: <20110122102058.GD12837@1wt.eu> <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <4D3AD086.6040700@gmx.de> <20110122125948.GJ12837@1wt.eu> <20110123195545.GE13494@shareable.org> <20110123214013.GF19855@1wt.eu> <20110124030945.GI13494@shareable.org> <20110124063624.GK19855@1wt.eu> <20110124185329.GK13494@shareable.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110124185329.GK13494@shareable.org>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Mon, 24 Jan 2011 19:13:57 -0000

On Mon, Jan 24, 2011 at 06:53:29PM +0000, Jamie Lokier wrote:
> Don't we have a message-fragment "more/done" bit already?  Maybe I'm
> confusing framing proposals :-)

As you suggested below, yes those are two distinct things as soon as you
multiplex or simply send chunks in multiple frames for whatever reason
(eg: a sequence of multiple opcodes, let's say text then binary).

> (Related: I discussed here last year why it would make sense to be
> _two_ bits: "forward eagerly" (like TCP PUSH) and "message finished",
> so that remuxing/rebuffering intermediaries can safely coalesce
> message fragments as well as splitting them.  With only one bit,
> coalescing wrecks the forwarding guarantees and timing of byte
> stream-like messages, such as would be needed for generic
> HTTP-over-WebSocket (muxed) or TCP-over-WebSocket, so coalescing would
> have to be forbidden at proxies (causing pointless excessive framing
> overhead), or the sender would have to use fine-grained messages in
> the first place (also causing unnecessary framing overhead)).

indeed.

> I'm thinking of eager forwarding of incomplete message parts causing
> longer TCP stalls.  WebSocket advertising on the net likes to talk
> about how it's going to be nice for low latency... so let's aim for that.

No quite the opposite instead. I'm not talking about buffering everything,
just about sending full-sized TCP segments when that makes sense. It's
extremely important in mobile environments where you need a time slot for
each frame sent, and where a PUSH implies an ACK that consumes bandwidth
and time slots.

> Background, Google for (I have no browser right now, sorry):
> 
>     "Performance Interactions Between P-HTTP and TCP Implementations",
>     John Heidemann, USC / Information Sciences Institute, May 19, 1997.
> 
>     Abstract (partial):
> 
>     "This document describes several performance problems resulting
>     from interactions between implementations of persistent-HTTP
>     (P-HTTP) and TCP. Two of these problems tie P-HTTP performance to
>     TCP delayed- acknowledgments, thus adding up to 200ms to each P-
>     HTTP transaction. A third results in multiple slow-starts per TCP
>     connection. Unresolved, these problems result in P-HTTP
>     transactions which are 14 times slower than standard HTTP and 20
>     times slower than potential P-HTTP over a 10 Mb/s Ethernet."..

I have also observed similar issues with components which blindly apply
the Nagle algorithm. If you correctly disable it on each last chunk,
this problem cannot appear because there will always be a PUSH causing
the frame to immediately be sent.

But the behaviour above is often encountered when TCP proxies are used
to forward HTTP with Nagle disabled. Nagle should only be disabled when
the proxy has knowledge of the application layer and framing. Some
implementations clearly are abusive.

> The paper's a bit dated (1997) and modern TCP implementations are
> better at avoiding the various problems described.

Not all, even last week I observed one, but I can't tell the name here ;-)

> But still, I'm not happy to assume that eager forwarding of all
> partial-frame bytes is a good low-latency strategy for WS-optimised
> proxies.  Timing-wise, TCP does not behave like a simple byte pipe
> with fixed latency - and this is generally true of similar protocols.

Anyway, since we already support fragmentation, probably that later
it will be possible to implement WS over UDP !

Cheers,
Willy


From jamie@shareable.org  Mon Jan 24 13:06:37 2011
Return-Path: <jamie@shareable.org>
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 D22863A6A7F for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 13:06:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.616
X-Spam-Level: 
X-Spam-Status: No, score=-2.616 tagged_above=-999 required=5 tests=[AWL=-0.017, BAYES_00=-2.599]
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 4Pm4VGTXNhWx for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 13:06:36 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 7B0483A696B for <hybi@ietf.org>; Mon, 24 Jan 2011 13:06:36 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1PhTf7-0005um-An; Mon, 24 Jan 2011 21:09:21 +0000
Date: Mon, 24 Jan 2011 21:09:21 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <w@1wt.eu>
Message-ID: <20110124210921.GL13494@shareable.org>
References: <k9clj6pjrvbd5c6t84e9ovevnkcdtnuukm@hive.bjoern.hoehrmann.de> <20110122115045.GG12837@1wt.eu> <4D3AD086.6040700@gmx.de> <20110122125948.GJ12837@1wt.eu> <20110123195545.GE13494@shareable.org> <20110123214013.GF19855@1wt.eu> <20110124030945.GI13494@shareable.org> <20110124063624.GK19855@1wt.eu> <20110124185329.GK13494@shareable.org> <20110124191646.GA32006@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110124191646.GA32006@1wt.eu>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Mon, 24 Jan 2011 21:06:37 -0000

Willy Tarreau wrote:
> On Mon, Jan 24, 2011 at 06:53:29PM +0000, Jamie Lokier wrote:
> > Don't we have a message-fragment "more/done" bit already?  Maybe I'm
> > confusing framing proposals :-)
> 
> As you suggested below, yes those are two distinct things as soon as you
> multiplex or simply send chunks in multiple frames for whatever reason
> (eg: a sequence of multiple opcodes, let's say text then binary).
> 
> > (Related: I discussed here last year why it would make sense to be
> > _two_ bits: "forward eagerly" (like TCP PUSH) and "message finished",
> > so that remuxing/rebuffering intermediaries can safely coalesce
> > message fragments as well as splitting them.  With only one bit,
> > coalescing wrecks the forwarding guarantees and timing of byte
> > stream-like messages, such as would be needed for generic
> > HTTP-over-WebSocket (muxed) or TCP-over-WebSocket, so coalescing would
> > have to be forbidden at proxies (causing pointless excessive framing
> > overhead), or the sender would have to use fine-grained messages in
> > the first place (also causing unnecessary framing overhead)).
> 
> indeed.
> 
> > I'm thinking of eager forwarding of incomplete message parts causing
> > longer TCP stalls.  WebSocket advertising on the net likes to talk
> > about how it's going to be nice for low latency... so let's aim for that.
> 
> No quite the opposite instead. I'm not talking about buffering everything,
> just about sending full-sized TCP segments when that makes sense. It's
> extremely important in mobile environments where you need a time slot for
> each frame sent, and where a PUSH implies an ACK that consumes bandwidth
> and time slots.

I believe you are describing Linux's TCP_CORK/MSG_MORE and BSD's TCP_NOPUSH?

I.e. write what you like to the kernel socket, but tell TCP not to
send a partial segment until you signal an explicit message boundary
to be pushed eagerly.  And even then, don't do that if you already
have part of the next message to forward, meaning you are expecting
more soon?

> > Background, Google for (I have no browser right now, sorry):
> > 
> >     "Performance Interactions Between P-HTTP and TCP Implementations",
> >     John Heidemann, USC / Information Sciences Institute, May 19, 1997.
> > 
> >     Abstract (partial):
> > 
> >     "This document describes several performance problems resulting
> >     from interactions between implementations of persistent-HTTP
> >     (P-HTTP) and TCP. Two of these problems tie P-HTTP performance to
> >     TCP delayed- acknowledgments, thus adding up to 200ms to each P-
> >     HTTP transaction. A third results in multiple slow-starts per TCP
> >     connection. Unresolved, these problems result in P-HTTP
> >     transactions which are 14 times slower than standard HTTP and 20
> >     times slower than potential P-HTTP over a 10 Mb/s Ethernet."..
> 
> I have also observed similar issues with components which blindly apply
> the Nagle algorithm. If you correctly disable it on each last chunk,
> this problem cannot appear because there will always be a PUSH causing
> the frame to immediately be sent.

Since you've observed it - do you know if correct use of
TCP_CORK/MSG_MORE/TCP_NOPUSH (where available) prevents the problem
consistently (presumably with Nagle also disabled), instead of
depending on toggling TCP_NODELAY optimistically on each write and
hoping that does the right thing?

> But the behaviour above is often encountered when TCP proxies are used
> to forward HTTP with Nagle disabled. Nagle should only be disabled when
> the proxy has knowledge of the application layer and framing. Some
> implementations clearly are abusive.

Leaving Nagle on can add horrible latency jitter to "smooth"
interactive applications on LANs.  I've played a simple game of
"snake" - two players each guiding their growing snake around and
trying not to hit the other, every move received from a shared server.
With Nagle, the motion of the snake head was very jittery, very
visible, very unpleasant.  With Nagle turned off it was nice and
smooth.

That wasn't in a browser, but I'd expect exactly the same in a browser
game with similar "smoothness" constraints.

(But as you note, turning Nagle off can cause problems too.)

> > The paper's a bit dated (1997) and modern TCP implementations are
> > better at avoiding the various problems described.
> 
> Not all, even last week I observed one, but I can't tell the name here ;-)

Hmm.

So, based on your observations, do you basically agree with me, that
blindly forwarding bytes after CONNECT/Upgrade negotiation (which
proxies aren't precisely specified to do but generally do), is not
ideal for consistent and low WebSocket message latency?

-- Jamie

From w@1wt.eu  Mon Jan 24 13:31:04 2011
Return-Path: <w@1wt.eu>
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 3CB2F3A6987 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 13:31:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.052
X-Spam-Level: 
X-Spam-Status: No, score=-2.052 tagged_above=-999 required=5 tests=[AWL=-0.009, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 4CnI3VZgsXoJ for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 13:31:03 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 9A47F3A6922 for <hybi@ietf.org>; Mon, 24 Jan 2011 13:31:01 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0OLXpqM032716; Mon, 24 Jan 2011 22:33:51 +0100
Date: Mon, 24 Jan 2011 22:33:51 +0100
From: Willy Tarreau <w@1wt.eu>
To: Jamie Lokier <jamie@shareable.org>
Message-ID: <20110124213351.GA32333@1wt.eu>
References: <20110122115045.GG12837@1wt.eu> <4D3AD086.6040700@gmx.de> <20110122125948.GJ12837@1wt.eu> <20110123195545.GE13494@shareable.org> <20110123214013.GF19855@1wt.eu> <20110124030945.GI13494@shareable.org> <20110124063624.GK19855@1wt.eu> <20110124185329.GK13494@shareable.org> <20110124191646.GA32006@1wt.eu> <20110124210921.GL13494@shareable.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110124210921.GL13494@shareable.org>
User-Agent: Mutt/1.4.2.3i
Cc: "hybi@ietf.org" <hybi@ietf.org>, Bjoern Hoehrmann <derhoermi@gmx.net>
Subject: Re: [hybi] On WEBSOCKET vs existing methods (was straw-poll on GET vs	OPTIONS vs new method)
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: Mon, 24 Jan 2011 21:31:04 -0000

On Mon, Jan 24, 2011 at 09:09:21PM +0000, Jamie Lokier wrote:
> > > I'm thinking of eager forwarding of incomplete message parts causing
> > > longer TCP stalls.  WebSocket advertising on the net likes to talk
> > > about how it's going to be nice for low latency... so let's aim for that.
> > 
> > No quite the opposite instead. I'm not talking about buffering everything,
> > just about sending full-sized TCP segments when that makes sense. It's
> > extremely important in mobile environments where you need a time slot for
> > each frame sent, and where a PUSH implies an ACK that consumes bandwidth
> > and time slots.
> 
> I believe you are describing Linux's TCP_CORK/MSG_MORE and BSD's TCP_NOPUSH?

exactly.

> Since you've observed it - do you know if correct use of
> TCP_CORK/MSG_MORE/TCP_NOPUSH (where available) prevents the problem
> consistently (presumably with Nagle also disabled), instead of
> depending on toggling TCP_NODELAY optimistically on each write and
> hoping that does the right thing?

Yes, that what I've done in haproxy (I suspect we're becoming off-topic
here, we can continue off-list if you want). Basically I'm using MSG_MORE
on Linux which is stronger than TCP_NODELAY. So I set TCP_NODELAY on all
sockets and adjust the MSG_MORE flag on each send() depending on whether
I know there are more data behind it or not. That way the last segment
does not have the flag and goes out with TCP_NODELAY, leading to a PUSH.
That's extremely efficient, it sends full-sized segments without any added
latency since the last segment is never delayed. It's also important for
the receiver to get all segments at once, it generally allows its TCP
stack to deliver them all at once. This also presents the benefit of
saving some ACKs in the other direction : the receiver ACKs all it got
at once instead of ACKing them 2 by 2. Once again this is very important
in mobile environments.

> > But the behaviour above is often encountered when TCP proxies are used
> > to forward HTTP with Nagle disabled. Nagle should only be disabled when
> > the proxy has knowledge of the application layer and framing. Some
> > implementations clearly are abusive.
> 
> Leaving Nagle on can add horrible latency jitter to "smooth"
> interactive applications on LANs.

I agree. I discovered TCP_NODELAY 15 years ago when I was wondering why
my telnet sessions were jerky on top of a simple proxy I wrote.

> I've played a simple game of
> "snake" - two players each guiding their growing snake around and
> trying not to hit the other, every move received from a shared server.
> With Nagle, the motion of the snake head was very jittery, very
> visible, very unpleasant.  With Nagle turned off it was nice and
> smooth.

This is normal. Nagle waits for the last small frames to be ACKed before
sending more, in the hope that it can fill them in the mean time. This
causes undesired delays. This must never be enabled when quick response
or delivery is expected. That's why I was saying that it must be disabled
unless the application understands the protocol in order to adjust it at
will.

> That wasn't in a browser, but I'd expect exactly the same in a browser
> game with similar "smoothness" constraints.

You'd have the same issue with a browser. Try to enable nagle on a keep-alive
HTTP connection and get 100 objects on the same connection, you'll get old
memories :-)

> (But as you note, turning Nagle off can cause problems too.)
> 
> > > The paper's a bit dated (1997) and modern TCP implementations are
> > > better at avoiding the various problems described.
> > 
> > Not all, even last week I observed one, but I can't tell the name here ;-)
> 
> Hmm.
> 
> So, based on your observations, do you basically agree with me, that
> blindly forwarding bytes after CONNECT/Upgrade negotiation (which
> proxies aren't precisely specified to do but generally do), is not
> ideal for consistent and low WebSocket message latency?

It's the only way to ensure low delivery latency without understanding
what is spoken there. However, it will inevitably cause many PUSH flags
to be emitted, and as many ACKs the other way around. That's already
what happens with many proxied protocols.

Anyway, don't stress, for the proxy to receive the data in small chunks,
the sender will already have had to send them chunked the same way with
TCP_NODELAY as well. So the proxy won't cause more PUSH/ACKs to be
exchanged than if the communication happened directly between the sender
and the receiver.

A correctly designed proxy (basically one that does not set TCP_NODELAY
when it has more data in the buffers) does not generate more PUSH flags.
It can be seen as a repeater : what it gets small is sent small, what
it gets large is sent large.

Regards,
Willy


From ietf@adambarth.com  Mon Jan 24 15:24:16 2011
Return-Path: <ietf@adambarth.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 9927C3A69B6 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 15:24:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.744
X-Spam-Level: 
X-Spam-Status: No, score=-3.744 tagged_above=-999 required=5 tests=[AWL=-0.767, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 vqr48dnwuAe5 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 15:24:15 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 98BEC3A69B5 for <hybi@ietf.org>; Mon, 24 Jan 2011 15:24:15 -0800 (PST)
Received: by wyf23 with SMTP id 23so4865007wyf.31 for <hybi@ietf.org>; Mon, 24 Jan 2011 15:27:11 -0800 (PST)
Received: by 10.216.180.77 with SMTP id i55mr4139892wem.76.1295911630893; Mon, 24 Jan 2011 15:27:10 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id x3sm6871121wes.22.2011.01.24.15.27.08 (version=SSLv3 cipher=RC4-MD5); Mon, 24 Jan 2011 15:27:09 -0800 (PST)
Received: by iwn40 with SMTP id 40so4990246iwn.31 for <hybi@ietf.org>; Mon, 24 Jan 2011 15:27:07 -0800 (PST)
Received: by 10.231.13.133 with SMTP id c5mr5644425iba.39.1295911627133; Mon, 24 Jan 2011 15:27:07 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.35.13 with HTTP; Mon, 24 Jan 2011 15:26:36 -0800 (PST)
In-Reply-To: <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com>
From: Adam Barth <ietf@adambarth.com>
Date: Mon, 24 Jan 2011 15:26:36 -0800
Message-ID: <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Mon, 24 Jan 2011 23:24:16 -0000

On Sun, Jan 23, 2011 at 4:13 PM, Greg Wilkins <gregw@webtide.com> wrote:
> On 15 January 2011 08:59, Adam Barth <ietf@adambarth.com> wrote:
>> Having the client and the server negotiate masking doesn't really make
>> much sense. =A0The malicious server will just ask for whichever masking
>> it knows how to break.
>
> and the well intentioned browser will reject any connections that
> don't support masking extensions that the browser implementers believe
> are secure.
>
> If the browser implementers can maintain disciplines like not sending
> secure cookies over HTTP connections, then surely you can exercise
> enough self control to insist on masking extensions that you believe
> are secure. =A0 This smacks of the naive programmer arguments, which we
> have dismissed.

IMHO, it would be shame for browsers to all agree to speak one variant
of the protocol and have other folks speak another variant.

Adam

From gregw@intalio.com  Mon Jan 24 17:07:48 2011
Return-Path: <gregw@intalio.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 2603F3A699F for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 17:07:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.934
X-Spam-Level: 
X-Spam-Status: No, score=-2.934 tagged_above=-999 required=5 tests=[AWL=0.043,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 Y5MG+8RVlSbu for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 17:07:43 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 83B8C3A69DF for <hybi@ietf.org>; Mon, 24 Jan 2011 17:07:43 -0800 (PST)
Received: by qwi2 with SMTP id 2so4991522qwi.31 for <hybi@ietf.org>; Mon, 24 Jan 2011 17:10:39 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.47.75 with SMTP id m11mr4698336qaf.249.1295917839316; Mon, 24 Jan 2011 17:10:39 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Mon, 24 Jan 2011 17:10:39 -0800 (PST)
In-Reply-To: <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com> <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com>
Date: Tue, 25 Jan 2011 12:10:39 +1100
X-Google-Sender-Auth: Igwsvo-i2cxuCjeRyHaghkqQntE
Message-ID: <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Adam Barth <ietf@adambarth.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi@ietf.org
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 01:07:48 -0000

On 25 January 2011 10:26, Adam Barth <ietf@adambarth.com> wrote:
> IMHO, it would be shame for browsers to all agree to speak one variant
> of the protocol and have other folks speak another variant.

Why?    One-size-fits-all approaches seldom work and you end up with
one-size-fits-nobody-perfectly.

Specifically in this case some want strong masking, but many will not
accept crypto masking unless it is agile.  So since there is an
insistence of non negotiation of masking, we've settled on a
compromise of XOR - which makes the advocates of strong masking
unhappy because it's too weak and makes the advocates of no-masking
unhappy because they think it is a waste of cycles.    But it is the
consensus because it addresses some of the concerns of both camps.

If you want strong masking, then you have to make some concessions to
those that are strongly opposed to it. If masking was a negotiated
extension, then there appears to be less objections to using stronger
masking, because it can be turned off or replaced with something else.
    We could have XOR masking as the default extension, but a standard
aes-mask extension defined that could be used by browsers. We could
also have no-mask extension that could be used in environments known
to be safe.    The servers have to implement everything (but then we
always do and I expect it will be a while before I can drop even -76
support).

Variation is natural and a good thing.  Obviously we don't want
rampant featurism in required extensions, but we can control the non
x- extensions and make sure they stay at a sane level.

Note that it makes sense for masking to not be used with wss
connections and for server->client, so we are already talking about
making masking optional.  Using the standardized extension mechanism
just regulates this optional behaviour into something sane and
manageable.

regards

From ietf@adambarth.com  Mon Jan 24 17:14:46 2011
Return-Path: <ietf@adambarth.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 BEBD33A699F for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 17:14:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.74
X-Spam-Level: 
X-Spam-Status: No, score=-3.74 tagged_above=-999 required=5 tests=[AWL=-0.763,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 EdrCMK610XYn for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 17:14:46 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id F029E3A6973 for <hybi@ietf.org>; Mon, 24 Jan 2011 17:14:45 -0800 (PST)
Received: by vws7 with SMTP id 7so2148813vws.31 for <hybi@ietf.org>; Mon, 24 Jan 2011 17:17:41 -0800 (PST)
Received: by 10.220.112.18 with SMTP id u18mr1351500vcp.261.1295918261706; Mon, 24 Jan 2011 17:17:41 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id s6sm1786610vch.23.2011.01.24.17.17.40 (version=SSLv3 cipher=RC4-MD5); Mon, 24 Jan 2011 17:17:41 -0800 (PST)
Received: by iwn40 with SMTP id 40so5071580iwn.31 for <hybi@ietf.org>; Mon, 24 Jan 2011 17:17:39 -0800 (PST)
Received: by 10.231.35.136 with SMTP id p8mr5737833ibd.139.1295918259712; Mon, 24 Jan 2011 17:17:39 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.35.13 with HTTP; Mon, 24 Jan 2011 17:17:09 -0800 (PST)
In-Reply-To: <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com> <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com> <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com>
From: Adam Barth <ietf@adambarth.com>
Date: Mon, 24 Jan 2011 17:17:09 -0800
Message-ID: <AANLkTiniFWUguZbmncXwUeTBiFCBJkvFvJQj7CiM9gXH@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 01:14:46 -0000

On Mon, Jan 24, 2011 at 5:10 PM, Greg Wilkins <gregw@webtide.com> wrote:
> On 25 January 2011 10:26, Adam Barth <ietf@adambarth.com> wrote:
>> IMHO, it would be shame for browsers to all agree to speak one variant
>> of the protocol and have other folks speak another variant.
>
> Why?=A0One-size-fits-all approaches seldom work and you end up with
> one-size-fits-nobody-perfectly.

Greg, I'm tired of discussing this topic with you.  You're not
listening.  Please see my earlier messages on this topic.

Adam

From gregw@intalio.com  Mon Jan 24 17:33:16 2011
Return-Path: <gregw@intalio.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 4D76E3A6B54 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 17:33:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.935
X-Spam-Level: 
X-Spam-Status: No, score=-2.935 tagged_above=-999 required=5 tests=[AWL=0.042,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 MrNkUNR9eo7K for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 17:33:15 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id DE2333A6B53 for <hybi@ietf.org>; Mon, 24 Jan 2011 17:33:14 -0800 (PST)
Received: by qyk34 with SMTP id 34so3582936qyk.10 for <hybi@ietf.org>; Mon, 24 Jan 2011 17:36:10 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.214.71 with SMTP id gz7mr4720443qab.349.1295919370768; Mon, 24 Jan 2011 17:36:10 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Mon, 24 Jan 2011 17:36:10 -0800 (PST)
In-Reply-To: <AANLkTiniFWUguZbmncXwUeTBiFCBJkvFvJQj7CiM9gXH@mail.gmail.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com> <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com> <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com> <AANLkTiniFWUguZbmncXwUeTBiFCBJkvFvJQj7CiM9gXH@mail.gmail.com>
Date: Tue, 25 Jan 2011 12:36:10 +1100
X-Google-Sender-Auth: ojRqeZL-0el6fTqQydk7aHbmkyI
Message-ID: <AANLkTi=oyNqNWck3eVWdxrX_iEc9FEFdFVxC_+Bfy-6L@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Adam Barth <ietf@adambarth.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 01:33:16 -0000

On 25 January 2011 12:17, Adam Barth <ietf@adambarth.com> wrote:

> Greg, I'm tired of discussing this topic with you.

Nobody is compelling you to take part in this WG.   If you are tired,
I suggest a vacation.


>=A0You're not  listening. =A0Please see my earlier messages on this topic.


Your messages on this topic have contained little more than one line sentim=
ents:

 "... doesn't really make much sense."
 "it would be shame for ..."

The only justification you give for these sentiments is the
many-times-rebutted falsehood that malicious servers could dictate a
breakable masking extension.

I have asked you for more information about why you think variations
would be a shame, plus given my reasoning why I think some controlled
amount of variation is good.    But you have declined to give your
reasoning and have chosen instead to give another of your one line
dismissals, that I have seen several others complain about.

If you have nothing to say, then please say nothing.

From ekr@rtfm.com  Mon Jan 24 20:51:48 2011
Return-Path: <ekr@rtfm.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 964963A6A2F for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 20:51:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.681
X-Spam-Level: 
X-Spam-Status: No, score=-102.681 tagged_above=-999 required=5 tests=[AWL=0.296, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 zm7ugNj9vMUU for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 20:51:47 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id C884A3A6A3D for <hybi@ietf.org>; Mon, 24 Jan 2011 20:51:47 -0800 (PST)
Received: by gyd12 with SMTP id 12so1828680gyd.31 for <hybi@ietf.org>; Mon, 24 Jan 2011 20:54:44 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.33.13 with SMTP id g13mr6170351agg.162.1295931283853; Mon, 24 Jan 2011 20:54:43 -0800 (PST)
Received: by 10.90.116.7 with HTTP; Mon, 24 Jan 2011 20:54:43 -0800 (PST)
In-Reply-To: <4D3D388A.3020803@ericsson.com>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com>
Date: Mon, 24 Jan 2011 20:54:43 -0800
Message-ID: <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
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: Tue, 25 Jan 2011 04:51:48 -0000

On Mon, Jan 24, 2011 at 12:30 AM, Salvatore Loreto
<salvatore.loreto@ericsson.com> wrote:
> On 1/24/11 9:14 AM, Greg Wilkins wrote:
>>
>> On 21 January 2011 06:27, Salvatore Loreto
>> <salvatore.loreto@ericsson.com> =A0wrote:
>>>
>>> The mailing list discussion generated by the straw-poll has showed a
>>> large
>>> consensus
>>> to option #1
>>
>> Will we apply masking to wss ?
>
> good question!
> this has not been discussed at all.
>
> IMO, as individual,
> TLS already resolves all the issues that led us to mask frames in ws.

Well, you may believe that, but it's not correct:
The TLS client can generate data which will produce controllable ciphertext
for a number of ciphers.

-Ekr

From mjs@apple.com  Mon Jan 24 22:44:13 2011
Return-Path: <mjs@apple.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 6B4813A6A60 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 22:44:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.553
X-Spam-Level: 
X-Spam-Status: No, score=-106.553 tagged_above=-999 required=5 tests=[AWL=0.046, BAYES_00=-2.599, 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 oANqLQG-VFca for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 22:44:11 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id E7B653A6A5D for <hybi@ietf.org>; Mon, 24 Jan 2011 22:44:11 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out3.apple.com (Postfix) with ESMTP id D84CAC9FC177 for <hybi@ietf.org>; Mon, 24 Jan 2011 22:47:08 -0800 (PST)
X-AuditID: 11807136-b7c24ae000004221-8b-4d3e71ec244d
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay15.apple.com (Apple SCV relay) with SMTP id 7F.9E.16929.CE17E3D4; Mon, 24 Jan 2011 22:47:08 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.57.223] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LFK00HMGG6KKB20@gertie.apple.com> for hybi@ietf.org; Mon, 24 Jan 2011 22:47:08 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com>
Date: Mon, 24 Jan 2011 22:47:07 -0800
Message-id: <F120935B-807D-4D54-9723-75D9DAAB3F35@apple.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com> <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com> <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 06:44:13 -0000

On Jan 24, 2011, at 5:10 PM, Greg Wilkins wrote:

> On 25 January 2011 10:26, Adam Barth <ietf@adambarth.com> wrote:
>> IMHO, it would be shame for browsers to all agree to speak one variant
>> of the protocol and have other folks speak another variant.
> 
> Why?    One-size-fits-all approaches seldom work and you end up with
> one-size-fits-nobody-perfectly.
> 
> Specifically in this case some want strong masking, but many will not
> accept crypto masking unless it is agile.  So since there is an
> insistence of non negotiation of masking, we've settled on a
> compromise of XOR - which makes the advocates of strong masking
> unhappy because it's too weak and makes the advocates of no-masking
> unhappy because they think it is a waste of cycles.    But it is the
> consensus because it addresses some of the concerns of both camps.

If you're building a server that needs to talk to browsers, and browsers require strong masking, then the fact that weak masking or no masking is available doesn't save you any cycles. Conversely, having a weaker and a stronger approach gives you the effective security of the weakest link. That's particularly so in threat models where the attacker is not using a WebSocket client. In that case, the fact that browser-hosted WebSocket clients insist on stronger masking does nothing to help if servers do not insist on it. As I understand it, CPU usage concerns are in large part about decoding incoming traffic from the Web, not just datacenter-internal routing.

So as I see it, having both ways to do it, of which browsers always require one, defeats the goals of both camps.

Much as I would like to see a more effective masking alogorithm, I don't think switchability gives a net benefit over weak masking.

Regards,
Maciej


From gregw@intalio.com  Mon Jan 24 23:16:10 2011
Return-Path: <gregw@intalio.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 D47523A6A18 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 23:16:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.935
X-Spam-Level: 
X-Spam-Status: No, score=-2.935 tagged_above=-999 required=5 tests=[AWL=0.042,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 CPsSextouR5O for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 23:16:10 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id E56ED3A69AC for <hybi@ietf.org>; Mon, 24 Jan 2011 23:16:09 -0800 (PST)
Received: by qwi2 with SMTP id 2so5240024qwi.31 for <hybi@ietf.org>; Mon, 24 Jan 2011 23:19:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.36.208 with SMTP id u16mr5005658qad.299.1295939946286; Mon, 24 Jan 2011 23:19:06 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Mon, 24 Jan 2011 23:19:06 -0800 (PST)
In-Reply-To: <F120935B-807D-4D54-9723-75D9DAAB3F35@apple.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com> <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com> <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com> <F120935B-807D-4D54-9723-75D9DAAB3F35@apple.com>
Date: Tue, 25 Jan 2011 18:19:06 +1100
X-Google-Sender-Auth: z93_t30mJ8hyhx953a3Bn4YFCzU
Message-ID: <AANLkTinXbidBjOZeMkysSmXTpRi_59zTU9hbD1U9BO5C@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi@ietf.org
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 07:16:11 -0000

On 25 January 2011 17:47, Maciej Stachowiak <mjs@apple.com> wrote:
>
> If you're building a server that needs to talk to browsers, and browsers require strong masking, then the fact that weak masking or no masking is available doesn't save you any cycles.

It does if you can offload the masking from your app servers to a
dedicated WS terminator/aggregator.



> Conversely, having a weaker and a stronger approach gives you the effective security of the weakest link.

Not at all.  Nobody says that SSL offloaders invalidate the security
of SSL because they have a weak link within the data centre. They do
increase the required security concerns of data centres, but obviously
not prohibitively so.     In the case of WS, the data centre security
is less of an issue because it is unlikely that a malicious attacker
will be able to physically install a vulnerable caching intermediary.


> As I understand it, CPU usage concerns are in large part about decoding incoming traffic from the Web,
> not just datacenter-internal routing.

Sure, there are multiple concerns about the CPU usage that masking
requires, both on app servers and on intermediaries. I think this
concern was central to the forming of the consensus around a simple
masking algorithm.


> So as I see it, having both ways to do it, of which browsers always require one, defeats the goals of both camps.
> Much as I would like to see a more effective masking algorithm, I don't think switchability gives a net benefit over
> weak masking.

So your preference is for mandatory weak masking over negotiated
strong masking.  Which is fine as that is what Sal has called as the
consensus and is probably what we will go forward with.

My preference is for mandatory weak masking over mandatory strong
masking, so I can live with the consensus as well.

I just think that if we could somehow mitigate your concerns about
negotiated masking, then there is a solution where all can be a little
be more satisfied than they are currently.   Again citing SSL as an
example, it has negotiated algorithms, offloaders and null ciphers,
yet this does not invalidate SSL security - so I don't see why we are
holding websockets to a higher standard.

regards

From mjs@apple.com  Mon Jan 24 23:46:23 2011
Return-Path: <mjs@apple.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 DF0BA3A6A69 for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 23:46:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.554
X-Spam-Level: 
X-Spam-Status: No, score=-106.554 tagged_above=-999 required=5 tests=[AWL=0.045, BAYES_00=-2.599, 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 FUesDX185zTj for <hybi@core3.amsl.com>; Mon, 24 Jan 2011 23:46:23 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id CD2923A6A60 for <hybi@ietf.org>; Mon, 24 Jan 2011 23:46:22 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out3.apple.com (Postfix) with ESMTP id B8564C9FDA11 for <hybi@ietf.org>; Mon, 24 Jan 2011 23:49:19 -0800 (PST)
X-AuditID: 11807136-b7c24ae000004221-55-4d3e807f3c59
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay15.apple.com (Apple SCV relay) with SMTP id 35.1A.16929.F708E3D4; Mon, 24 Jan 2011 23:49:19 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.57.223] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LFK00H1NJ26KB40@gertie.apple.com> for hybi@ietf.org; Mon, 24 Jan 2011 23:49:19 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTinXbidBjOZeMkysSmXTpRi_59zTU9hbD1U9BO5C@mail.gmail.com>
Date: Mon, 24 Jan 2011 23:49:18 -0800
Message-id: <04B78872-EA5A-485E-ACCF-C68B6EB61ABB@apple.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com> <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com> <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com> <F120935B-807D-4D54-9723-75D9DAAB3F35@apple.com> <AANLkTinXbidBjOZeMkysSmXTpRi_59zTU9hbD1U9BO5C@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 07:46:24 -0000

On Jan 24, 2011, at 11:19 PM, Greg Wilkins wrote:

> On 25 January 2011 17:47, Maciej Stachowiak <mjs@apple.com> wrote:
>> 
>> If you're building a server that needs to talk to browsers, and browsers require strong masking, then the fact that weak masking or no masking is available doesn't save you any cycles.
> 
> It does if you can offload the masking from your app servers to a
> dedicated WS terminator/aggregator.

One exhaustively debated posited use case was for a WebSocket terminator that accepts outside traffic and reroutes it to private servers. So the cost of offloading this masking is precisely the concern of many.

> 
>> Conversely, having a weaker and a stronger approach gives you the effective security of the weakest link.
> 
> Not at all.  Nobody says that SSL offloaders invalidate the security
> of SSL because they have a weak link within the data centre. They do
> increase the required security concerns of data centres, but obviously
> not prohibitively so.     In the case of WS, the data centre security
> is less of an issue because it is unlikely that a malicious attacker
> will be able to physically install a vulnerable caching intermediary.

That's not what I meant. If a protocol offers a choice of A or B, then it is generally vulnerable to attacks on either A or B.

> 
>> As I understand it, CPU usage concerns are in large part about decoding incoming traffic from the Web,
>> not just datacenter-internal routing.
> 
> Sure, there are multiple concerns about the CPU usage that masking
> requires, both on app servers and on intermediaries. I think this
> concern was central to the forming of the consensus around a simple
> masking algorithm.

Willy's specific test case was meant to model a WebSocket multiplexing terminator that accepts lots of connections from the public Internet. I think you are wrong.

But if you can demonstrate consensus among those who expressed CPU concerns that they only care about CPU usage on private internal connections, I'm sure the chairs will take that into account.

> 
>> So as I see it, having both ways to do it, of which browsers always require one, defeats the goals of both camps.
>> Much as I would like to see a more effective masking algorithm, I don't think switchability gives a net benefit over
>> weak masking.
> 
> So your preference is for mandatory weak masking over negotiated
> strong masking.  Which is fine as that is what Sal has called as the
> consensus and is probably what we will go forward with.
> 
> My preference is for mandatory weak masking over mandatory strong
> masking, so I can live with the consensus as well.
> 
> I just think that if we could somehow mitigate your concerns about
> negotiated masking, then there is a solution where all can be a little
> be more satisfied than they are currently.   Again citing SSL as an
> example, it has negotiated algorithms, offloaders and null ciphers,
> yet this does not invalidate SSL security - so I don't see why we are
> holding websockets to a higher standard.

I expect instead that many will be less satisfied (apparently excluding you). 

Regards,
Maciej



From gregw@intalio.com  Tue Jan 25 00:04:11 2011
Return-Path: <gregw@intalio.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 EE90C3A6B7D for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 00:04:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.935
X-Spam-Level: 
X-Spam-Status: No, score=-2.935 tagged_above=-999 required=5 tests=[AWL=0.042,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 Hr+eev4Y7qve for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 00:04:11 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 119F33A6A73 for <hybi@ietf.org>; Tue, 25 Jan 2011 00:04:10 -0800 (PST)
Received: by qwi2 with SMTP id 2so5275988qwi.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 00:07:07 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.87.13 with SMTP id u13mr4384075qcl.55.1295942827757; Tue, 25 Jan 2011 00:07:07 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Tue, 25 Jan 2011 00:07:07 -0800 (PST)
In-Reply-To: <04B78872-EA5A-485E-ACCF-C68B6EB61ABB@apple.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com> <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com> <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com> <F120935B-807D-4D54-9723-75D9DAAB3F35@apple.com> <AANLkTinXbidBjOZeMkysSmXTpRi_59zTU9hbD1U9BO5C@mail.gmail.com> <04B78872-EA5A-485E-ACCF-C68B6EB61ABB@apple.com>
Date: Tue, 25 Jan 2011 19:07:07 +1100
X-Google-Sender-Auth: X7gPKXvQV3ZWsydXx7vX2ZcphIw
Message-ID: <AANLkTinwECWMN+TSGeNkX1j=QWw3DgcjoiVbP+6hw0W=@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: hybi@ietf.org
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 08:04:12 -0000

On 25 January 2011 18:49, Maciej Stachowiak <mjs@apple.com> wrote:
> That's not what I meant. If a protocol offers a choice of A or B, then it is generally vulnerable to attacks on either A or B.

What I'm suggesting is that the protocol, as implemented for browsers
does not offer A or B, it only offers B - so if A is vulnerable to
attacks, this is not a concern for the browsers.

I understand that you are also concerned about non-WS clients being
tricked into talking to a server that supports option A or B and thus
being able to pick the most vulnerable. But if the a non-ws client can
send a fake WS handshake (which I don't think it can) and if it can
send a fake WS frame, then it can set the XOR mask to whatever it
likes and send whatever clear text it likes anyway.    Thus I don't
think you have substantiated your concerns about this attack vector in
regards to servers offering A or B to non-WS clients.

but whatever... the consensus is for mandatory XOR - I'll stop
advocating negotiated masking if others drop the advocacy for strong
masking (  or  support  negotiated masking and I'll put my hand up in
support of an AES mask extension ).

regards

From dave@cridland.net  Tue Jan 25 00:17:13 2011
Return-Path: <dave@cridland.net>
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 29BD23A6964 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 00:17:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.553
X-Spam-Level: 
X-Spam-Status: No, score=-2.553 tagged_above=-999 required=5 tests=[AWL=0.046,  BAYES_00=-2.599]
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 iqRYnEUSyPFs for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 00:17:12 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id C8F5B3A6A30 for <hybi@ietf.org>; Tue, 25 Jan 2011 00:17:11 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 1E84411680BB; Tue, 25 Jan 2011 08:20:06 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y6rf3jmeePyD; Tue, 25 Jan 2011 08:20:04 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id F3E2811680BA; Tue, 25 Jan 2011 08:20:03 +0000 (GMT)
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com> <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com> <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com> <F120935B-807D-4D54-9723-75D9DAAB3F35@apple.com> <AANLkTinXbidBjOZeMkysSmXTpRi_59zTU9hbD1U9BO5C@mail.gmail.com> <04B78872-EA5A-485E-ACCF-C68B6EB61ABB@apple.com> <AANLkTinwECWMN+TSGeNkX1j=QWw3DgcjoiVbP+6hw0W=@mail.gmail.com>
In-Reply-To: <AANLkTinwECWMN+TSGeNkX1j=QWw3DgcjoiVbP+6hw0W=@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <28835.1295943603.888072@puncture>
Date: Tue, 25 Jan 2011 08:20:03 +0000
From: Dave Cridland <dave@cridland.net>
To: Greg Wilkins <gregw@webtide.com>, Server-Initiated HTTP <hybi@ietf.org>, Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 08:17:13 -0000

On Tue Jan 25 08:07:07 2011, Greg Wilkins wrote:
> On 25 January 2011 18:49, Maciej Stachowiak <mjs@apple.com> wrote:
> > That's not what I meant. If a protocol offers a choice of A or B,  
> then it is generally vulnerable to attacks on either A or B.
> 
> What I'm suggesting is that the protocol, as implemented for  
> browsers
> does not offer A or B, it only offers B - so if A is vulnerable to
> attacks, this is not a concern for the browsers.
> 
> 
That doesn't satisfy me at all. My concern is partly the wasted clock  
cycles, but also the quasi-legal implications of using cryptographic  
algorithms. (And yes, I do know it's not really cryptography, but the  
wording on the EU dual-use export control document, taken at face  
value, still seems to apply).

On top of that, there are some environments we deploy in where  
cryptographic usage is carefully controlled. I think we probably  
could get around these cases, mind, but it's friction I could happily  
do without.

Since I need to have my server interop with browsers, then if the  
browsers always negotiate a masking I may not be able to provide, I'm  
well and truly screwed.

It's bad enough living with masking - it's already a horrendous waste  
of CPU and bandwidth, IMHO, but making it negotiated won't change  
anything in practical cases, and it may actually make things worse.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From dave@cridland.net  Tue Jan 25 00:17:16 2011
Return-Path: <dave@cridland.net>
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 1264E3A6964 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 00:17:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.554
X-Spam-Level: 
X-Spam-Status: No, score=-2.554 tagged_above=-999 required=5 tests=[AWL=0.045,  BAYES_00=-2.599]
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 dfqhfFBlyHEk for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 00:17:15 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 0EB4C3A6B86 for <hybi@ietf.org>; Tue, 25 Jan 2011 00:17:15 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 3FE8411680BB; Tue, 25 Jan 2011 08:20:11 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5Z8EiTv1wWXZ; Tue, 25 Jan 2011 08:20:10 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id DCA3B11680BA; Tue, 25 Jan 2011 08:20:09 +0000 (GMT)
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com>
In-Reply-To: <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <28835.1295943609.914593@puncture>
Date: Tue, 25 Jan 2011 08:20:09 +0000
From: Dave Cridland <dave@cridland.net>
To: Eric Rescorla <ekr@rtfm.com>, Server-Initiated HTTP <hybi@ietf.org>, Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
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: Tue, 25 Jan 2011 08:17:16 -0000

On Tue Jan 25 04:54:43 2011, Eric Rescorla wrote:
> The TLS client can generate data which will produce controllable  
> ciphertext
> for a number of ciphers.

That argument would appear to apply equally to HTTPS as to WSS; after  
all, both are simply TLS clients, externally. I'd have to argue that  
this implies a general security issue within TLS, and one that needs  
to be solved there.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From salvatore.loreto@ericsson.com  Tue Jan 25 00:32:29 2011
Return-Path: <salvatore.loreto@ericsson.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 79DD23A6B84 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 00:32:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.552
X-Spam-Level: 
X-Spam-Status: No, score=-106.552 tagged_above=-999 required=5 tests=[AWL=0.047, BAYES_00=-2.599, 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 chSvacocBNBK for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 00:32:28 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 50AE83A6B81 for <hybi@ietf.org>; Tue, 25 Jan 2011 00:32:28 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-07-4d3e8b4c5cdd
Received: from esessmw0197.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id EC.F8.13987.C4B8E3D4; Tue, 25 Jan 2011 09:35:24 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0197.eemea.ericsson.se (153.88.115.88) with Microsoft SMTP Server id 8.2.234.1; Tue, 25 Jan 2011 09:35:24 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 22585271B; Tue, 25 Jan 2011 10:35:24 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id DE2C9506DB; Tue, 25 Jan 2011 10:35:23 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 39A1250433; Tue, 25 Jan 2011 10:35:23 +0200 (EET)
Message-ID: <4D3E8B4A.2040000@ericsson.com>
Date: Tue, 25 Jan 2011 09:35:22 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: Eric Rescorla <ekr@rtfm.com>
References: <4D388CBD.4040708@ericsson.com>	<AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com>	<4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com>
In-Reply-To: <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
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: Tue, 25 Jan 2011 08:32:30 -0000

On 1/25/11 5:54 AM, Eric Rescorla wrote:
> On Mon, Jan 24, 2011 at 12:30 AM, Salvatore Loreto
> <salvatore.loreto@ericsson.com>  wrote:
>> On 1/24/11 9:14 AM, Greg Wilkins wrote:
>>> On 21 January 2011 06:27, Salvatore Loreto
>>> <salvatore.loreto@ericsson.com>    wrote:
>>>> The mailing list discussion generated by the straw-poll has showed a
>>>> large
>>>> consensus
>>>> to option #1
>>> Will we apply masking to wss ?
>> good question!
>> this has not been discussed at all.
>>
>> IMO, as individual,
>> TLS already resolves all the issues that led us to mask frames in ws.
> Well, you may believe that, but it's not correct:
> The TLS client can generate data which will produce controllable ciphertext
> for a number of ciphers.
my guess come from the fact that I haven't seen any explicit discussion 
about it.
But I was also pretty sure to be proved wrong, that was the reason why I 
started the thread

/Sal


From andy.warmcat.com@googlemail.com  Tue Jan 25 01:24:46 2011
Return-Path: <andy.warmcat.com@googlemail.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 EE2E63A6A85 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 01:24:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.551
X-Spam-Level: 
X-Spam-Status: No, score=-3.551 tagged_above=-999 required=5 tests=[AWL=0.048,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 svsNft9HBvux for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 01:24:44 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 971FE3A6A7A for <hybi@ietf.org>; Tue, 25 Jan 2011 01:24:44 -0800 (PST)
Received: by wyf23 with SMTP id 23so5466685wyf.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 01:27:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=CXb0XAWSZNCrMyZU6YGhkYQ8yloONl6b0ui4mEHPsAs=; b=r+Sb9iHCL2TE/Wt4B4h3+fX1CCbfDORmFkjbdVJ4xUGqko/B9OtF28UNLaDdsTzZ7m N7H1iWXbxgb9s0DWXhVL+XJyaJVxUa9RpLEaaURl2nnY4DLX0R0924dXAd4EzXwxk56u U4wa8X/HmDKne8DCSQLuS8QlLJdLFYqckpC5E=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=dLkFcxjlVAJ1gd2E15R+Y6mYQ2FU6eCNA2TyeQk1Iwo6GP3lrqMtcqkdwfJdBiYlu4 PqkjUw1G+4PmhYMuI51J5XvBdltXK7Ugc8KpKEqWEriwiMIk2xL7yu7yvh5sPgWYAmq8 rqUsqx3xUV/UTr7y6Nm9AHf1Tuvh+nTsvNtxA=
Received: by 10.227.133.81 with SMTP id e17mr5539205wbt.176.1295947660946; Tue, 25 Jan 2011 01:27:40 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id q18sm9971137wbe.17.2011.01.25.01.27.38 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 01:27:39 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3E977C.7080103@warmcat.com>
Date: Tue, 25 Jan 2011 09:27:24 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
References: <4D388CBD.4040708@ericsson.com>	<AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com>	<4D3D388A.3020803@ericsson.com>	<AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <4D3E8B4A.2040000@ericsson.com>
In-Reply-To: <4D3E8B4A.2040000@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss / tls controllable
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Tue, 25 Jan 2011 09:24:46 -0000

On 01/25/11 08:35, Somebody in the thread at some point said:

>>> IMO, as individual,
>>> TLS already resolves all the issues that led us to mask frames in ws.
>> Well, you may believe that, but it's not correct:
>> The TLS client can generate data which will produce controllable
>> ciphertext
>> for a number of ciphers.
> my guess come from the fact that I haven't seen any explicit discussion
> about it.
> But I was also pretty sure to be proved wrong, that was the reason why I
> started the thread

If TLS "produces controllable ciphertext" does that mean every browser's 
SSL is an attack vector for these supposed vulnerable proxies same as 
"ws:// with no munging" was accused of?

I hope the browser vendors will immediately disable SSL support by 
default if so, until munging can be added to ssl: same as they did for 
ws://...

-Andy

From andy.warmcat.com@googlemail.com  Tue Jan 25 01:31:31 2011
Return-Path: <andy.warmcat.com@googlemail.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 C08243A682A for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 01:31:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.553
X-Spam-Level: 
X-Spam-Status: No, score=-3.553 tagged_above=-999 required=5 tests=[AWL=0.046,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 RRxFCZ4tl9IP for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 01:31:30 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 9EAC83A63CB for <hybi@ietf.org>; Tue, 25 Jan 2011 01:31:30 -0800 (PST)
Received: by wyf23 with SMTP id 23so5473682wyf.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 01:34:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:subject:content-type:content-transfer-encoding; bh=vhE2c0As8V2oRnhTf/VhNaZEXYSyqzDp1Sf//VNXobc=; b=udO4uuLz7MeV9IXWYsjAa+SJkkKjIKIRJO1SAawm98FTy9mHG8DDqqQDefrykS1ENs E+2uyd4NElKrYg+DWavqnxJR+fJ2wxJ5Kxa67u3bu+EBwo7RRMKAEKIuqzvQarySP6TP EQCXwcF5+9IwxW1QSMeshKH3EtmXOusjcyAek=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; b=RX6pfLi8DTPnUVStOcZpOjNjl0sZfRfGdrmjAqwqnK10x0NKa++lkNIAkQz9gISJ4j hVOAfIZZeZ8zK6+txIj12xSDs8QwvN6/eqfWAh5QEKxOPrOfbGf/Xy8Ftwrx6P8rP8Xd lMByC7/nnSG3tp1uLUhhsABlBGlFJci+L2jE4=
Received: by 10.227.132.213 with SMTP id c21mr5565970wbt.28.1295948067247; Tue, 25 Jan 2011 01:34:27 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id f35sm9973536wbf.14.2011.01.25.01.34.26 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 01:34:26 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3E9921.7070607@warmcat.com>
Date: Tue, 25 Jan 2011 09:34:25 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [hybi] Value of "superframes"
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Tue, 25 Jan 2011 09:31:31 -0000

Hi -

What's the thinking behind the FIN bit and frames with a continuation 
opcode?

It seems to create a concept of "superframes", each consisting of an 
unbounded number of frames which identify their own frame length in advance.

What is the value of that system compared to just having atomic frames 
with their length identified in advance?

-Andy

From mjs@apple.com  Tue Jan 25 03:34:10 2011
Return-Path: <mjs@apple.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 16BF33A683F for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 03:34:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.555
X-Spam-Level: 
X-Spam-Status: No, score=-106.555 tagged_above=-999 required=5 tests=[AWL=0.044, BAYES_00=-2.599, 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 OvKxRYM4nXdd for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 03:34:09 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 398DE3A63C9 for <hybi@ietf.org>; Tue, 25 Jan 2011 03:34:09 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out3.apple.com (Postfix) with ESMTP id 24660CA04BB1 for <hybi@ietf.org>; Tue, 25 Jan 2011 03:36:53 -0800 (PST)
X-AuditID: 11807136-b7c24ae000004221-81-4d3eb5d4a5c3
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay15.apple.com (Apple SCV relay) with SMTP id 87.A9.16929.5D5BE3D4; Tue, 25 Jan 2011 03:36:53 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.59.46] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LFK00MXKTLGOX00@gertie.apple.com> for hybi@ietf.org; Tue, 25 Jan 2011 03:36:52 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D3E977C.7080103@warmcat.com>
Date: Tue, 25 Jan 2011 03:36:52 -0800
Message-id: <CD26FC5B-B97F-4424-AE6F-2DE8AE29832F@apple.com>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <4D3E8B4A.2040000@ericsson.com> <4D3E977C.7080103@warmcat.com>
To: andy@warmcat.com
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss / tls controllable
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: Tue, 25 Jan 2011 11:34:10 -0000

On Jan 25, 2011, at 1:27 AM, Andy Green wrote:

> On 01/25/11 08:35, Somebody in the thread at some point said:
> 
>>>> IMO, as individual,
>>>> TLS already resolves all the issues that led us to mask frames in ws.
>>> Well, you may believe that, but it's not correct:
>>> The TLS client can generate data which will produce controllable
>>> ciphertext
>>> for a number of ciphers.
>> my guess come from the fact that I haven't seen any explicit discussion
>> about it.
>> But I was also pretty sure to be proved wrong, that was the reason why I
>> started the thread
> 
> If TLS "produces controllable ciphertext" does that mean every browser's SSL is an attack vector for these supposed vulnerable proxies same as "ws:// with no munging" was accused of?
> 
> I hope the browser vendors will immediately disable SSL support by default if so, until munging can be added to ssl: same as they did for ws://...

The transparent proxy vulnerability stems from sending an HTTP request making use of the Upgrade feature, coupled with the fact that seemingly a number intermediaries don't understand it, and may interpret subsequent content on the same connection as additional requests. You can't do that with TLS, because it starts with a TLS handshake, not an unusual HTTP request. The attacker does not have control over the TLS handshake.

Regards,
Maciej


From andy.warmcat.com@googlemail.com  Tue Jan 25 03:49:04 2011
Return-Path: <andy.warmcat.com@googlemail.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 C8EC03A683E for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 03:49:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.554
X-Spam-Level: 
X-Spam-Status: No, score=-3.554 tagged_above=-999 required=5 tests=[AWL=0.045,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 oefFoAOIBjKp for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 03:49:03 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 6FAA23A6B80 for <hybi@ietf.org>; Tue, 25 Jan 2011 03:49:03 -0800 (PST)
Received: by wyf23 with SMTP id 23so5615706wyf.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 03:52:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=HKPUPGzzuJ2qXIkZuAfj8fggokCOVTyoCiCdAKiRwP4=; b=hSdnrENRsq7JxKi/dbpXbBoXJrHmvt5Wi/SLaZheXp6RX/AyvgTtiNZ+6hpjUM5LUf G5YSOZ+4x76MhEqwn2OEdnuCJGeJZMLSmVTE7uyQnc48HcC0AQoQS/doJ63eyHNMjm9w y6NVxOo5Hi0Y/ZorLEoorqOWzcWJluj3LmF+I=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=wpdZmCXYsiXmgKE35cZLReA+pgP8iF21n8G/kUf0ntoQcZOgF/vTit5iiC/D2ovUKR P6Y9Pe7TaCv36LUGGSqLm39HzgMri48F0cql5jgMbfaLQfNyAf+nqAsLsdnc5CxVF5L0 HXrWuqmnu46D3VEVLqHIl0RlskBMFuXMSwtRU=
Received: by 10.227.154.132 with SMTP id o4mr3230389wbw.93.1295956320190; Tue, 25 Jan 2011 03:52:00 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id 11sm10053491wbi.0.2011.01.25.03.51.26 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 03:51:40 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3EB939.4050303@warmcat.com>
Date: Tue, 25 Jan 2011 11:51:21 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Maciej Stachowiak <mjs@apple.com>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <4D3E8B4A.2040000@ericsson.com> <4D3E977C.7080103@warmcat.com> <CD26FC5B-B97F-4424-AE6F-2DE8AE29832F@apple.com>
In-Reply-To: <CD26FC5B-B97F-4424-AE6F-2DE8AE29832F@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss / tls controllable
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Tue, 25 Jan 2011 11:49:04 -0000

On 01/25/11 11:36, Somebody in the thread at some point said:

>> If TLS "produces controllable ciphertext" does that mean every
>> browser's SSL is an attack vector for these supposed vulnerable
>> proxies same as "ws:// with no munging" was accused of?

> The transparent proxy vulnerability stems from sending an HTTP
> request making use of the Upgrade feature, coupled with the fact that
> seemingly a number intermediaries don't understand it, and may
> interpret subsequent content on the same connection as additional
> requests. You can't do that with TLS, because it starts with a TLS
> handshake, not an unusual HTTP request. The attacker does not have
> control over the TLS handshake.

Then... in your opinion too there is no reason to have munging on wss://?

-Andy

From mjs@apple.com  Tue Jan 25 04:05:53 2011
Return-Path: <mjs@apple.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 60C1C3A6AC5 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 04:05:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.556
X-Spam-Level: 
X-Spam-Status: No, score=-106.556 tagged_above=-999 required=5 tests=[AWL=0.043, BAYES_00=-2.599, 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 EebwhJ7yK9qr for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 04:05:52 -0800 (PST)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 8D5123A684B for <hybi@ietf.org>; Tue, 25 Jan 2011 04:05:52 -0800 (PST)
Received: from relay15.apple.com (relay15.apple.com [17.128.113.54]) by mail-out4.apple.com (Postfix) with ESMTP id EAF96CDEE0D5 for <hybi@ietf.org>; Tue, 25 Jan 2011 04:08:49 -0800 (PST)
X-AuditID: 11807136-b7c24ae000004221-3d-4d3ebd514c6d
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay15.apple.com (Apple SCV relay) with SMTP id 94.6D.16929.15DBE3D4; Tue, 25 Jan 2011 04:08:49 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.59.46] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LFK00A91V2PEG40@elliott.apple.com> for hybi@ietf.org; Tue, 25 Jan 2011 04:08:49 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D3EB939.4050303@warmcat.com>
Date: Tue, 25 Jan 2011 04:08:49 -0800
Message-id: <B5318204-CA21-43E0-A10F-CF3282808622@apple.com>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <4D3E8B4A.2040000@ericsson.com> <4D3E977C.7080103@warmcat.com> <CD26FC5B-B97F-4424-AE6F-2DE8AE29832F@apple.com> <4D3EB939.4050303@warmcat.com>
To: andy@warmcat.com
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss / tls controllable
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: Tue, 25 Jan 2011 12:05:53 -0000

On Jan 25, 2011, at 3:51 AM, Andy Green wrote:

> On 01/25/11 11:36, Somebody in the thread at some point said:
> 
>>> If TLS "produces controllable ciphertext" does that mean every
>>> browser's SSL is an attack vector for these supposed vulnerable
>>> proxies same as "ws:// with no munging" was accused of?
> 
>> The transparent proxy vulnerability stems from sending an HTTP
>> request making use of the Upgrade feature, coupled with the fact that
>> seemingly a number intermediaries don't understand it, and may
>> interpret subsequent content on the same connection as additional
>> requests. You can't do that with TLS, because it starts with a TLS
>> handshake, not an unusual HTTP request. The attacker does not have
>> control over the TLS handshake.
> 
> Then... in your opinion too there is no reason to have munging on wss://?

I think it could be useful for addressing other threat models than the HTTP intercept proxy. Unfortunately, the chairs chose a masking scheme too weak to defend against attacks using HTTP(S) against a WebSocket server. However, there could still be some protection for infrastructure such as dedicated TLS terminators or man-in-the-middle filtering TLS proxies.

Regards,
Maciej


From andy.warmcat.com@googlemail.com  Tue Jan 25 05:21:40 2011
Return-Path: <andy.warmcat.com@googlemail.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 6DE1A28B56A for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 05:21:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 JiuEuMToeebp for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 05:21:39 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 12D3F3A6BBF for <hybi@ietf.org>; Tue, 25 Jan 2011 05:21:38 -0800 (PST)
Received: by wyf23 with SMTP id 23so5709568wyf.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 05:24:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=X2+Ro7KPK5VbGKM2aI85VHClP2ogcKY1dxgP7CqWihs=; b=LwapTPucJUSc/jflKm+mis+sUmQ7lKtKDk0Spvv5uC5t54+h90sCMp8kyeTgeyjAnM j36Orv8/7V4Hopp0TRLjsCKoDhJaGOnlgUNF8/NjUNqWNdH+k0KcMhepb4z+jBqwY13r ppLoa3wjuLs4jQLB1QoLPb9ytrltx6SpxgY8I=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=ToCYoOU1zGV6SDyzE+nxcAqAUIz3H4U+LggK54yNW8HlNwJZQVcSqQgxfMbKAzu4rA SO1QXPsWd0Hkf3uSRgFEGib5h0HqhT2tV2JEEX9k5iVoGfEyZXybyl8jn5X9NpvGz62G c6EOstTJ7UxM5G3x1YMbwMbyPXTzSFbn6IoSM=
Received: by 10.227.144.12 with SMTP id x12mr5846299wbu.102.1295961876036; Tue, 25 Jan 2011 05:24:36 -0800 (PST)
Received: from [192.168.0.18] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id y29sm4977712wbd.10.2011.01.25.05.24.34 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 05:24:35 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3ECF11.20406@warmcat.com>
Date: Tue, 25 Jan 2011 13:24:33 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Maciej Stachowiak <mjs@apple.com>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <4D3E8B4A.2040000@ericsson.com> <4D3E977C.7080103@warmcat.com> <CD26FC5B-B97F-4424-AE6F-2DE8AE29832F@apple.com> <4D3EB939.4050303@warmcat.com> <B5318204-CA21-43E0-A10F-CF3282808622@apple.com>
In-Reply-To: <B5318204-CA21-43E0-A10F-CF3282808622@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss / tls controllable
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Tue, 25 Jan 2011 13:21:40 -0000

On 01/25/11 12:08, Somebody in the thread at some point said:

>> Then... in your opinion too there is no reason to have munging on
>> wss://?
>
> I think it could be useful for addressing other threat models than
> the HTTP intercept proxy. Unfortunately, the chairs chose a masking
> scheme too weak to defend against attacks using HTTP(S) against a
> WebSocket server. However, there could still be some protection for
> infrastructure such as dedicated TLS terminators or man-in-the-middle
> filtering TLS proxies.

Well the difficulty bothering me is that nobody is going to "get fired" 
for piling more and more obfuscation and computational burden on 
websocket protocol "just in case" without any reproducible scenario as 
you are doing above.   Nobody will "get fired" for including more and 
more vague scenarios into what is meant to be websockets' problem to 
protect against either.  It seems to me to have reached a new pinnacle 
of otherworldliness to demand munging inside an ssl tunnel "just in case".

I don't see how this process leads to designing a good lightweight 
protocol (or makes the world more secure).

-Andy

From ekr@rtfm.com  Tue Jan 25 06:00:16 2011
Return-Path: <ekr@rtfm.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 44CAC3A6858 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 06:00:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.683
X-Spam-Level: 
X-Spam-Status: No, score=-102.683 tagged_above=-999 required=5 tests=[AWL=0.294, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 XY72tckJ3Flr for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 06:00:15 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id 4C01328C0D7 for <hybi@ietf.org>; Tue, 25 Jan 2011 06:00:15 -0800 (PST)
Received: by yie19 with SMTP id 19so2009725yie.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 06:03:12 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.20.6 with SMTP id 6mr6699318agt.200.1295964192620; Tue, 25 Jan 2011 06:03:12 -0800 (PST)
Received: by 10.90.116.7 with HTTP; Tue, 25 Jan 2011 06:03:12 -0800 (PST)
In-Reply-To: <28835.1295943609.914593@puncture>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <28835.1295943609.914593@puncture>
Date: Tue, 25 Jan 2011 06:03:12 -0800
Message-ID: <AANLkTinqezsvmRQDuyjeJBingdHEvfbYuCYOcbqE8m4J@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Dave Cridland <dave@cridland.net>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
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: Tue, 25 Jan 2011 14:00:16 -0000

On Tue, Jan 25, 2011 at 12:20 AM, Dave Cridland <dave@cridland.net> wrote:
> On Tue Jan 25 04:54:43 2011, Eric Rescorla wrote:
>>
>> The TLS client can generate data which will produce controllable
>> ciphertext
>> for a number of ciphers.
>
> That argument would appear to apply equally to HTTPS as to WSS; after all,
> both are simply TLS clients, externally. I'd have to argue that this implies
> a general security issue within TLS, and one that needs to be solved there.

Why would that be the case?

TLS does not generally attempt to prevent attackers who *know the key* from
generating any bits on the wire of their choice. It's not part of the
communications
security threat model. Why would it be, since the attacker can just send
plaintext communications of their choice down the same channel? The implication
here is simply that HTTPS needs the same treatment as non-HTTP when used
for WS. This is an issue that applies solely to the browser threat
model and needs
to be solved there.

-Ekr

From ekr@rtfm.com  Tue Jan 25 06:39:48 2011
Return-Path: <ekr@rtfm.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 0A2733A67EB for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 06:39:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.636
X-Spam-Level: 
X-Spam-Status: No, score=-102.636 tagged_above=-999 required=5 tests=[AWL=0.341, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 va8ugztRGX88 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 06:39:47 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id 1B06C3A67E7 for <hybi@ietf.org>; Tue, 25 Jan 2011 06:39:47 -0800 (PST)
Received: by gwb20 with SMTP id 20so2014962gwb.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 06:42:44 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.91.20 with SMTP id o20mr60022agb.27.1295966564413; Tue, 25 Jan 2011 06:42:44 -0800 (PST)
Received: by 10.90.116.7 with HTTP; Tue, 25 Jan 2011 06:42:44 -0800 (PST)
In-Reply-To: <4D3E977C.7080103@warmcat.com>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <4D3E8B4A.2040000@ericsson.com> <4D3E977C.7080103@warmcat.com>
Date: Tue, 25 Jan 2011 06:42:44 -0800
Message-ID: <AANLkTi==qAHGpgMk3uFpRnrawJRj0LuGqRzMm_gJ2ML2@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: andy@warmcat.com
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss / tls controllable
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: Tue, 25 Jan 2011 14:39:48 -0000

On Tue, Jan 25, 2011 at 1:27 AM, Andy Green <andy@warmcat.com> wrote:
> On 01/25/11 08:35, Somebody in the thread at some point said:
> I hope the browser vendors will immediately disable SSL support by default
> if so, until munging can be added to ssl: same as they did for ws://...

I don't know what "ssl:" is.

If you mean "https:", then no.

Look, the same origin policy prohibits you sending arbitrary data
plaintext to arbitrary
locations and then reading back the results. This applies whether you
are doing that
over HTTPS or over HTTP. WebSockets relaxes that constraint on a consensual
basis but in return adds new security features (the consent handshake
+ masking).
I'm simply stating that merely using TLS does not do an adequate job of masking,
i.e., not even as good as the 32-bit moving mask.

This isn't a concern with ordinary HTTPS for the same reason that it's
not a concern
with HTTP: same origin policy. However, that doesn't apply here.

-Ekr

From andy.warmcat.com@googlemail.com  Tue Jan 25 06:55:59 2011
Return-Path: <andy.warmcat.com@googlemail.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 4BB603A67EA for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 06:55:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 uj4-jlXQ2NeN for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 06:55:57 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 60BFD3A67E2 for <hybi@ietf.org>; Tue, 25 Jan 2011 06:55:57 -0800 (PST)
Received: by wwa36 with SMTP id 36so5845753wwa.13 for <hybi@ietf.org>; Tue, 25 Jan 2011 06:58:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=FWf7dR4+S7Kdz7ZOu3b4yxQiDWb1GQhdBrUyJp1bN+8=; b=NrK7dGPfr+GK1JLXw7wTGwYYxu02XmJUu7/IQIT3UiW9G3g3+RDBZWrwy5HO4msDFf 7YhN+fp5HZ7N0YpzISWSQg/CgofdiOctE1j2U8tWgeMwr3cVmpSPoOIUR4xs3YCjO8cr i79ARffNjUk3T5EJJe+XSmP/i29p3CcwYYRp4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=B4aWaVKZ654XvO5MaLruRSuodQu4BnGQXOaUei+FBfPcc0CfOUKg15MT9APFhHwzCM UpPEsXSfbewaHXu53nCSOA0Qy5+J2aYUmZbx0895HkPwnZRyS8t5j0v6qE4vlqZtPGSJ iz9J74IGdn5JKwOz5GvlSvQ1cxC9l+yvi14+U=
Received: by 10.227.2.193 with SMTP id 1mr682481wbk.50.1295967534425; Tue, 25 Jan 2011 06:58:54 -0800 (PST)
Received: from [192.168.0.18] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id b19sm3410604wbd.19.2011.01.25.06.58.52 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 06:58:53 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3EE52B.1030807@warmcat.com>
Date: Tue, 25 Jan 2011 14:58:51 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Eric Rescorla <ekr@rtfm.com>
References: <4D388CBD.4040708@ericsson.com>	<AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com>	<4D3D388A.3020803@ericsson.com>	<AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com>	<4D3E8B4A.2040000@ericsson.com>	<4D3E977C.7080103@warmcat.com> <AANLkTi==qAHGpgMk3uFpRnrawJRj0LuGqRzMm_gJ2ML2@mail.gmail.com>
In-Reply-To: <AANLkTi==qAHGpgMk3uFpRnrawJRj0LuGqRzMm_gJ2ML2@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss / tls controllable
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Tue, 25 Jan 2011 14:55:59 -0000

On 01/25/11 14:42, Somebody in the thread at some point said:
> On Tue, Jan 25, 2011 at 1:27 AM, Andy Green<andy@warmcat.com>  wrote:
>> On 01/25/11 08:35, Somebody in the thread at some point said:
>> I hope the browser vendors will immediately disable SSL support by default
>> if so, until munging can be added to ssl: same as they did for ws://...
>
> I don't know what "ssl:" is.

':' is called a "colon".  It's used in English for punctuation: you can 
read more about it here...

http://en.wikipedia.org/wiki/Colon_(punctuation)

> If you mean "https:", then no.
>
> Look, the same origin policy prohibits you sending arbitrary data
> plaintext to arbitrary
> locations and then reading back the results. This applies whether you
> are doing that
> over HTTPS or over HTTP. WebSockets relaxes that constraint on a consensual
> basis but in return adds new security features (the consent handshake
> + masking).
> I'm simply stating that merely using TLS does not do an adequate job of masking,
> i.e., not even as good as the 32-bit moving mask.
>
> This isn't a concern with ordinary HTTPS for the same reason that it's
> not a concern
> with HTTP: same origin policy. However, that doesn't apply here.

All the security noise around munging has been so intermediaries between 
the client and the websocket server can't see things under attacker 
control in the TCP packet that an intermediary may allegedly be 
sensitive to.  So it is not requiring sending things to "arbitrary 
locations", just the stated SSL endpoint via these theoretical 
intermediaries.

Since wss:// works by establishing an SSL connection with the 
SSL-capable websocket server endpoint first, if "TLS doesn't do an 
adequate job of masking", then I understand you to mean that the 
websocket traffic inside can be formed such that the TCP packet content 
can be under attacker control after encryption: to have the same magic 
text that causes intermediaries to be attacked in the websocket traffic 
case.

I take you to mean that because otherwise, I don't see why what your 
saying about the munging power of SSL encryption is relevant to the 
question of needing munging inside an ssl tunnel for websocket traffic.

-Andy

From dave@cridland.net  Tue Jan 25 06:58:31 2011
Return-Path: <dave@cridland.net>
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 2BC653A67EA for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 06:58:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.555
X-Spam-Level: 
X-Spam-Status: No, score=-2.555 tagged_above=-999 required=5 tests=[AWL=0.044,  BAYES_00=-2.599]
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 Og74cEwwuaa9 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 06:58:30 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id B40BF3A67EB for <hybi@ietf.org>; Tue, 25 Jan 2011 06:58:29 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id F0C2411680BC; Tue, 25 Jan 2011 15:01:25 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Re3gciWUvZ44; Tue, 25 Jan 2011 15:01:24 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 2C16D11680BA; Tue, 25 Jan 2011 15:01:24 +0000 (GMT)
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <28835.1295943609.914593@puncture> <AANLkTinqezsvmRQDuyjeJBingdHEvfbYuCYOcbqE8m4J@mail.gmail.com>
In-Reply-To: <AANLkTinqezsvmRQDuyjeJBingdHEvfbYuCYOcbqE8m4J@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <28835.1295967684.197430@puncture>
Date: Tue, 25 Jan 2011 15:01:24 +0000
From: Dave Cridland <dave@cridland.net>
To: Eric Rescorla <ekr@rtfm.com>, Server-Initiated HTTP <hybi@ietf.org>, Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; delsp="yes"; charset="us-ascii"; format="flowed"
Subject: Re: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
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: Tue, 25 Jan 2011 14:58:31 -0000

On Tue Jan 25 14:03:12 2011, Eric Rescorla wrote:
> On Tue, Jan 25, 2011 at 12:20 AM, Dave Cridland <dave@cridland.net>  
> wrote:
> > On Tue Jan 25 04:54:43 2011, Eric Rescorla wrote:
> >>
> >> The TLS client can generate data which will produce controllable
> >> ciphertext
> >> for a number of ciphers.
> >
> > That argument would appear to apply equally to HTTPS as to WSS;  
> after all,
> > both are simply TLS clients, externally. I'd have to argue that  
> this implies
> > a general security issue within TLS, and one that needs to be  
> solved there.
> 
> Why would that be the case?
> 
> TLS does not generally attempt to prevent attackers who *know the  
> key* from
> generating any bits on the wire of their choice.

If you're saying that the browser generates the key, thus rendering  
it out of control of the attacker, then this seems a fine argument  
that HTTPS is immune from such problems. But I don't understand why  
the protocol ostensibly carried beneath the TLS layer could have any  
bearing on whether, if the attacker can choose the key, being able to  
choose the bits on the wire becomes a threat or not. Therefore WSS  
must also be immune, surely?

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

From mcmanus@ducksong.com  Tue Jan 25 07:00:13 2011
Return-Path: <mcmanus@ducksong.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 0EF0F3A67EA for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:00:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.546
X-Spam-Level: 
X-Spam-Status: No, score=-2.546 tagged_above=-999 required=5 tests=[AWL=0.053,  BAYES_00=-2.599]
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 Ta3FUKBVBZQV for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:00:12 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 9D2223A67EC for <hybi@ietf.org>; Tue, 25 Jan 2011 07:00:11 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id EC87610305; Tue, 25 Jan 2011 10:03:08 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 8D7E310157; Tue, 25 Jan 2011 10:03:03 -0500 (EST)
From: Patrick McManus <mcmanus@ducksong.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
In-Reply-To: <4D3E8B4A.2040000@ericsson.com>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <4D3E8B4A.2040000@ericsson.com>
Content-Type: text/plain; charset="UTF-8"
Date: Tue, 25 Jan 2011 10:02:43 -0500
Message-ID: <1295967763.2383.80.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
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: Tue, 25 Jan 2011 15:00:13 -0000

On Tue, 2011-01-25 at 09:35 +0100, Salvatore Loreto wrote:

> >>> Will we apply masking to wss ?

just as with https, wss may be TLS terminated in the data center at
something less than end to end.. given that one of the masking use cases
was reverse proxies that you would find in the datacenter we still want
that masking even if the TLS had proven sufficient.




From andy.warmcat.com@googlemail.com  Tue Jan 25 07:05:03 2011
Return-Path: <andy.warmcat.com@googlemail.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 7E9093A67EB for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:05:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 8wowDeQWxzjJ for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:05:02 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 34CD33A67EA for <hybi@ietf.org>; Tue, 25 Jan 2011 07:05:01 -0800 (PST)
Received: by wwa36 with SMTP id 36so5855940wwa.13 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:07:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=jLfVDkzbxXypjDeisIgMhHNThlOMUnPpg3f3LCN3MIg=; b=KYBZslvQk5UnKSzpG/uOIQybXssKwt1t9Tkv4thdIAcetRiEhox/gmG4JnC4seiTn7 S5qUABO/ZH0yeUpsRrE2CPx9uOKTFBZtQ8K9nUDU6VD7gcBpMv0IozrQk5XusidBdHBC GNlNOsE9LiY6LEGFtjRh3tC6DvMeHU+mYeKsM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=lm/v/B4lKP/k1UuH7nOUvXJauDsr8XdBYUlgaeKuNToanBHzWUSyc4NSC0ijGX/w2v kTKgvTd5lI8EA8IZZVzaCEGKPJqsfXUFC7I/VwL3YVfSGrZN/NYZ6iHLOquX2FA8r0PY FkbhCnBBHPKW3e0fxLDVfrh+jRfsHmWgQ2rcw=
Received: by 10.227.151.204 with SMTP id d12mr6009517wbw.113.1295968079398; Tue, 25 Jan 2011 07:07:59 -0800 (PST)
Received: from [192.168.0.18] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id b19sm3414721wbd.13.2011.01.25.07.07.57 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 07:07:58 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3EE74C.7080607@warmcat.com>
Date: Tue, 25 Jan 2011 15:07:56 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Patrick McManus <mcmanus@ducksong.com>
References: <4D388CBD.4040708@ericsson.com>	<AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com>	<4D3D388A.3020803@ericsson.com>	<AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com>	<4D3E8B4A.2040000@ericsson.com> <1295967763.2383.80.camel@ds9.ducksong.com>
In-Reply-To: <1295967763.2383.80.camel@ds9.ducksong.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Tue, 25 Jan 2011 15:05:03 -0000

On 01/25/11 15:02, Somebody in the thread at some point said:
> On Tue, 2011-01-25 at 09:35 +0100, Salvatore Loreto wrote:
>
>>>>> Will we apply masking to wss ?
>
> just as with https, wss may be TLS terminated in the data center at
> something less than end to end.. given that one of the masking use cases
> was reverse proxies that you would find in the datacenter we still want
> that masking even if the TLS had proven sufficient.

If you believe that the munging does anything useful, that is indeed a 
good consistent reason for having it on inside wss://.

-Andy

From mcmanus@ducksong.com  Tue Jan 25 07:08:25 2011
Return-Path: <mcmanus@ducksong.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 2915C3A67FD for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:08:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.549
X-Spam-Level: 
X-Spam-Status: No, score=-2.549 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599]
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 KvXJky8qhJRo for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:08:24 -0800 (PST)
Received: from linode.ducksong.com (linode.ducksong.com [64.22.125.164]) by core3.amsl.com (Postfix) with ESMTP id 6F7013A67F0 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:08:24 -0800 (PST)
Received: by linode.ducksong.com (Postfix, from userid 1000) id 22AD310305; Tue, 25 Jan 2011 10:11:22 -0500 (EST)
Received: from [192.168.16.226] (cpe-67-253-92-25.maine.res.rr.com [67.253.92.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by linode.ducksong.com (Postfix) with ESMTPSA id 1E2CE1030A; Tue, 25 Jan 2011 10:11:17 -0500 (EST)
From: Patrick McManus <mcmanus@ducksong.com>
To: andy@warmcat.com
In-Reply-To: <4D3E9921.7070607@warmcat.com>
References: <4D3E9921.7070607@warmcat.com>
Content-Type: text/plain; charset="UTF-8"
Date: Tue, 25 Jan 2011 10:10:57 -0500
Message-ID: <1295968257.2383.89.camel@ds9.ducksong.com>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Value of "superframes"
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: Tue, 25 Jan 2011 15:08:25 -0000

On Tue, 2011-01-25 at 09:34 +0000, Andy Green wrote:
> Hi -
> 
> What's the thinking behind the FIN bit and frames with a continuation 
> opcode?

allowing the sender to arbitrarily break a message into chunks enables
low latency and low buffering streaming. Clients bound by the JS API
aren't helped, but servers are as well as other potential classes of
clients. It also preserves the flexibility to build a multiplexing
extension later on which will be good for everyone.




From salvatore.loreto@ericsson.com  Tue Jan 25 07:10:01 2011
Return-Path: <salvatore.loreto@ericsson.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 03E4E3A6800 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:10:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.552
X-Spam-Level: 
X-Spam-Status: No, score=-106.552 tagged_above=-999 required=5 tests=[AWL=0.047, BAYES_00=-2.599, 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 Xy7LWTSJwLDM for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:10:00 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id 050173A67FD for <hybi@ietf.org>; Tue, 25 Jan 2011 07:09:59 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-d1-4d3ee879dc18
Received: from esessmw0256.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id 88.99.13987.978EE3D4; Tue, 25 Jan 2011 16:12:57 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0256.eemea.ericsson.se (153.88.115.97) with Microsoft SMTP Server id 8.2.234.1; Tue, 25 Jan 2011 16:12:44 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id CD0FE2A34; Tue, 25 Jan 2011 17:12:44 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 900FF50691; Tue, 25 Jan 2011 17:12:44 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id E01C050435; Tue, 25 Jan 2011 17:12:43 +0200 (EET)
Message-ID: <4D3EE86B.4050207@ericsson.com>
Date: Tue, 25 Jan 2011 16:12:43 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: Patrick McManus <mcmanus@ducksong.com>
References: <4D388CBD.4040708@ericsson.com>	 <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com>	 <4D3D388A.3020803@ericsson.com>	 <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com>	 <4D3E8B4A.2040000@ericsson.com> <1295967763.2383.80.camel@ds9.ducksong.com>
In-Reply-To: <1295967763.2383.80.camel@ds9.ducksong.com>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
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: Tue, 25 Jan 2011 15:10:01 -0000

On 1/25/11 4:02 PM, Patrick McManus wrote:
> On Tue, 2011-01-25 at 09:35 +0100, Salvatore Loreto wrote:
>
>>>>> Will we apply masking to wss ?
> just as with https, wss may be TLS terminated in the data center at
> something less than end to end.. given that one of the masking use cases
> was reverse proxies that you would find in the datacenter we still want
> that masking even if the TLS had proven sufficient.

thanks to both Eric and Patrick for their explanations/use cases.
I was not against, just asking so to clarify a point it was not; at 
least for me.


/Sal

From andy.warmcat.com@googlemail.com  Tue Jan 25 07:14:57 2011
Return-Path: <andy.warmcat.com@googlemail.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 F3EDB3A67FD for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:14:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 XsO76FLx22Bj for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:14:56 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id BDD403A67F0 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:14:55 -0800 (PST)
Received: by wwa36 with SMTP id 36so5868196wwa.13 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:17:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=MJgI7R0zyqtO0z1pkKebMWu+uTI3xpV1IZ7TRS949Mo=; b=KWOqhTgtdCcuoOExyUO9k9gOCgCkBQRGguToSKLVum3FhBhDgHCArEOTmxfdop8kpn N0tQixIt/rGv4RN9QoCU8y1iv8+Cb/TrMdKeJsyJ25N0tB9WxnRygCK55PekPqUJ3Fl6 9oDXjR8MZLNa34HKFzVmMcy4ZErnJbJSK6Kw4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=SEU0AxA/LaUUrmChitGrMSz0jX13rLF+FxpY2uHXDvRyqtJcvSVxdd4J4RC6mstYyF RunD6XJmZRTE0GY0+bU+fkTOcDcGeeNJH5YjciK007xms35fuiLRWIe5fmebcPUs59Q6 AmXMUB4ZhyDrDAPVNTc8s+8Sfmp6DDkc7VvrM=
Received: by 10.227.136.81 with SMTP id q17mr6114201wbt.129.1295968672862; Tue, 25 Jan 2011 07:17:52 -0800 (PST)
Received: from [192.168.0.18] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id u9sm97714wbg.6.2011.01.25.07.17.51 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 07:17:52 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3EE99E.7090403@warmcat.com>
Date: Tue, 25 Jan 2011 15:17:50 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Patrick McManus <mcmanus@ducksong.com>
References: <4D3E9921.7070607@warmcat.com> <1295968257.2383.89.camel@ds9.ducksong.com>
In-Reply-To: <1295968257.2383.89.camel@ds9.ducksong.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Value of "superframes"
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Tue, 25 Jan 2011 15:14:57 -0000

On 01/25/11 15:10, Somebody in the thread at some point said:
> On Tue, 2011-01-25 at 09:34 +0000, Andy Green wrote:
>> Hi -
>>
>> What's the thinking behind the FIN bit and frames with a continuation
>> opcode?
>
> allowing the sender to arbitrarily break a message into chunks enables
> low latency and low buffering streaming. Clients bound by the JS API
> aren't helped, but servers are as well as other potential classes of
> clients. It also preserves the flexibility to build a multiplexing
> extension later on which will be good for everyone.

OK so instead of being some "superframe" concept it's actually a 
"microframe" for splitting up the sized frames.  Fine.

It seems it's enough to just always send FIN set and a TEXT or BINARY 
opcode to ignore it then, which is what I am doing already.

-Andy

From jat@google.com  Tue Jan 25 07:29:38 2011
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 55BAE3A6805 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:29:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.268
X-Spam-Level: 
X-Spam-Status: No, score=-105.268 tagged_above=-999 required=5 tests=[AWL=0.708, 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 F6EYLnO5ilkN for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:29:37 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 3FC953A6801 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:29:37 -0800 (PST)
Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id p0PFWYfF002627 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:32:34 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295969554; bh=bL2lWlIUNdrJuCTs9r8/2iEkzL4=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=QAYm8kHh2epHEluMNM8pPoxTc4Hau4rnZud8TpKr/QY9wYMOmuPMMjY+Fb77PY6+M xKoHeylLzAkBHaSd4aKtA==
Received: from gwb11 (gwb11.prod.google.com [10.200.2.11]) by wpaz5.hot.corp.google.com with ESMTP id p0PFWXOt021203 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Tue, 25 Jan 2011 07:32:33 -0800
Received: by gwb11 with SMTP id 11so3442915gwb.25 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:32:33 -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=uxjBwZ9pw5otvrZQuYIYmVGc8BbvEwU3bJO6DB+uJSc=; b=RS/kds/9D3XcrLfEKxV9SQtApOGLNfx2hWnOfhk22b8YMzApYzqJ4/yvZtywSnFN1F gasXrhaA+HRlfIgKV3Fg==
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=dCFVDGQdJPyLSwKoDaCHDELiitJiBTlAW+7Hw6a7jyfL2ZBBkHPwWhCC9q1AAN51eL 9SO3cGYolvAxQD/UgaPw==
Received: by 10.151.51.9 with SMTP id d9mr6379478ybk.92.1295969553137; Tue, 25 Jan 2011 07:32:33 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Tue, 25 Jan 2011 07:31:24 -0800 (PST)
In-Reply-To: <4D3EE99E.7090403@warmcat.com>
References: <4D3E9921.7070607@warmcat.com> <1295968257.2383.89.camel@ds9.ducksong.com> <4D3EE99E.7090403@warmcat.com>
From: John Tamplin <jat@google.com>
Date: Tue, 25 Jan 2011 10:31:24 -0500
Message-ID: <AANLkTim8ZhzRwyCFfWw-jKtwV1-xFx_SuP2QKJ=-BhNU@mail.gmail.com>
To: andy@warmcat.com
Content-Type: multipart/alternative; boundary=0015174bf21cdac011049aad6c05
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Value of "superframes"
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: Tue, 25 Jan 2011 15:29:38 -0000

--0015174bf21cdac011049aad6c05
Content-Type: text/plain; charset=UTF-8

On Tue, Jan 25, 2011 at 10:17 AM, Andy Green <andy@warmcat.com> wrote:

> OK so instead of being some "superframe" concept it's actually a
> "microframe" for splitting up the sized frames.  Fine.
>

In addition, it is necessary when the sender doesn't know the size of the
frame up front, such as when it is dynamically generated or compressed
frames are being sent.  Without fragmentation, you would have to buffer the
entire message in memory before starting to send any of it.  With
fragmentation, you choose an appropriate buffer size and send it when it is
full.

The large maximum frame size was a compromise for those that wanted to be
able to send large messages in a single fragment (perhaps using sendfile),
and likely would never be used on a fragmented message.


> It seems it's enough to just always send FIN set and a TEXT or BINARY
> opcode to ignore it then, which is what I am doing already.


A sender is never required to fragment, but a receiver has to be prepared to
receive fragmented messages even if the message was sent in a single frame.

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

--0015174bf21cdac011049aad6c05
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Jan 25, 2011 at 10:17 AM, Andy Green <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:andy@warmcat.com">andy@warmcat.com</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">OK so instead of being some &quot;superframe&quot; concep=
t it&#39;s actually a &quot;microframe&quot; for splitting up the sized fra=
mes. =C2=A0Fine.</div></blockquote><div><br></div><div>In addition, it is n=
ecessary when the sender doesn&#39;t know the size of the frame up front, s=
uch as when it is dynamically generated or compressed frames are being sent=
. =C2=A0Without fragmentation, you would have to buffer the entire message =
in memory before starting to send any of it. =C2=A0With fragmentation, you =
choose an appropriate buffer size and send it when it is full.=C2=A0</div>

<div><br></div><div>The large maximum frame size was a compromise for those=
 that wanted to be able to send large messages in a single fragment (perhap=
s using sendfile), and likely would never be used on a fragmented message.<=
/div>

<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex;">
It seems it&#39;s enough to just always send FIN set and a TEXT or BINARY o=
pcode to ignore it then, which is what I am doing already.</blockquote><div=
><br></div><div>A sender is never required to fragment, but a receiver has =
to be prepared to receive fragmented messages even if the message was sent =
in a single frame.=C2=A0</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--0015174bf21cdac011049aad6c05--

From andy.warmcat.com@googlemail.com  Tue Jan 25 07:39:16 2011
Return-Path: <andy.warmcat.com@googlemail.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 5C1F73A67F3 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:39:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 HH8O-nTyzvm8 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:39:15 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id F37403A6802 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:39:14 -0800 (PST)
Received: by wwa36 with SMTP id 36so5894970wwa.13 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:42:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=4eIgK+EsvzGdPEjoP27K5qUoZzXHAd5snDF6lF+QAJ4=; b=v7Aub54msnli6OfbK68p0hCjWweh2QL1Klaauc+/aUEA4Xh3q9zl9dOSklUjt7NjJD jOejREEdVIsWxd0/2oF8EEtEnhntkyfyrvR3MWO3XjUXdDXwIkfCuQPdGaWeMdE9miK5 PQV4YZwftGlhZpdKxh7OMgN41xoGFjDK/s97g=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=Kcg7yvYQVkvwAFrFpJF/NGryjERpI8IEj7/n91B+HTe+fLdLZBGSs0oJd0jOYqxjtm cf4LFNQxbSPd60f+9z/x0HaIksHtXfd1yomX16dgMpIKsn0OMRZ1iGSBHhSOb82r8GJC rlRkzqvtCUU6WiKIX/b7uq52CjRaE4N01W31A=
Received: by 10.227.155.15 with SMTP id q15mr6037241wbw.133.1295970132373; Tue, 25 Jan 2011 07:42:12 -0800 (PST)
Received: from [192.168.0.18] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id y29sm5074531wbd.22.2011.01.25.07.42.11 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 07:42:11 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3EEF52.30208@warmcat.com>
Date: Tue, 25 Jan 2011 15:42:10 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: John Tamplin <jat@google.com>
References: <4D3E9921.7070607@warmcat.com> <1295968257.2383.89.camel@ds9.ducksong.com> <4D3EE99E.7090403@warmcat.com> <AANLkTim8ZhzRwyCFfWw-jKtwV1-xFx_SuP2QKJ=-BhNU@mail.gmail.com>
In-Reply-To: <AANLkTim8ZhzRwyCFfWw-jKtwV1-xFx_SuP2QKJ=-BhNU@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Value of "superframes"
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Tue, 25 Jan 2011 15:39:16 -0000

On 01/25/11 15:31, Somebody in the thread at some point said:
> On Tue, Jan 25, 2011 at 10:17 AM, Andy Green <andy@warmcat.com
> <mailto:andy@warmcat.com>> wrote:
>
>     OK so instead of being some "superframe" concept it's actually a
>     "microframe" for splitting up the sized frames.  Fine.
>
>
> In addition, it is necessary when the sender doesn't know the size of
> the frame up front, such as when it is dynamically generated or
> compressed frames are being sent.  Without fragmentation, you would have
> to buffer the entire message in memory before starting to send any of
> it.  With fragmentation, you choose an appropriate buffer size and send
> it when it is full.
>
> The large maximum frame size was a compromise for those that wanted to
> be able to send large messages in a single fragment (perhaps using
> sendfile), and likely would never be used on a fragmented message.

What would the problem be just sending lots of small arbitrary-sized 
frames whenever you wanted to spill your buffer, without making any 
statement about overall length?  (I mean now with munging in the browser 
-> server direction, I can see what the problem would be in terms of 
more SHA-1s, but otherwise).

>     It seems it's enough to just always send FIN set and a TEXT or
>     BINARY opcode to ignore it then, which is what I am doing already.
>
>
> A sender is never required to fragment, but a receiver has to be
> prepared to receive fragmented messages even if the message was sent in
> a single frame.

OK, makes sense thanks.

-Andy


From ekr@rtfm.com  Tue Jan 25 07:44:22 2011
Return-Path: <ekr@rtfm.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 5179D3A67ED for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:44:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.686
X-Spam-Level: 
X-Spam-Status: No, score=-102.686 tagged_above=-999 required=5 tests=[AWL=0.291, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 g1plNnCSaafu for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:44:21 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id 5732B3A67EA for <hybi@ietf.org>; Tue, 25 Jan 2011 07:44:21 -0800 (PST)
Received: by yie19 with SMTP id 19so2060077yie.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:47:19 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.20.6 with SMTP id 6mr6833941agt.200.1295970438859; Tue, 25 Jan 2011 07:47:18 -0800 (PST)
Received: by 10.90.116.7 with HTTP; Tue, 25 Jan 2011 07:47:17 -0800 (PST)
In-Reply-To: <4D3EE52B.1030807@warmcat.com>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <4D3E8B4A.2040000@ericsson.com> <4D3E977C.7080103@warmcat.com> <AANLkTi==qAHGpgMk3uFpRnrawJRj0LuGqRzMm_gJ2ML2@mail.gmail.com> <4D3EE52B.1030807@warmcat.com>
Date: Tue, 25 Jan 2011 07:47:17 -0800
Message-ID: <AANLkTindou8YU42GWXaMVxkEh7Qev7Venbyb1tOXsXZK@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: andy@warmcat.com
Content-Type: text/plain; charset=ISO-8859-1
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss / tls controllable
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: Tue, 25 Jan 2011 15:44:22 -0000

On Tue, Jan 25, 2011 at 6:58 AM, Andy Green <andy@warmcat.com> wrote:
> On 01/25/11 14:42, Somebody in the thread at some point said:
> Since wss:// works by establishing an SSL connection with the SSL-capable
> websocket server endpoint first, if "TLS doesn't do an adequate job of
> masking", then I understand you to mean that the websocket traffic inside
> can be formed such that the TCP packet content can be under attacker control
> after encryption:

Yes, that is correct. More properly, if the client knows the
cryptographic keys used for
TLS (which of course can be passed back by the server) then he can generate any
payload (modulo the TLS framing) of his choice. I thought this was a well-known
property, as it follows immediately from the fact that TLS can be configured to
use RC4.


> to have the same magic text that causes intermediaries to
> be attacked in the websocket traffic case.

That's a slightly different question.

You're right that SOP isn't relevant here--I plead lack of caffeine
for my confused response.

In general, w/o WS you're limited to whatever you can cram into
XmlHttpRequest() whereas
with WS you can send anything you want. So, WS isweaker in this
respect and masking
inside the TLS channel would make it more secure. I think its an open
question whether it's
necessary, but what's the argument *against* masking inside the channel?

-Ekr

From ekr@rtfm.com  Tue Jan 25 07:49:33 2011
Return-Path: <ekr@rtfm.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 682EC3A67EA for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:49:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.689
X-Spam-Level: 
X-Spam-Status: No, score=-102.689 tagged_above=-999 required=5 tests=[AWL=0.288, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 df+OqWgQUdnb for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:49:32 -0800 (PST)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by core3.amsl.com (Postfix) with ESMTP id 6811C3A67ED for <hybi@ietf.org>; Tue, 25 Jan 2011 07:49:32 -0800 (PST)
Received: by gxk27 with SMTP id 27so2059902gxk.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:52:30 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.27.4 with SMTP id a4mr7205984aga.135.1295970750023; Tue, 25 Jan 2011 07:52:30 -0800 (PST)
Received: by 10.90.116.7 with HTTP; Tue, 25 Jan 2011 07:52:29 -0800 (PST)
In-Reply-To: <28835.1295967684.197430@puncture>
References: <4D388CBD.4040708@ericsson.com> <AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com> <4D3D388A.3020803@ericsson.com> <AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com> <28835.1295943609.914593@puncture> <AANLkTinqezsvmRQDuyjeJBingdHEvfbYuCYOcbqE8m4J@mail.gmail.com> <28835.1295967684.197430@puncture>
Date: Tue, 25 Jan 2011 07:52:29 -0800
Message-ID: <AANLkTimo05DwXJ78MG2Xw4eSmJkrx24ke63W9GMi5hbT@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Dave Cridland <dave@cridland.net>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] masking and wss (was Re: consensus result on Straw Poll: Masking options)
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: Tue, 25 Jan 2011 15:49:33 -0000

On Tue, Jan 25, 2011 at 7:01 AM, Dave Cridland <dave@cridland.net> wrote:
> On Tue Jan 25 14:03:12 2011, Eric Rescorla wrote:
>>
>> On Tue, Jan 25, 2011 at 12:20 AM, Dave Cridland <dave@cridland.net> wrote:
>> > On Tue Jan 25 04:54:43 2011, Eric Rescorla wrote:
>> >>
>> >> The TLS client can generate data which will produce controllable
>> >> ciphertext
>> >> for a number of ciphers.
>> >
>> > That argument would appear to apply equally to HTTPS as to WSS; after
>> > all,
>> > both are simply TLS clients, externally. I'd have to argue that this
>> > implies
>> > a general security issue within TLS, and one that needs to be solved
>> > there.
>>
>> Why would that be the case?
>>
>> TLS does not generally attempt to prevent attackers who *know the key*
>> from
>> generating any bits on the wire of their choice.
>
> If you're saying that the browser generates the key, thus rendering it out
> of control of the attacker, then this seems a fine argument that HTTPS is
> immune from such problems. But I don't understand why the protocol
> ostensibly carried beneath the TLS layer could have any bearing on whether,
> if the attacker can choose the key, being able to choose the bits on the
> wire becomes a threat or not.
I'm sorry, I don't understand what you're saying here.

TLS can be configured to use stream ciphers. With a stream cipher, if
you can predict
the key and can control the plaintext you can generate ciphertext
(i.e., what appears on
the wire) of your choice. In the standard TLS configuration, the
client (i.e., the browser)
and the server (in this case the attacker) both know the key. The
attacker can feed
it back to the JavaScript in the browser, thus allowing him to
generate any plaintext
(and hence ciphertext) of his choice in the client->server direction.


>Therefore WSS must also be immune, surely?

I don't see how that follows. At best it follows that HTTPS is equally
vulnerable. However,
as I argued to Andy, since WS affords better control of the stream,
then I don't think this
is actually true.

-Ekr

From jat@google.com  Tue Jan 25 07:50:32 2011
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 233193A67ED for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:50:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.278
X-Spam-Level: 
X-Spam-Status: No, score=-105.278 tagged_above=-999 required=5 tests=[AWL=0.698, 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 FIxTk6yX3ong for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 07:50:30 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 6482C3A6801 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:50:30 -0800 (PST)
Received: from kpbe20.cbf.corp.google.com (kpbe20.cbf.corp.google.com [172.25.105.84]) by smtp-out.google.com with ESMTP id p0PFrR4V004001 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:53:27 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1295970808; bh=k1qrPcHDXgTBNaMhF/yedaiUlp8=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=id5qAdYKuZQ8RkFn9U8P9u7IedmAKfqsGVKjJrUY1YfrJ/pr7YYoQIisKLeoa464o bD/ygn3Ae26EiAXTen4qQ==
Received: from yxs7 (yxs7.prod.google.com [10.190.5.135]) by kpbe20.cbf.corp.google.com with ESMTP id p0PFrQrE015929 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Tue, 25 Jan 2011 07:53:26 -0800
Received: by yxs7 with SMTP id 7so1721721yxs.10 for <hybi@ietf.org>; Tue, 25 Jan 2011 07:53:26 -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=f+pIfNKYRhDK32JKMPAmSjlz+c51Elrq/Yj3keurxdY=; b=AkBdJuFR+W6MTQS4Q/bOUtPUuL6lHxN6Iq5ddnV2iRb0yYva6diPnCdk5u/XxwV9RD LfKzugszbonH53XjCqIA==
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=H1DgP9TPvAVvCMNESI3yDSzbAshjx/POmnyB9TTprVIwNm/ubCJPpk2HLRLUqM9jXK DoQc0uXFmIsQiZsXQ5pQ==
Received: by 10.151.40.16 with SMTP id s16mr6624679ybj.35.1295970805670; Tue, 25 Jan 2011 07:53:25 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Tue, 25 Jan 2011 07:53:05 -0800 (PST)
In-Reply-To: <4D3EEF52.30208@warmcat.com>
References: <4D3E9921.7070607@warmcat.com> <1295968257.2383.89.camel@ds9.ducksong.com> <4D3EE99E.7090403@warmcat.com> <AANLkTim8ZhzRwyCFfWw-jKtwV1-xFx_SuP2QKJ=-BhNU@mail.gmail.com> <4D3EEF52.30208@warmcat.com>
From: John Tamplin <jat@google.com>
Date: Tue, 25 Jan 2011 10:53:05 -0500
Message-ID: <AANLkTikDeTq6T=R=z=GhfAeuS87+it9O=iKmdn3fm_3M@mail.gmail.com>
To: andy@warmcat.com
Content-Type: multipart/alternative; boundary=00151750edbc82e610049aadb7ce
X-System-Of-Record: true
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Value of "superframes"
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: Tue, 25 Jan 2011 15:50:32 -0000

--00151750edbc82e610049aadb7ce
Content-Type: text/plain; charset=UTF-8

On Tue, Jan 25, 2011 at 10:42 AM, Andy Green <andy@warmcat.com> wrote:

> What would the problem be just sending lots of small arbitrary-sized frames
> whenever you wanted to spill your buffer, without making any statement about
> overall length?  (I mean now with munging in the browser -> server
> direction, I can see what the problem would be in terms of more SHA-1s, but
> otherwise).
>

That is exactly the current model -- there is no notion of overall message
length (though there was talk of adding it back as an extension to ease
receiver buffer management in the case where the size is known up front by
the sender), only the lengths of individual frames.  So, if I am dynamically
generating a message, it looks something like this:

opcode = BINARY;
while ((n = readStream(buf, BUF_SIZE)) == BUF_SIZE) {
   writeFrame(buf, n, opcode);
   opcode = CONTINUATION;
}
writeFrame(buf, n, opcode | FIN);

where readStream could be dynamically generating content, reading from a
network connection, or simply compressing the real content.

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

--00151750edbc82e610049aadb7ce
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Jan 25, 2011 at 10:42 AM, Andy Green <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:andy@warmcat.com">andy@warmcat.com</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">What would the problem be just sending lots of small arbi=
trary-sized frames whenever you wanted to spill your buffer, without making=
 any statement about overall length? =C2=A0(I mean now with munging in the =
browser -&gt; server direction, I can see what the problem would be in term=
s of more SHA-1s, but otherwise).</div>

</blockquote><div><br></div><div>That is exactly the current model -- there=
 is no notion of overall message length (though there was talk of adding it=
 back as an extension to ease receiver buffer management in the case where =
the size is known up front by the sender), only the lengths of individual f=
rames. =C2=A0So, if I am dynamically generating a message, it looks somethi=
ng like this:</div>

<div><br></div><div>opcode =3D BINARY;</div><div>while ((n =3D readStream(b=
uf, BUF_SIZE)) =3D=3D BUF_SIZE) {</div><div>=C2=A0=C2=A0 writeFrame(buf, n,=
 opcode);</div><div>=C2=A0=C2=A0 opcode =3D CONTINUATION;</div><div>}</div>=
<div>writeFrame(buf, n, opcode | FIN);</div>

</div><div><br></div><div>where readStream could be dynamically generating =
content, reading from a network connection, or simply compressing the real =
content.</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google=
<br>



--00151750edbc82e610049aadb7ce--

From andy.warmcat.com@googlemail.com  Tue Jan 25 08:28:38 2011
Return-Path: <andy.warmcat.com@googlemail.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 D6B9B3A680D for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 08:28:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 wy-dn5VB6L9d for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 08:28:37 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 64CEA3A680F for <hybi@ietf.org>; Tue, 25 Jan 2011 08:28:37 -0800 (PST)
Received: by wyf23 with SMTP id 23so5906731wyf.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 08:31:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=pom24QE6ahnuzRWXazUTBRiDMcWK3p1i/q4APNsyezA=; b=MrlOfUkToZxzwvyev88YGiMFaV9HgqfgqUL0Rc+S/DcqT+e2XPC2nD8t83a0Uoi5+P oZywhEa1gqzZYf/0RbgbL8vdoKsMEdhealscKpKvsKyRU+uLkwD0CAc3uGdC4BXSgHHg NpHF4AEcJ7LCB+FOhKKjbQ095SR5Gk+e6m2bA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=aoBGuisPiEi8SNoltT1pt3aRuu6H4GvkHuMjZxo1t6oOHKxUpLcn7LSky6/RE7SJvu 6CcYfg3vlK4BdCm10bwWKMUlgIEgfwWTBI6pI20rRqqyuQXGg2JM7/8WqJZctMbgPNCw nrOKrK/fAfUe41rPrpOHLVT64rrWRzb7E0CnU=
Received: by 10.227.30.84 with SMTP id t20mr3113340wbc.156.1295973094813; Tue, 25 Jan 2011 08:31:34 -0800 (PST)
Received: from [192.168.0.18] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id y29sm5106266wbd.22.2011.01.25.08.31.32 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 08:31:33 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3EFAE4.1050004@warmcat.com>
Date: Tue, 25 Jan 2011 16:31:32 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Eric Rescorla <ekr@rtfm.com>
References: <4D388CBD.4040708@ericsson.com>	<AANLkTik_4q_r4jwqX8LMRriBpO6ZZDKMtqLF7s+e6Qy2@mail.gmail.com>	<4D3D388A.3020803@ericsson.com>	<AANLkTikxyYLgt1XWi9mZTg3MTHiG1cQWCy7sM10kPDop@mail.gmail.com>	<4D3E8B4A.2040000@ericsson.com>	<4D3E977C.7080103@warmcat.com>	<AANLkTi==qAHGpgMk3uFpRnrawJRj0LuGqRzMm_gJ2ML2@mail.gmail.com>	<4D3EE52B.1030807@warmcat.com> <AANLkTindou8YU42GWXaMVxkEh7Qev7Venbyb1tOXsXZK@mail.gmail.com>
In-Reply-To: <AANLkTindou8YU42GWXaMVxkEh7Qev7Venbyb1tOXsXZK@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] masking and wss / tls controllable
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Tue, 25 Jan 2011 16:28:38 -0000

On 01/25/11 15:47, Somebody in the thread at some point said:
> On Tue, Jan 25, 2011 at 6:58 AM, Andy Green<andy@warmcat.com>  wrote:
>> On 01/25/11 14:42, Somebody in the thread at some point said:
>> Since wss:// works by establishing an SSL connection with the SSL-capable
>> websocket server endpoint first, if "TLS doesn't do an adequate job of
>> masking", then I understand you to mean that the websocket traffic inside
>> can be formed such that the TCP packet content can be under attacker control
>> after encryption:
>
> Yes, that is correct. More properly, if the client knows the
> cryptographic keys used for
> TLS (which of course can be passed back by the server) then he can generate any
> payload (modulo the TLS framing) of his choice. I thought this was a well-known
> property, as it follows immediately from the fact that TLS can be configured to
> use RC4.

Right... I wasn't trying to argue against it, just establishing that we 
are both in the end talking about the same process (and we are).

>> to have the same magic text that causes intermediaries to
>> be attacked in the websocket traffic case.
>
> That's a slightly different question.
>
> You're right that SOP isn't relevant here--I plead lack of caffeine
> for my confused response.

No problem, it seems Salvatore appreciated it anyway 8-P

> In general, w/o WS you're limited to whatever you can cram into
> XmlHttpRequest() whereas
> with WS you can send anything you want. So, WS isweaker in this
> respect and masking
> inside the TLS channel would make it more secure. I think its an open
> question whether it's
> necessary, but what's the argument *against* masking inside the channel?

The extra SHA-1s per packet at the server (who has to do them too to 
unmunge the packet) will add up, if they could be avoided they should be.

Anyway while munging is accepted into the standard as being websocket 
business as it is, seems to me there is no point trying to ameliorate 
the ssl munging situation given Patrick's point about not letting it 
wander about unmunged behind the SSL endpoint, so nothing to argue.

-Andy

From andy.warmcat.com@googlemail.com  Tue Jan 25 09:46:29 2011
Return-Path: <andy.warmcat.com@googlemail.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 0D11E3A685B for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 09:46:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[AWL=0.000,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 yYP1mbhp1Zri for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 09:46:28 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 8EECE3A6853 for <hybi@ietf.org>; Tue, 25 Jan 2011 09:46:27 -0800 (PST)
Received: by wyf23 with SMTP id 23so37430wyf.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 09:49:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=KVAXZs8zt6YPV3GK9UI9rSatoiYkPGifcMVhzI+XzdE=; b=uzCC9IdTQYONGUBPVrd80ojCf8Y/p6oqvlhR6KEWb8HDk7dl7XpXuVQRUJS7+9Dru7 Rf2jlHcbMuxYmBPcMvwqsAEGitYrrcJjDqvMumqkxYYjJjRcyrmJJ5JhvzEEk5exP3FT fYJl88GUz+84wfN85Exd+vQ9YCJw+/opxfQDA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=rTEnbcYqVKrIRFqZ847+Q1JVaiP0QLjlBablGifC0grlGiArK5U9SldG/0O9DY4kJz 5xqhmb6fbtmlP9SXFmU/2UrF8G+Ra9Ns5gVmpeAhzs9eR9WdDFIpTPr8rAVM8SIGv04q m2J3AhlN3B/KaKyuL9ocReQQskg38e1lP2jUM=
Received: by 10.227.30.84 with SMTP id t20mr3230532wbc.156.1295977765201; Tue, 25 Jan 2011 09:49:25 -0800 (PST)
Received: from [192.168.0.18] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id b19sm3518187wbd.13.2011.01.25.09.49.23 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 09:49:23 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D3F0D23.8080505@warmcat.com>
Date: Tue, 25 Jan 2011 17:49:23 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: John Tamplin <jat@google.com>
References: <4D3E9921.7070607@warmcat.com> <1295968257.2383.89.camel@ds9.ducksong.com> <4D3EE99E.7090403@warmcat.com> <AANLkTim8ZhzRwyCFfWw-jKtwV1-xFx_SuP2QKJ=-BhNU@mail.gmail.com> <4D3EEF52.30208@warmcat.com> <AANLkTikDeTq6T=R=z=GhfAeuS87+it9O=iKmdn3fm_3M@mail.gmail.com>
In-Reply-To: <AANLkTikDeTq6T=R=z=GhfAeuS87+it9O=iKmdn3fm_3M@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Value of "superframes"
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Tue, 25 Jan 2011 17:46:29 -0000

On 01/25/11 15:53, Somebody in the thread at some point said:

> opcode = BINARY;
> while ((n = readStream(buf, BUF_SIZE)) == BUF_SIZE) {
>     writeFrame(buf, n, opcode);
>     opcode = CONTINUATION;
> }
> writeFrame(buf, n, opcode | FIN);
>
> where readStream could be dynamically generating content, reading from a
> network connection, or simply compressing the real content.

Thanks.  I think I can work with all that just by adding a NO_FIN flag 
that the caller can set when flushing a buffer; the caller can already 
control the opcode.  If he doesn't give the flag (because he don't 
understand all this CONTINUATION stuff) everything goes out with FIN | 
BINARY or FIN | TEXT and that is already OK; if he does give the flag 
it's his job to give it and set the CONTINUATION opcode on the right 
packets.

-Andy

From bruce@callenish.com  Tue Jan 25 11:08:04 2011
Return-Path: <bruce@callenish.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 0A2A03A681D for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 11:08:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.588
X-Spam-Level: 
X-Spam-Status: No, score=-2.588 tagged_above=-999 required=5 tests=[AWL=0.011,  BAYES_00=-2.599]
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 k4oDIf8sWygD for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 11:08:03 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 33E6E3A680A for <hybi@ietf.org>; Tue, 25 Jan 2011 11:08:03 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PhoI8-0004jI-Cr for hybi@ietf.org; Tue, 25 Jan 2011 11:11:00 -0800
Message-ID: <4D3F2045.7020409@callenish.com>
Date: Tue, 25 Jan 2011 11:11:01 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com>	<AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com>	<AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com>	<AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com>	<F120935B-807D-4D54-9723-75D9DAAB3F35@apple.com>	<AANLkTinXbidBjOZeMkysSmXTpRi_59zTU9hbD1U9BO5C@mail.gmail.com>	<04B78872-EA5A-485E-ACCF-C68B6EB61ABB@apple.com> <AANLkTinwECWMN+TSGeNkX1j=QWw3DgcjoiVbP+6hw0W=@mail.gmail.com>
In-Reply-To: <AANLkTinwECWMN+TSGeNkX1j=QWw3DgcjoiVbP+6hw0W=@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 19:08:04 -0000

On 25/01/2011 12:07 AM, Greg Wilkins wrote:
> On 25 January 2011 18:49, Maciej Stachowiak<mjs@apple.com>  wrote:
>> That's not what I meant. If a protocol offers a choice of A or B, then it is generally vulnerable to attacks on either A or B.
> What I'm suggesting is that the protocol, as implemented for browsers
> does not offer A or B, it only offers B - so if A is vulnerable to
> attacks, this is not a concern for the browsers.

I agree with you, and that is how I voted in the straw poll. However at 
this stage I'm inclined to let that go.

So far there have been 4 uses that I've noticed for negotiated masking 
beyond the random XOR:

   1) gzip
   2) no masking
   3) AES-CTR
   4) future masking options

I've left off Base64 since it seemed like everyone who supported that 
was just as happy with XOR.

The first, gzip, will be dealt with as a separate option from masking. 
Option 2, no masking, will follow if the per-frame XOR mask is 0. I have 
nothing concrete to offer about why future masking options should be 
considered other than the general guideline that flexibility is a good 
thing if it doesn't come with too many costs or risks.

That leaves AES-CTR as the main use for negotiated masking. Two of the 
biggest boosters of that scheme, Adam and Maciej, have indicated here 
they would rather have XOR than the ability to negotiate AES-CTR. I 
don't understand their objections to negotiation of masking, but given 
how passionately they argued for AES-CTR then if they want to give that 
up in order to avoid negotiation, I'll give up on the flexibility of 
future masking choices.



From mjs@apple.com  Tue Jan 25 13:25:25 2011
Return-Path: <mjs@apple.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 1465D3A68AE for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 13:25:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.557
X-Spam-Level: 
X-Spam-Status: No, score=-106.557 tagged_above=-999 required=5 tests=[AWL=0.042, BAYES_00=-2.599, 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 hG7i3kK0BZJN for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 13:25:24 -0800 (PST)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 0CE2F3A6852 for <hybi@ietf.org>; Tue, 25 Jan 2011 13:25:24 -0800 (PST)
Received: from relay16.apple.com (relay16.apple.com [17.128.113.55]) by mail-out4.apple.com (Postfix) with ESMTP id BED81CE09A25 for <hybi@ietf.org>; Tue, 25 Jan 2011 13:28:22 -0800 (PST)
X-AuditID: 11807137-b7c69ae000003c40-ae-4d3f40769cc9
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay16.apple.com (Apple SCV relay) with SMTP id 3D.C7.15424.6704F3D4; Tue, 25 Jan 2011 13:28:22 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.97.109] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LFL005HSKZAUV60@et.apple.com> for hybi@ietf.org; Tue, 25 Jan 2011 13:28:22 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D3F2045.7020409@callenish.com>
Date: Tue, 25 Jan 2011 13:28:21 -0800
Message-id: <C3195D7E-7B85-4508-877B-A6DF3BA157BF@apple.com>
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com> <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com> <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com> <F120935B-807D-4D54-9723-75D9DAAB3F35@apple.com> <AANLkTinXbidBjOZeMkysSmXTpRi_59zTU9hbD1U9BO5C@mail.gmail.com> <04B78872-EA5A-485E-ACCF-C68B6EB61ABB@apple.com> <AANLkTinwECWMN+TSGeNkX1j=QWw3DgcjoiVbP+6hw0W=@mail.gmail.com> <4D3F2045.7020409@callenish.com>
To: Bruce Atherton <bruce@callenish.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: hybi@ietf.org
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 21:25:25 -0000

On Jan 25, 2011, at 11:11 AM, Bruce Atherton wrote:

> On 25/01/2011 12:07 AM, Greg Wilkins wrote:
>> On 25 January 2011 18:49, Maciej Stachowiak<mjs@apple.com>  wrote:
>>> That's not what I meant. If a protocol offers a choice of A or B, then it is generally vulnerable to attacks on either A or B.
>> What I'm suggesting is that the protocol, as implemented for browsers
>> does not offer A or B, it only offers B - so if A is vulnerable to
>> attacks, this is not a concern for the browsers.
> 
> I agree with you, and that is how I voted in the straw poll. However at this stage I'm inclined to let that go.
> 
> So far there have been 4 uses that I've noticed for negotiated masking beyond the random XOR:
> 
>  1) gzip
>  2) no masking
>  3) AES-CTR
>  4) future masking options
> 
> I've left off Base64 since it seemed like everyone who supported that was just as happy with XOR.
> 
> The first, gzip, will be dealt with as a separate option from masking. Option 2, no masking, will follow if the per-frame XOR mask is 0. I have nothing concrete to offer about why future masking options should be considered other than the general guideline that flexibility is a good thing if it doesn't come with too many costs or risks.
> 
> That leaves AES-CTR as the main use for negotiated masking. Two of the biggest boosters of that scheme, Adam and Maciej, have indicated here they would rather have XOR than the ability to negotiate AES-CTR. I don't understand their objections to negotiation of masking, but given how passionately they argued for AES-CTR then if they want to give that up in order to avoid negotiation, I'll give up on the flexibility of future masking choices.

There's two ways in which the AES-CTR scheme can provide security benefits over the simple XOR mask (with the full mask in the frame):

(1) If all browsers consistently only use AES-CTR masking when sending with WebSocket, then there is less risk of endangering intermediaries.
(2) If all WebSocket servers only accept a masking (such as the proposed AES-CTR scheme) that requires a server nonce, then WebSocket servers are better defended against attacks using HTTP.

The negotiated proposal seems like it would mostly deliver on (1), if browser-hosted clients always require the stronger masking. It would not be quite as good as always having the stronger masking, since there is some extra fragility imposed by the negotiation. Also it forks the protocol between browser and non-browser use cases. It doesn't address (2) at all. It also seems like it imposes the CPU costs and legal considerations that were the main arguments presented against the AES-CTR scheme.

Regards,
Maciej


From bruce@callenish.com  Tue Jan 25 15:21:10 2011
Return-Path: <bruce@callenish.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 8A2FB3A68E8 for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 15:21:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.588
X-Spam-Level: 
X-Spam-Status: No, score=-2.588 tagged_above=-999 required=5 tests=[AWL=0.011,  BAYES_00=-2.599]
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 tcBtvnJzlNdw for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 15:21:09 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 56E073A68E0 for <hybi@ietf.org>; Tue, 25 Jan 2011 15:21:09 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1PhsF4-0006WF-RA for hybi@ietf.org; Tue, 25 Jan 2011 15:24:06 -0800
Message-ID: <4D3F5B99.6090203@callenish.com>
Date: Tue, 25 Jan 2011 15:24:09 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <AANLkTi=X5GBW8k6qgyH=2cQt8ZNe3hFvNzTyGqdk+EKg@mail.gmail.com> <AANLkTikStLw4fkZW0y+Lec_Q+xg6eNTCFuv0VqAgDO4T@mail.gmail.com> <AANLkTinPrZ2p3r8cVgn7r40GAqyNFDKt=_EgW5X7JZLz@mail.gmail.com> <AANLkTikx8XP2YM6z=-obKcFZOaDAgsWXbQodGgrhhc+k@mail.gmail.com> <F120935B-807D-4D54-9723-75D9DAAB3F35@apple.com> <AANLkTinXbidBjOZeMkysSmXTpRi_59zTU9hbD1U9BO5C@mail.gmail.com> <04B78872-EA5A-485E-ACCF-C68B6EB61ABB@apple.com> <AANLkTinwECWMN+TSGeNkX1j=QWw3DgcjoiVbP+6hw0W=@mail.gmail.com> <4D3F2045.7020409@callenish.com> <C3195D7E-7B85-4508-877B-A6DF3BA157BF@apple.com>
In-Reply-To: <C3195D7E-7B85-4508-877B-A6DF3BA157BF@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Negotiating masking doesn't make sense (was Re: Straw-poll on Masking options)
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: Tue, 25 Jan 2011 23:21:10 -0000

On 25/01/2011 1:28 PM, Maciej Stachowiak wrote:
> There's two ways in which the AES-CTR scheme can provide security benefits over the simple XOR mask (with the full mask in the frame):
>
> (1) If all browsers consistently only use AES-CTR masking when sending with WebSocket, then there is less risk of endangering intermediaries.
> (2) If all WebSocket servers only accept a masking (such as the proposed AES-CTR scheme) that requires a server nonce, then WebSocket servers are better defended against attacks using HTTP.
>
> The negotiated proposal seems like it would mostly deliver on (1), if browser-hosted clients always require the stronger masking. It would not be quite as good as always having the stronger masking, since there is some extra fragility imposed by the negotiation. Also it forks the protocol between browser and non-browser use cases. It doesn't address (2) at all. It also seems like it imposes the CPU costs and legal considerations that were the main arguments presented against the AES-CTR scheme.
>

Well, nothing says that servers can't choose to implement only AES-CTR 
masking and to refuse Websocket connections that are not so masked. Just 
as, had AES-CTR masking been chosen in the straw poll, nothing would 
have prevented servers from implementing alternate schemes with a 
protocol that look like Websockets minus the required masking, say a 
LightSockets specification.

As far as the legal and CPU costs, it is true those would remain so long 
as the browser vendors felt there was a security risk with simpler or no 
masking. However, over time it is possible that enough trust could be 
developed in XOR masking that they might be willing to relax the 
requirement for AES-CTR masking (perhaps as a configurable option), and 
with negotiated masking they could choose to do that if they wanted.

Basically, making it negotiable takes the decision out of the hands of 
the protocol specification designers and puts it into the hands of the 
browser vendors, at least as far as browser implementations is concerned.


From ibc@aliax.net  Tue Jan 25 16:11:30 2011
Return-Path: <ibc@aliax.net>
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 D53463A68BD for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 16:11:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.256
X-Spam-Level: 
X-Spam-Status: No, score=-2.256 tagged_above=-999 required=5 tests=[AWL=0.421,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 FWYNGeIB9++x for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 16:11:29 -0800 (PST)
Received: from mail-px0-f172.google.com (mail-px0-f172.google.com [209.85.212.172]) by core3.amsl.com (Postfix) with ESMTP id E6DFD3A68AB for <hybi@ietf.org>; Tue, 25 Jan 2011 16:11:29 -0800 (PST)
Received: by pxi6 with SMTP id 6so1317694pxi.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 16:14:29 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.218.3 with SMTP id q3mr5992177wfg.267.1296000868899; Tue, 25 Jan 2011 16:14:28 -0800 (PST)
Received: by 10.142.47.19 with HTTP; Tue, 25 Jan 2011 16:14:28 -0800 (PST)
Date: Wed, 26 Jan 2011 01:14:28 +0100
Message-ID: <AANLkTinE0==edLXkgoAE9rB_UBUx_g-H8kheESY14sjs@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: [hybi] How is the BNF grammar of Sec-WebSocket-Version?
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, 26 Jan 2011 00:11:30 -0000

Hi, the draft doesn't specify the exact BNF grammar of the
Sec-WebSocket-Version header. Just a "4" value is shown as an example.
Does it allow "4.1" syntax? "4.1-2"?

IMHO the draft must describe properly the BNF grammar of every headers invo=
lved.

Regards.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From ietf@adambarth.com  Tue Jan 25 21:45:29 2011
Return-Path: <ietf@adambarth.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 0ED8E3A692E for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 21:45:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.58
X-Spam-Level: 
X-Spam-Status: No, score=-3.58 tagged_above=-999 required=5 tests=[AWL=-0.903,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 BTwUQ6rfszPY for <hybi@core3.amsl.com>; Tue, 25 Jan 2011 21:45:27 -0800 (PST)
Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by core3.amsl.com (Postfix) with ESMTP id C0E223A692C for <hybi@ietf.org>; Tue, 25 Jan 2011 21:45:27 -0800 (PST)
Received: by gwb20 with SMTP id 20so8576gwb.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 21:48:27 -0800 (PST)
Received: by 10.100.164.2 with SMTP id m2mr4670852ane.146.1296020906662; Tue, 25 Jan 2011 21:48:26 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id 35sm18647143ano.11.2011.01.25.21.48.24 (version=SSLv3 cipher=RC4-MD5); Tue, 25 Jan 2011 21:48:25 -0800 (PST)
Received: by iwn40 with SMTP id 40so597777iwn.31 for <hybi@ietf.org>; Tue, 25 Jan 2011 21:48:24 -0800 (PST)
Received: by 10.231.30.73 with SMTP id t9mr7776712ibc.64.1296020904076; Tue, 25 Jan 2011 21:48:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.35.13 with HTTP; Tue, 25 Jan 2011 21:47:54 -0800 (PST)
In-Reply-To: <AANLkTi=M+HoJei_5WHXfb9YZ=SvyFVqQ-xyHAORjKc1a@mail.gmail.com>
References: <AANLkTi=M+HoJei_5WHXfb9YZ=SvyFVqQ-xyHAORjKc1a@mail.gmail.com>
From: Adam Barth <ietf@adambarth.com>
Date: Tue, 25 Jan 2011 21:47:54 -0800
Message-ID: <AANLkTinMgwo15XUB5RMiZKWMqO8ywU4Gr5QyNwP7RycM@mail.gmail.com>
To: =?ISO-8859-1?Q?I=F1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] draft-ietf-hybi-thewebsocketprotocol-04: Sec-WebSocket-Location header is missing
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, 26 Jan 2011 05:45:29 -0000

This was a remnant from a previous draft that made use of that header.
 It can be removed from the IANA considerations section now.

Adam


On Sun, Jan 23, 2011 at 11:28 AM, I=F1aki Baz Castillo <ibc@aliax.net> wrot=
e:
> Hi, Sec-WebSocket-Location header is just mentioned in IANA section
> (section 10.5). There it's written:
>
> =A0 =A0The |Sec-WebSocket-Location| header is used in the WebSocket
> =A0 =A0handshake.
>
> However the rest of the draft doesn't mention such header at all. Is it c=
orrect?
>
> Regards.
>
>
> --
> I=F1aki Baz Castillo
> <ibc@aliax.net>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From ibc@aliax.net  Wed Jan 26 01:58:36 2011
Return-Path: <ibc@aliax.net>
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 D29AF3A6969 for <hybi@core3.amsl.com>; Wed, 26 Jan 2011 01:58:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.268
X-Spam-Level: 
X-Spam-Status: No, score=-2.268 tagged_above=-999 required=5 tests=[AWL=0.409,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 uwJofZlSoXfK for <hybi@core3.amsl.com>; Wed, 26 Jan 2011 01:58:36 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 1131C3A6825 for <hybi@ietf.org>; Wed, 26 Jan 2011 01:58:35 -0800 (PST)
Received: by qwi2 with SMTP id 2so794988qwi.31 for <hybi@ietf.org>; Wed, 26 Jan 2011 02:01:35 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.81.65 with SMTP id w1mr259759qck.9.1296036095778; Wed, 26 Jan 2011 02:01:35 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Wed, 26 Jan 2011 02:01:35 -0800 (PST)
Date: Wed, 26 Jan 2011 11:01:35 +0100
Message-ID: <AANLkTimBpv2beUkLv0m6cFLJ0DcKnLj=vgnYVy3v-H1X@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: [hybi] Sec-WebSocket-Origin or Origin?
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, 26 Jan 2011 09:58:37 -0000

Hi, previous versions of the draft (i.e. 76) talked about
Sec-WebSocket-Origin and Origin headers (both). It seems however that
latest version (04) just uses Sec-WebSocket-Origin. Is it definitive?

Thanks a lot.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From ibc@aliax.net  Wed Jan 26 02:37:38 2011
Return-Path: <ibc@aliax.net>
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 9CA113A6983 for <hybi@core3.amsl.com>; Wed, 26 Jan 2011 02:37:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.28
X-Spam-Level: 
X-Spam-Status: No, score=-2.28 tagged_above=-999 required=5 tests=[AWL=0.397,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 ONfWiZkqJMZn for <hybi@core3.amsl.com>; Wed, 26 Jan 2011 02:37:38 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id D98163A6975 for <hybi@ietf.org>; Wed, 26 Jan 2011 02:37:37 -0800 (PST)
Received: by qyj19 with SMTP id 19so820085qyj.10 for <hybi@ietf.org>; Wed, 26 Jan 2011 02:40:37 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.81.65 with SMTP id w1mr291583qck.9.1296038436627; Wed, 26 Jan 2011 02:40:36 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Wed, 26 Jan 2011 02:40:36 -0800 (PST)
Date: Wed, 26 Jan 2011 11:40:36 +0100
Message-ID: <AANLkTimv=y7Urrmk70wPD92LCvLMf62_XptQTCiKqEyk@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: [hybi] About websocket draft progress
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, 26 Jan 2011 10:37:38 -0000

Hi, please don't take me wrong but, what is going on with this draft?
This is: there are 80 versions of the draft in two years, and there
are still discussions about core components of the protocol as "GET vs
OPTIONS vs any method", "framing or not framing", the handshake has
been totally rewritten (ok, due to a bug), and so on.

In the meanwhile there are a lot of browser and server implementations
of any version of the draft. IMHO it's ugly the fact that a server
supports 3-4 versions of a non finished specification. It's like "the
world is waiting out there" :)

I'm new in this maillist and I'm reading latest threads trying to
understand the current status and, honestly, it seems that the
protocol is still being defined (but it's a version 80 of the draft
!!).

Thanks for any comment and best regards.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From julian.reschke@gmx.de  Wed Jan 26 03:08:06 2011
Return-Path: <julian.reschke@gmx.de>
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 B4E063A69A4 for <hybi@core3.amsl.com>; Wed, 26 Jan 2011 03:08:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.995
X-Spam-Level: 
X-Spam-Status: No, score=-103.995 tagged_above=-999 required=5 tests=[AWL=-1.696, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, 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 1oPJkgqRB7yh for <hybi@core3.amsl.com>; Wed, 26 Jan 2011 03:08:06 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 7180C3A69A2 for <hybi@ietf.org>; Wed, 26 Jan 2011 03:08:04 -0800 (PST)
Received: (qmail invoked by alias); 26 Jan 2011 11:11:04 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.133]) [217.91.35.233] by mail.gmx.net (mp069) with SMTP; 26 Jan 2011 12:11:04 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX19dxk0lx+9d5mvCUncni3OrFK282++7aROECmEQWa ESvKhkPT0TsMii
Message-ID: <4D400142.6080509@gmx.de>
Date: Wed, 26 Jan 2011 12:10:58 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: =?UTF-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>
References: <AANLkTimv=y7Urrmk70wPD92LCvLMf62_XptQTCiKqEyk@mail.gmail.com>
In-Reply-To: <AANLkTimv=y7Urrmk70wPD92LCvLMf62_XptQTCiKqEyk@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] About websocket draft progress
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, 26 Jan 2011 11:08:06 -0000

On 26.01.2011 11:40, IÃ±aki Baz Castillo wrote:
> Hi, please don't take me wrong but, what is going on with this draft?
> This is: there are 80 versions of the draft in two years, and there
> ...

The only reason there were so many drafts of the pre-WG draft was 
because the author was submitting a new one for each and every change he 
made. It doesn't really reflect what was going on back then.

Best regards, Julian

From hannes.tschofenig@gmx.net  Wed Jan 26 04:38:53 2011
Return-Path: <hannes.tschofenig@gmx.net>
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 137D93A69AB for <hybi@core3.amsl.com>; Wed, 26 Jan 2011 04:38:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.366
X-Spam-Level: 
X-Spam-Status: No, score=-102.366 tagged_above=-999 required=5 tests=[AWL=-0.067, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, 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 YE5AuJnMPG40 for <hybi@core3.amsl.com>; Wed, 26 Jan 2011 04:38:52 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id DD74B3A68AB for <hybi@ietf.org>; Wed, 26 Jan 2011 04:38:51 -0800 (PST)
Received: (qmail invoked by alias); 26 Jan 2011 12:41:50 -0000
Received: from unknown (EHLO [10.255.139.165]) [192.100.123.77] by mail.gmx.net (mp067) with SMTP; 26 Jan 2011 13:41:50 +0100
X-Authenticated: #29516787
X-Provags-ID: V01U2FsdGVkX186SdovRWI6WfUcCAcYYFQdlYOdyW4jLLv5xVIht8 mGGnesQ5Xkc/kn
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset=iso-8859-1
From: Hannes Tschofenig <hannes.tschofenig@gmx.net>
In-Reply-To: <AANLkTimv=y7Urrmk70wPD92LCvLMf62_XptQTCiKqEyk@mail.gmail.com>
Date: Wed, 26 Jan 2011 14:41:46 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <C2E37CA9-A76E-4F52-98B0-33ED60643E4F@gmx.net>
References: <AANLkTimv=y7Urrmk70wPD92LCvLMf62_XptQTCiKqEyk@mail.gmail.com>
To: =?iso-8859-1?Q?I=F1aki_Baz_Castillo?= <ibc@aliax.net>
X-Mailer: Apple Mail (2.1082)
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] About websocket draft progress
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, 26 Jan 2011 12:38:53 -0000

Asking for regular status updates is not a bad idea.=20

Regarding your surprise about many not-yet-finished versions. =
Boilerplate text at IETF drafts say:=20
"
   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).   =20
   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."
"

It is good to have early implementations to see whether there are =
problems. Still, work in progress means that it may change. If you ship =
implementations based on draft versions then you may end up having =
problems.=20

"The world is not waiting" is valid but if working group participants do =
not conclude discussions what can you do?=20

Ciao
Hannes

On Jan 26, 2011, at 12:40 PM, I=F1aki Baz Castillo wrote:

> Hi, please don't take me wrong but, what is going on with this draft?
> This is: there are 80 versions of the draft in two years, and there
> are still discussions about core components of the protocol as "GET vs
> OPTIONS vs any method", "framing or not framing", the handshake has
> been totally rewritten (ok, due to a bug), and so on.
>=20
> In the meanwhile there are a lot of browser and server implementations
> of any version of the draft. IMHO it's ugly the fact that a server
> supports 3-4 versions of a non finished specification. It's like "the
> world is waiting out there" :)
>=20
> I'm new in this maillist and I'm reading latest threads trying to
> understand the current status and, honestly, it seems that the
> protocol is still being defined (but it's a version 80 of the draft
> !!).
>=20
> Thanks for any comment and best regards.
>=20
> --=20
> I=F1aki Baz Castillo
> <ibc@aliax.net>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


From sm@elandsys.com  Wed Jan 26 08:57:40 2011
Return-Path: <sm@elandsys.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 96A0A3A6824 for <hybi@core3.amsl.com>; Wed, 26 Jan 2011 08:57:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.496
X-Spam-Level: 
X-Spam-Status: No, score=-102.496 tagged_above=-999 required=5 tests=[AWL=0.103, BAYES_00=-2.599, 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 CiFQ8M05BPbc for <hybi@core3.amsl.com>; Wed, 26 Jan 2011 08:57:39 -0800 (PST)
Received: from mail.elandsys.com (mail.elandsys.com [208.69.177.125]) by core3.amsl.com (Postfix) with ESMTP id 8AC4F3A6804 for <hybi@ietf.org>; Wed, 26 Jan 2011 08:57:39 -0800 (PST)
Received: from SUBMAN.elandsys.com ([41.136.238.59]) (authenticated bits=0) by mail.elandsys.com (8.13.8/8.13.8) with ESMTP id p0QH0QgB001990; Wed, 26 Jan 2011 09:00:32 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=elandsys.com; s=mail; t=1296061234; bh=oMVAmNv0pRp6AuUnWSR5o0X32m0=; h=Message-Id:Date:To:From:Subject:Cc:In-Reply-To:References: Mime-Version:Content-Type; b=Cr1lM6sSWJ3iO/qshNXdPt7C8A9j0SqTJrLHvWiDL09HvxjlXayL5hLSdPxlZJRNV 4jgfM/5kSWY44CzCxYyL0P4VpQfB4lSGoJ0GhOS5rOqMJ2G2O4yLGcxWUeshrzYokl opVLs7p44isoqcbBeFd0+IRZUh7CKhp/mVgVtEhY=
Message-Id: <6.2.5.6.2.20110126084240.0c529698@resistor.net>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.5.6
Date: Wed, 26 Jan 2011 08:58:40 -0800
To: Inaki Baz Castillo <ibc@aliax.net>
From: SM <sm+ietf@elandsys.com>
In-Reply-To: <AANLkTimv=y7Urrmk70wPD92LCvLMf62_XptQTCiKqEyk@mail.gmail.c om>
References: <AANLkTimv=y7Urrmk70wPD92LCvLMf62_XptQTCiKqEyk@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] About websocket draft progress
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, 26 Jan 2011 16:57:40 -0000

Hello,
At 02:40 26-01-11, Inaki Baz Castillo wrote:
>Hi, please don't take me wrong but, what is going on with this draft?
>This is: there are 80 versions of the draft in two years, and there
>are still discussions about core components of the protocol as "GET vs
>OPTIONS vs any method", "framing or not framing", the handshake has
>been totally rewritten (ok, due to a bug), and so on.

The current working group document is draft-ietf-hybi-thewebsocketprotocol-04.

There is current a straw poll under way on GET vs OPTIONS vs new method (
  http://www.ietf.org/mail-archive/web/hybi/current/msg06036.html 
).  The poll will run until January 31st.

Regards,
S. Moonesamy
Hybi WG Secretary 


From ibc@aliax.net  Thu Jan 27 10:00:49 2011
Return-Path: <ibc@aliax.net>
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 6D40728C145 for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 10:00:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.291
X-Spam-Level: 
X-Spam-Status: No, score=-2.291 tagged_above=-999 required=5 tests=[AWL=0.386,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 QW9EX5SEnRsP for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 10:00:48 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 858683A69BA for <hybi@ietf.org>; Thu, 27 Jan 2011 10:00:48 -0800 (PST)
Received: by qyk34 with SMTP id 34so6906307qyk.10 for <hybi@ietf.org>; Thu, 27 Jan 2011 10:03:52 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.99.76 with SMTP id t12mr1761246qcn.275.1296151431166; Thu, 27 Jan 2011 10:03:51 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Thu, 27 Jan 2011 10:03:50 -0800 (PST)
Date: Thu, 27 Jan 2011 19:03:50 +0100
Message-ID: <AANLkTin929XAYSGE+Z1ZqZy=1xDVQTF+-+zqEsKeUsma@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: [hybi] Are there changes in framing from draft-ietf-hybi-thewebsocketprotocol-03 to 04?
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: Thu, 27 Jan 2011 18:00:49 -0000

Hi, are there changes in client-to-server framing from
draft-ietf-hybi-thewebsocketprotocol-03 to 04 version? or just the
handshake has changed?

I strongly miss a "changelog" section in the draft, even more when
there have been so many versions and changes.

And the magic question: will the handshake and framing mechanism
specified in 04 be the definitive one? or will it change?

Even a more magic question: when will the draft become "stable" and
proposed as an RFC?

Thanks a lot.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From julian.reschke@gmx.de  Thu Jan 27 10:08:30 2011
Return-Path: <julian.reschke@gmx.de>
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 4438628C152 for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 10:08:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.98
X-Spam-Level: 
X-Spam-Status: No, score=-103.98 tagged_above=-999 required=5 tests=[AWL=-1.681, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, 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 pAMvCj8xgCtQ for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 10:08:29 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id 96F3F28C14D for <hybi@ietf.org>; Thu, 27 Jan 2011 10:08:28 -0800 (PST)
Received: (qmail invoked by alias); 27 Jan 2011 18:11:31 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.134]) [217.91.35.233] by mail.gmx.net (mp003) with SMTP; 27 Jan 2011 19:11:31 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX18ppb02jk8pkd1n3ldlvEHe0pwu608u12swXtALj+ MmEK0Nj8gBxR7k
Message-ID: <4D41B54C.4010104@gmx.de>
Date: Thu, 27 Jan 2011 19:11:24 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: =?UTF-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>
References: <AANLkTin929XAYSGE+Z1ZqZy=1xDVQTF+-+zqEsKeUsma@mail.gmail.com>
In-Reply-To: <AANLkTin929XAYSGE+Z1ZqZy=1xDVQTF+-+zqEsKeUsma@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Are there changes in framing from draft-ietf-hybi-thewebsocketprotocol-03 to 04?
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: Thu, 27 Jan 2011 18:08:30 -0000

On 27.01.2011 19:03, IÃ±aki Baz Castillo wrote:
> Hi, are there changes in client-to-server framing from
> draft-ietf-hybi-thewebsocketprotocol-03 to 04 version? or just the
> handshake has changed?

You can check here: 
<http://tools.ietf.org/rfcdiff?url2=draft-ietf-hybi-thewebsocketprotocol-04.txt>

> ...

Best regards, Julian

From ibc@aliax.net  Thu Jan 27 11:12:19 2011
Return-Path: <ibc@aliax.net>
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 64E9E3A69F0 for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 11:12:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.301
X-Spam-Level: 
X-Spam-Status: No, score=-2.301 tagged_above=-999 required=5 tests=[AWL=0.376,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 8raivF0ybcf2 for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 11:12:18 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id DC7E93A69ED for <hybi@ietf.org>; Thu, 27 Jan 2011 11:12:17 -0800 (PST)
Received: by qwi2 with SMTP id 2so2623223qwi.31 for <hybi@ietf.org>; Thu, 27 Jan 2011 11:15:21 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.249.17 with SMTP id mi17mr66885qcb.123.1296155721571; Thu, 27 Jan 2011 11:15:21 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Thu, 27 Jan 2011 11:15:21 -0800 (PST)
In-Reply-To: <4D41B54C.4010104@gmx.de>
References: <AANLkTin929XAYSGE+Z1ZqZy=1xDVQTF+-+zqEsKeUsma@mail.gmail.com> <4D41B54C.4010104@gmx.de>
Date: Thu, 27 Jan 2011 20:15:21 +0100
Message-ID: <AANLkTi=yYjpToDOJ0_y68FV5nbXCQYEQ7B5qxAuRiCjQ@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Julian Reschke <julian.reschke@gmx.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Are there changes in framing from draft-ietf-hybi-thewebsocketprotocol-03 to 04?
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: Thu, 27 Jan 2011 19:12:19 -0000

2011/1/27 Julian Reschke <julian.reschke@gmx.de>:
>> Hi, are there changes in client-to-server framing from
>> draft-ietf-hybi-thewebsocketprotocol-03 to 04 version? or just the
>> handshake has changed?
>
> You can check here:
> <http://tools.ietf.org/rfcdiff?url2=3Ddraft-ietf-hybi-thewebsocketprotoco=
l-04.txt>

Thanks. However that is a diff, and since draft 03 and 04 are so
different a diff is not very useful (check it by yourself).
Anyhow it seems that framing has not changed (just bit MORE becomes
FIN). But I still think that a "Changelog" section, as present in lot
of drafts, would be nice.

Thanks a lot.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From salvatore.loreto@ericsson.com  Thu Jan 27 11:21:58 2011
Return-Path: <salvatore.loreto@ericsson.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 ADFED28C163 for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 11:21:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.556
X-Spam-Level: 
X-Spam-Status: No, score=-106.556 tagged_above=-999 required=5 tests=[AWL=0.043, BAYES_00=-2.599, 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 QcK4C9HGJnpI for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 11:21:57 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by core3.amsl.com (Postfix) with ESMTP id B298D28C161 for <hybi@ietf.org>; Thu, 27 Jan 2011 11:21:56 -0800 (PST)
X-AuditID: c1b4fb3d-b7b89ae0000036a3-e8-4d41c68cc479
Received: from esessmw0237.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id F6.1C.13987.C86C14D4; Thu, 27 Jan 2011 20:25:00 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0237.eemea.ericsson.se (153.88.115.91) with Microsoft SMTP Server id 8.2.234.1; Thu, 27 Jan 2011 20:24:59 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id C4FC42356	for <hybi@ietf.org>; Thu, 27 Jan 2011 21:24:59 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 88A18506AB	for <hybi@ietf.org>; Thu, 27 Jan 2011 21:24:59 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 160BE50453	for <hybi@ietf.org>; Thu, 27 Jan 2011 21:24:58 +0200 (EET)
Message-ID: <4D41C68A.5010605@ericsson.com>
Date: Thu, 27 Jan 2011 20:24:58 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <AANLkTin929XAYSGE+Z1ZqZy=1xDVQTF+-+zqEsKeUsma@mail.gmail.com>
In-Reply-To: <AANLkTin929XAYSGE+Z1ZqZy=1xDVQTF+-+zqEsKeUsma@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] Are there changes in framing from draft-ietf-hybi-thewebsocketprotocol-03 to 04?
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: Thu, 27 Jan 2011 19:21:58 -0000

On 1/27/11 7:03 PM, IÃ±aki Baz Castillo wrote:
> Hi, are there changes in client-to-server framing from
> draft-ietf-hybi-thewebsocketprotocol-03 to 04 version? or just the
> handshake has changed?
just related to the handshake,
then there was the change related to the FIN bit (it was MORE bit in 03)
> I strongly miss a "changelog" section in the draft, even more when
> there have been so many versions and changes.
thanks for the suggestion,
we will insert a change log in the next version
> And the magic question: will the handshake and framing mechanism
> specified in 04 be the definitive one? or will it change?
the major changes in 05 are expected to be still related the handshake

> Even a more magic question: when will the draft become "stable" and
> proposed as an RFC?
when people agree that the draft is stable and ready to become RFC
at moment there is not such agreement...

cheers
/Sal

From ibc@aliax.net  Thu Jan 27 11:51:41 2011
Return-Path: <ibc@aliax.net>
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 9E2943A69E5 for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 11:51:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.31
X-Spam-Level: 
X-Spam-Status: No, score=-2.31 tagged_above=-999 required=5 tests=[AWL=0.367,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 NQfX8PWfxt+V for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 11:51:40 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id BBCB43A683D for <hybi@ietf.org>; Thu, 27 Jan 2011 11:51:40 -0800 (PST)
Received: by qyj19 with SMTP id 19so2633687qyj.10 for <hybi@ietf.org>; Thu, 27 Jan 2011 11:54:44 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.249.203 with SMTP id ml11mr97132qcb.199.1296158084205; Thu, 27 Jan 2011 11:54:44 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Thu, 27 Jan 2011 11:54:44 -0800 (PST)
In-Reply-To: <4D41C68A.5010605@ericsson.com>
References: <AANLkTin929XAYSGE+Z1ZqZy=1xDVQTF+-+zqEsKeUsma@mail.gmail.com> <4D41C68A.5010605@ericsson.com>
Date: Thu, 27 Jan 2011 20:54:44 +0100
Message-ID: <AANLkTi=4sz4v2wyYEFk_dFzedefG_5h7LobPoL=uarwo@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Are there changes in framing from draft-ietf-hybi-thewebsocketprotocol-03 to 04?
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: Thu, 27 Jan 2011 19:51:41 -0000

2011/1/27 Salvatore Loreto <salvatore.loreto@ericsson.com>:
>> I strongly miss a "changelog" section in the draft, even more when
>> there have been so many versions and changes.
>
> thanks for the suggestion,
> we will insert a change log in the next version

Great, it will be very useful, thanks :)


>> And the magic question: will the handshake and framing mechanism
>> specified in 04 be the definitive one? or will it change?
>
> the major changes in 05 are expected to be still related the handshake

Humm, could I know the reasons of those expected changes? If there is
a thread in the maillist about it please tell it to me and I'll look
for it.


>> Even a more magic question: when will the draft become "stable" and
>> proposed as an RFC?
>
> when people agree that the draft is stable and ready to become RFC
> at moment there is not such agreement...

A magic response for a magic question :)

Regards.



--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From jat@google.com  Thu Jan 27 11:56:05 2011
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 201D03A6A29 for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 11:56:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.138
X-Spam-Level: 
X-Spam-Status: No, score=-105.138 tagged_above=-999 required=5 tests=[AWL=0.538, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, 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 T5p9xNZHtR8Q for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 11:56:04 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 1FFE23A6A1D for <hybi@ietf.org>; Thu, 27 Jan 2011 11:56:04 -0800 (PST)
Received: from kpbe15.cbf.corp.google.com (kpbe15.cbf.corp.google.com [172.25.105.79]) by smtp-out.google.com with ESMTP id p0RJx7XW031219 for <hybi@ietf.org>; Thu, 27 Jan 2011 11:59:08 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1296158348; bh=RyiVICM5xBR1Of6g8pC6Yg39pts=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=JGq+IRy+MBU6/QST/vs9ZcDGMYJKIvPxfN1rZt9pyATP8O21U8OGV2tMR/lw4bXyL fxLPxN1rbP8l7OBwIpQHQ==
Received: from gye5 (gye5.prod.google.com [10.243.50.5]) by kpbe15.cbf.corp.google.com with ESMTP id p0RJx62h002811 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Thu, 27 Jan 2011 11:59:06 -0800
Received: by gye5 with SMTP id 5so853043gye.4 for <hybi@ietf.org>; Thu, 27 Jan 2011 11:59:06 -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=u5NCGDHV836+SI87OVMUKGEAIceIhmkiVvS1PG7F0yw=; b=ZdRdkH9iIuhzB9H5JSha9SZ9dSI7HsMYcKOZ5Xy5GQqTbp5g7p0mEgchlVOo21Akgg 6G4LdP6EH26lFCtzGu+A==
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=aTbIaQL7J6PPQTba5UmbU69US+UI6dtCyLz9KHUs6I0osBrhce5pt2qhbv+ugk2qkU 0Z5sXRCturfjAWHZpgPg==
Received: by 10.150.217.15 with SMTP id p15mr3126162ybg.206.1296158345942; Thu, 27 Jan 2011 11:59:05 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Thu, 27 Jan 2011 11:58:45 -0800 (PST)
In-Reply-To: <AANLkTi=4sz4v2wyYEFk_dFzedefG_5h7LobPoL=uarwo@mail.gmail.com>
References: <AANLkTin929XAYSGE+Z1ZqZy=1xDVQTF+-+zqEsKeUsma@mail.gmail.com> <4D41C68A.5010605@ericsson.com> <AANLkTi=4sz4v2wyYEFk_dFzedefG_5h7LobPoL=uarwo@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Thu, 27 Jan 2011 14:58:45 -0500
Message-ID: <AANLkTikDhJ50ALLaQ7Kh0dUgWDuxqcTbWXOR1iTU-Z03@mail.gmail.com>
To: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: multipart/alternative; boundary=000e0cd401e8c858d5049ad96134
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Are there changes in framing from draft-ietf-hybi-thewebsocketprotocol-03 to 04?
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: Thu, 27 Jan 2011 19:56:05 -0000

--000e0cd401e8c858d5049ad96134
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Thu, Jan 27, 2011 at 2:54 PM, I=C3=B1aki Baz Castillo <ibc@aliax.net> wr=
ote:

> > the major changes in 05 are expected to be still related the handshake
>
> Humm, could I know the reasons of those expected changes? If there is
> a thread in the maillist about it please tell it to me and I'll look
> for it.


Virtually all the threads for the last 4 months about vulnerable
intermediaries and masking?

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

--000e0cd401e8c858d5049ad96134
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Thu, Jan 27, 2011 at 2:54 PM, I=C3=B1aki Baz =
Castillo <span dir=3D"ltr">&lt;<a href=3D"mailto:ibc@aliax.net">ibc@aliax.n=
et</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">&gt; the major changes in 05 are expected to be still rel=
ated the handshake<br>
<br>
</div>Humm, could I know the reasons of those expected changes? If there is=
<br>
a thread in the maillist about it please tell it to me and I&#39;ll look<br=
>
for it.</blockquote><div><br></div><div>Virtually all the threads for the l=
ast 4 months about vulnerable intermediaries and masking?=C2=A0</div></div>=
<br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--000e0cd401e8c858d5049ad96134--

From andy.warmcat.com@googlemail.com  Thu Jan 27 12:31:22 2011
Return-Path: <andy.warmcat.com@googlemail.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 A862F28C171 for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 12:31:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.556
X-Spam-Level: 
X-Spam-Status: No, score=-3.556 tagged_above=-999 required=5 tests=[AWL=0.043,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 9StjTM+CqKZY for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 12:31:21 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 54DE328C15D for <hybi@ietf.org>; Thu, 27 Jan 2011 12:31:21 -0800 (PST)
Received: by wwa36 with SMTP id 36so2874525wwa.13 for <hybi@ietf.org>; Thu, 27 Jan 2011 12:34:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:subject:content-type:content-transfer-encoding; bh=vdmXdpmRgC4YmdaIsryeUhO+YciK7GV/NG+RE+1OmIE=; b=jFuK0gRRO+bWN22wFWXbthzQz09KpdeydZXel8rfEq6TuhOE7/byCG21KeLX6jyj4J VnRDKXtq2tdFwR6fSEwSgGNsGQtkUzWQBp0N/hrH2/3rcExC4Y+dagoSisymlb0nWFVH 1Y4GHvIJs+uIdzDnAIpKsgewF8xFuSt+B1iUE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; b=XFLcWPrVkg+N9y9FP34jnP4GpF+meR4l9FYRZO/558YpCBc6IDVAQGQriFt+8yZpzf AWoDcOzzfBnWqeyHnUHU5Q7CsHpXBUFiw2CqlwdpllpWkFgDgFar3K93akEXuqLKpyOu QoaLRgrCas4KVswL94zMj2q24GAuDVlxQYDnQ=
Received: by 10.227.209.9 with SMTP id ge9mr1690368wbb.81.1296160464946; Thu, 27 Jan 2011 12:34:24 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id u9sm1999015wbg.12.2011.01.27.12.34.22 (version=SSLv3 cipher=RC4-MD5); Thu, 27 Jan 2011 12:34:24 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D41D6CA.3010709@warmcat.com>
Date: Thu, 27 Jan 2011 20:34:18 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [hybi] libwebsockets C library SSL client connections and websocket ping
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Thu, 27 Jan 2011 20:31:22 -0000

Hi -

libwebsockets

http://git.warmcat.com/cgi-bin/cgit/libwebsockets/

now supports SSL client connections as well as SSL server connections, 
along with plain versions of each; one context and per-protocol callback 
can handle both client and server connections in a single polling loop call.

It's now a fairly complete protocol-version-independent implementation 
of both client and server websockets in a very small footprint; with 
openssl configured off there are no dependencies outside libc.

It also introduces a websocket ping utility which can work via 04 PING 
and PONG control packets up to 125 payload length, or via BINARY 
payloads up to 4096 with the help of a server protocol that performs an 
echo (it defaults to using the lws-mirror-protocol supported by the 
libwebsockets test server).  Either way before any kind of frame can be 
sent, even PING that doesn't need cooperation from the protocol, the 
handshake must complete with a protocol acceptable to the server, so it 
can be set from the commandline.

$ libwebsockets-test-ping localhost
handshake OK for protocol lws-mirror-protocol
Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.
64 bytes from localhost: req=1 time=0.1ms
64 bytes from localhost: req=2 time=0.1ms
64 bytes from localhost: req=3 time=0.1ms
64 bytes from localhost: req=4 time=0.2ms
64 bytes from localhost: req=5 time=0.1ms
64 bytes from localhost: req=6 time=0.2ms
64 bytes from localhost: req=7 time=0.2ms
64 bytes from localhost: req=8 time=0.1ms
^C
--- localhost.localdomain websocket ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7458ms
rtt min/avg/max = 0.110/0.185/0.218 ms
$

Like normal ping you can set the interval, size and floodping display, 
and get stats at the end, and it handles out-of-order and delayed and 
duplicated replies.

-Andy

From julian.reschke@gmx.de  Thu Jan 27 14:22:08 2011
Return-Path: <julian.reschke@gmx.de>
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 AFF543A6AC8 for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 14:22:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.714
X-Spam-Level: 
X-Spam-Status: No, score=-103.714 tagged_above=-999 required=5 tests=[AWL=-1.415, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, 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 DTeHkIQZYWHs for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 14:22:08 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 244E63A6AC9 for <hybi@ietf.org>; Thu, 27 Jan 2011 14:22:06 -0800 (PST)
Received: (qmail invoked by alias); 27 Jan 2011 22:25:09 -0000
Received: from p508FDE80.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.222.128] by mail.gmx.net (mp006) with SMTP; 27 Jan 2011 23:25:09 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+lo9UcKA+lw+a2lXm1GfxdBHintKvnkCivfQCaEf HmoQ3nsKYqd84D
Message-ID: <4D41F0BD.1050403@gmx.de>
Date: Thu, 27 Jan 2011 23:25:01 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: =?UTF-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>
References: <AANLkTin929XAYSGE+Z1ZqZy=1xDVQTF+-+zqEsKeUsma@mail.gmail.com>	<4D41B54C.4010104@gmx.de> <AANLkTi=yYjpToDOJ0_y68FV5nbXCQYEQ7B5qxAuRiCjQ@mail.gmail.com>
In-Reply-To: <AANLkTi=yYjpToDOJ0_y68FV5nbXCQYEQ7B5qxAuRiCjQ@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Are there changes in framing from draft-ietf-hybi-thewebsocketprotocol-03 to 04?
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: Thu, 27 Jan 2011 22:22:08 -0000

On 27.01.2011 20:15, IÃ±aki Baz Castillo wrote:
> 2011/1/27 Julian Reschke<julian.reschke@gmx.de>:
>>> Hi, are there changes in client-to-server framing from
>>> draft-ietf-hybi-thewebsocketprotocol-03 to 04 version? or just the
>>> handshake has changed?
>>
>> You can check here:
>> <http://tools.ietf.org/rfcdiff?url2=draft-ietf-hybi-thewebsocketprotocol-04.txt>
>
> Thanks. However that is a diff, and since draft 03 and 04 are so
> different a diff is not very useful (check it by yourself).

I did check it myself. It is a bit big, but it should be able to answer 
your question.

> ...

Best regards, Julian

From david@davidflanagan.com  Thu Jan 27 14:02:15 2011
Return-Path: <david@davidflanagan.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 E9DC53A68E6 for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 14:02:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
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 WUESeZqUNymi for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 14:02:15 -0800 (PST)
Received: from qmta13.westchester.pa.mail.comcast.net (qmta13.westchester.pa.mail.comcast.net [76.96.59.243]) by core3.amsl.com (Postfix) with ESMTP id C60043A69E0 for <hybi@ietf.org>; Thu, 27 Jan 2011 14:02:14 -0800 (PST)
Received: from omta21.westchester.pa.mail.comcast.net ([76.96.62.72]) by qmta13.westchester.pa.mail.comcast.net with comcast id 0lzv1g0031ZXKqc5Dm5L0h; Thu, 27 Jan 2011 22:05:20 +0000
Received: from [192.168.10.254] ([66.114.38.251]) by omta21.westchester.pa.mail.comcast.net with comcast id 0m581g00i5R7Qga3hm5DWy; Thu, 27 Jan 2011 22:05:17 +0000
Message-ID: <4D41EC12.2080403@davidflanagan.com>
Date: Thu, 27 Jan 2011 14:05:06 -0800
From: David Flanagan <david@davidflanagan.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Thu, 27 Jan 2011 15:07:51 -0800
Subject: [hybi] draft-ietf-hybi-thewebsocketprotocol-04
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: Thu, 27 Jan 2011 22:37:10 -0000

Section 4.5 lists control frame opcodes, and section 4.7 gives examples 
of control and data opcodes.  Shouldn't section 4.6 explicitly state the 
text and data opcodes?

	David Flanagan

From ibc@aliax.net  Thu Jan 27 15:46:26 2011
Return-Path: <ibc@aliax.net>
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 D545D3A68AF for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 15:46:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.625
X-Spam-Level: 
X-Spam-Status: No, score=-1.625 tagged_above=-999 required=5 tests=[AWL=-0.338, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, PLING_QUERY=1.39, RCVD_IN_DNSWL_LOW=-1]
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 QPexKop+afvk for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 15:46:26 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id F0C013A69DD for <hybi@ietf.org>; Thu, 27 Jan 2011 15:46:25 -0800 (PST)
Received: by qyk34 with SMTP id 34so213047qyk.10 for <hybi@ietf.org>; Thu, 27 Jan 2011 15:49:30 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.81.65 with SMTP id w1mr2143470qck.9.1296172169972; Thu, 27 Jan 2011 15:49:29 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Thu, 27 Jan 2011 15:49:29 -0800 (PST)
Date: Fri, 28 Jan 2011 00:49:29 +0100
Message-ID: <AANLkTin2Lfw4BxUUJjx2MHF2-2Bc7R9KmbAMxcXUq=Ro@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: [hybi] Are "Sec-WebSocket-XXXXX" headers case sensitive? WS handshake is still HTTP !
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: Thu, 27 Jan 2011 23:46:27 -0000

Hi, version 76 of the draft states that WS related headers are case sensiti=
ve:

---------------------------------------------
 The leading line from the client follows the Request-Line format.
 The leading line from the server follows the Status-Line format.  The
 Request-Line and Status-Line productions are defined in the HTTP
 specification.

 After the leading line in both cases come an unordered ASCII case-
 insensitive set of fields, one per line, that each match the
 following non-normative ABNF: [RFC5234]
---------------------------------------------

Fortunatelly latest draft 04 corrects it:

---------------------------------------------
 The leading line from the client follows the Request-Line format.
 The leading line from the server follows the Status-Line format.  The
 Request-Line and Status-Line productions are defined in [RFC2616].

 After the leading line in both cases come an unordered set of
 headers.  The meaning of these headers is specified in Section 5 of
 this document.  Additional headers may also be present, such as
 cookies required to identify the user.  The format and parsing of
 headers is as defined in [RFC2616].
---------------------------------------------


By reading some versions of the draft I've realized that the author(s)
has tried to make the WS handshake something non related to HTTP (non
normative rules for header matching, 8 bytes of body without
Content-Length header and so on).
IMHO this vision is totally wrong as WS is based on a feature
*already* described in RFC 2616, in which "Upgrade" header and 101
response are already defined. So if such feature is used it must be
done by respecting core HTTP rules (i.e: headers are always case
insensitive).

Also, until version 75 of the draft, the 101 response parsing by the
client is explained as if it had nothing to do with normal HTTP
parsing ("expect CRLF after each field value" and such stuf). It's
like if WS was designed for developers without HTTP knowledge (which
makes no sense as WS will be mainly implemented in web browsers, whose
authors do know the HTTP protocol very well).

Anyhow is nice to see that all these "issues" have been "fixed" in
latest versions of the draft but, can we be sure that they won't come
back in future versions? This is, IMHO the websocket protocol MUST be
valid HTTP until the 101 response has been sent by the server. After
it the protocol has been "switched" and new rules are accepted, but
not before.

Just my opinion, thanks a lot.



--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From gregw@intalio.com  Thu Jan 27 16:53:32 2011
Return-Path: <gregw@intalio.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 4491C3A6B3D for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 16:53:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.09
X-Spam-Level: 
X-Spam-Status: No, score=-2.09 tagged_above=-999 required=5 tests=[AWL=-0.803,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, PLING_QUERY=1.39, RCVD_IN_DNSWL_LOW=-1]
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 QogFXWgGOylm for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 16:53:31 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 6AFC33A6B38 for <hybi@ietf.org>; Thu, 27 Jan 2011 16:53:31 -0800 (PST)
Received: by qyk34 with SMTP id 34so261586qyk.10 for <hybi@ietf.org>; Thu, 27 Jan 2011 16:56:35 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.36.208 with SMTP id u16mr2242014qad.299.1296176195626; Thu, 27 Jan 2011 16:56:35 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Thu, 27 Jan 2011 16:56:35 -0800 (PST)
In-Reply-To: <AANLkTin2Lfw4BxUUJjx2MHF2-2Bc7R9KmbAMxcXUq=Ro@mail.gmail.com>
References: <AANLkTin2Lfw4BxUUJjx2MHF2-2Bc7R9KmbAMxcXUq=Ro@mail.gmail.com>
Date: Fri, 28 Jan 2011 11:56:35 +1100
X-Google-Sender-Auth: P-J80Yn1YcWCcdpjOYngO8IFT7c
Message-ID: <AANLkTikJxJ5MNt6cZi+i6_zeWxXAzKhE7j9kPkiY9Kxv@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: =?ISO-8859-1?Q?I=F1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Are "Sec-WebSocket-XXXXX" headers case sensitive? WS handshake is still HTTP !
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: Fri, 28 Jan 2011 00:53:32 -0000

On 28 January 2011 10:49, I=F1aki Baz Castillo <ibc@aliax.net> wrote:
> By reading some versions of the draft I've realized that the author(s)
> has tried to make the WS handshake something non related to HTTP (non
> normative rules for header matching, 8 bytes of body without
> Content-Length header and so on).
> IMHO this vision is totally wrong [...]

> Anyhow is nice to see that all these "issues" have been "fixed" in
> latest versions of the draft but, can we be sure that they won't come
> back in future versions?

There was a long debate about in the WG of  "must be HTTP compliant"
vs "it just looks like HTTP".
This was eventually put to a consensus call which came down on the
side of MUST be HTTP compliant before the 101 response (or 200 if
CONNECT is used etc.).
So I hope you need not fear the return of the "it's so like HTTP that
I can't believe it's not HTTP" handshake.

cheers

From ibc@aliax.net  Thu Jan 27 16:55:15 2011
Return-Path: <ibc@aliax.net>
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 99D3A3A6B3B for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 16:55:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.616
X-Spam-Level: 
X-Spam-Status: No, score=-1.616 tagged_above=-999 required=5 tests=[AWL=-0.329, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, PLING_QUERY=1.39, RCVD_IN_DNSWL_LOW=-1]
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 Nwe2FSMY7P8u for <hybi@core3.amsl.com>; Thu, 27 Jan 2011 16:55:15 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id D7E1F3A6B37 for <hybi@ietf.org>; Thu, 27 Jan 2011 16:55:14 -0800 (PST)
Received: by qyk34 with SMTP id 34so262821qyk.10 for <hybi@ietf.org>; Thu, 27 Jan 2011 16:58:19 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.82.69 with SMTP id a5mr358499qcl.47.1296176299178; Thu, 27 Jan 2011 16:58:19 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Thu, 27 Jan 2011 16:58:19 -0800 (PST)
In-Reply-To: <AANLkTikJxJ5MNt6cZi+i6_zeWxXAzKhE7j9kPkiY9Kxv@mail.gmail.com>
References: <AANLkTin2Lfw4BxUUJjx2MHF2-2Bc7R9KmbAMxcXUq=Ro@mail.gmail.com> <AANLkTikJxJ5MNt6cZi+i6_zeWxXAzKhE7j9kPkiY9Kxv@mail.gmail.com>
Date: Fri, 28 Jan 2011 01:58:19 +0100
Message-ID: <AANLkTi=8v=2-_M2w0n-vSWgznDp9TQm=9aMoKPL+47hk@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Are "Sec-WebSocket-XXXXX" headers case sensitive? WS handshake is still HTTP !
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: Fri, 28 Jan 2011 00:55:15 -0000

2011/1/28 Greg Wilkins <gregw@webtide.com>:
> There was a long debate about in the WG of =C2=A0"must be HTTP compliant"
> vs "it just looks like HTTP".
> This was eventually put to a consensus call which came down on the
> side of MUST be HTTP compliant before the 101 response (or 200 if
> CONNECT is used etc.).
> So I hope you need not fear the return of the "it's so like HTTP that
> I can't believe it's not HTTP" handshake.

Great, thanks for the information.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From andy.warmcat.com@googlemail.com  Fri Jan 28 00:53:36 2011
Return-Path: <andy.warmcat.com@googlemail.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 CBB703A694D for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 00:53:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.557
X-Spam-Level: 
X-Spam-Status: No, score=-3.557 tagged_above=-999 required=5 tests=[AWL=0.042,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 Y3hn9pB-Dg2E for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 00:53:35 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 95FF43A6933 for <hybi@ietf.org>; Fri, 28 Jan 2011 00:53:35 -0800 (PST)
Received: by wyf23 with SMTP id 23so3056388wyf.31 for <hybi@ietf.org>; Fri, 28 Jan 2011 00:56:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:subject:content-type:content-transfer-encoding; bh=GRxPH+HZa+AyH48tiM7onoLfxbi3vLoLY7wJ+nJFQpw=; b=Vuv3JxmZmFOzcEBG/TWeixl/8Yh7Axr8adQpS+0gBmU6TgTpkgcJgbi2EJ+ucT5IAZ j+dsy6fw+pZiJEITLMLSGTDt2/7HSYjS63x1gshfJxPJjB+JtmUKccA3x9etlRzoufAR qTQyNjJiGI+c2Mo7XJQiEyfKbn0B4iEGyG9P0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; b=E1SA1DFHvV+iN4Vkv5ny5bm33Q8P3YfuigEIEtDj0T61ABvYi9sk8jW1fXzj2frvjq pvNrnqbCTe6Sp6P2XhyasDO0zd+Ypb5neIwyaA/8bdy1AZ4hZhoMRjyaPfVdukKfl+hw Uz5w5td7YXO+Wr65TOJRd3qSFTnzBGR4K/ed0=
Received: by 10.227.156.5 with SMTP id u5mr2337799wbw.28.1296205000522; Fri, 28 Jan 2011 00:56:40 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id y29sm7366810wbd.10.2011.01.28.00.56.37 (version=SSLv3 cipher=RC4-MD5); Fri, 28 Jan 2011 00:56:38 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D4284C2.2040903@warmcat.com>
Date: Fri, 28 Jan 2011 08:56:34 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [hybi] 04 and squid
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 28 Jan 2011 08:53:36 -0000

Hi -

At the suggestion of a guy offlist who was curious if 04 would actually 
work through proxies, I added http_proxy support (via CONNECT as per the 
standard) to libwebsockets last night and tested it with squid on a 
current Fedora rawhide box.

It worked fine, with a caveat.

Here are the steps to reproduce

  - libwebsockets 9659f379672d7be6
  - squid 3.1.10

  1) install squid on boxA

  2) edit default squid config

   acl SSL_ports port 443

    to

   acl SSL_ports port 443 7681 80

   (7681 is default libwebsocket test port 80 is obvious)

  3) restart squid

  4) On boxB, run

   libwebsockets-test-server --port 80

  5) On boxA, run

   http_proxy=boxA:3128 libwebsockets-test-client boxB --port 80

Running both client and server on 7681 was also fine; adding --ssl flag 
to client and server also worked fine through the proxy.


However, out of the box, the squid config disallows use of CONNECT 
except on SSL_ports, which defaults to 443.  So by default ws:// will 
fail through these guys, but wss:// on 443 will succeed.

I don't think it makes any overall big trouble but just a datapoint.

-Andy

From ibc@aliax.net  Fri Jan 28 03:51:00 2011
Return-Path: <ibc@aliax.net>
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 7C8CC3A67F3 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 03:51:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.303
X-Spam-Level: 
X-Spam-Status: No, score=-2.303 tagged_above=-999 required=5 tests=[AWL=0.374,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 drvXVqUdwDMm for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 03:50:59 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 8A74A3A67EE for <hybi@ietf.org>; Fri, 28 Jan 2011 03:50:59 -0800 (PST)
Received: by qyj19 with SMTP id 19so3368214qyj.10 for <hybi@ietf.org>; Fri, 28 Jan 2011 03:54:05 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.249.203 with SMTP id ml11mr858317qcb.199.1296215644873; Fri, 28 Jan 2011 03:54:04 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Fri, 28 Jan 2011 03:54:04 -0800 (PST)
Date: Fri, 28 Jan 2011 12:54:04 +0100
Message-ID: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 11:51:00 -0000

Hi, draft 04 states that client to server frames must be masked as follows:

---------------------------------------------------------------------------=
--
     masked-frame  =3D masking-nonce masked-data
     masking-nonce =3D 4full-octet
     masked-data   =3D *full-octet
     full-octet    =3D %x00-FF

   The masked-data is the clear-text frame "encrypted" using a simple
   XOR cipher as follows.

   1.  Let the frame-key be the SHA-1 hash of the concatentation of the
       masking-nonce followed by the masking-key.

   2.  Octet i of the masked-data is the XOR of octet i of the clear
       text frame with octet i modulo 20 of the frame-key:

     frame-key      =3D SHA-1(masking-nonce || masking-key)
     j              =3D i MOD 20
     masked-octet-i =3D clear-text-octet-i XOR octet-j-of-frame-key
---------------------------------------------------------------------------=
----

After the WS handshake, the server starts receiving bytes and it must
un-mask them. How can know the server when an entire frame has been
received? Maybe the server must wait until it has enough bytes in
order to un-mask the "Payload len" and "Extended payload length"? This
is, the masked-data has the same length than the clear frame, so after
un-masking those frame fields related to frame length the server
already knows how many bytes it must read in order to get the entire
frame. Am I right?

Isn't it becoming a "bit" complex? Just wondering.

Thanks a lot.


--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From andy.warmcat.com@googlemail.com  Fri Jan 28 03:57:12 2011
Return-Path: <andy.warmcat.com@googlemail.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 A34873A67F6 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 03:57:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.408
X-Spam-Level: 
X-Spam-Status: No, score=-3.408 tagged_above=-999 required=5 tests=[AWL=-0.109, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 7SeRUOenZxI1 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 03:57:11 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 532F03A67C0 for <hybi@ietf.org>; Fri, 28 Jan 2011 03:57:11 -0800 (PST)
Received: by wyf23 with SMTP id 23so3212470wyf.31 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:00:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Yx3V8N9MkW3jE1/nhtclqlNU3GQNFrGMbLXTCirt1/4=; b=YLQlJhoGzO+1SpaXeysHj5luGtHnF+NZg8MZ27xeIzkNH+rBnriV3VqPOxqhvMOfz4 Ut5G9A+G9+QlmfvgP/Sd4gtXhma8YqHLrAzkTigxOw+cKdMTJHTcWhFA8hjOlXR8ZGrx RTkaHBelHgkX6EaUgbjOyr8O92hv/Ui96SQDE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=MtoOLG/jgNHE3dRoNoVjyCQ4X03L2bhknZsSO2dpk5zavyaqICyTR8FuX44Jc5pUvJ nSBVPjRJuc5O5TKkixyJp9DA04xWUtTVtqRSMa20PGO4tKhozaSq7shbWmrBSGYC3Y0w Xmhy2DFAIfRzqydI9/DPvx5Igs05jg+VPIRs4=
Received: by 10.227.154.74 with SMTP id n10mr2528061wbw.116.1296216016640; Fri, 28 Jan 2011 04:00:16 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id o6sm976506wbo.15.2011.01.28.04.00.15 (version=SSLv3 cipher=RC4-MD5); Fri, 28 Jan 2011 04:00:15 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D42AFCE.6010204@warmcat.com>
Date: Fri, 28 Jan 2011 12:00:14 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: =?UTF-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com>
In-Reply-To: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 28 Jan 2011 11:57:12 -0000

On 01/28/11 11:54, Somebody in the thread at some point said:

Hi -

> After the WS handshake, the server starts receiving bytes and it must
> un-mask them. How can know the server when an entire frame has been
> received? Maybe the server must wait until it has enough bytes in
> order to un-mask the "Payload len" and "Extended payload length"? This
> is, the masked-data has the same length than the clear frame, so after
> un-masking those frame fields related to frame length the server
> already knows how many bytes it must read in order to get the entire
> frame. Am I right?

Not sure if I get your issue... the masking nonce comes in the clear as 
the first 4 bytes of the packet.

So you can start unmasking immediately at the fifth byte onwards, which 
is the first header byte.  libwebsockets has a bytewise state machine to 
parse this traffic and that works out well.

> Isn't it becoming a "bit" complex? Just wondering.

Simplicity stopped being the goal when the browser vendors disabled 
websockets by default.  Now the goal is keeping the effort to have 
websockets at all alive by piling in whatever the browser vendors that 
disabled it want to see included, whether it is useful or not ie, "masking".

-Andy

From tyoshino@google.com  Fri Jan 28 04:03:05 2011
Return-Path: <tyoshino@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 A2DCE3A67FD for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 04:03:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.826
X-Spam-Level: 
X-Spam-Status: No, score=-105.826 tagged_above=-999 required=5 tests=[AWL=-0.150, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, 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 0nqH0+YzkxHr for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 04:03:04 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 76D313A67E4 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:03:04 -0800 (PST)
Received: from kpbe20.cbf.corp.google.com (kpbe20.cbf.corp.google.com [172.25.105.84]) by smtp-out.google.com with ESMTP id p0SC693q015236 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:06:10 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1296216370; bh=qoua3YpxLus8syBktvPaCJV31KE=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=l/x62pTRmwBSlCykYWY4MhFBsq9Ci9g4psHr4dZtwt/GSERa6M1XZjHZvwg8qDyoy SE7X3ZpIK2+cEwauRPIjw==
Received: from iwn2 (iwn2.prod.google.com [10.241.68.66]) by kpbe20.cbf.corp.google.com with ESMTP id p0SC68CM002351 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Fri, 28 Jan 2011 04:06:08 -0800
Received: by iwn2 with SMTP id 2so3354903iwn.21 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:06:08 -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=g7hMgLvvOPzjvq+29puFJEPhGMojSzXVvXhYR88qf/8=; b=JbtDuJuRIFLd8WDzgKNCNqjwciWHS40yzispGW5Z9O7zuRMZI66hy4CIjfbpqX+7mB z13ej9/PuBgiaFNx/zdA==
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=h91La/yHvsg0h9rgR3kR+wPZLHSogfVK5LrAMZmC/OOzypbD86izdR7HuoDr+ngq9C vzE9qyULwYjuKKC7LTEA==
Received: by 10.231.173.67 with SMTP id o3mr2543481ibz.29.1296216368461; Fri, 28 Jan 2011 04:06:08 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.15.139 with HTTP; Fri, 28 Jan 2011 04:05:48 -0800 (PST)
In-Reply-To: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Fri, 28 Jan 2011 21:05:48 +0900
Message-ID: <AANLkTi=1DVBDyiaq5H4Cfqry9HRHmfVSUvuFvWfqLEoB@mail.gmail.com>
To: =?ISO-8859-1?Q?I=F1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: multipart/alternative; boundary=0016364edb0c31b7c8049ae6e41f
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 12:03:05 -0000

--0016364edb0c31b7c8049ae6e41f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Fri, Jan 28, 2011 at 20:54, I=F1aki Baz Castillo <ibc@aliax.net> wrote:

> Hi, draft 04 states that client to server frames must be masked as follow=
s:
>
>
> -------------------------------------------------------------------------=
----
>     masked-frame  =3D masking-nonce masked-data
>     masking-nonce =3D 4full-octet
>     masked-data   =3D *full-octet
>     full-octet    =3D %x00-FF
>
>   The masked-data is the clear-text frame "encrypted" using a simple
>   XOR cipher as follows.
>
>   1.  Let the frame-key be the SHA-1 hash of the concatentation of the
>       masking-nonce followed by the masking-key.
>
>   2.  Octet i of the masked-data is the XOR of octet i of the clear
>       text frame with octet i modulo 20 of the frame-key:
>
>     frame-key      =3D SHA-1(masking-nonce || masking-key)
>     j              =3D i MOD 20
>     masked-octet-i =3D clear-text-octet-i XOR octet-j-of-frame-key
>
> -------------------------------------------------------------------------=
------
>
> After the WS handshake, the server starts receiving bytes and it must
> un-mask them. How can know the server when an entire frame has been
> received? Maybe the server must wait until it has enough bytes in
> order to un-mask the "Payload len" and "Extended payload length"? This
> is, the masked-data has the same length than the clear frame, so after
> un-masking those frame fields related to frame length the server
> already knows how many bytes it must read in order to get the entire
> frame. Am I right?
>
>
I think so. We need to read N octet (necessary and sufficient) masked data
to get N octet unmasked data. We get the 20 octet frame-key once we receive
4 octets of masking-nonce. Just receive following 2 octets and xor with
frame-key[0 to 1] to know the length of extended payload length. If there's
N octet extended payload length, read N octets and xor with frame-key[1 to
1+N], ..., then payload ... as well.


> Isn't it becoming a "bit" complex? Just wondering.
>
> Thanks a lot.
>
>
> --
> I=F1aki Baz Castillo
> <ibc@aliax.net>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

--0016364edb0c31b7c8049ae6e41f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Fri, Jan 28, 2011 at 20:54, I=F1aki Baz Casti=
llo <span dir=3D"ltr">&lt;<a href=3D"mailto:ibc@aliax.net">ibc@aliax.net</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi, draft 04 states that client to server frames must be masked as follows:=
<br>
<br>
---------------------------------------------------------------------------=
--<br>
 =A0 =A0 masked-frame =A0=3D masking-nonce masked-data<br>
 =A0 =A0 masking-nonce =3D 4full-octet<br>
 =A0 =A0 masked-data =A0 =3D *full-octet<br>
 =A0 =A0 full-octet =A0 =A0=3D %x00-FF<br>
<br>
 =A0 The masked-data is the clear-text frame &quot;encrypted&quot; using a =
simple<br>
 =A0 XOR cipher as follows.<br>
<br>
 =A0 1. =A0Let the frame-key be the SHA-1 hash of the concatentation of the=
<br>
 =A0 =A0 =A0 masking-nonce followed by the masking-key.<br>
<br>
 =A0 2. =A0Octet i of the masked-data is the XOR of octet i of the clear<br=
>
 =A0 =A0 =A0 text frame with octet i modulo 20 of the frame-key:<br>
<br>
 =A0 =A0 frame-key =A0 =A0 =A0=3D SHA-1(masking-nonce || masking-key)<br>
 =A0 =A0 j =A0 =A0 =A0 =A0 =A0 =A0 =A0=3D i MOD 20<br>
 =A0 =A0 masked-octet-i =3D clear-text-octet-i XOR octet-j-of-frame-key<br>
---------------------------------------------------------------------------=
----<br>
<br>
After the WS handshake, the server starts receiving bytes and it must<br>
un-mask them. How can know the server when an entire frame has been<br>
received? Maybe the server must wait until it has enough bytes in<br>
order to un-mask the &quot;Payload len&quot; and &quot;Extended payload len=
gth&quot;? This<br>
is, the masked-data has the same length than the clear frame, so after<br>
un-masking those frame fields related to frame length the server<br>
already knows how many bytes it must read in order to get the entire<br>
frame. Am I right?<br>
<br></blockquote><div><br></div><div>I think so. We need to read N octet (n=
ecessary and sufficient) masked data to get N octet unmasked data. We get t=
he 20 octet frame-key once we receive 4 octets of masking-nonce. Just recei=
ve following 2 octets and xor with frame-key[0 to 1] to know the length of =
extended payload length. If there&#39;s N octet extended payload length, re=
ad N octets and xor with frame-key[1 to 1+N], ..., then payload ... as well=
.</div>

<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;">
Isn&#39;t it becoming a &quot;bit&quot; complex? Just wondering.<br>
<br>
Thanks a lot.<br>
<font color=3D"#888888"><br>
<br>
--<br>
I=F1aki Baz Castillo<br>
&lt;<a href=3D"mailto:ibc@aliax.net">ibc@aliax.net</a>&gt;<br>
_______________________________________________<br>
hybi mailing list<br>
<a href=3D"mailto:hybi@ietf.org">hybi@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/hybi" target=3D"_blank">ht=
tps://www.ietf.org/mailman/listinfo/hybi</a><br>
</font></blockquote></div><br>

--0016364edb0c31b7c8049ae6e41f--

From gregw@intalio.com  Fri Jan 28 04:15:28 2011
Return-Path: <gregw@intalio.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 E6F303A67E4 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 04:15:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.93
X-Spam-Level: 
X-Spam-Status: No, score=-2.93 tagged_above=-999 required=5 tests=[AWL=0.047,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 JfL6BW9Og-Io for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 04:15:28 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 206533A67A4 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:15:28 -0800 (PST)
Received: by qyj19 with SMTP id 19so3391017qyj.10 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:18:34 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.47.75 with SMTP id m11mr2836744qaf.249.1296217114034; Fri, 28 Jan 2011 04:18:34 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Fri, 28 Jan 2011 04:18:33 -0800 (PST)
In-Reply-To: <4D42AFCE.6010204@warmcat.com>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com>
Date: Fri, 28 Jan 2011 23:18:33 +1100
X-Google-Sender-Auth: TY4SdiXL-MAUKCOp2K99uQLYyOQ
Message-ID: <AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 12:15:29 -0000

On 28 January 2011 23:00, Andy Green <andy@warmcat.com> wrote:
> So you can start unmasking immediately at the fifth byte onwards, which i=
s
> the first header byte. =A0libwebsockets has a bytewise state machine to p=
arse
> this traffic and that works out well.

The problem with this, is that it make masking part of the framing. ie
you cannot identify the boundary of a frame without understanding
masking.
Apart from the additional complexity and asymmetry in framing, this
will mean that we unable to ever to change the masking algorithm
(either for a
stronger or weaker algorithm) because it will break too much
infrastructure that gets built to understand masked framing.

I really think that masking should not change the framing that we took
so long to agree on.

From andy.warmcat.com@googlemail.com  Fri Jan 28 04:40:43 2011
Return-Path: <andy.warmcat.com@googlemail.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 E3C653A6840 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 04:40:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 4TTlF+STcNek for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 04:40:42 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id A3C9C3A6821 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:40:42 -0800 (PST)
Received: by wyf23 with SMTP id 23so3253226wyf.31 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:43:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=qg3XlNTFiEOFOxO75J8FKeqq/l63iunYEPjSdG47eiU=; b=Rc8c98Y7ERxOHpeGV/PFtBdnf3/RSUqTTMX+0awMCBuhhtGXGvYCVuWRmzoa4HWd7z 54XcifTmQTe41KyG9cYFXXjvABOqaRWYbxj18AVqwfPEBoi4ONz9jes4wHi77gxll/mN pmv04oFdS3N36iP4o04YMYlIc2yivwV23DTAg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=Mjl25noi7ottG2toPTvi2XTi1Tckw4jwHR6vFbUiyDeUv78VhP25W6v+XAyuasHovF i67NyE5aRauutimY7hSJrbSFBmScS0T6aytS+41eZGv/rjUAVYvyw2atUzgUUxjqm4xB qBqxHx6iwUq22sru4TzS5fLPJcFb6q9TL2o68=
Received: by 10.227.156.5 with SMTP id u5mr2620263wbw.28.1296218616187; Fri, 28 Jan 2011 04:43:36 -0800 (PST)
Received: from [192.168.0.18] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id w25sm1608757wbd.17.2011.01.28.04.43.33 (version=SSLv3 cipher=RC4-MD5); Fri, 28 Jan 2011 04:43:34 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D42B9E9.3000907@warmcat.com>
Date: Fri, 28 Jan 2011 12:43:21 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Greg Wilkins <gregw@webtide.com>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com>	<4D42AFCE.6010204@warmcat.com> <AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com>
In-Reply-To: <AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 28 Jan 2011 12:40:44 -0000

On 01/28/11 12:18, Somebody in the thread at some point said:
> On 28 January 2011 23:00, Andy Green<andy@warmcat.com>  wrote:
>> So you can start unmasking immediately at the fifth byte onwards, which is
>> the first header byte.  libwebsockets has a bytewise state machine to parse
>> this traffic and that works out well.
>
> The problem with this, is that it make masking part of the framing. ie
> you cannot identify the boundary of a frame without understanding
> masking.

It's true.

> Apart from the additional complexity and asymmetry in framing, this
> will mean that we unable to ever to change the masking algorithm
> (either for a
> stronger or weaker algorithm) because it will break too much
> infrastructure that gets built to understand masked framing.
>
> I really think that masking should not change the framing that we took
> so long to agree on.

I didn't appreciate this was behind your pushing 
masking-as-an-extension, but of course that makes sense to subordinate 
it to the header.

Will people agree to having ten bytes or whatever in plain?  Nobody 
wanted to make a list of attacks that are websocket business or not to 
worry about so it's just arbitrary if people will allow it or not.

-Andy

From ibc@aliax.net  Fri Jan 28 04:52:14 2011
Return-Path: <ibc@aliax.net>
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 9EF7C3A6866 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 04:52:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.312
X-Spam-Level: 
X-Spam-Status: No, score=-2.312 tagged_above=-999 required=5 tests=[AWL=0.365,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 jMjM4AjroZ2I for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 04:52:13 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 733A63A6863 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:52:13 -0800 (PST)
Received: by qyk34 with SMTP id 34so780032qyk.10 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:55:19 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.249.203 with SMTP id ml11mr908281qcb.199.1296219319064; Fri, 28 Jan 2011 04:55:19 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Fri, 28 Jan 2011 04:55:18 -0800 (PST)
In-Reply-To: <4D42B9E9.3000907@warmcat.com>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com> <AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com> <4D42B9E9.3000907@warmcat.com>
Date: Fri, 28 Jan 2011 13:55:18 +0100
Message-ID: <AANLkTimCtyufbRfqnSamFQ-cFOALATDyaKQN6jhdP5yS@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: andy@warmcat.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 12:52:14 -0000

2011/1/28 Andy Green <andy@warmcat.com>:
>> The problem with this, is that it make masking part of the framing. ie
>> you cannot identify the boundary of a frame without understanding
>> masking.
>
> It's true.

Perhaps the masking should be done into the frame Application data
field? This is: client-to-server frame would contain masking in the
data, instead of masking the whoole frame as it is specified in
draft-04.
Would it be better?

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From ibc@aliax.net  Fri Jan 28 04:57:24 2011
Return-Path: <ibc@aliax.net>
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 051403A686A for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 04:57:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.32
X-Spam-Level: 
X-Spam-Status: No, score=-2.32 tagged_above=-999 required=5 tests=[AWL=0.357,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 07jfjzbOIshE for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 04:57:23 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 1931F3A6801 for <hybi@ietf.org>; Fri, 28 Jan 2011 04:57:22 -0800 (PST)
Received: by qwi2 with SMTP id 2so3454690qwi.31 for <hybi@ietf.org>; Fri, 28 Jan 2011 05:00:29 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.249.17 with SMTP id mi17mr929579qcb.123.1296219628865; Fri, 28 Jan 2011 05:00:28 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Fri, 28 Jan 2011 05:00:28 -0800 (PST)
In-Reply-To: <4D42AFCE.6010204@warmcat.com>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com>
Date: Fri, 28 Jan 2011 14:00:28 +0100
Message-ID: <AANLkTikLzM96czDFfKNH0e5-ONVDVUrc5xARWARFb3kU@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: andy@warmcat.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 12:57:24 -0000

2011/1/28 Andy Green <andy@warmcat.com>:
> Not sure if I get your issue... the masking nonce comes in the clear as t=
he
> first 4 bytes of the packet.
>
> So you can start unmasking immediately at the fifth byte onwards, which i=
s
> the first header byte. =C2=A0libwebsockets has a bytewise state machine t=
o parse
> this traffic and that works out well.

Ok, understood. Thanks.


>> Isn't it becoming a "bit" complex? Just wondering.
>
> Simplicity stopped being the goal when the browser vendors disabled
> websockets by default. =C2=A0Now the goal is keeping the effort to have
> websockets at all alive by piling in whatever the browser vendors that
> disabled it want to see included, whether it is useful or not ie, "maskin=
g".

This wouldn't occur if browser vendors wouldn't implement the draft
when it's still unstable. I strongly can't understand how the browser
vendors have decided to implement an "in-progress" draft so far from
being stable. Neither I can't understand that there are already
commercial products based on websockets. It's annoying IMHO.



--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From ibc@aliax.net  Fri Jan 28 05:01:24 2011
Return-Path: <ibc@aliax.net>
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 1733E3A6823 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 05:01:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.328
X-Spam-Level: 
X-Spam-Status: No, score=-2.328 tagged_above=-999 required=5 tests=[AWL=0.349,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 qGraPiDmWnIR for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 05:01:23 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 449263A6801 for <hybi@ietf.org>; Fri, 28 Jan 2011 05:01:23 -0800 (PST)
Received: by qwi2 with SMTP id 2so3458766qwi.31 for <hybi@ietf.org>; Fri, 28 Jan 2011 05:04:29 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.82.69 with SMTP id a5mr935211qcl.47.1296219868959; Fri, 28 Jan 2011 05:04:28 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Fri, 28 Jan 2011 05:04:28 -0800 (PST)
In-Reply-To: <4D42AFCE.6010204@warmcat.com>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com>
Date: Fri, 28 Jan 2011 14:04:28 +0100
Message-ID: <AANLkTimfcYTDigL0YCW7F-cy+EDGFGr1mqgagmsRfGGY@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: andy@warmcat.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 13:01:24 -0000

2011/1/28 Andy Green <andy@warmcat.com>:
> Now the goal is keeping the effort to have websockets at all alive by pil=
ing
> in whatever the browser vendors that disabled it want to see included,
> whether it is useful or not ie, "masking".

draft-04 says:

   Frames sent from the client to the server are masked to
   avoid confusing network intermediaries, such as intercepting proxies.

For sure I miss something, but I cannot understand how a masked frame
avoids such problems in intermediaries while non mased frames don't
avoid it. At the end, a frame (as defined in 04) contains various
bytes at the beginning which make impossible for an intermediary to
interpret such data is "more HTTP requests", am I wrong?

Which is the real advantage of masking? shouldn't the draft describe it?

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From andy.warmcat.com@googlemail.com  Fri Jan 28 05:02:34 2011
Return-Path: <andy.warmcat.com@googlemail.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 9EB4D3A684B for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 05:02:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.449
X-Spam-Level: 
X-Spam-Status: No, score=-3.449 tagged_above=-999 required=5 tests=[AWL=-0.150, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 ZrGx-bUPERVz for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 05:02:33 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 36DAE3A6801 for <hybi@ietf.org>; Fri, 28 Jan 2011 05:02:33 -0800 (PST)
Received: by wyf23 with SMTP id 23so3275479wyf.31 for <hybi@ietf.org>; Fri, 28 Jan 2011 05:05:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Uxt5rAIA2ojgw65HhfmUUyqY8ezGWpn87kcC3lR6zLc=; b=At96Z2Hj2IPJu+hyUCek5Idln7K9HoEDDya4ZWhHk0dsJ8sDDgbWX0irqJCMDrSkph VlBv37Rz5RMDhzP/T1pgp5DVVg7wr0nsqt+f5yGnZve47o1ayu5nUZi6tyZJAEEg2qq+ oQe2ZArPeCSAh3fjefWhUacebLfc5mqOFcGkw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=Fuo54AaiOuLrjjEzXhNZNmMPtE60Gs0WIJKq2ne2uHzqK7RTSEtmK/0bpvz/fLL9+7 tkTw+Jt0PJqmC8GngCJNzY6bqSLw25AEU1b27tQT8djePHV/CF1VBR6cVST8pOFUE5Xz ta1/wPWxGZiza9zmVvRNF1QqXz9GytMGEYYuA=
Received: by 10.227.155.73 with SMTP id r9mr2680078wbw.63.1296219938575; Fri, 28 Jan 2011 05:05:38 -0800 (PST)
Received: from [192.168.0.18] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id w25sm1625755wbd.23.2011.01.28.05.05.26 (version=SSLv3 cipher=RC4-MD5); Fri, 28 Jan 2011 05:05:37 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D42BEF5.2030605@warmcat.com>
Date: Fri, 28 Jan 2011 13:04:53 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: =?UTF-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com>	<4D42AFCE.6010204@warmcat.com>	<AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com>	<4D42B9E9.3000907@warmcat.com> <AANLkTimCtyufbRfqnSamFQ-cFOALATDyaKQN6jhdP5yS@mail.gmail.com>
In-Reply-To: <AANLkTimCtyufbRfqnSamFQ-cFOALATDyaKQN6jhdP5yS@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 28 Jan 2011 13:02:34 -0000

On 01/28/11 12:55, Somebody in the thread at some point said:
> 2011/1/28 Andy Green<andy@warmcat.com>:
>>> The problem with this, is that it make masking part of the framing. ie
>>> you cannot identify the boundary of a frame without understanding
>>> masking.
>>
>> It's true.
>
> Perhaps the masking should be done into the frame Application data
> field? This is: client-to-server frame would contain masking in the
> data, instead of masking the whoole frame as it is specified in
> draft-04.
> Would it be better?

That's what Greg has been suggesting for some time; it got somewhat lost 
in the "we need masking" / "we don't need masking" debate.  I think it 
would be better to do that.

The political problem is a lot of funny claims were made about how 
dangerous it is to allow even just a few bytes controlled by the client 
to come from the client, through any intermediaries, to the server.  For 
example if GET appears even after GB of garbage through a websocket 
connection was held by some to be deadly for some (unidentified and so 
theoretical) intermediaries.

In the situation you describe, at least 8 bytes of the header can 
contain whatever you want just by setting the long length and it goes 
out unmunged.  That will likely lead some people to say it is a security 
problem (to exactly what, has not been described).

-Andy

From ibc@aliax.net  Fri Jan 28 05:07:29 2011
Return-Path: <ibc@aliax.net>
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 9143D3A688B for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 05:07:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.336
X-Spam-Level: 
X-Spam-Status: No, score=-2.336 tagged_above=-999 required=5 tests=[AWL=0.341,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 MvNJ1VemkpfX for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 05:07:28 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 474563A684B for <hybi@ietf.org>; Fri, 28 Jan 2011 05:07:28 -0800 (PST)
Received: by qwi2 with SMTP id 2so3465102qwi.31 for <hybi@ietf.org>; Fri, 28 Jan 2011 05:10:33 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.249.17 with SMTP id mi17mr938019qcb.123.1296220228429; Fri, 28 Jan 2011 05:10:28 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Fri, 28 Jan 2011 05:10:28 -0800 (PST)
In-Reply-To: <4D42BEF5.2030605@warmcat.com>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com> <AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com> <4D42B9E9.3000907@warmcat.com> <AANLkTimCtyufbRfqnSamFQ-cFOALATDyaKQN6jhdP5yS@mail.gmail.com> <4D42BEF5.2030605@warmcat.com>
Date: Fri, 28 Jan 2011 14:10:28 +0100
Message-ID: <AANLkTimgdrX2roe2augqW1tdxW77pRYa58HNohV=sXxf@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: andy@warmcat.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 13:07:29 -0000

2011/1/28 Andy Green <andy@warmcat.com>:
> That's what Greg has been suggesting for some time; it got somewhat lost =
in
> the "we need masking" / "we don't need masking" debate. =C2=A0I think it =
would be
> better to do that.
>
> The political problem is a lot of funny claims were made about how danger=
ous
> it is to allow even just a few bytes controlled by the client to come fro=
m
> the client, through any intermediaries, to the server. =C2=A0For example =
if GET
> appears even after GB of garbage through a websocket connection was held =
by
> some to be deadly for some (unidentified and so theoretical) intermediari=
es.
>
> In the situation you describe, at least 8 bytes of the header can contain
> whatever you want just by setting the long length and it goes out unmunge=
d.
> =C2=A0That will likely lead some people to say it is a security problem (=
to
> exactly what, has not been described).

Even when using masking, a malicius client can send literal "GET
/xxxxx" as the first bytes of the stream (after the handshake), so
what does masking avoid? an intermediary proxy still would read such
"malicius" clear GET sent fom the client after the WS handshake.


--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From andy.warmcat.com@googlemail.com  Fri Jan 28 05:11:38 2011
Return-Path: <andy.warmcat.com@googlemail.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 17ADA3A684B for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 05:11:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.437
X-Spam-Level: 
X-Spam-Status: No, score=-3.437 tagged_above=-999 required=5 tests=[AWL=-0.137, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 M1-nlzuqbDeo for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 05:11:36 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 1C2383A67A1 for <hybi@ietf.org>; Fri, 28 Jan 2011 05:11:35 -0800 (PST)
Received: by wwa36 with SMTP id 36so3676265wwa.13 for <hybi@ietf.org>; Fri, 28 Jan 2011 05:14:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=lSqvuAnWZdG+kEMHO1FGWvGvwT9HmwYIQtbT5BQwo98=; b=nhbM9LMBrqNOlWl5Vycb8pwNqcXPSnm0yTbdOql1LoQwripOH06hFvUYG1aN5L7kSV jbE13lpjDpJ57gQ7MKFbJ2GGIckz19IsNQ+llFnbubjc/yLO++JaHS7orTFxZAonS/SN 4azKuEHdJJR9usjbquvfst4ZNmu0T1dWx9eWs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=ramjKFjf6qavhxJG5mQsuqoNT9c30otvbz0kvKdn1sQzciQCNgD2hA1gEHghsVEuHu IqnyCEQ/Y7+C18fAoetdnNIcjrh45x2hUJNO2fBZVct2Mx/bMFO5GAUF2j/m87PjacY/ 1bcHfZqkGJIB/1dOAYyQBhV0qnzleoJTcN93g=
Received: by 10.227.141.136 with SMTP id m8mr2638316wbu.179.1296220481429; Fri, 28 Jan 2011 05:14:41 -0800 (PST)
Received: from [192.168.0.18] (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id w25sm1630540wbd.17.2011.01.28.05.14.40 (version=SSLv3 cipher=RC4-MD5); Fri, 28 Jan 2011 05:14:40 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D42C13F.3010903@warmcat.com>
Date: Fri, 28 Jan 2011 13:14:39 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: =?UTF-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com>	<4D42AFCE.6010204@warmcat.com>	<AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com>	<4D42B9E9.3000907@warmcat.com>	<AANLkTimCtyufbRfqnSamFQ-cFOALATDyaKQN6jhdP5yS@mail.gmail.com>	<4D42BEF5.2030605@warmcat.com> <AANLkTimgdrX2roe2augqW1tdxW77pRYa58HNohV=sXxf@mail.gmail.com>
In-Reply-To: <AANLkTimgdrX2roe2augqW1tdxW77pRYa58HNohV=sXxf@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Fri, 28 Jan 2011 13:11:38 -0000

On 01/28/11 13:10, Somebody in the thread at some point said:

> Even when using masking, a malicius client can send literal "GET
> /xxxxx" as the first bytes of the stream (after the handshake), so
> what does masking avoid? an intermediary proxy still would read such
> "malicius" clear GET sent fom the client after the WS handshake.

That is true.

But to be fair, Javascript can't do that since it doesn't know the nonce 
and masking key.

Although I agree, if that vulnerable intermediary exists, he is 
vulnerable to the same sequence of packets via websockets or something else.

-Andy

From jmason@rim.com  Fri Jan 28 08:33:02 2011
Return-Path: <jmason@rim.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 75C693A68F7 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 08:33:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.929
X-Spam-Level: 
X-Spam-Status: No, score=-5.929 tagged_above=-999 required=5 tests=[AWL=0.370,  BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_MED=-4]
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 Abwv+N+OzXJO for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 08:33:01 -0800 (PST)
Received: from mhs03ykf.rim.net (mhs03ykf.rim.net [216.9.243.80]) by core3.amsl.com (Postfix) with ESMTP id 4593D3A6903 for <hybi@ietf.org>; Fri, 28 Jan 2011 08:33:00 -0800 (PST)
X-AuditID: 0a401fcb-b7b5eae000000a4d-63-4d42f0758b68
Received: from XHT109CNC.rim.net ( [10.65.12.218]) by mhs03ykf.rim.net (RIM Mail) with SMTP id E5.46.02637.570F24D4; Fri, 28 Jan 2011 11:36:06 -0500 (EST)
Received: from XCH117CNC.rim.net ([fe80::b8df:541f:9d85:9909]) by XHT109CNC.rim.net ([fe80::8412:4d9e:eb55:2c7b%11]) with mapi; Fri, 28 Jan 2011 11:36:05 -0500
From: Joe Mason <jmason@rim.com>
To: =?utf-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>, "andy@warmcat.com" <andy@warmcat.com>
Date: Fri, 28 Jan 2011 11:36:00 -0500
Thread-Topic: [hybi] Doubt about cliente-to-server masking
Thread-Index: Acu+7MJcJqcShxHoTgiVmZUgxfC6vQAHGiIA
Message-ID: <BB31C4AB95A70042A256109D4619912605EF6A75@XCH117CNC.rim.net>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com> <AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com> <4D42B9E9.3000907@warmcat.com> <AANLkTimCtyufbRfqnSamFQ-cFOALATDyaKQN6jhdP5yS@mail.gmail.com> <4D42BEF5.2030605@warmcat.com> <AANLkTimgdrX2roe2augqW1tdxW77pRYa58HNohV=sXxf@mail.gmail.com>
In-Reply-To: <AANLkTimgdrX2roe2augqW1tdxW77pRYa58HNohV=sXxf@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
content-transfer-encoding: base64
MIME-Version: 1.0
X-Brightmail-Tracker: AAAAAgAAAZEXRGiF
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 16:33:03 -0000

PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBoeWJpLWJvdW5jZXNAaWV0
Zi5vcmcgW21haWx0bzpoeWJpLWJvdW5jZXNAaWV0Zi5vcmddIE9uIEJlaGFsZiBPZg0KPiBJ
w7Fha2kgQmF6IENhc3RpbGxvDQo+IA0KPiBFdmVuIHdoZW4gdXNpbmcgbWFza2luZywgYSBt
YWxpY2l1cyBjbGllbnQgY2FuIHNlbmQgbGl0ZXJhbCAiR0VUDQo+IC94eHh4eCIgYXMgdGhl
IGZpcnN0IGJ5dGVzIG9mIHRoZSBzdHJlYW0gKGFmdGVyIHRoZSBoYW5kc2hha2UpLCBzbw0K
PiB3aGF0IGRvZXMgbWFza2luZyBhdm9pZD8gYW4gaW50ZXJtZWRpYXJ5IHByb3h5IHN0aWxs
IHdvdWxkIHJlYWQgc3VjaA0KPiAibWFsaWNpdXMiIGNsZWFyIEdFVCBzZW50IGZvbSB0aGUg
Y2xpZW50IGFmdGVyIHRoZSBXUyBoYW5kc2hha2UuDQoNCkEgZnVsbHkgbWFsaWNpb3VzIGNs
aWVudCB3aWxsIG5vdCBiZSBydW5uaW5nIGJlaGluZCBjb3Jwb3JhdGUgZmlyZXdhbGxzLiAg
VGhlIGF0dGFjayB3ZSBhcmUgdHJ5aW5nIHRvIGRlZmVuZCBmcm9tIGlzIGEgbWFsaWNpb3Vz
IHNjcmlwdCBydW5uaW5nIGluIGEgdHJ1c3RlZCBicm93c2VyIGJlaGluZCB0aGUgZmlyZXdh
bGwuICBUaGlzIHNjcmlwdCBjYW4gb25seSBtYW5pcHVsYXRlIHRoZSB1bm1hc2tlZCBkYXRh
LCBub3QgdGhlIHByb3RvY29sIGl0c2VsZi4NCg0KSm9lDQoNCi0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpU
aGlzIHRyYW5zbWlzc2lvbiAoaW5jbHVkaW5nIGFueSBhdHRhY2htZW50cykgbWF5IGNvbnRh
aW4gY29uZmlkZW50aWFsIGluZm9ybWF0aW9uLCBwcml2aWxlZ2VkIG1hdGVyaWFsIChpbmNs
dWRpbmcgbWF0ZXJpYWwgcHJvdGVjdGVkIGJ5IHRoZSBzb2xpY2l0b3ItY2xpZW50IG9yIG90
aGVyIGFwcGxpY2FibGUgcHJpdmlsZWdlcyksIG9yIGNvbnN0aXR1dGUgbm9uLXB1YmxpYyBp
bmZvcm1hdGlvbi4gQW55IHVzZSBvZiB0aGlzIGluZm9ybWF0aW9uIGJ5IGFueW9uZSBvdGhl
ciB0aGFuIHRoZSBpbnRlbmRlZCByZWNpcGllbnQgaXMgcHJvaGliaXRlZC4gSWYgeW91IGhh
dmUgcmVjZWl2ZWQgdGhpcyB0cmFuc21pc3Npb24gaW4gZXJyb3IsIHBsZWFzZSBpbW1lZGlh
dGVseSByZXBseSB0byB0aGUgc2VuZGVyIGFuZCBkZWxldGUgdGhpcyBpbmZvcm1hdGlvbiBm
cm9tIHlvdXIgc3lzdGVtLiBVc2UsIGRpc3NlbWluYXRpb24sIGRpc3RyaWJ1dGlvbiwgb3Ig
cmVwcm9kdWN0aW9uIG9mIHRoaXMgdHJhbnNtaXNzaW9uIGJ5IHVuaW50ZW5kZWQgcmVjaXBp
ZW50cyBpcyBub3QgYXV0aG9yaXplZCBhbmQgbWF5IGJlIHVubGF3ZnVsLg0K

From ibc@aliax.net  Fri Jan 28 09:36:52 2011
Return-Path: <ibc@aliax.net>
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 E85003A691C for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 09:36:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.343
X-Spam-Level: 
X-Spam-Status: No, score=-2.343 tagged_above=-999 required=5 tests=[AWL=0.334,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 Cxth-7etbXsb for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 09:36:52 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id D62FB3A691A for <hybi@ietf.org>; Fri, 28 Jan 2011 09:36:51 -0800 (PST)
Received: by qyk34 with SMTP id 34so1080801qyk.10 for <hybi@ietf.org>; Fri, 28 Jan 2011 09:39:58 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.224.212 with SMTP id ip20mr2890401qcb.237.1296236398065; Fri, 28 Jan 2011 09:39:58 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Fri, 28 Jan 2011 09:39:57 -0800 (PST)
In-Reply-To: <BB31C4AB95A70042A256109D4619912605EF6A75@XCH117CNC.rim.net>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com> <AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com> <4D42B9E9.3000907@warmcat.com> <AANLkTimCtyufbRfqnSamFQ-cFOALATDyaKQN6jhdP5yS@mail.gmail.com> <4D42BEF5.2030605@warmcat.com> <AANLkTimgdrX2roe2augqW1tdxW77pRYa58HNohV=sXxf@mail.gmail.com> <BB31C4AB95A70042A256109D4619912605EF6A75@XCH117CNC.rim.net>
Date: Fri, 28 Jan 2011 18:39:57 +0100
Message-ID: <AANLkTi=oiY-_0w3VpR6Bc1a-rmno+6FRGKaQhGo+Ce7T@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Joe Mason <jmason@rim.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 17:36:53 -0000

2011/1/28 Joe Mason <jmason@rim.com>:
>> Even when using masking, a malicius client can send literal "GET
>> /xxxxx" as the first bytes of the stream (after the handshake), so
>> what does masking avoid? an intermediary proxy still would read such
>> "malicius" clear GET sent fom the client after the WS handshake.
>
> A fully malicious client will not be running behind corporate firewalls. =
=C2=A0The attack we are trying to defend from is a malicious script running=
 in a trusted browser behind the firewall. =C2=A0This script can only manip=
ulate the unmasked data, not the protocol itself.

Ok, but how to defend from a malicius ActionScript code (a .swf file)
which opens a TCP connection and behaves as a WS client?

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From jmason@rim.com  Fri Jan 28 09:40:19 2011
Return-Path: <jmason@rim.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 6C5703A68F8 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 09:40:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.944
X-Spam-Level: 
X-Spam-Status: No, score=-5.944 tagged_above=-999 required=5 tests=[AWL=0.355,  BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_MED=-4]
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 FiEJwFEDMkzF for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 09:40:18 -0800 (PST)
Received: from mhs04ykf.rim.net (mhs04ykf.rim.net [216.9.243.82]) by core3.amsl.com (Postfix) with ESMTP id 76E9D3A68E3 for <hybi@ietf.org>; Fri, 28 Jan 2011 09:40:17 -0800 (PST)
X-AuditID: 0a666446-b7beeae000000a64-94-4d43003b551f
Received: from XHT106CNC.rim.net ( [10.65.22.53]) by mhs04ykf.rim.net (RIM Mail) with SMTP id 8F.9D.02660.B30034D4; Fri, 28 Jan 2011 12:43:24 -0500 (EST)
Received: from XCH117CNC.rim.net ([fe80::b8df:541f:9d85:9909]) by XHT106CNC.rim.net ([fe80::218f:6cb:a58:2a01%11]) with mapi; Fri, 28 Jan 2011 12:43:23 -0500
From: Joe Mason <jmason@rim.com>
To: =?utf-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>
Date: Fri, 28 Jan 2011 12:43:28 -0500
Thread-Topic: [hybi] Doubt about cliente-to-server masking
Thread-Index: Acu/EmM4nQEJl9miTIuYjvtI5IG16QAABOXw
Message-ID: <BB31C4AB95A70042A256109D4619912605EF6B02@XCH117CNC.rim.net>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com> <AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com> <4D42B9E9.3000907@warmcat.com> <AANLkTimCtyufbRfqnSamFQ-cFOALATDyaKQN6jhdP5yS@mail.gmail.com> <4D42BEF5.2030605@warmcat.com> <AANLkTimgdrX2roe2augqW1tdxW77pRYa58HNohV=sXxf@mail.gmail.com> <BB31C4AB95A70042A256109D4619912605EF6A75@XCH117CNC.rim.net> <AANLkTi=oiY-_0w3VpR6Bc1a-rmno+6FRGKaQhGo+Ce7T@mail.gmail.com>
In-Reply-To: <AANLkTi=oiY-_0w3VpR6Bc1a-rmno+6FRGKaQhGo+Ce7T@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
content-transfer-encoding: base64
MIME-Version: 1.0
X-Brightmail-Tracker: AAAAAgAAAZEXRGiF
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 17:40:19 -0000

PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBJw7Fha2kgQmF6IENhc3Rp
bGxvIFttYWlsdG86aWJjQGFsaWF4Lm5ldF0NCj4gDQo+IE9rLCBidXQgaG93IHRvIGRlZmVu
ZCBmcm9tIGEgbWFsaWNpdXMgQWN0aW9uU2NyaXB0IGNvZGUgKGEgLnN3ZiBmaWxlKQ0KPiB3
aGljaCBvcGVucyBhIFRDUCBjb25uZWN0aW9uIGFuZCBiZWhhdmVzIGFzIGEgV1MgY2xpZW50
Pw0KDQpNYWxpY2lvdXMgQWN0aW9uU2NyaXB0IGNvZGUgZG9lc24ndCBuZWVkIHRvIGZha2Ug
YmVpbmcgYSBXUyBjbGllbnQgdG8gcGVyZm9ybSBhIGNyb3NzLXByb3RvY29sIGF0dGFjayAt
IGl0IGNhbiBwZXJmb3JtIGEgY3Jvc3MtcHJvdG9jb2wgYXR0YWNrIGRpcmVjdGx5LiAgSWYg
YWRtaW5pc3RyYXRvcnMgYXJlIHdvcnJpZWQgYWJvdXQgdGhpcyB0aGV5IG5lZWQgdG8gYmFu
IEZsYXNoIG9yIHByZXNzdXJlIEFkb2JlIHRvIGZpeCBGbGFzaCdzIHNlY3VyaXR5IGhvbGVz
LiAgV2UgYXJlIG9ubHkgY29uY2VybmVkIHdpdGggZml4aW5nIFdTIHNlY3VyaXR5IGhvbGVz
IHNvIHRoYXQgYWRtaW5pc3RyYXRvcnMgd2hvIGJhbiBGbGFzaCBkb24ndCBoYXZlIHRvIGJh
biBXUyBhcyB3ZWxsLg0KDQpKb2UNCg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tClRoaXMgdHJhbnNtaXNz
aW9uIChpbmNsdWRpbmcgYW55IGF0dGFjaG1lbnRzKSBtYXkgY29udGFpbiBjb25maWRlbnRp
YWwgaW5mb3JtYXRpb24sIHByaXZpbGVnZWQgbWF0ZXJpYWwgKGluY2x1ZGluZyBtYXRlcmlh
bCBwcm90ZWN0ZWQgYnkgdGhlIHNvbGljaXRvci1jbGllbnQgb3Igb3RoZXIgYXBwbGljYWJs
ZSBwcml2aWxlZ2VzKSwgb3IgY29uc3RpdHV0ZSBub24tcHVibGljIGluZm9ybWF0aW9uLiBB
bnkgdXNlIG9mIHRoaXMgaW5mb3JtYXRpb24gYnkgYW55b25lIG90aGVyIHRoYW4gdGhlIGlu
dGVuZGVkIHJlY2lwaWVudCBpcyBwcm9oaWJpdGVkLiBJZiB5b3UgaGF2ZSByZWNlaXZlZCB0
aGlzIHRyYW5zbWlzc2lvbiBpbiBlcnJvciwgcGxlYXNlIGltbWVkaWF0ZWx5IHJlcGx5IHRv
IHRoZSBzZW5kZXIgYW5kIGRlbGV0ZSB0aGlzIGluZm9ybWF0aW9uIGZyb20geW91ciBzeXN0
ZW0uIFVzZSwgZGlzc2VtaW5hdGlvbiwgZGlzdHJpYnV0aW9uLCBvciByZXByb2R1Y3Rpb24g
b2YgdGhpcyB0cmFuc21pc3Npb24gYnkgdW5pbnRlbmRlZCByZWNpcGllbnRzIGlzIG5vdCBh
dXRob3JpemVkIGFuZCBtYXkgYmUgdW5sYXdmdWwuDQo=

From gregw@intalio.com  Fri Jan 28 15:28:38 2011
Return-Path: <gregw@intalio.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 815BF3A6996 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 15:28:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.931
X-Spam-Level: 
X-Spam-Status: No, score=-2.931 tagged_above=-999 required=5 tests=[AWL=0.046,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 L6cYAeN9nr8f for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 15:28:37 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id ECFE13A68B7 for <hybi@ietf.org>; Fri, 28 Jan 2011 15:28:34 -0800 (PST)
Received: by vws7 with SMTP id 7so1325266vws.31 for <hybi@ietf.org>; Fri, 28 Jan 2011 15:31:42 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.163.2 with SMTP id y2mr781727vcx.130.1296257501802; Fri, 28 Jan 2011 15:31:41 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Fri, 28 Jan 2011 15:31:41 -0800 (PST)
In-Reply-To: <4D42B9E9.3000907@warmcat.com>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com> <AANLkTimciVZ1fhuGVpdvQO2KqcLfzYq=zm3WyEnUeRA4@mail.gmail.com> <4D42B9E9.3000907@warmcat.com>
Date: Sat, 29 Jan 2011 10:31:41 +1100
X-Google-Sender-Auth: oH46ZHOZVaSgSMUEBy1HqDMUy2U
Message-ID: <AANLkTi=xVwqdEjdJoSdGw+eKr8ONapdjOks0e5bQw=76@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: andy@warmcat.com
Content-Type: text/plain; charset=ISO-8859-1
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Fri, 28 Jan 2011 23:28:38 -0000

On 28 January 2011 23:43, Andy Green <andy@warmcat.com> wrote:
> On 01/28/11 12:18, Somebody in the thread at some point said:
>> I really think that masking should not change the framing that we took
>> so long to agree on.
>
> I didn't appreciate this was behind your pushing masking-as-an-extension,
> but of course that makes sense to subordinate it to the header.

It is one of the prime reasons behind my push for
masking-as-an-extension - but there are other reasons such as agility.

Note also that if there is significant opposition to
masking-as-an-extension, then there is also a middle ground, where the
masking key is the first 4 bytes of the frame payload.  This option is
acceptable (but is really just a special case extension, and I hate
special cases).

cheers

From Gabriel.Montenegro@microsoft.com  Fri Jan 28 23:00:40 2011
Return-Path: <Gabriel.Montenegro@microsoft.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 006843A697A for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 23:00:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.299
X-Spam-Level: 
X-Spam-Status: No, score=-10.299 tagged_above=-999 required=5 tests=[AWL=0.300, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
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 E6ZpLn+wcjrQ for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 23:00:38 -0800 (PST)
Received: from smtp.microsoft.com (mail1.microsoft.com [131.107.115.212]) by core3.amsl.com (Postfix) with ESMTP id E71AC3A68D3 for <hybi@ietf.org>; Fri, 28 Jan 2011 23:00:37 -0800 (PST)
Received: from TK5EX14HUBC102.redmond.corp.microsoft.com (157.54.7.154) by TK5-EXGWY-E801.partners.extranet.microsoft.com (10.251.56.50) with Microsoft SMTP Server (TLS) id 8.2.176.0; Fri, 28 Jan 2011 23:03:46 -0800
Received: from TK5EX14MLTW651.wingroup.windeploy.ntdev.microsoft.com (157.54.71.39) by TK5EX14HUBC102.redmond.corp.microsoft.com (157.54.7.154) with Microsoft SMTP Server (TLS) id 14.1.270.2; Fri, 28 Jan 2011 23:03:46 -0800
Received: from TK5EX14MBXW605.wingroup.windeploy.ntdev.microsoft.com ([169.254.5.102]) by TK5EX14MLTW651.wingroup.windeploy.ntdev.microsoft.com ([157.54.71.39]) with mapi; Fri, 28 Jan 2011 23:03:46 -0800
From: Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>
To: Salvatore Loreto <salvatore.loreto@ericsson.com>, "hybi@ietf.org" <hybi@ietf.org>
Thread-Topic: [hybi] straw-poll on GET vs OPTIONS vs new method
Thread-Index: AQHLuUoQ3oNzz/PaKUq0SFj3SnFkQpPnkhtg
Date: Sat, 29 Jan 2011 07:03:42 +0000
Message-ID: <CA566BAEAD6B3F4E8B5C5C4F61710C1126DDF08E@TK5EX14MBXW605.wingroup.windeploy.ntdev.microsoft.com>
References: <4D394B51.2060105@ericsson.com>
In-Reply-To: <4D394B51.2060105@ericsson.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sat, 29 Jan 2011 07:00:40 -0000

Unfortunately, I can't say which I'd absolutely prefer, but I can say that =
OPTIONS is at the very bottom.

In other words, my preference is:

#3 (WEBSOCKET) over #2 (OPTIONS)
#1 (GET) over #2 (OPTIONS)

Here's some rationale:=20

The point that previous uses of OPTIONS can lead to confusion with previous=
 usage was made in reference to its use in CORS (http://www.w3.org/TR/cors/=
). There's also WEBDAV (http://tools.ietf.org/html/rfc4918) and others.  Th=
is point argues for WEBSOCKET (a brand new method with no other previous us=
age) over either GET or OPTIONS.=20

+1 WEBSOCKET

Even though both GET and OPTIONS have existing usage, they are not equally =
safe. GET and POST (which are by far the most used) undergo much more scrut=
iny than other lesser-known or completely arbitrary methods. Lesser methods=
 can be used to exploit vulnerabilities in faulty ACL checking:
http://www.owasp.org/index.php/Testing_for_HTTP_Methods_and_XST_(OWASP-CM-0=
08)#Arbitrary_HTTP_Methods

This argues for GET over either OPTIONS or WEBSOCKET.

+1 GET

The reason why the straw poll was initiated is that it was argued that OPTI=
ONS is what RFC2817 uses.  This is true, but only partly so. RFC2817 uses *=
both* GET and OPTIONS.

GET is used in an "Optional Upgrade" per http://tools.ietf.org/html/rfc2817=
#section-3.1. This means that the GET request could be satisfied by the ser=
ver either (1) without heeding the Upgrade, or (2) by first switching proto=
cols as requested by the Upgrade, and then answering the original request, =
per the order specified in http://tools.ietf.org/html/draft-ietf-httpbis-p1=
-messaging-12#section-9.8:
 =09
   ... although the first action
   after changing the protocol MUST be a response to the initial HTTP
   request containing the Upgrade header field.

OPTIONS is used in a "Mandatory Upgrade" per http://tools.ietf.org/html/rfc=
2817#section-3.2. The Upgrade is still optional at the server, of course, b=
ut if it's not heeded, the client could abort at this time. This would make=
 the upgrade a precondition to fetching the resource ("mandatory" in that r=
espect).

So RFC2817 is not an argument for either method, but to the use of more tha=
n one. The WG seems to have spoken against this, and I agree, it's best to =
have only one and avoid more complexity.

Another point against GET and OPTIONS is that both are supposed to be idemp=
otent. This has been misconstrued as a requirement to cause no changes at t=
he server. http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-12#se=
ction-7.1.2 clarifies:

   ...  It is important to
   note that idempotence refers only to changes requested by the client:
   a server is free to change its state due to multiple requests for the
   purpose of tracking those requests, versioning of results, etc.

Since the Upgrade effects a change on the connection, not on the resource, =
I don't see idempotence as an argument against GET, OPTIONS or any other id=
empotent method.

That's why I prefer WEBSOCKET or GET (and only one) over OPTIONS.=20

Gabriel


> -----Original Message-----
> From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
> Salvatore Loreto
> Sent: Friday, January 21, 2011 1:01 AM
> To: hybi@ietf.org
> Cc: Joe Hildebrand; SM
> Subject: [hybi] straw-poll on GET vs OPTIONS vs new method
>=20
>=20
> Hi there,
>=20
> after the result of the first straw-poll on GET+Upgrade+Masking, there we=
re a
> discussion about GET not being the only method to "Upgrade"
> the connection;
> other methods such as OPTIONS
> (http://www.ietf.org/mail-archive/web/hybi/current/msg05721.html)
> and perhaps a completely new method could be used (as proposed months ago=
).
>=20
> All the possibilities have pro and cons.
>=20
> The mail thread(s) started to discuss the alternatives, convinced Joe and=
 myself,
> as HyBi wg co-chairs, that it make sense to run a straw-poll to get as mu=
ch
> information as we can  from people about technical reason (pro and cons) =
for
> their preference(s).
>=20
>=20
> So please provide your choices (if more then one, please rank them or if =
only
> one specify "I can live only with") among the following
>=20
> #1 - GET
> #2 - OPTIONS
> #3 - a complete new method (e.g. WEBSOCKET)
>=20
> This poll will run until January 31st
>=20
> cheers
> /Sal
>=20
> --
> Salvatore Loreto
> www.sloreto.com
>=20
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi


From w@1wt.eu  Fri Jan 28 23:06:16 2011
Return-Path: <w@1wt.eu>
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 2B6E83A68D6 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 23:06:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level: 
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[AWL=-0.159, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, MIME_8BIT_HEADER=0.3]
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 DxIOukZQLg04 for <hybi@core3.amsl.com>; Fri, 28 Jan 2011 23:06:14 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 831D73A697A for <hybi@ietf.org>; Fri, 28 Jan 2011 23:06:14 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0T79K2B026600; Sat, 29 Jan 2011 08:09:20 +0100
Date: Sat, 29 Jan 2011 08:09:20 +0100
From: Willy Tarreau <w@1wt.eu>
To: =?iso-8859-1?Q?I=F1aki?= Baz Castillo <ibc@aliax.net>
Message-ID: <20110129070920.GB25459@1wt.eu>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com> <AANLkTimfcYTDigL0YCW7F-cy+EDGFGr1mqgagmsRfGGY@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTimfcYTDigL0YCW7F-cy+EDGFGr1mqgagmsRfGGY@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Sat, 29 Jan 2011 07:06:16 -0000

On Fri, Jan 28, 2011 at 02:04:28PM +0100, Iñaki Baz Castillo wrote:
> 2011/1/28 Andy Green <andy@warmcat.com>:
> > Now the goal is keeping the effort to have websockets at all alive by piling
> > in whatever the browser vendors that disabled it want to see included,
> > whether it is useful or not ie, "masking".
> 
> draft-04 says:
> 
>    Frames sent from the client to the server are masked to
>    avoid confusing network intermediaries, such as intercepting proxies.
> 
> For sure I miss something, but I cannot understand how a masked frame
> avoids such problems in intermediaries while non mased frames don't
> avoid it. At the end, a frame (as defined in 04) contains various
> bytes at the beginning which make impossible for an intermediary to
> interpret such data is "more HTTP requests", am I wrong?

No, you're perfectly right. It was suspected that *some* poorly coded
caching intermediaries would be able to skip the bytes they don't
understand until they can match an HTTP request. Since the debate between
those who claimed they surely exist and the ones who claim they surely
don't exist could not come to an end, masking was proposed as a way to
get everyone agree on a middle position.

I really invite you to read the list archives of the last 2-3 months,
you'll get better background.

> Which is the real advantage of masking? shouldn't the draft describe it?

The principle is to prevent the client from sending a controlled string
that can look like an HTTP request. In theory, escaping CR/LF or encoding
all the stream (eg: base64) was enough for this but it was also difficult
to implement and would have implied additional bandwidth overhead.

The advantage of masking is that the client side application does not know
the key, which is a random that is generated just before the data is sent
over the wire. So the client cannot decide what the on-wire data will look
like. Of course, random means that once in a while the key itself could look
like the beginning of a request. But the chances are low enough so that this
does not become an easily exploitable attack vector.

Again, all this has been long discussed, so do not hesitate to consult the
list archives.

Regards,
willy


From julian.reschke@gmx.de  Sat Jan 29 01:01:26 2011
Return-Path: <julian.reschke@gmx.de>
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 156343A6AAA for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 01:01:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.856
X-Spam-Level: 
X-Spam-Status: No, score=-103.856 tagged_above=-999 required=5 tests=[AWL=-1.257, BAYES_00=-2.599, 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 uXI73+FXnJMN for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 01:01:25 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 97A6C3A6956 for <hybi@ietf.org>; Sat, 29 Jan 2011 01:01:23 -0800 (PST)
Received: (qmail invoked by alias); 29 Jan 2011 09:04:29 -0000
Received: from p508FAE55.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.174.85] by mail.gmx.net (mp008) with SMTP; 29 Jan 2011 10:04:29 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/aLKRSYEDaIDnFcG9ETTdmErRVLEWDbfap8co7to 3YZyX6Mv7Pt7s8
Message-ID: <4D43D80B.7010903@gmx.de>
Date: Sat, 29 Jan 2011 10:04:11 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>
References: <4D394B51.2060105@ericsson.com> <CA566BAEAD6B3F4E8B5C5C4F61710C1126DDF08E@TK5EX14MBXW605.wingroup.windeploy.ntdev.microsoft.com>
In-Reply-To: <CA566BAEAD6B3F4E8B5C5C4F61710C1126DDF08E@TK5EX14MBXW605.wingroup.windeploy.ntdev.microsoft.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>, "hybi@ietf.org" <hybi@ietf.org>, SM <sm+ietf@elandsys.com>
Subject: Re: [hybi] straw-poll on GET vs OPTIONS vs new method
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: Sat, 29 Jan 2011 09:01:26 -0000

On 29.01.2011 08:03, Gabriel Montenegro wrote:
> ...
> The point that previous uses of OPTIONS can lead to confusion with previous usage was made in reference to its use in CORS (http://www.w3.org/TR/cors/). There's also WEBDAV (http://tools.ietf.org/html/rfc4918) and others.  This point argues for WEBSOCKET (a brand new method with no other previous usage) over either GET or OPTIONS.
> ...

I don't think there's a problem with OPTIONS and WebDAV. WebDAV uses 
OPTIONS just the way it's designed for, and I'm not aware of any 
potential problems using OPTIONS in other protocol exchanges as well. If 
you do, you need to elaborate.

OPTIONS and CORS is a slightly different story because of the stupid 
requirement CORS makes on OPTIONS not to require authentication. That's 
a design flaw in CORS. I'm not sure how it would affect usage of OPTIONS 
over here, though.

> +1 WEBSOCKET
>
> Even though both GET and OPTIONS have existing usage, they are not equally safe. GET and POST (which are by far the most used) undergo much more scrutiny than other lesser-known or completely arbitrary methods. Lesser methods can be used to exploit vulnerabilities in faulty ACL checking:
> http://www.owasp.org/index.php/Testing_for_HTTP_Methods_and_XST_(OWASP-CM-008)#Arbitrary_HTTP_Methods

Not convinced. The linked text correctly reports that some frameworks do 
only ACL on certain methods, but then fallback to execute unknown 
methods as GET. That's a bug, indeed. Do we have evidence that 
Websockets is going to be deployable on frameworks like these anyway? 
Also, these frameworks are vulnerable already, how does Websockets 
change the situation?

 > ...
> Another point against GET and OPTIONS is that both are supposed to be idempotent. This has been misconstrued as a requirement to cause no changes at the server. http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-12#section-7.1.2 clarifies:
>
>     ...  It is important to
>     note that idempotence refers only to changes requested by the client:
>     a server is free to change its state due to multiple requests for the
>     purpose of tracking those requests, versioning of results, etc.
>
> Since the Upgrade effects a change on the connection, not on the resource, I don't see idempotence as an argument against GET, OPTIONS or any other idempotent method.
> ...

That's correct.

Best regards, Julian

From ibc@aliax.net  Sat Jan 29 04:09:10 2011
Return-Path: <ibc@aliax.net>
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 7F02A3A67AA for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 04:09:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.35
X-Spam-Level: 
X-Spam-Status: No, score=-2.35 tagged_above=-999 required=5 tests=[AWL=0.327,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 s9SW5NYaElg5 for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 04:09:09 -0800 (PST)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by core3.amsl.com (Postfix) with ESMTP id 7A6703A6778 for <hybi@ietf.org>; Sat, 29 Jan 2011 04:09:09 -0800 (PST)
Received: by qyj19 with SMTP id 19so4332426qyj.10 for <hybi@ietf.org>; Sat, 29 Jan 2011 04:12:18 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.81.65 with SMTP id w1mr3832688qck.9.1296303137084; Sat, 29 Jan 2011 04:12:17 -0800 (PST)
Received: by 10.229.24.213 with HTTP; Sat, 29 Jan 2011 04:12:17 -0800 (PST)
In-Reply-To: <20110129070920.GB25459@1wt.eu>
References: <AANLkTi=k-yW+XCpg=VeQi=sPYgNsXj6wD=HuE=AZ83UY@mail.gmail.com> <4D42AFCE.6010204@warmcat.com> <AANLkTimfcYTDigL0YCW7F-cy+EDGFGr1mqgagmsRfGGY@mail.gmail.com> <20110129070920.GB25459@1wt.eu>
Date: Sat, 29 Jan 2011 13:12:17 +0100
Message-ID: <AANLkTinxDHADg_CnJpAuaG5ytWZG-N81dnsn3vZYF+MW@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Doubt about cliente-to-server masking
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: Sat, 29 Jan 2011 12:09:10 -0000

2011/1/29 Willy Tarreau <w@1wt.eu>:
>> For sure I miss something, but I cannot understand how a masked frame
>> avoids such problems in intermediaries while non mased frames don't
>> avoid it. At the end, a frame (as defined in 04) contains various
>> bytes at the beginning which make impossible for an intermediary to
>> interpret such data is "more HTTP requests", am I wrong?
>
> No, you're perfectly right. It was suspected that *some* poorly coded
> caching intermediaries would be able to skip the bytes they don't
> understand until they can match an HTTP request. Since the debate between
> those who claimed they surely exist and the ones who claim they surely
> don't exist could not come to an end, masking was proposed as a way to
> get everyone agree on a middle position.
>
> I really invite you to read the list archives of the last 2-3 months,
> you'll get better background.

Ok, I'll check them. I've arrived a bit late to this maillist :)


>> Which is the real advantage of masking? shouldn't the draft describe it?
>
> The principle is to prevent the client from sending a controlled string
> that can look like an HTTP request. In theory, escaping CR/LF or encoding
> all the stream (eg: base64) was enough for this but it was also difficult
> to implement and would have implied additional bandwidth overhead.
>
> The advantage of masking is that the client side application does not kno=
w
> the key, which is a random that is generated just before the data is sent
> over the wire. So the client cannot decide what the on-wire data will loo=
k
> like. Of course, random means that once in a while the key itself could l=
ook
> like the beginning of a request. But the chances are low enough so that t=
his
> does not become an easily exploitable attack vector.
>
> Again, all this has been long discussed, so do not hesitate to consult th=
e
> list archives.

Thanks a lot for the explanation.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From ekr@rtfm.com  Sat Jan 29 06:51:03 2011
Return-Path: <ekr@rtfm.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 E49233A67D8 for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 06:51:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.692
X-Spam-Level: 
X-Spam-Status: No, score=-102.692 tagged_above=-999 required=5 tests=[AWL=0.285, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 CHsMPiiVbEhI for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 06:51:03 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id 1B5FD3A672F for <hybi@ietf.org>; Sat, 29 Jan 2011 06:51:03 -0800 (PST)
Received: by yxt33 with SMTP id 33so1633427yxt.31 for <hybi@ietf.org>; Sat, 29 Jan 2011 06:54:12 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.104.18 with SMTP id b18mr6432619agc.81.1296312851617; Sat, 29 Jan 2011 06:54:11 -0800 (PST)
Received: by 10.90.116.7 with HTTP; Sat, 29 Jan 2011 06:54:11 -0800 (PST)
Date: Sat, 29 Jan 2011 06:54:11 -0800
Message-ID: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Subject: [hybi] Modest enhancement to XOR-based masking
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: Sat, 29 Jan 2011 14:51:04 -0000

Maciej has suggested that an XOR-based masking mechanism enables
"canned" messages
using non-WS clients (e.g., the FORM tag) to be sent to a WS server
and accepted.

In private, Adam suggested an easy fix for this: the per-packet mask
is a combination of a
server-provided per-connection mask and a client-provided per-packet mask.

I.e.,

1. During the handshake the server provides M1.
2. For each packet P the client generates M2 and sends:


M2    ||      P[i] ^ M1[i %M1.len] ^ M2[i ^% M2.len]


This has at most a modest performance cost over the existing repeating
mask and has the
impact of randomizing canned messages from the server perspective,
thus removing the
possibility of that mechanism.

Thoughts?

-Ekr

From w@1wt.eu  Sat Jan 29 07:08:29 2011
Return-Path: <w@1wt.eu>
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 CA2C83A67D8 for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 07:08:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.052
X-Spam-Level: 
X-Spam-Status: No, score=-2.052 tagged_above=-999 required=5 tests=[AWL=-0.009, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 m7dDeh7rd8fI for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 07:08:29 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id C2AE63A67B6 for <hybi@ietf.org>; Sat, 29 Jan 2011 07:08:28 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0TFBXK0027576; Sat, 29 Jan 2011 16:11:33 +0100
Date: Sat, 29 Jan 2011 16:11:33 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110129151133.GE25459@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sat, 29 Jan 2011 15:08:29 -0000

Hello Eric,

On Sat, Jan 29, 2011 at 06:54:11AM -0800, Eric Rescorla wrote:
> Maciej has suggested that an XOR-based masking mechanism enables
> "canned" messages
> using non-WS clients (e.g., the FORM tag) to be sent to a WS server
> and accepted.
> 
> In private, Adam suggested an easy fix for this: the per-packet mask
> is a combination of a
> server-provided per-connection mask and a client-provided per-packet mask.
> 
> I.e.,
> 
> 1. During the handshake the server provides M1.
> 2. For each packet P the client generates M2 and sends:
> 
> 
> M2    ||      P[i] ^ M1[i %M1.len] ^ M2[i ^% M2.len]
> 
> 
> This has at most a modest performance cost over the existing repeating
> mask and has the impact of randomizing canned messages from the server
> perspective, thus removing the possibility of that mechanism.

I see your point, but masking the framing with a session-based
mask reopens the issue of multiplexing for intermediaries, as
it will not be possible to guess the key from the masked stream
and it will not be possible to find the unmasking key without
access to the stream.

IMO that was the reason some of us insisted on the per-frame mask
only.

I could personally live with a session-dependant mask if we only
masked the payload and not the framing, but as it is, it reopens
an old can of worms.

Regards,
Willy


From derhoermi@gmx.net  Sat Jan 29 10:43:32 2011
Return-Path: <derhoermi@gmx.net>
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 915923A6853 for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 10:43:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.245
X-Spam-Level: 
X-Spam-Status: No, score=-3.245 tagged_above=-999 required=5 tests=[AWL=-0.646, BAYES_00=-2.599]
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 qgzzUHQvSY-c for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 10:43:31 -0800 (PST)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by core3.amsl.com (Postfix) with SMTP id E910F3A6849 for <hybi@ietf.org>; Sat, 29 Jan 2011 10:43:30 -0800 (PST)
Received: (qmail invoked by alias); 29 Jan 2011 18:46:38 -0000
Received: from dslb-094-223-191-191.pools.arcor-ip.net (EHLO hive) [94.223.191.191] by mail.gmx.net (mp007) with SMTP; 29 Jan 2011 19:46:38 +0100
X-Authenticated: #723575
X-Provags-ID: V01U2FsdGVkX1+aZMN1RbSapCjRa0dsB72H2Ao46Vr67UGfFPHIfY ZD5LIBDqdg4Sdw
From: Bjoern Hoehrmann <derhoermi@gmx.net>
To: Eric Rescorla <ekr@rtfm.com>
Date: Sat, 29 Jan 2011 19:46:31 +0100
Message-ID: <bck8k6ld8ue3sph3255rhab4ogk7b2mhr5@hive.bjoern.hoehrmann.de>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>
In-Reply-To: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>
X-Mailer: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sat, 29 Jan 2011 18:43:32 -0000

* Eric Rescorla wrote:
>In private, Adam suggested an easy fix for this: the per-packet mask
>is a combination of a
>server-provided per-connection mask and a client-provided per-packet mask.

There is no reason why a server developer who cannot be bothered to pro-
perly validate the handshake will employ a random number generator that
is difficult to predict in generating this mask. Odds are if developers
have to get handshake validation right, and also need to get generating
the mask here right, that they will make mistakes with both. This also
increases the risk that some developers will think the protocol provides
integrity or confidentiality or other features when it does not.

I don't see how this will improve overall security in practise, unless
someone can show that it is insufficient to validate the handshake. And
the cost isn't just more operations per byte, you also have to maintain
more state; and I would expect people who'd like to have this added will
not like it if the scheme allows servers to pick a mask that translates 
to "do nothing" which would re-open the "optional masking" debate.

It's easy to understand "A proper handshake looks like this; if it does
not, refuse the connection and you are safe"; understanding "also use a
cryptographically secure random number generator, making sure its state
isn't exposed through other parts of the system, to generate a per-
connection mask and mix it into the decoding process, then your server
will get confused if under attack" is not so easy. And there's xkcd 424.

Ultimately the argument here is that by making the protocol more complex
we can aid people in implementing it correctly. I do not recall anyone
offering good evidence in support of that argument back when we talked
about the "amateur programmer"; short of someone offering such evidence,
or showing that in practise properly validating the handshake is not
enough, I don't think we should consider this.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

From jat@google.com  Sat Jan 29 11:12:23 2011
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 214153A67D1 for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 11:12:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.296
X-Spam-Level: 
X-Spam-Status: No, score=-105.296 tagged_above=-999 required=5 tests=[AWL=0.680, 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 YB7t6C-FvzjH for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 11:12:22 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id ADB723A6835 for <hybi@ietf.org>; Sat, 29 Jan 2011 11:12:21 -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 p0TJFU8E016840 for <hybi@ietf.org>; Sat, 29 Jan 2011 11:15:30 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1296328530; bh=PpDGFFyu+yiPDkr0eZAQhIoNU/s=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=UcT1G4TezBz8YoM5PvzLM4MKyyQEKQ67vZj80AI7598n9b8+OFwuP4QqxWVHY3T1L vXkpD1J7cJToDnI7ot1/g==
Received: from yxt3 (yxt3.prod.google.com [10.190.5.195]) by wpaz37.hot.corp.google.com with ESMTP id p0TJFTQA025257 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Sat, 29 Jan 2011 11:15:29 -0800
Received: by yxt3 with SMTP id 3so1715786yxt.5 for <hybi@ietf.org>; Sat, 29 Jan 2011 11:15:29 -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=+0h1TXsD91v1hPhvWsoYOL4iDMWNW81YrVfdWfonfKE=; b=bMyUywB3aIE5SVefwjJF8tBxgD9eBYqbRKiy95KUZvsezHm3VnknOqIrszFMADnU0P xMgR3R7nfAkf3xc3d10A==
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=xQ/CyLhuWPAvclIZomTqPizLD/e8ww7mGVaXvIBSuM80JDVShPMyc+pTE9cf6GvJY0 de0INQL0TzQzaxO/KOsA==
Received: by 10.151.40.16 with SMTP id s16mr6171878ybj.35.1296328529013; Sat, 29 Jan 2011 11:15:29 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Sat, 29 Jan 2011 11:15:08 -0800 (PST)
In-Reply-To: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Sat, 29 Jan 2011 14:15:08 -0500
Message-ID: <AANLkTi==ozObHW8b7vgM8O968BuZrbcuzwGAR8kGBss0@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: multipart/alternative; boundary=00151750edbc7beac5049b01017e
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sat, 29 Jan 2011 19:12:23 -0000

--00151750edbc7beac5049b01017e
Content-Type: text/plain; charset=UTF-8

On Sat, Jan 29, 2011 at 9:54 AM, Eric Rescorla <ekr@rtfm.com> wrote:

> Maciej has suggested that an XOR-based masking mechanism enables
> "canned" messages
> using non-WS clients (e.g., the FORM tag) to be sent to a WS server
> and accepted.
>
> In private, Adam suggested an easy fix for this: the per-packet mask
> is a combination of a
> server-provided per-connection mask and a client-provided per-packet mask.
>
> I.e.,
>
> 1. During the handshake the server provides M1.
> 2. For each packet P the client generates M2 and sends:
>
>
> M2    ||      P[i] ^ M1[i %M1.len] ^ M2[i ^% M2.len]
>
>
> This has at most a modest performance cost over the existing repeating
> mask and has the
> impact of randomizing canned messages from the server perspective,
> thus removing the
> possibility of that mechanism.


One of the objections to the options not including everything you need to
mask in the frame itself is the need to maintain state (even if it is a
small amount) in busy intermediaries and the difficulties that imposes on
analyzing captured frames (you have to get every frame including the
handshake to analyze anything).

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

--00151750edbc7beac5049b01017e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sat, Jan 29, 2011 at 9:54 AM, Eric Rescorla <=
span dir=3D"ltr">&lt;<a href=3D"mailto:ekr@rtfm.com">ekr@rtfm.com</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex;">

Maciej has suggested that an XOR-based masking mechanism enables<br>
&quot;canned&quot; messages<br>
using non-WS clients (e.g., the FORM tag) to be sent to a WS server<br>
and accepted.<br>
<br>
In private, Adam suggested an easy fix for this: the per-packet mask<br>
is a combination of a<br>
server-provided per-connection mask and a client-provided per-packet mask.<=
br>
<br>
I.e.,<br>
<br>
1. During the handshake the server provides M1.<br>
2. For each packet P the client generates M2 and sends:<br>
<br>
<br>
M2 =C2=A0 =C2=A0|| =C2=A0 =C2=A0 =C2=A0P[i] ^ M1[i %M1.len] ^ M2[i ^% M2.le=
n]<br>
<br>
<br>
This has at most a modest performance cost over the existing repeating<br>
mask and has the<br>
impact of randomizing canned messages from the server perspective,<br>
thus removing the<br>
possibility of that mechanism.</blockquote><div><br></div><div>One of the o=
bjections to the options not including everything you need to mask in the f=
rame itself is the need to maintain state (even if it is a small amount) in=
 busy intermediaries and the difficulties that imposes on analyzing capture=
d frames (you have to get every frame including the handshake to analyze an=
ything).</div>

</div><br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--00151750edbc7beac5049b01017e--

From ietf@adambarth.com  Sat Jan 29 17:57:15 2011
Return-Path: <ietf@adambarth.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 C83763A6904 for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 17:57:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.714
X-Spam-Level: 
X-Spam-Status: No, score=-3.714 tagged_above=-999 required=5 tests=[AWL=-0.737, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 QUgptV71IEcc for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 17:57:15 -0800 (PST)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id D10843A68E4 for <hybi@ietf.org>; Sat, 29 Jan 2011 17:57:14 -0800 (PST)
Received: by yie19 with SMTP id 19so1779027yie.31 for <hybi@ietf.org>; Sat, 29 Jan 2011 18:00:25 -0800 (PST)
Received: by 10.100.227.17 with SMTP id z17mr2819264ang.214.1296352824976; Sat, 29 Jan 2011 18:00:24 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id b19sm23856119ana.7.2011.01.29.18.00.23 (version=SSLv3 cipher=RC4-MD5); Sat, 29 Jan 2011 18:00:23 -0800 (PST)
Received: by iwn40 with SMTP id 40so4714944iwn.31 for <hybi@ietf.org>; Sat, 29 Jan 2011 18:00:22 -0800 (PST)
Received: by 10.231.35.136 with SMTP id p8mr4747325ibd.139.1296352822527; Sat, 29 Jan 2011 18:00:22 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.35.13 with HTTP; Sat, 29 Jan 2011 17:59:52 -0800 (PST)
In-Reply-To: <20110129151133.GE25459@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sat, 29 Jan 2011 17:59:52 -0800
Message-ID: <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com>
To: Server-Initiated HTTP <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 01:57:15 -0000

On Sat, Jan 29, 2011 at 7:11 AM, Willy Tarreau <w@1wt.eu> wrote:
> On Sat, Jan 29, 2011 at 06:54:11AM -0800, Eric Rescorla wrote:
>> Maciej has suggested that an XOR-based masking mechanism enables
>> "canned" messages
>> using non-WS clients (e.g., the FORM tag) to be sent to a WS server
>> and accepted.
>>
>> In private, Adam suggested an easy fix for this: the per-packet mask
>> is a combination of a
>> server-provided per-connection mask and a client-provided per-packet mas=
k.
>>
>> I.e.,
>>
>> 1. During the handshake the server provides M1.
>> 2. For each packet P the client generates M2 and sends:
>>
>> M2 =A0 =A0|| =A0 =A0 =A0P[i] ^ M1[i %M1.len] ^ M2[i ^% M2.len]
>>
>> This has at most a modest performance cost over the existing repeating
>> mask and has the impact of randomizing canned messages from the server
>> perspective, thus removing the possibility of that mechanism.
>
> I see your point, but masking the framing with a session-based
> mask reopens the issue of multiplexing for intermediaries, as
> it will not be possible to guess the key from the masked stream
> and it will not be possible to find the unmasking key without
> access to the stream.
>
> IMO that was the reason some of us insisted on the per-frame mask
> only.
>
> I could personally live with a session-dependant mask if we only
> masked the payload and not the framing, but as it is, it reopens
> an old can of worms.

I'm not really sure I understand how session-dependent masking incurs
much of a cost for multiplexing intermediaries.  At most, the
intermediary would need to maintain 32-bits of state per stream, which
is less than the TCP control blocks it needs to maintain anyway.

On Sat, Jan 29, 2011 at 11:15 AM, John Tamplin <jat@google.com> wrote:
> One of the objections to the options not including everything you need to
> mask in the frame itself is the need to maintain state (even if it is a
> small amount) in busy intermediaries and the difficulties that imposes on
> analyzing captured frames (you have to get every frame including the
> handshake to analyze anything).

Again, the overhead that session-dependent masking incurs is
infinitesimal.  For example, the state required to analyze logs of
captured frames is less than the state required to remember which
parties were communicating (e.g., even just their IPv4 addresses).

Kind regards,
Adam

From w@1wt.eu  Sat Jan 29 22:46:06 2011
Return-Path: <w@1wt.eu>
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 29BAF3A6AE3 for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 22:46:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.052
X-Spam-Level: 
X-Spam-Status: No, score=-2.052 tagged_above=-999 required=5 tests=[AWL=-0.009, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 e892Lf+Hw5MP for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 22:46:05 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id A33B63A68C8 for <hybi@ietf.org>; Sat, 29 Jan 2011 22:46:03 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0U6n8ws029830; Sun, 30 Jan 2011 07:49:08 +0100
Date: Sun, 30 Jan 2011 07:49:08 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110130064908.GL25459@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 06:46:06 -0000

Hello Adam,

On Sat, Jan 29, 2011 at 05:59:52PM -0800, Adam Barth wrote:
> I'm not really sure I understand how session-dependent masking incurs
> much of a cost for multiplexing intermediaries.  At most, the
> intermediary would need to maintain 32-bits of state per stream, which
> is less than the TCP control blocks it needs to maintain anyway.

It's not a matter of memory but a matter of knowing what key to use with
each multiplexed message. I think my explanation was not clear in fact.
Let's see two examples.

The first one is a server receiving multiplexed streams in a single
connection from a proxy which aggregates them from multiple clients.
The stream looks like this :


  [ key1 ] [ msg1 ] [ key2 ] [ msg2 ] ... [ keyN ] [ msgN ]

Each msg is composed of a masked framing followed by a masked payload.
The server has no way to know which client each message comes from until
he has unmasked the message. One proposal could consist in having the
server always emit the same random on a given connection, but it could
be argued that this voids the effect of the random then. It would also
strongly tie clients to connections, which limits the usefulness of
multiplexing, where connection pools are much more efficient.

The second example involves a proxy which acts on a multiplexed stream.
For instance, it could be a filter to prevent some terms from appearing
in chat discussions, or sort of an IDS trying to block exploits for known
bugs affecting servers. Or it could also be a cache in an auto-completion
system for a search engine, which proposes most common searched words
without bothering the servers, or simply an automatic indexing system.
Anything which has to work inline on the stream.

This component receives the same stream as above and forwards it to the
next hop, be it the server or another proxy. This time it has no way to
find the server's key from the connection. It just sees a message stream
with a key at the beginning, and no way to decode the extension data.

I see 3 solutions for these issues :
  - always prepend a stream ID at the beginning of the message when doing
    multiplexing. This is annoying because it means that the frame format
    is not the same depending on multiplexing or not.

  - don't depend on a per-session key (as we have right now). Like John,
    I'd prefer that we don't have to maintain a state and I'd like to be
    able to analyse network traces without having to rewing back 5 minutes
    to get the server key, but it is just a preference in my case, I'm not
    strongly opposed to the per-state key. However it would limit load
    balancing techniques since there would be no way to send a frame to be
    analyzed to a component from a pool which does not know the key.

  - don't mask the framing, just mask the payload. It then becomes possible
    to send a stream ID or even the server key as an extension for all other
    components behind to be able to decode the stream. Or we could also send
    clear-text frames assuming we're already in the clean room.

That said, we designed the handshake to prevent cross-protocol attacks and
we're saying that we're still fragile to clients sending a POST. Surely we
failed to address all issues somewhere and need to work a bit more on the
handshake. I already see a few points :
  - once a method is proposed, make it mandatory on the server side
  - make it mandatory to reject any incoming request with a body

At one point, we should probably consider that if all the MUST of the spec
have been deliberately ignored by the server-side implementation, we have
limited abilities to protect it against anything. It could as well decide
that if it did not see a valid nonce in the request, then the server key
is not computed and remains zero. So the client can still blindly send
anything to it.

We can't design a protocol that remains totally safe when implementers don't
bother to open the spec. However we can (and should) protect the most compliant
implementations against a maximum number of possible issues.

Regards,
Willy


From ietf@adambarth.com  Sat Jan 29 23:45:09 2011
Return-Path: <ietf@adambarth.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 E2E313A6B14 for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 23:45:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.71
X-Spam-Level: 
X-Spam-Status: No, score=-3.71 tagged_above=-999 required=5 tests=[AWL=-0.733,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 Qeftf2mx5Lrd for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 23:45:09 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by core3.amsl.com (Postfix) with ESMTP id 1209A3A6AE3 for <hybi@ietf.org>; Sat, 29 Jan 2011 23:45:09 -0800 (PST)
Received: by iyi42 with SMTP id 42so4275280iyi.31 for <hybi@ietf.org>; Sat, 29 Jan 2011 23:48:19 -0800 (PST)
Received: by 10.42.172.134 with SMTP id n6mr4564050icz.310.1296373699840; Sat, 29 Jan 2011 23:48:19 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by mx.google.com with ESMTPS id gy41sm16616369ibb.11.2011.01.29.23.48.16 (version=SSLv3 cipher=RC4-MD5); Sat, 29 Jan 2011 23:48:17 -0800 (PST)
Received: by iwn40 with SMTP id 40so4848257iwn.31 for <hybi@ietf.org>; Sat, 29 Jan 2011 23:48:16 -0800 (PST)
Received: by 10.231.200.134 with SMTP id ew6mr4999737ibb.164.1296373696324; Sat, 29 Jan 2011 23:48:16 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.35.13 with HTTP; Sat, 29 Jan 2011 23:47:46 -0800 (PST)
In-Reply-To: <20110130064908.GL25459@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sat, 29 Jan 2011 23:47:46 -0800
Message-ID: <AANLkTikD_vadYw9oFJmOvvDTPSaEkHui2NcYbP5wvUiL@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 07:45:10 -0000

On Sat, Jan 29, 2011 at 10:49 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sat, Jan 29, 2011 at 05:59:52PM -0800, Adam Barth wrote:
>> I'm not really sure I understand how session-dependent masking incurs
>> much of a cost for multiplexing intermediaries. =A0At most, the
>> intermediary would need to maintain 32-bits of state per stream, which
>> is less than the TCP control blocks it needs to maintain anyway.
>
> It's not a matter of memory but a matter of knowing what key to use with
> each multiplexed message. I think my explanation was not clear in fact.
> Let's see two examples.
>
> The first one is a server receiving multiplexed streams in a single
> connection from a proxy which aggregates them from multiple clients.
> The stream looks like this :
>
> =A0[ key1 ] [ msg1 ] [ key2 ] [ msg2 ] ... [ keyN ] [ msgN ]

Why mask between the proxy and the back-end server at all?  The
protocol you describe above isn't WebSockets anyway.  Since you're
free to speak whatever protocol you like, you might as well terminate
the masking at the proxy.

Kind regards,
Adam

From w@1wt.eu  Sat Jan 29 23:52:17 2011
Return-Path: <w@1wt.eu>
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 3EFF23A6B20 for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 23:52:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.052
X-Spam-Level: 
X-Spam-Status: No, score=-2.052 tagged_above=-999 required=5 tests=[AWL=-0.009, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 eXq3VLzXeLNh for <hybi@core3.amsl.com>; Sat, 29 Jan 2011 23:52:16 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 0AFAB3A6B14 for <hybi@ietf.org>; Sat, 29 Jan 2011 23:52:15 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0U7tOvj029888; Sun, 30 Jan 2011 08:55:24 +0100
Date: Sun, 30 Jan 2011 08:55:24 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110130075524.GN25459@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTikD_vadYw9oFJmOvvDTPSaEkHui2NcYbP5wvUiL@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTikD_vadYw9oFJmOvvDTPSaEkHui2NcYbP5wvUiL@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 07:52:17 -0000

On Sat, Jan 29, 2011 at 11:47:46PM -0800, Adam Barth wrote:
> On Sat, Jan 29, 2011 at 10:49 PM, Willy Tarreau <w@1wt.eu> wrote:
> > On Sat, Jan 29, 2011 at 05:59:52PM -0800, Adam Barth wrote:
> >> I'm not really sure I understand how session-dependent masking incurs
> >> much of a cost for multiplexing intermediaries.  At most, the
> >> intermediary would need to maintain 32-bits of state per stream, which
> >> is less than the TCP control blocks it needs to maintain anyway.
> >
> > It's not a matter of memory but a matter of knowing what key to use with
> > each multiplexed message. I think my explanation was not clear in fact.
> > Let's see two examples.
> >
> > The first one is a server receiving multiplexed streams in a single
> > connection from a proxy which aggregates them from multiple clients.
> > The stream looks like this :
> >
> >  [ key1 ] [ msg1 ] [ key2 ] [ msg2 ] ... [ keyN ] [ msgN ]
> 
> Why mask between the proxy and the back-end server at all?

Because at the moment, masking has been made mandatory in the direction
from the client to the server.

> The protocol you describe above isn't WebSockets anyway.

I don't know why you're saying that given that we've talked a number
of times in the past about the need to be able to evolve in the
direction of multiplexing even if we don't implement it right now.

Willy


From ietf@adambarth.com  Sun Jan 30 00:09:06 2011
Return-Path: <ietf@adambarth.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 AB0673A6895 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 00:09:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.706
X-Spam-Level: 
X-Spam-Status: No, score=-3.706 tagged_above=-999 required=5 tests=[AWL=-0.729, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 KxzAxOvhqJzy for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 00:09:05 -0800 (PST)
Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by core3.amsl.com (Postfix) with ESMTP id D00C53A68AF for <hybi@ietf.org>; Sun, 30 Jan 2011 00:09:05 -0800 (PST)
Received: by iwn40 with SMTP id 40so4857554iwn.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 00:12:16 -0800 (PST)
Received: by 10.231.16.67 with SMTP id n3mr5022826iba.66.1296375136502; Sun, 30 Jan 2011 00:12:16 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id 8sm16667360iba.22.2011.01.30.00.12.15 (version=SSLv3 cipher=RC4-MD5); Sun, 30 Jan 2011 00:12:15 -0800 (PST)
Received: by iyi42 with SMTP id 42so4284550iyi.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 00:12:14 -0800 (PST)
Received: by 10.231.11.68 with SMTP id s4mr5077572ibs.14.1296375134405; Sun, 30 Jan 2011 00:12:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.35.13 with HTTP; Sun, 30 Jan 2011 00:11:44 -0800 (PST)
In-Reply-To: <20110130075524.GN25459@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTikD_vadYw9oFJmOvvDTPSaEkHui2NcYbP5wvUiL@mail.gmail.com> <20110130075524.GN25459@1wt.eu>
From: Adam Barth <ietf@adambarth.com>
Date: Sun, 30 Jan 2011 00:11:44 -0800
Message-ID: <AANLkTimVzsyWeW+xWoA6jdKvPtWxG46KHqqXJ3eREWUc@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 08:09:06 -0000

On Sat, Jan 29, 2011 at 11:55 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sat, Jan 29, 2011 at 11:47:46PM -0800, Adam Barth wrote:
>> On Sat, Jan 29, 2011 at 10:49 PM, Willy Tarreau <w@1wt.eu> wrote:
>> > On Sat, Jan 29, 2011 at 05:59:52PM -0800, Adam Barth wrote:
>> >> I'm not really sure I understand how session-dependent masking incurs
>> >> much of a cost for multiplexing intermediaries. =A0At most, the
>> >> intermediary would need to maintain 32-bits of state per stream, whic=
h
>> >> is less than the TCP control blocks it needs to maintain anyway.
>> >
>> > It's not a matter of memory but a matter of knowing what key to use wi=
th
>> > each multiplexed message. I think my explanation was not clear in fact=
.
>> > Let's see two examples.
>> >
>> > The first one is a server receiving multiplexed streams in a single
>> > connection from a proxy which aggregates them from multiple clients.
>> > The stream looks like this :
>> >
>> > =A0[ key1 ] [ msg1 ] [ key2 ] [ msg2 ] ... [ keyN ] [ msgN ]
>>
>> Why mask between the proxy and the back-end server at all?
>
> Because at the moment, masking has been made mandatory in the direction
> from the client to the server.

The proxy isn't a client.  It's a proxy.  From you description, it
sounds like the proxy is acting as a WebSockets server and then as a
WillyTarreauSockets clients to talk to a WillyTarreauSockets server.

>> The protocol you describe above isn't WebSockets anyway.
>
> I don't know why you're saying that given that we've talked a number
> of times in the past about the need to be able to evolve in the
> direction of multiplexing even if we don't implement it right now.

Unless and until we extend WebSockets to include multiplexing, the
protocol you're describing isn't WebSockets.  It's
WillyTarreauSockets.

Kind regards,
Adam

From w@1wt.eu  Sun Jan 30 00:57:55 2011
Return-Path: <w@1wt.eu>
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 6261F3A68DF for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 00:57:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.051
X-Spam-Level: 
X-Spam-Status: No, score=-2.051 tagged_above=-999 required=5 tests=[AWL=-0.008, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 Mll8Riy58AVg for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 00:57:54 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 3345D3A68D9 for <hybi@ietf.org>; Sun, 30 Jan 2011 00:57:53 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0U912TV029955; Sun, 30 Jan 2011 10:01:02 +0100
Date: Sun, 30 Jan 2011 10:01:02 +0100
From: Willy Tarreau <w@1wt.eu>
To: Adam Barth <ietf@adambarth.com>
Message-ID: <20110130090102.GO25459@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTikD_vadYw9oFJmOvvDTPSaEkHui2NcYbP5wvUiL@mail.gmail.com> <20110130075524.GN25459@1wt.eu> <AANLkTimVzsyWeW+xWoA6jdKvPtWxG46KHqqXJ3eREWUc@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <AANLkTimVzsyWeW+xWoA6jdKvPtWxG46KHqqXJ3eREWUc@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 08:57:55 -0000

On Sun, Jan 30, 2011 at 12:11:44AM -0800, Adam Barth wrote:
> On Sat, Jan 29, 2011 at 11:55 PM, Willy Tarreau <w@1wt.eu> wrote:
> > On Sat, Jan 29, 2011 at 11:47:46PM -0800, Adam Barth wrote:
> >> On Sat, Jan 29, 2011 at 10:49 PM, Willy Tarreau <w@1wt.eu> wrote:
> >> > On Sat, Jan 29, 2011 at 05:59:52PM -0800, Adam Barth wrote:
> >> >> I'm not really sure I understand how session-dependent masking incurs
> >> >> much of a cost for multiplexing intermediaries.  At most, the
> >> >> intermediary would need to maintain 32-bits of state per stream, which
> >> >> is less than the TCP control blocks it needs to maintain anyway.
> >> >
> >> > It's not a matter of memory but a matter of knowing what key to use with
> >> > each multiplexed message. I think my explanation was not clear in fact.
> >> > Let's see two examples.
> >> >
> >> > The first one is a server receiving multiplexed streams in a single
> >> > connection from a proxy which aggregates them from multiple clients.
> >> > The stream looks like this :
> >> >
> >> >  [ key1 ] [ msg1 ] [ key2 ] [ msg2 ] ... [ keyN ] [ msgN ]
> >>
> >> Why mask between the proxy and the back-end server at all?
> >
> > Because at the moment, masking has been made mandatory in the direction
> > from the client to the server.
> 
> The proxy isn't a client.  It's a proxy.  From you description, it
> sounds like the proxy is acting as a WebSockets server and then as a
> WillyTarreauSockets clients to talk to a WillyTarreauSockets server.

No, it's talking to a standard WebSocket server that will be known for
supporting a multiplexing extension. I've already said it, look what
happened to HTTP. There are many sites running with front proxies
aggregating traffic over connection pools for standard HTTP servers.
It was done because it dramatically improved their processing speed.
It will be even more important with WebSocket where long connections
are expected to be common.

> >> The protocol you describe above isn't WebSockets anyway.
> >
> > I don't know why you're saying that given that we've talked a number
> > of times in the past about the need to be able to evolve in the
> > direction of multiplexing even if we don't implement it right now.
> 
> Unless and until we extend WebSockets to include multiplexing, the
> protocol you're describing isn't WebSockets.  It's WillyTarreauSockets.

Call it as you like. I'm not trying to define my protocol as you seem to
imply it by putting my name on it. I'm just trying to remind people that
some extensions will be much harder to implement if possible at all with
certain masking choices.

We have designed a protocol that supports extensions (cf 4.8), and it
was even said that the protocol should evolve via extensions instead of
versions because "versioning is anti-pattern". Stream multiplexing has
been identified as something we'll want to introduce at one point
because it makes a lot of sense on the server side and looks like a
natural evolution of the protocol.

Thus if we mask the framing with a stream-specific key, we'll mask the
extensions as well and we won't be able to later implement stream
multiplexing as an extension and we'll have to change the framing for
that, which is a bit contrary to extensibility as defined in 4.8.

I'd like that we'd be careful not to break extensibility.

Once again, I see how you want to protect the laziest servers against
HTTP->WS attacks, but 1) I'm sure it's not the only solution, 2) if
we do this we should probably only mask payload and not framing, and
3) I'm still wondering why someone who can send a POST request from a
browser to a WS server could not make a native WS connection to send
real traffic the normal way, but that's another debate.

Regards,
Willy


From andy.warmcat.com@googlemail.com  Sun Jan 30 01:44:22 2011
Return-Path: <andy.warmcat.com@googlemail.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 493973A6935 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 01:44:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level: 
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 FaYibSQwU+yb for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 01:44:21 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id D08E73A68EE for <hybi@ietf.org>; Sun, 30 Jan 2011 01:44:20 -0800 (PST)
Received: by wyf23 with SMTP id 23so4761671wyf.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 01:47:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=wVZ5+sRUKsC8q1Lp8cDJwKCYV8s+GDsA2GmLMcJKD3Q=; b=sP9CN1jgWznJmfSONFWiYLCbteiX5L46f7RebXmqQz6lj8Rze4dyuDNObRvqCneGzD XqO1zihCnRd6u3hduH/1nHSK2C5ylOq36wdp2tBpeE3oOITAt5btNhMtklSqFPagWwd9 gf/HNmmA6DRaq+q2tqyGpRV+FF+zZ/lue3jWw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=HhLt49VSzb8SPWVm63+amae6qFcGoAQNQlbsJBPzVSo/qtYDnG7LzN75mSLDdogfCs xQC1rkgQRD1HCJnb8DORV9z79jk5CILgkuxk2PyF0bqgDZCTo+DcIfY2qhvp8fXGWh8N b0mwHJAS0ZVqakPrBEcSSJZor5L8jehPclWSc=
Received: by 10.227.128.208 with SMTP id l16mr4834089wbs.53.1296380851312; Sun, 30 Jan 2011 01:47:31 -0800 (PST)
Received: from [192.168.10.150] (82-68-228-230.dsl.in-addr.zen.co.uk [82.68.228.230]) by mx.google.com with ESMTPS id w25sm3139593wbd.17.2011.01.30.01.47.27 (version=SSLv3 cipher=RC4-MD5); Sun, 30 Jan 2011 01:47:28 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D4533A7.1090700@warmcat.com>
Date: Sun, 30 Jan 2011 09:47:19 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Eric Rescorla <ekr@rtfm.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>
In-Reply-To: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Sun, 30 Jan 2011 09:44:22 -0000

On 01/29/11 14:54, Somebody in the thread at some point said:

> Maciej has suggested that an XOR-based masking mechanism enables
> "canned" messages
> using non-WS clients (e.g., the FORM tag) to be sent to a WS server
> and accepted.

Could someone elaborate on the sequence of events there?  The masking 
key itself includes a nonce sent back by the server, is that not enough 
to disallow canned clientside content working from scratch?

The 32-bit frame key sent by the client is not used directly but is 
hashed with the masking key which contains random info from the server.

-Andy

From mjs@apple.com  Sun Jan 30 04:27:20 2011
Return-Path: <mjs@apple.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 A58B53A693B for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 04:27:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.258
X-Spam-Level: 
X-Spam-Status: No, score=-106.258 tagged_above=-999 required=5 tests=[AWL=-0.259, BAYES_00=-2.599, HTML_MESSAGE=0.001, J_CHICKENPOX_34=0.6, 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 sM+ktXfiGGRI for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 04:27:19 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 759A83A679C for <hybi@ietf.org>; Sun, 30 Jan 2011 04:27:19 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out4.apple.com (Postfix) with ESMTP id 2C018CEF9B14 for <hybi@ietf.org>; Sun, 30 Jan 2011 04:30:31 -0800 (PST)
X-AuditID: 11807130-b7c9cae000004f84-aa-4d4559e60873
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay11.apple.com (Apple SCV relay) with SMTP id 27.8E.20356.7E9554D4; Sun, 30 Jan 2011 04:30:31 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_9pHu9AOvXI3YnYA77JR72Q)"
Received: from [17.153.56.113] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LFU0061W5ETLA40@gertie.apple.com> for hybi@ietf.org; Sun, 30 Jan 2011 04:30:30 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4D4533A7.1090700@warmcat.com>
Date: Sun, 30 Jan 2011 04:30:01 -0800
Message-id: <DDC55888-AAF9-4B1E-BF5A-37FCAB450EE2@apple.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <4D4533A7.1090700@warmcat.com>
To: andy@warmcat.com
X-Mailer: Apple Mail (2.1191.1)
X-Brightmail-Tracker: AAAAAA==
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 12:27:20 -0000

--Boundary_(ID_9pHu9AOvXI3YnYA77JR72Q)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 30, 2011, at 1:47 AM, Andy Green wrote:

> On 01/29/11 14:54, Somebody in the thread at some point said:
> 
>> Maciej has suggested that an XOR-based masking mechanism enables
>> "canned" messages
>> using non-WS clients (e.g., the FORM tag) to be sent to a WS server
>> and accepted.
> 
> Could someone elaborate on the sequence of events there?  The masking key itself includes a nonce sent back by the server, is that not enough to disallow canned clientside content working from scratch?
> 
> The 32-bit frame key sent by the client is not used directly but is hashed with the masking key which contains random info from the server.

That's the case in the current draft. However, the Chairs have declared consensus to change this so that only the 32-bit mask included in the message is used for masking, thus regressing protection against this threat model. Adam proposed a lightweight way to bring back stronger protection against non-WS clients. For what it's worth, Adam's solution would address my objection.

Also noteworthy, it results in trivial computational overhead (an extra 32-bit XOR operation per frame) and trivial state overhead (32 bits per connection). It also does not use real crypto. This should address most objections to the AES and XOR+HMAC alternatives in the poll.

Regards,
Maciej


--Boundary_(ID_9pHu9AOvXI3YnYA77JR72Q)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: quoted-printable

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><br><div><div>On Jan 30, 2011, at 1:47 AM, Andy Green wrote:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><div>On =
01/29/11 14:54, Somebody in the thread at some point =
said:<br><br><blockquote type=3D"cite">Maciej has suggested that an =
XOR-based masking mechanism enables<br></blockquote><blockquote =
type=3D"cite">"canned" messages<br></blockquote><blockquote =
type=3D"cite">using non-WS clients (e.g., the FORM tag) to be sent to a =
WS server<br></blockquote><blockquote type=3D"cite">and =
accepted.<br></blockquote><br>Could someone elaborate on the sequence of =
events there? &nbsp;The masking key itself includes a nonce sent back by =
the server, is that not enough to disallow canned clientside content =
working from scratch?<br><br>The 32-bit frame key sent by the client is =
not used directly but is hashed with the masking key which contains =
random info from the server.<br></div></blockquote><br></div><div>That's =
the case in the current draft. However, the Chairs have declared =
consensus to change this so that only the 32-bit mask included in the =
message is used for masking, thus regressing protection against this =
threat model. Adam proposed a lightweight way to bring back stronger =
protection against non-WS clients. For what it's worth, Adam's solution =
would address my objection.</div><div><br></div><div>Also noteworthy, it =
results in trivial computational overhead (an extra 32-bit XOR operation =
per frame) and trivial state overhead (32 bits per connection). It also =
does not use real crypto. This should address most objections to the AES =
and XOR+HMAC alternatives in the =
poll.</div><div><br></div><div>Regards,</div><div>Maciej</div><div><br></d=
iv></body></html>=

--Boundary_(ID_9pHu9AOvXI3YnYA77JR72Q)--

From ekr@rtfm.com  Sun Jan 30 08:44:00 2011
Return-Path: <ekr@rtfm.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 B15F83A6AEA for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 08:44:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.694
X-Spam-Level: 
X-Spam-Status: No, score=-102.694 tagged_above=-999 required=5 tests=[AWL=0.283, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 X0vSIAoVLwdI for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 08:43:59 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id 174A43A6AEC for <hybi@ietf.org>; Sun, 30 Jan 2011 08:43:59 -0800 (PST)
Received: by gyd12 with SMTP id 12so1935639gyd.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 08:47:10 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.91.20 with SMTP id o20mr7897003agb.27.1296406030609; Sun, 30 Jan 2011 08:47:10 -0800 (PST)
Received: by 10.90.116.7 with HTTP; Sun, 30 Jan 2011 08:47:10 -0800 (PST)
In-Reply-To: <20110130064908.GL25459@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu>
Date: Sun, 30 Jan 2011 08:47:10 -0800
Message-ID: <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 16:44:00 -0000

On Sat, Jan 29, 2011 at 10:49 PM, Willy Tarreau <w@1wt.eu> wrote:
> Hello Adam,
>
> On Sat, Jan 29, 2011 at 05:59:52PM -0800, Adam Barth wrote:
>> I'm not really sure I understand how session-dependent masking incurs
>> much of a cost for multiplexing intermediaries. =A0At most, the
>> intermediary would need to maintain 32-bits of state per stream, which
>> is less than the TCP control blocks it needs to maintain anyway.
>
> It's not a matter of memory but a matter of knowing what key to use with
> each multiplexed message. I think my explanation was not clear in fact.
> Let's see two examples.
>
> The first one is a server receiving multiplexed streams in a single
> connection from a proxy which aggregates them from multiple clients.
> The stream looks like this :
>
>
> =A0[ key1 ] [ msg1 ] [ key2 ] [ msg2 ] ... [ keyN ] [ msgN ]
>
> Each msg is composed of a masked framing followed by a masked payload.
> The server has no way to know which client each message comes from until
> he has unmasked the message. One proposal could consist in having the
> server always emit the same random on a given connection, but it could
> be argued that this voids the effect of the random then. It would also
> strongly tie clients to connections, which limits the usefulness of
> multiplexing, where connection pools are much more efficient.

Let's take a step back here:
If you're going to mux connections from multiple clients, you
absolutely want the
ultimate back-end server to know which client they came from, if for no oth=
er
reason than it's generally attractive to tie requests into a single
context (e.g.,
once a client has authenticated overTLS you don't force reauthentication). =
So,
I don't really see the problem of attaching a stream-id.

I don't see that there is a useful variant of WebSockets that has
multiplexed traffic
by different clients on the same TCP connection. That's some other,
non-WS protocol
and I agree with Adam that it doesn't require masking at all.

-Ekr

From andy.warmcat.com@googlemail.com  Sun Jan 30 09:09:31 2011
Return-Path: <andy.warmcat.com@googlemail.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 7B2033A6B26 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 09:09:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.255
X-Spam-Level: 
X-Spam-Status: No, score=-3.255 tagged_above=-999 required=5 tests=[AWL=-0.256, BAYES_00=-2.599, J_CHICKENPOX_34=0.6, RCVD_IN_DNSWL_LOW=-1]
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 p94mHw1mPnts for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 09:09:30 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 8F6F53A6802 for <hybi@ietf.org>; Sun, 30 Jan 2011 09:09:29 -0800 (PST)
Received: by wwa36 with SMTP id 36so5528592wwa.13 for <hybi@ietf.org>; Sun, 30 Jan 2011 09:12:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=CH5jcbfmjL58GFejg7MiEqhIr7daAkDPJFnts+FhYJw=; b=r/Blo2Wv3TFhpg09nEwhWsnDi6mJURbhYMLGoRiEUbpPFeonjJVMjo4WDsvLe9JioK RbX+q5lgZhOjxxj3sBMDtLUuWMmg/5aOwuVaRmhyg/rrU09QKnBOeWjGApANtYEZoOHD oc673Tlzkg3oZQ1qhhhqnJYL4a7T1SXJ//Jhw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=jF/Tw7iWW+AjDLf6RtWJzugtlDj/EQXZKDw002Qs3VX+w2IxvdulrvgOHVsaW03uvh t52OSkHcHbSbOVX/ySmO9WAPrdeHjR7lPl9TeAjns27m6dHLOtvr/jrogN2/TZSqYL01 jOwt4FgQGWMj/1OwMZYytYad6rIDjC+fAkdQ4=
Received: by 10.227.133.16 with SMTP id d16mr5169965wbt.145.1296407560865; Sun, 30 Jan 2011 09:12:40 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id w25sm3412179wbd.23.2011.01.30.09.12.37 (version=SSLv3 cipher=RC4-MD5); Sun, 30 Jan 2011 09:12:38 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D459C02.60704@warmcat.com>
Date: Sun, 30 Jan 2011 17:12:34 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Maciej Stachowiak <mjs@apple.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <4D4533A7.1090700@warmcat.com> <DDC55888-AAF9-4B1E-BF5A-37FCAB450EE2@apple.com>
In-Reply-To: <DDC55888-AAF9-4B1E-BF5A-37FCAB450EE2@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Sun, 30 Jan 2011 17:09:31 -0000

On 01/30/11 12:30, Somebody in the thread at some point said:

> That's the case in the current draft. However, the Chairs have declared
> consensus to change this so that only the 32-bit mask included in the
> message is used for masking, thus regressing protection against this
> threat model. Adam proposed a lightweight way to bring back stronger
> protection against non-WS clients. For what it's worth, Adam's solution
> would address my objection.

Well, not changing it will also make that observation redundant.

> Also noteworthy, it results in trivial computational overhead (an extra
> 32-bit XOR operation per frame) and trivial state overhead (32 bits per
> connection). It also does not use real crypto. This should address most
> objections to the AES and XOR+HMAC alternatives in the poll.

Maybe it is better to follow Greg's idea about bringing the masking into 
the extensions scheme now.  Servers and clients can both enforce what 
kind of masking they think is best then, and introducing a new scheme 
needn't delay the standard as a whole.  I mean maybe next week a better 
new scheme appears (or the utility of masking rightly get questioned by 
more people) and this way a new or no masking scheme can be slipstreamed 
into use without spinning the standard.

You believe that having 8 bytes in clear before the masking is 
dangerous?  If so do you have any idea about specifically what it would 
be dangerous to?  What about sticking the extension zone, usually zero 
bytes, before the length count so it could be encrypted?

-Andy

From w@1wt.eu  Sun Jan 30 13:21:57 2011
Return-Path: <w@1wt.eu>
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 C513E3A6872 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 13:21:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.051
X-Spam-Level: 
X-Spam-Status: No, score=-2.051 tagged_above=-999 required=5 tests=[AWL=-0.008, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 nhsHNp-lL+Nv for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 13:21:57 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id B599A3A67F7 for <hybi@ietf.org>; Sun, 30 Jan 2011 13:21:55 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0ULP4fY031662; Sun, 30 Jan 2011 22:25:04 +0100
Date: Sun, 30 Jan 2011 22:25:04 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110130212504.GB30182@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 21:21:57 -0000

On Sun, Jan 30, 2011 at 08:47:10AM -0800, Eric Rescorla wrote:
> If you're going to mux connections from multiple clients, you
> absolutely want the
> ultimate back-end server to know which client they came from, if for no other
> reason than it's generally attractive to tie requests into a single
> context (e.g.,
> once a client has authenticated overTLS you don't force reauthentication). So,
> I don't really see the problem of attaching a stream-id.

Exactly. And if that stream ID is located where it is supposed to be (in the
extension data), it will be masked.

Willy


From andy.warmcat.com@googlemail.com  Sun Jan 30 13:35:38 2011
Return-Path: <andy.warmcat.com@googlemail.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 C1E623A6885 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 13:35:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.548
X-Spam-Level: 
X-Spam-Status: No, score=-3.548 tagged_above=-999 required=5 tests=[AWL=0.051,  BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 XjYrg0+1Pq7T for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 13:35:37 -0800 (PST)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id 156263A6881 for <hybi@ietf.org>; Sun, 30 Jan 2011 13:35:36 -0800 (PST)
Received: by wwa36 with SMTP id 36so5676126wwa.13 for <hybi@ietf.org>; Sun, 30 Jan 2011 13:38:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:reply-to:user-agent :mime-version:to:subject:content-type:content-transfer-encoding; bh=h+WxZbY839BM0fFd/64V8ziSIsVnMY/RkfKsni9lb94=; b=H84F7sTBiX4AIjMXaNxToCbSHM94q4Ov73F0cZ7f0Zsye6y3rYRozcdH3y7+roLu3F 6x5SHfr/9tUR4vYfFW2cc5CqFFS9NKctsX0BxoFG3KtyoeHlhcMoMpSDhAkYZES0c7wT GQRzimygpqFhe/ic8RnTbI4fnzNIrpS2wsZZI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; b=qQTDk+Q4A8O43/I+/M/aIkOZxMw91eH4VP4txc10mFgKLvkqKmiRzUAQw2Z8yzbhsP WUZ70TehZGSuOTPsBoJE/CijfF/DPtVH+HNgf76QqO3vx3jtYS3eYdNvgd0qA6SnHUd+ 8wfqbbUQqq728x+stUovZptlugH4R8amqt6d4=
Received: by 10.227.157.205 with SMTP id c13mr5265597wbx.136.1296423527181; Sun, 30 Jan 2011 13:38:47 -0800 (PST)
Received: from [10.8.0.6] (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id o6sm2976644wbo.21.2011.01.30.13.38.44 (version=SSLv3 cipher=RC4-MD5); Sun, 30 Jan 2011 13:38:45 -0800 (PST)
Sender: Andy Green <andy.warmcat.com@googlemail.com>
Message-ID: <4D45DA61.2030607@warmcat.com>
Date: Sun, 30 Jan 2011 21:38:41 +0000
From: Andy Green <andy@warmcat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101217 Fedora/3.1.7-0.39.b3pre.fc15 Thunderbird/3.1.7
MIME-Version: 1.0
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [hybi] Server bandwidth test with and without masking
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: andy@warmcat.com
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: Sun, 30 Jan 2011 21:35:38 -0000

Hi -

This describes an 04 pingflood test against an 04 server on the same 
machine, both with 04 masking enabled compliant to the standard, and the 
same test done with all the per-frame masking computation and XOR action 
disabled both on the pingflood client and the server.

I repeated each test twice, and on two machines.

2.6.38-rc2 Core i7 laptop:   Masked: 2346KiB/s, 2270KiB/s
                            Unmasked: 4427KiB/s, 4244KiB/s

2.6.18     Athlon 64 box :   Masked: 1020KiB/s, 1021KiB/s
                            Unmasked: 1321KiB/s, 1251KiB/s

These bandwidth numbers are formed from 64 byte PING payloads only (ie, 
no framing or TCP/IP overhead is counted), and they are KiBs (1024 
bytes).  It's using the libwebsockets built-in sha-1.


To reproduce:

libwebsockets 990d5062d007dcd11f51b
git clone git://git.warmcat.com/libwebsockets

For the masking ON test, just run

  $ libwebsockets-test-server

and

  $ libwebsockets-test-ping localhost -r1 -f -i0

For masking OFF test, just run

  $ libwebsockets-test-server -k

and

  $ libwebsockets-test-ping localhost -r1 -f -i0 -k



Actual results -->

Core i7 x86_64 laptop MASKING ON  two runs

$ libwebsockets-test-ping localhost -r1 -f -i0
handshake OK for protocol lws-mirror-protocol
Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.
. 

--- localhost.localdomain websocket ping statistics using 1 connections ---
847595 packets transmitted, 847595 received, 0% packet loss, time 22576ms
rtt min/avg/max = 0.040/0.092/40.121 ms
payload bandwidth average 2346.447 KiBytes/sec

$ libwebsockets-test-ping localhost -r1 -f -i0
handshake OK for protocol lws-mirror-protocol
Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.
. 

--- localhost.localdomain websocket ping statistics using 1 connections ---
852018 packets transmitted, 851798 received, 0% packet loss, time 23451ms
rtt min/avg/max = 0.040/0.087/40.050 ms
payload bandwidth average 2270.140 KiBytes/sec


Commodity rented x86_64 Athlon 64 server MASKING ON two runs

# libwebsockets-test-ping localhost -r1 -i0 -f
handshake OK for protocol lws-mirror-protocol
Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.

--- localhost.localdomain websocket ping statistics using 1 connections ---
467501 packets transmitted, 467501 received, 0% packet loss, time 28625ms
rtt min/avg/max = 0.070/0.140/40.202 ms
payload bandwidth average 1020.715 KiBytes/sec

# libwebsockets-test-ping localhost -r1 -i0 -f
handshake OK for protocol lws-mirror-protocol
Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.

--- localhost.localdomain websocket ping statistics using 1 connections ---
528528 packets transmitted, 528528 received, 0% packet loss, time 32332ms
rtt min/avg/max = 0.055/0.136/39.605 ms
payload bandwidth average 1021.665 KiBytes/sec



Core i7 laptop Masking OFF two runs

$ libwebsockets-test-ping localhost -r1 -f -i0 -k
handshake OK for protocol lws-mirror-protocol
Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.
. 

--- localhost.localdomain websocket ping statistics using 1 connections ---
1505933 packets transmitted, 1489349 received, 1% packet loss, time 21025ms
rtt min/avg/max = 0.027/0.151/39.993 ms
payload bandwidth average 4427.229 KiBytes/sec

$ libwebsockets-test-ping localhost -r1 -f -i0 -k
handshake OK for protocol lws-mirror-protocol
Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.
. 

--- localhost.localdomain websocket ping statistics using 1 connections ---
1180166 packets transmitted, 1172265 received, 0% packet loss, time 17263ms
rtt min/avg/max = 0.026/0.131/40.494 ms
payload bandwidth average 4244.110 KiBytes/sec

Commodity rented x86_64 Athlon 64 server Masking OFF two run

# libwebsockets-test-ping localhost -r1 -i0 -f -k
handshake OK for protocol lws-mirror-protocol
Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.
 

--- localhost.localdomain websocket ping statistics using 1 connections ---
654099 packets transmitted, 651687 received, 0% packet loss, time 30814ms
rtt min/avg/max = 0.055/0.114/39.316 ms
payload bandwidth average 1321.801 KiBytes/sec

# libwebsockets-test-ping localhost -r1 -i0 -f -k
handshake OK for protocol lws-mirror-protocol
Websocket PING localhost.localdomain (127.0.0.1) 64 bytes of data.
 

--- localhost.localdomain websocket ping statistics using 1 connections ---
586050 packets transmitted, 585806 received, 0% packet loss, time 29260ms
rtt min/avg/max = 0.038/0.161/1218.389 ms
payload bandwidth average 1251.272 KiBytes/sec

-Andy

From Martin.Thomson@andrew.com  Sun Jan 30 14:12:39 2011
Return-Path: <Martin.Thomson@andrew.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 6591A3A6891 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 14:12:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.543
X-Spam-Level: 
X-Spam-Status: No, score=-2.543 tagged_above=-999 required=5 tests=[AWL=0.056,  BAYES_00=-2.599]
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 UiWAabVffdJi for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 14:12:38 -0800 (PST)
Received: from csmailgw2.commscope.com (csmailgw2.commscope.com [198.135.207.242]) by core3.amsl.com (Postfix) with ESMTP id 8FD123A6872 for <hybi@ietf.org>; Sun, 30 Jan 2011 14:12:38 -0800 (PST)
Received: from [10.86.20.103] ([10.86.20.103]:25127 "EHLO ACDCE7HC2.commscope.com") by csmailgw2.commscope.com with ESMTP id S530931Ab1A3WPv (ORCPT <rfc822;hybi@ietf.org>); Sun, 30 Jan 2011 16:15:51 -0600
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC2.commscope.com (10.86.20.103) with Microsoft SMTP Server (TLS) id 8.3.137.0; Sun, 30 Jan 2011 16:15:50 -0600
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Mon, 31 Jan 2011 06:15:46 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Willy Tarreau <w@1wt.eu>, Eric Rescorla <ekr@rtfm.com>
Date: Mon, 31 Jan 2011 06:15:40 +0800
Thread-Topic: [hybi] Modest enhancement to XOR-based masking
Thread-Index: AcvAxDWkRIXBHw29QAq6VfktQgXA0AABitzQ
Message-ID: <8B0A9FCBB9832F43971E38010638454F03FEA14F9D@SISPE7MB1.commscope.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <20110130212504.GB30182@1wt.eu>
In-Reply-To: <20110130212504.GB30182@1wt.eu>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw2.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 22:12:39 -0000

T24gMjAxMS0wMS0zMSBhdCAwODoyNTowNCwgV2lsbHkgVGFycmVhdSB3cm90ZToNCj4gT24gU3Vu
LCBKYW4gMzAsIDIwMTEgYXQgMDg6NDc6MTBBTSAtMDgwMCwgRXJpYyBSZXNjb3JsYSB3cm90ZToN
Cj4gPiBJZiB5b3UncmUgZ29pbmcgdG8gbXV4IGNvbm5lY3Rpb25zIGZyb20gbXVsdGlwbGUgY2xp
ZW50cywgeW91DQo+ID4gYWJzb2x1dGVseSB3YW50IHRoZQ0KPiA+IHVsdGltYXRlIGJhY2stZW5k
IHNlcnZlciB0byBrbm93IHdoaWNoIGNsaWVudCB0aGV5IGNhbWUgZnJvbSwgaWYgZm9yDQo+IG5v
IG90aGVyDQo+ID4gcmVhc29uIHRoYW4gaXQncyBnZW5lcmFsbHkgYXR0cmFjdGl2ZSB0byB0aWUg
cmVxdWVzdHMgaW50byBhIHNpbmdsZQ0KPiA+IGNvbnRleHQgKGUuZy4sDQo+ID4gb25jZSBhIGNs
aWVudCBoYXMgYXV0aGVudGljYXRlZCBvdmVyVExTIHlvdSBkb24ndCBmb3JjZQ0KPiByZWF1dGhl
bnRpY2F0aW9uKS4gU28sDQo+ID4gSSBkb24ndCByZWFsbHkgc2VlIHRoZSBwcm9ibGVtIG9mIGF0
dGFjaGluZyBhIHN0cmVhbS1pZC4NCj4gDQo+IEV4YWN0bHkuIEFuZCBpZiB0aGF0IHN0cmVhbSBJ
RCBpcyBsb2NhdGVkIHdoZXJlIGl0IGlzIHN1cHBvc2VkIHRvIGJlDQo+IChpbiB0aGUNCj4gZXh0
ZW5zaW9uIGRhdGEpLCBpdCB3aWxsIGJlIG1hc2tlZC4NCg0KUGVyaGFwcyB0aGUgc3RyZWFtIElE
IGNhbiBiZSBhZGRlZCBiZWZvcmUgdGhlIG1hc2tpbmcga2V5LCBpbiB0aGUgY2xlYXIuICBBZnRl
ciBhbGwsIHdlJ3JlIHRhbGtpbmcgYWJvdXQgYSBuZWdvdGlhdGVkIGV4dGVuc2lvbiBoZXJlLiAg
SXQgb25seSBhcHBlYXJzIHdoZW4gYm90aCBzaWRlcyBoYXZlIGFncmVlZCB0byBpdHMgbmVjZXNz
aXR5Lg0KDQoNCk9uIHRoZSBtZWNoYW5pc20uLi4gVGhlIG9ubHkgZXh0ZW5zaW9uIHRoYXQgSSB3
b3VsZCBzdWdnZXN0IGlzIHRoYXQgTTEgbWlnaHQgYmUgYmV0dGVyIGRlcml2ZWQgZnJvbSBhIGNv
bWJpbmF0aW9uIG9mIHNlcnZlciBhbmQgY2xpZW50IHByb2R1Y2VkIG5vaXNlLiAgVGhhdCB3b3Vs
ZCBsZXQgdGhlIGJyb3dzZXIgaGF2ZSBzb21lIHNheSBvbiB0aGUgbGVuZ3RoIG9mIHNlcXVlbmNl
LiAgRm9yIGluc3RhbmNlLCBpZiB0aGUgc2VydmVyIHdhbnRlZCB0byBwb2lzb24gYW4gaW50ZXJt
ZWRpYXJ5LCB0aGV5IGNvdWxkIHNldCBhIHJlYWxseSBzbWFsbCBNMSB0byBpbmNyZWFzZSB0aGVp
ciBjaGFuY2VzIG9mIGhpdHRpbmcgdGhlIHJpZ2h0IGNvbWJpbmF0aW9uLg0KDQpBbnl0aGluZyBs
ZXNzIHRoYW4gb3IgZXF1YWwgdG8gdGhlIGZyYW1lIG1hc2sgaW4gbGVuZ3RoIGlzIGdvaW5nIHRv
IGJlIGFzIHdlYWsgYXMgaGF2aW5nIG5vIE0xIGF0IGFsbCAtIGxlYXZpbmcgdGhhdCBpbiBzZXJ2
ZXIgY29udHJvbCBzZWVtcyBpcnJlc3BvbnNpYmxlLg0KDQotLU1hcnRpbg0KDQoNCg==

From ekr@rtfm.com  Sun Jan 30 14:26:34 2011
Return-Path: <ekr@rtfm.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 B4DEE3A684C for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 14:26:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.697
X-Spam-Level: 
X-Spam-Status: No, score=-102.697 tagged_above=-999 required=5 tests=[AWL=0.280, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 qMFWFV0+QCnj for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 14:26:34 -0800 (PST)
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by core3.amsl.com (Postfix) with ESMTP id C58D23A6849 for <hybi@ietf.org>; Sun, 30 Jan 2011 14:26:33 -0800 (PST)
Received: by yxt33 with SMTP id 33so2015423yxt.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 14:29:46 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.104.18 with SMTP id b18mr7976382agc.81.1296426585969; Sun, 30 Jan 2011 14:29:45 -0800 (PST)
Received: by 10.90.116.7 with HTTP; Sun, 30 Jan 2011 14:29:45 -0800 (PST)
In-Reply-To: <20110130212504.GB30182@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <20110130212504.GB30182@1wt.eu>
Date: Sun, 30 Jan 2011 14:29:45 -0800
Message-ID: <AANLkTik6hka_-Et=RjW21V-3DwWD+HWBuam1XhnPCJZ3@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 22:26:34 -0000

On Sun, Jan 30, 2011 at 1:25 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Sun, Jan 30, 2011 at 08:47:10AM -0800, Eric Rescorla wrote:
>> If you're going to mux connections from multiple clients, you
>> absolutely want the
>> ultimate back-end server to know which client they came from, if for no other
>> reason than it's generally attractive to tie requests into a single
>> context (e.g.,
>> once a client has authenticated overTLS you don't force reauthentication). So,
>> I don't really see the problem of attaching a stream-id.
>
> Exactly. And if that stream ID is located where it is supposed to be (in the
> extension data), it will be masked.

As Adam said, this isn't WebSockets. It's WillyTarreauSockets. Frame
the WS messages
and add the stream-id in the framing. This is better in any case
because it avoids intermixing
meta-data supplied by the proxy with data supplied by the client.

-Ekr

From gregw@intalio.com  Sun Jan 30 15:06:22 2011
Return-Path: <gregw@intalio.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 CB5493A6B33 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 15:06:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.931
X-Spam-Level: 
X-Spam-Status: No, score=-2.931 tagged_above=-999 required=5 tests=[AWL=0.046,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 HfoKjdEqLChX for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 15:06:22 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id E99763A68B1 for <hybi@ietf.org>; Sun, 30 Jan 2011 15:06:21 -0800 (PST)
Received: by qwi2 with SMTP id 2so5190156qwi.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 15:09:34 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.235.143 with SMTP id kg15mr3352730qcb.17.1296428973599; Sun, 30 Jan 2011 15:09:33 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Sun, 30 Jan 2011 15:09:33 -0800 (PST)
In-Reply-To: <AANLkTikD_vadYw9oFJmOvvDTPSaEkHui2NcYbP5wvUiL@mail.gmail.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTikD_vadYw9oFJmOvvDTPSaEkHui2NcYbP5wvUiL@mail.gmail.com>
Date: Mon, 31 Jan 2011 10:09:33 +1100
X-Google-Sender-Auth: gKpjJu6215H_PXifMITLM8tfZQY
Message-ID: <AANLkTin=7ViLAfynV467GaTYr8Gksgb_NUec4uVK99JO@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Joe Hildebrand <Joe.Hildebrand@webex.com>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 23:06:22 -0000

On 30 January 2011 18:47, Adam Barth <ietf@adambarth.com> wrote:
> Why mask between the proxy and the back-end server at all? =A0The
> protocol you describe above isn't WebSockets anyway. =A0Since you're
> free to speak whatever protocol you like, you might as well terminate
> the masking at the proxy.

This is an oft-repeated argument whenever the topic of intermediaries
is discussed.

The counter argument is that data centres are built from components
sourced from multiple vendors and that it is REALLY important that the
standards apply within the data centre as well as without.   We are
not all google who have the luxury of developing their own private
internal protocols.

Note that I'm please to see that Adam does now recognise the desire to
not mask within the data centre, and his view that this is outside the
standard goes a long way to explain why he is opposed to masking as an
extension.

Chairs - can we get a consensus call on this point - that
intermediaries (even those running extensions like mux) talking to
servers should be covered by the protocol that we standardise.


regards

From gregw@intalio.com  Sun Jan 30 15:11:48 2011
Return-Path: <gregw@intalio.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 53D4E3A68C9 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 15:11:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.931
X-Spam-Level: 
X-Spam-Status: No, score=-2.931 tagged_above=-999 required=5 tests=[AWL=0.046,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 CoZrpyMJLs6z for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 15:11:47 -0800 (PST)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id 673933A68BC for <hybi@ietf.org>; Sun, 30 Jan 2011 15:11:47 -0800 (PST)
Received: by qyk34 with SMTP id 34so2524133qyk.10 for <hybi@ietf.org>; Sun, 30 Jan 2011 15:14:59 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.214.71 with SMTP id gz7mr5661983qab.349.1296429299763; Sun, 30 Jan 2011 15:14:59 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Sun, 30 Jan 2011 15:14:59 -0800 (PST)
In-Reply-To: <20110130064908.GL25459@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu>
Date: Mon, 31 Jan 2011 10:14:59 +1100
X-Google-Sender-Auth: TNWxPqCgziDOK80cBorr9RNLztM
Message-ID: <AANLkTi=rq=cb97K3JNANz-fjv1+y_g5ymgJNB00267Mi@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 23:11:48 -0000

On 30 January 2011 17:49, Willy Tarreau <w@1wt.eu> wrote:
> =A0[ key1 ] [ msg1 ] [ key2 ] [ msg2 ] ... [ keyN ] [ msgN ]


I think this example shows the folly of having the key as something
outside the framing.

If the key was sent as extension data then we would have:

 [<key1>msg1] [<key2>msg2 ] ... [<keyN>msgN]


If we were to add a mux extension, then the chanId could also go into
the extension data:


 [<chanID,key1>msg1] [<chanID,key2>msg2 ] ... [<chanID,keyN>msgN]


The choice of using session based masking vs frame based masking would
then be independent of whatever extension might be applied  (I would
still favour frame based masking, but could live with session masking
in this scenario).

regards

From gregw@intalio.com  Sun Jan 30 15:25:48 2011
Return-Path: <gregw@intalio.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 EC6913A68C6 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 15:25:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.932
X-Spam-Level: 
X-Spam-Status: No, score=-2.932 tagged_above=-999 required=5 tests=[AWL=0.045,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 3Ff7EbKPaqwB for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 15:25:48 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 1699A3A68C5 for <hybi@ietf.org>; Sun, 30 Jan 2011 15:25:47 -0800 (PST)
Received: by vws7 with SMTP id 7so1820124vws.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 15:29:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.202.10 with SMTP id fc10mr470451vcb.60.1296430140346; Sun, 30 Jan 2011 15:29:00 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Sun, 30 Jan 2011 15:29:00 -0800 (PST)
In-Reply-To: <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com>
Date: Mon, 31 Jan 2011 10:29:00 +1100
X-Google-Sender-Auth: _sw83wpmGiZx1KP_DpeIJ08tjZk
Message-ID: <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Sun, 30 Jan 2011 23:25:49 -0000

On 31 January 2011 03:47, Eric Rescorla <ekr@rtfm.com> wrote:
> I don't really see the problem of attaching a stream-id.

Because we designed framing with extensions so that they could be used
for things like MUX.   But now that framing is masked it means that
all extensions must understand masking, making it impossible to have
both session based masking and a session ID within the extension data.

Of course the session ID could be prepended like:

  [sessionID][key][message]

But that would mean the MUX "extension" would be changing framing and
would not work with any other intermediaries or infrastructure that
was not aware of the MUX extension.

This shows the folly of not putting meta data like masking keys and
stream IDs in the frame extension data.  Once one "extension" breaks
out of this model, it will break all intermediaries and infrastructure
and force all other extensions to do the same.

From gregw@intalio.com  Sun Jan 30 15:26:05 2011
Return-Path: <gregw@intalio.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 941193A68A6 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 15:26:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.152
X-Spam-Level: 
X-Spam-Status: No, score=-2.152 tagged_above=-999 required=5 tests=[AWL=-0.735, BAYES_00=-2.599, DC_IMAGE_SPAM_HTML=0.001, DC_IMAGE_SPAM_TEXT=0.001, DC_PNG_UNO_LARGO=0.558, FM_FORGED_GMAIL=0.622]
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 yGBwscCmwJiF for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 15:26:05 -0800 (PST)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by core3.amsl.com (Postfix) with ESMTP id A52F73A68BC for <hybi@ietf.org>; Sun, 30 Jan 2011 15:26:04 -0800 (PST)
Received: by vxi40 with SMTP id 40so300455vxi.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 15:29:17 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.163.2 with SMTP id y2mr1472355vcx.130.1296430156868; Sun, 30 Jan 2011 15:29:16 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Sun, 30 Jan 2011 15:29:16 -0800 (PST)
In-Reply-To: <4D45DA61.2030607@warmcat.com>
References: <4D45DA61.2030607@warmcat.com>
Date: Mon, 31 Jan 2011 10:29:16 +1100
X-Google-Sender-Auth: Jo05bzyEeDYY34xN1sTBYYd4JuY
Message-ID: <AANLkTikHBKDGiSxG5GCsJqL9vRv3dLrhstemNd7jjAET@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: andy@warmcat.com
Content-Type: multipart/mixed; boundary=0016e68ac762f9edc6049b18aa4a
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Server bandwidth test with and without masking
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: Sun, 30 Jan 2011 23:26:05 -0000

--0016e68ac762f9edc6049b18aa4a
Content-Type: text/plain; charset=ISO-8859-1

Andy,

Great!

To make it easier to grok the results, I've put them in a google spreadsheet:

https://spreadsheets.google.com/ccc?key=0ApsJ-Kl6lVTkdHl2RnFiYmhWQ0p6T0hkNzkzMEJXd0E&hl=en_GB&authkey=CL7OiLYK

Chart image also attached.

cheers

--0016e68ac762f9edc6049b18aa4a
Content-Type: image/png; name="chart1.png"
Content-Disposition: attachment; filename="chart1.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gjkjv21c0

iVBORw0KGgoAAAANSUhEUgAAAlgAAAFzCAIAAABth+DjAAAv/klEQVR42u2dC1RU9534s9tt99Gz
p9um293T3e7DEwwQcAGfqBvQIw8RNiDUo0BkICovpRWoEbTRBpWY1m1ctCkSA0QQ1HOMcIBNJdFo
fMSkENeANoKhEmOImKCgPIbX/7v+/r17O3NneESRx+dzOPf85ju/e+fOnR/fz3zn3pnfI/0AAAAT
mEc4BAAAgAgBAAAQIQAAACIEAABAhAAAAIgQAAAAEQIAACBCAAAARAgAAIAIAQAAECEAAAAiBAAA
QIQAAACIEAAAABECAAAgQgAAAEQIAACACAEAABAhAAAAIgQAAECEAAAAiBAAAAARAgAAIEIAAABE
CAAAgAgBAAAQIQAAACIEAABAhAAAAIgQAAAAEQIAACBCAAAARAgAAIAIAQAAECEAAAAiBAAAQIQA
AACIEAAAABECAAAgQgAAAEQIAACACAEAABAhAAAAIgQAAECEAAAAiBAAAAARAgAAIEIAAABE+HD5
p3/6p0ceeeTKlSvS7unp+Zu/+Ru5+c1vftNsNktE4nJT+hi/VPewCDY3N5tMpu9973tf+9rXHn30
0aeeeurSpUtDGwFGmzXk+PHjXl5e930Hhj92rRjS0/mKjzvs1Q0PIwAgwolCRESE5NC8vDxpnzlz
RsvgJ0+elIjEpS19Bp9//fz8JPj22293dnYePnxY2o899tgDSusPaAfur5ZGvwhHYA8BABGOXrKz
syUJxsTESHvz5s2aCDdt2iSRFStWSPvXv/61FIhr1qz51re+JSVjQkJCV1eXlkB/+ctffv/73587
d25TU5ME//zP/1yCL7zwQm9vr/6Buru7U1JSvvOd78gWpCHVpwRlO0lJSRKUtebNm1dfX6/Pyx9/
/PE///M//8M//IM0rHfAovDSsLUDdp7CggULVMPf399CqKWlpXbWmjlz5iBFWFFRMWvWrH/8x38s
Kyuz3oLhwdFvR2vfuHFDqjc5Jr/61a8sik7DhygoKJDNSvyzzz4z3KatwwgAiHCicOnSJcmADg4O
0p49e7a0ly1bJss5c+ZI5PHHH5d2bW3thg0bpJGTk5Ofny+N9PR0LZMmJiZKXBqRkZESlMyu4tOm
TTt16pT2QBkZGRKU9P3yyy9LQ25K8Nlnn5X2K6+8oorRGTNmaJsVKf7gBz/427/924sXL0rQzg5Y
PCNbO2BnC4cOHWpubnZ2dv6TP/mT3/3ud+qwSNvR0VG62V9rkCJctWrV6dOnpfGv//qv1lswPDiG
IjSZTNLIzc1VpbxehIYPER8fL4dXGk8//bStbWJBAEQ40fne974neVAE8Gd/9mdSTl27du3r95A6
TOKPPvpoX1+fOEnaN2/ebGtrs0i1X95DGt/97nclePnyZaVPxVNPPfXpp59KXFaRm1/cQxpS6klQ
Khtpt7a2WotEKhtZ7t27VwXt7IDF07G1A3a20NLSIm2lcyn7pC3+UGYacK1BilBWlzpPGl/72tes
t2B4cAylpV6sW7duSYVnYTLDh5ANqldH3lIgQgBECMYsXrxYKwT9/PwkMm/ePGk/88wzSiQSkdyq
/wxNlKklUNFkb2+vln/VB55ZWVnKZMKTTz4pwW984xv6zmoLarMStBbJX/3VX33nO9/593//dxW0
swPWz8hwB+xsQX0U2dHRIbb45je/efXqVVl++9vfvnv37oBrDVKEhu7RtmB4cLTOEtfa2hFTPa1N
ZhEczDYRIQAinOi89NJLkgf/9E//VJa7du2SyC9+8QtpS1EoS2lL5Pvf/751DaQSqFRLEpfG3/3d
3+nv7ezsfPHFFyX+l3/5l3LzX/7lX1SBIv210kpVhIabPXr0aFpamjSOHTtmfwdsPS+LHRjMFp57
7jn1Ca0sf/KTnwzvcQcvQq2P4cFRzuvu7v7888+1/qJqWxWh4UM0NTWpivDv//7vbW0TEQIgwolO
dXW1VvFIMdT/hxOHinPnzklErCBtKbNOnTolDXW1veqQnJz86quvSsNkMklwypQp0i4qKpKy7I03
3tCqzJ/+9KfquhtBXcyibfaVV145e/asNNSVI1pebmhoED2rxzLcgW9961vSvn37tv7p2NoBO09B
W1f0oK61EWGoQzGYtb66CA0Pjvq8VB53zZo1FucI8/LyVGNAESYmJubm5kojNjbW1jYNDyMAIMIJ
RG9vr0qFrq6uWnDSpEnq80mpHvrvfdgoKVVd3unr63v9+vV+3XWJjz766OzZs8Ui/fe+ehgSEiIR
cdh3v/vd8PBwFTebzSIViX/7299+9tln1SWdUrTFx8fLo//FX/zF/PnzP/74Y4u0vmjRImkfP37c
cAcKCwtlD729vfVPx9YO2HkK+tVjYmIkEhYWpm4Ocq2vKELDg3P48GEpsuWFUJfAqP7yXObOnSuV
9O7duyUix83+Q0hB/9d//dfz5s2TutDWNg0PIwAgQoDRiLxp+PnPf97a2lpTUyMaEykO0scAgAgB
xgMlJSVPPPHE17/+dakFpYZTX/ZAhACIEAAAABECAAAgQgAAAEQIAACACAEAABAhAAAAIgQAAECE
AAAAiBAAAAARAgAAIEIAAABECAAAgAgBAAAQIQAAACJ8iNy8eXOBDot76+vrTSaTv79/fHx8TU3N
UIMAAIAIRztnz57duHGjrXszMzOLi4u7urry8vIyMjKGGgQAAEQ42snPz9+3b5+te6Ojo2/duiWN
pqammJiYoQYBAAARjnakHExISFi0aJEsxWEW9wYFBfX09EjDbDZLn6EGAQAAEY52lixZUlVV1dvb
e/HixbS0NIt7fXx8VKOvr09rDz4IAACIcMwgAgsICLAISm3X3d0tDVlKzTfU4ID8FgDgfjOY5FMW
9Y0B/xDhhKOnpyc4ONgiGB0d3dzcLI0bN25Ie6hBAIDRyfBEKNVCQUGBdlPa+vqhpKRk0qRJpaWl
WuTq1asmk8nZ2dnDwyM9Pf3u3bsqLt30m83Pz8/MzNTHpVFUVKTvo1/lN7/5zeTJkyXi6Oh48uRJ
wyfY0tLi6emJCAdFZGTk5cuXpRy8cOHC9u3bLe6ViLxC7e3tsty2bdtQgwAA40mE4h5vb2/lszt3
7sydO1fvp7i4uNjY2Pj4eC2yePHivXv3dnR0iJa2bt2qXaKvXysvLy81NVWSsIUIQ0NDP//8c2sR
igWfeOIJWf7vsygrc3V1fffddy328/r160FBQRa6RYQ2qampiYmJ8ff3X79+fWtrqwpqXyisra2N
ioqSe2VZV1c31CAAwDgT4dq1a48fPy7tY8eOrVmzRpON2NHd3b2pqcnNzU1KAhV0cnLSqsCenp5p
06ZZWC03N3fFihXqSkMLEb733nuJiYnWIpRaUFnw/z+RsrLs7GyL/Zw5c6YUlIjwK5GVlcVBAABE
aC3C/fv3qw+9tmzZkp+fr8mmvLxcfXPMZDJVVFSoYEJCwqZNmw4dOlRfX2+xHVm++uqrYWFhUi9a
2041pII8evSo4V32UaUkIvxK5OTkcBAAABFai7Curi4wMLD/3vnC2tpaTTZSHYojpVFYWJiUlKSC
LS0tIrPg4GAHBwcfHx/pr21HLCi1oCytBak1WltbZV31WZ2hCCf9AcPniAgBAOD+i7Cvr2/atGlS
4bm5ufX29irZdHZ2uri4aFpydXWViH7Ftra27OzshQsXattZu3atNKS4rKqqsiXC/ntnBDds2GC/
IkSEAAAwciKU5apVq1JTU00mkxaprKyMiIjQuoWHh0tEGu7u7to5wq6uLicnJ207ZrNZBWNiYrSL
Ygxtl5CQcO7cOVvnCNUVpIgQAABGToQ5OTmOjo67d+/WIsnJyWVlZVq3kpKSlJQUaaSlpe3cubO5
ubm9vT0rK0u500JRDQ0NUVFRyouGIhRNhoSEGF41qm8jQgAAGCERnj9/XhpSpWm1nbe3tzKZorOz
08vLSyJ37txZt26dh4eHs7PzypUrrSs/xZEjR9LT0/ttf/5pcQmo9j1Ci+oQEQIAwIMV4UQAEQIA
IEJECAAAMFFBhAAAgAgBAAAQIQAAACIEAABAhAAAAIgQAAAAEQIAwHgh+5GB/xAhAAAgQj0BAQEF
BQXaTWlLRLtZUlIyadKk0tJSLXL16lWTyeTs7Ozh4ZGenq79ALfFj5/l5+dnZmb2//FPrBUVFen7
GP7EmqOj48mTJ6338+zZs76+vg4ODoGBgZcvX0aEAABwf0Qo7vH29lY+u3Pnzty5c/V+iouLi42N
jY+P1yKLFy/eu3dvR0dHS0vL1q1bN27caG21vLy81NTUvr4+CxGGhoZqv03a/8cTM2k/tF1WVubq
6vruu+9a7KfsWGVlpTzurl27QkJCECEAANw3Ea5du/b48ePSPnbs2Jo1azQ/iR3d3d2bmprc3Nza
29tV0MnJSasCe3p6pk2bZmG13NzcFStWyF0WcWm89957iYmJ1iK0+KFtcWF2dratZyl7YmuSJkQI
AIAIhyPC/fv3b9u2TdpbtmzJz8/X/FReXh4TEyMNk8lUUVGhggkJCZs2bTp06FB9fb3FdmT56quv
hoWFSd1mbTvVkAry6NGjhncNkuvXr+s/vEWEAADwVUVYV1cXGBjYf+98YW1traYlqQ7FkdIoLCxM
SkpSwZaWFpFZcHCwg4ODj4+P9Ne2IxaUWlCW1oLUGq2trbKuLG2JcNIfsPUsd+/erakUEQIAwH0Q
YV9f37Rp06TCc3Nz6+3tVRLq7Ox0cXHRtOTq6ioR/YptbW3Z2dkLFy7UtrN27VppSHFZVVVlS4T9
984IbtiwwX5FaEuEH330kZStQz0wiBAAABHaE6EsV61alZqaqqabV5HKysqIiAitW3h4uESk4e7u
rp0j7OrqcnJy0rajJvKVYExMjPWEvXq3JSQknDt3ztY5QnUFqfWuNjU1paWlWfgYEcKY4bVT54bx
x3EDGBkR5uTkODo67t69W4skJyeXlZVp3UpKSlJSUqQhKtq5c2dzc3N7e3tWVpZyp4XnGhoaoqKi
lBcNRSiaDAkJMbxqVN/WI+JcuXKlds0OIgRECAD3U4Tnz5+XhshGq+28vb2VyRRSh3l5eUnkzp07
69at8/DwcHZ2FjNZV36KI0eOpKen99v+/LOoqMjwe4QW1aGGp6fnJB2IEBAhANwfEU4EECEgQgBE
iAgBJp4IZ637wTD+eKUAECEAIgQARAiACAEAEQIgQgBAhAAPWYQ/Kq4fxh8iBABECIgQEQIAIgRE
iAgBECGHABAhIoSJke8fGfgPEQIgQkQIiFBPQEBAQUGBdlPa+tn+SkpKJk2aVFpaqkWuXr1qMpmc
nZ09PDzS09O1H+C2+Nmz/Pz8zMzM/j/+ibWioiJ9H8OfWHN0dDx58iQiBESICAFGSITiHm9vb+Wz
O3fuzJ07V++nuLi42NjY+Ph4LbJ48eK9e/d2dHS0tLRs3bp148aN1lbLy8tLTU3t6+uzEGFoaKj2
26T9fzwxk/ZD22VlZa6uru+++y4iBESICAFGSIRr1649fvy4tI8dO7ZmzRrNT2JHd3f3pqYmNzc3
bdoHJycnrQrs6emZNm2ahdVyc3NXrFghd1nEpfHee+8lJiZai9Dih7bFhdnZ2YgQECEiBBghEe7f
v3/btm3S3rJlS35+vuan8vLymJgYaZhMpoqKChVMSEjYtGnToUOH6uvrLbYjy1dffTUsLEzqRWvb
qYZUkNr88nYm5r3PB4axAYgQEQIitCPCurq6wMDA/nvnC2trazUtSXUojpRGYWFhUlKSCra0tIjM
goODHRwcfHx8pL+2HbGg1IKytBak1mhtbZV1ZWlLhMObaAkRAiJEhADDF2FfX9+0adOkwnNzc+vt
7VUS6uzsdHFx0bTk6upqMTV8W1tbdnb2woULte2sXbtWGlJcVlVV2RJh/70zghs2bLBfESJCQISI
EGDkRCjLVatWpaamqunmVaSysjIiIkLrFh4eLhFpuLu7a+cIu7q6nJyctO2oiXwlGBMTYz1hr95t
CQkJ586ds3WOUF1BiggBESJCgJETYU5OjqOj4+7du7VIcnJyWVmZ1q2kpCQlJUUaaWlpO3fubG5u
bm9vz8rKUu608FxDQ0NUVJTyoqEIRZMhISGGV43q24gQECEiBBghEZ4/f14aUqVptZ23t7cymaKz
s9PLy0sid+7cWbdunYeHh7Oz88qVK60rP8WRI0fS09P7bX/+WVRUZPg9QovqEBECIkSEAA9WhBPi
wDA2ABEiQkCEiBAAESJCgIn6DoFDAIgQEQIgwolFQ0NDfHy8v7//j370o08++cTi3gU6fH19VfDm
zZv6uArW19ebTCbZjmytpqaGwYQIAQARjg1iY2PffPPNzs7Ow4cPr1mzxlY36ZOXl6faZ8+e1X46
ViMzM7O4uLirq0u6ZWRkMJgQIQAgwjGGuFA/n4ie27dvr1q1SiSnbubn5+/bt8+iT3R09K1bt6TR
1NSkfnAPECEAIMKxZMHXXnvtueeeM7z317/+9euvv67dlHIwISFh0aJFshTtqWBQUJD6AXWz2Sx3
MZgQIcC4RD/pYF1dnaenpzZ3hNDX1/fkk09++OGHk6xAhKOatra2sLAwPz8/wwkeOzo6li5dqv1K
kLBkyZKqqqre3t6LFy+mpaWpoI+PjzYOtDYgQoBxhsWkg5IeT5w4od17+vTp4ODg/gc/RwQifCAc
O3Zs2bJl1vHjx48///zzhquI87RPU6UK7O7uloYspToc5IP+FowYnghlxeGJUFYcngh5pWB08uDy
pPWkg1Ia6q+u+PGPf3zo0CFEOFYxm83+/v7W8RdffPGNN94wXKWnp0e99+m/d46wublZGjdu3JA2
bxupCAHGH9aTDkrmnD17trpCorW11dPTU80viAjHEsuXL7948aLUdufOnVO/EmvBM88809DQoI9E
RkZevnxZVrlw4cL27dtVUBr5+fnyFkmWatZKQIQA4wzDSQczMzPV9YMFBQXaNfOcIxxLXLp0acWK
FVILrl27VrvyRft2oPrMU30CoFFTUyPviWSV9evXqxkjhdra2qioKAnKsq6ujn8YRAgwzrA16eDv
f//7kJAQaQQHB1+5ckUTIRXh2CYrK4uDgAgRIYAeW5MOCk8//XR5ebn+XkQ45snJyeEgIEJECKDH
1qSDQkVFxdSpU9VZQ0QIgAgBxiF2Jh3sv3flYGBgoP4LhZwjBECEAEBFCIAIAQARAiBCAECEAIgQ
ABAhACIEAEQIgAgBABECIEIAQIQAiBAAECEAIgQARAiACAFG438ZIgRAhIgQEKEl1dXVy5Ytc3Z2
Tk9Pv3btmhY3/BE1Oz+0VlJSIjdLS0sNOzs5OS1ZskSby0JPS0uLp6cnIgT+RREhwEMQYW1t7fTp
0ysqKu7evdvQ0BAZGZmfn29fhLZ2IC4uLjY2Nj4+3rDz7du3d+zYERoaarHW9evXg4KCHugvlyJC
QISIEPgvsylCbWJeRWNjY2pq6jBEKB51d3dvampyc3PTJny16NzR0fH4449brDhz5syioiJECPyL
IkKAhyPCGTNmfP7554YbHJIIy8vLY2JipGEymbTJm/SdzWZzbm5uWFiYxYrq0REh8C+KCAEejggn
T56sn2tpMCI0PEeoVZaFhYVJSUnWnR0dHaOjoz/55JPBPxYiBESICAEeuAhnzZqlrwj7+vpu3bo1
1Iqws7PTxcVFc56rq6tEtM6yzaNHj/r5+bW1tdnaeUQI/IsiQoCHI8LVq1cfPHhQu1lVVTVv3ryh
irCysjIiIkK7GR4eLhGLzgUFBYmJiYgQ+BdFhACjS4TV1dXTp09/6623pIa7dOmS1G1irKGKMDk5
uaysTLtZUlKSkpJi3Xn58uVKkIgQ+BdFhACjRYSqngsICHBwcPD09NyzZ49eTtanA62DZrPZ29tb
ltqK4lQvLy+JWOitsbHR399ffWqKCIF/UUQIMFpEOO5BhIAIESHwX4YIARAhIgSYqCBCQISIEAAR
AiBCRAiACAEQISIEQIQjyuuvvz516lRp7Nmzx8XFxdfX98KFC7wkiBARAsBEEaFY8P333z9//vzC
hQu/+OKL0tLSgIAAXhJEiAgBYKKI0NXV9eOPP162bJn6JXLDCTgAESJCABi3IszNzXVxcVm5cmVv
b+/du3d37ty5ZMkSXhJEiAgBHgSD/NdAhCOEyWT63e9+p484OztHRkY2NjYyWBEhIgQYVSKsrq5e
tmyZZOn09PRr165p8SFNw9R/7ydG5WZpaalhZycnJ6mFrly5YrHBs2fP+vr6Ojg4BAYGXr58efyI
8MSJE4sWLUpLS7M13yMgQkQIMBpEWFtbO3369IqKirt37zY0NEjFkp+fb1+EtnYgLi4uNjY2Pj7e
sPPt27d37NgRGhpqsdbcuXMrKys7Ojp27doVEhIyfkQo9Pb2FhcXz5s3b+fOnXJ8GaOIEBECjEIR
ahPqKhobG1NTU4chQsnz7u7uTU1Nbm5u7e3thp3tXykia02ePHlciVA7NL/85S/nz59/4MABUSMj
FREiQoBRJcIZM2bY+uhuSCIsLy+PiYnpv3dqTF0gadHZbDbn5uaGhYXZ2v/r168/oG8WjIov1MtR
fvbZZwMDA0+cOMFgRYSIEGD0iFCKsJ6eniGJ0PAcoVZZFhYWJiUlWXd2dHSMjo7+5JNPbO3/7t27
jx49Ot5EaPGFejkQHh4eDFZEiAgBRo8IZ82apa8I+/r6bt26NdSKsLOzUyV5haurq5p0UHWWbYrh
/Pz82trabO38Rx99tGXLlgd0ZPhCPSBCRAiI0KYIV69effDgQe1mVVXVvHnzhirCysrKiIgI7WZ4
eLiaiV7fuaCgIDEx0XDPm5qa0tLSDCfsHfMi5Av1gAgBRrkIq6urp0+f/tZbb4mHLl26JHWbGGuo
IkxOTi4rK9NulpSUpKSkWHdevny5EqSec+fOrVy5Uru+ZryJkC/UAyIEGOUiVPVcQECAg4ODp6fn
nj179M6zPh1oHTSbzd7e3rLUVhSnenl5ScRChI2Njf7+/haVnzyo4bcSx4kI9fCFekSICAFGpwjH
PUzDBIgQEQIiRIQPiWvXrplMJqkFnZyc5Kb+E2RAhIgQAMa/CH/4wx/u3Lmzvb1dfewbEBBQUlLC
S4IIESEATBQRTp48uaOjo/8PFw6dP39+/vz5vCSIEBECwEQRoZ+f3+nTpzURihQdHR15SRAhIgSA
iSLC48ePz5w588CBAyLCzs7OXbt2LV26lJcEESJCAJgoIuy/93FoXFych4eHs7OzyWSy8ytzgAgR
IQCMNxE+oK9GDsgHH3zwzDPP+Pn5xcbGNjQ0WNx78+bNBTpUsL6+Xjzt7+8fHx9fU1NjJwiIEAAQ
4cBkZmZOnTpVROjl5bVhw4aKioqWlpaOjo7AwMARePTw8PAzZ850dnYWFBSsXr3a4t6zZ89u3LjR
eoeLi4u7urry8vIyMjLsBAERAoxOGOGjtCJsbGw8ePBgcnLynDlzRI0+Pj4juQPiQqnnLIL5+fn7
9u2zCEZHR6sfXG9qalJTatkKAiIEGGcirK6uXrZsmbOzc3p6+rVr1/Q53DCxG07D1H/vJ0blZmlp
qWFnJyenJUuWXLlyxXqb+hXr6uo8PT31M0P19fU9+eSTH374oZ2HHr0iNJlM8pS0mzdu3Bjhqerl
EVetWmURlHIwISFh0aJFshTDqWBQUJA67mazWe6yEwRECDCeRFhbWzt9+vSKigrJzw0NDZGRkVIt
2BehrR2Ii4uLjY2Nj4837Hz79u0dO3aEhoYOuOLSpUv1k9eePn06ODi4/yucbnuYInz77bcDAgI2
b97c0tLyUHZg//79p06dsgjKW5Kqqqre3t6LFy+mpaWpoFaqylsPrW0YHJDfghHDE6GsODwRyorD
EyGvFIxOHpwItQl1FY2NjampqcMQoXjU3d1dqgs3NzdtKgmLzoZzEFmvKKWh7JXW4cc//vGhQ4fG
qggFqajkzcX8+fNzc3O7u7tH8qHlrc3LL79sp4PoTZsfUQo+tXuylELQThCoCAHGU0U4Y8YM/cS8
AzrPlo3Ky8vVKSSTyaSm3rPobDabRQRhYWEDrig9Z8+erc5Mtba2enp66n+bZeyJUKuIMzIyFi5c
eOzYsZF5xObmZqnBu7q67Etaldv9904Hyirq01Rp2wkCIgQYTyKcPHmy/oTcYERoeKJOqywLCwuT
kpKsOzs6Okoitf4SneGKmZmZ6mKOgoIC7VrFMXmOUM/hw4effPJJJycncb545YE+1oULFzZu3Ghr
suPIyMjLly9LOSjdtm/froLSkMpVqnJZbtu2zU4QECHAeBLhrFmz9BWh5EZVig2pIpR86+LiovnJ
1dVVZWDVWbZ59OhRPz+/tra2Qa74+9//PiQkRBpSrmjX14zJinDevHmbN28+ceLEtWvXZClvBORw
iBEXL178QB936dKl1t8U1Bo1NTVShvv7+69fv16KbhWsra2NioqSoCy1C3wMg4AIAcaTCFevXn3w
4EHtZlVVlaTuoYqwsrIyIiJCuxkeHq5motd3ltouMTFxkCsKTz/9dHl5uf7esf3RqJ7u7u4nnnhi
5B83KyuL/xNEiAgBEVpQXV09ffr0t956S0qxS5cuSd0mxhqqCJOTk/UT7ZWUlKSkpFh3Xr58ueY5
+ysKFRUVU6dO1U43jj0RlpaWenp6ivDWrFkjdZUcWSl+n3322RH++oSenJwc/k8QISIERGhYzwUE
BDg4OEje3rNnj1481ufkrINms9nb21uW2oriVC8vL4lYqKuxsdHf3187b2Vnxf57l3EEBgbqz1+O
sXOEU6ZMOXHihGjvpZdecnJyOnLkiDyxF154QVzIYEWEiBBgVIlw3PNwRCii7uvrk8adO3fU+wVp
f/bZZ66urgzW+0hZ1DeG8YcISROACBHhSIjQui1qfFg/w40IESEiBJiwPBwROjg4LF++/L/+67/O
nDljKEUYqyJ85JHh/CFCAJhoImxvbxcFZmVlRUVFTZkyJTg4OCMjo7y8HBEiQkQIABNChHp6e3tr
a2tfe+21pKSkOXPm8JKMChFmPzKcP0QIAIhwkHh6esoyNzf3/Pnz+ktjAREiQgCYECL87LPPZPn8
88+HhIRMmTIlLCxs69atFRUVKg6IEBECwDgXoZ6urq6qqqqcnJzExERVKQIiRIQAMM5FuHv3bg49
IkSEADBxRZiampqXl2cdP3nyJC8JIkSEADD+RdjT0xMTE3PgwAEtUltbu/wevCSIEBECwPgXoXD3
7t3Q0NDS0tJPP/00JSUlKCjonXfe4fVAhIgQACaKCIUvv/zSz89v/vz5hw8f7u3t5cVAhIgQACaK
CBcvXrx58+YjR45IFRgWFvagp6RHhIgQEQLA6BLhhx9+uG/fvtTUVF9fXwcHBykKd+zY8eabbzY3
N/OSIEJECADjX4R62traTp8+/atf/So2NpbvESJCRAgAE06EgAgRIQAgQkCEiBAAECEgQkQIAIgQ
ECEiBABECIgQEQIAIgREiAgBABECIkSEAIAIAREiQgBAhIAIESEAIEJAhIgQABAhIEJECACIEBAh
IgQARAiIEBECACIERIgIAQARAiJEhACACAERIkIAQISACBEhACBCQISIEAAQISBCRAgAiBARIkJE
CACIEBEiQkQIAIgQESJCRAgAiBARIkJECACIEBEiQkQIAIgQESJCRAgAiBARIkJECIAIAREiQkQI
gAgBESJCRAiACAERIkJECIAIJwatra1Lly41vOuDDz545pln/Pz8YmNjGxoaVPDmzZsLdKhgfX29
yWTy9/ePj4+vqalBhIgQABDh2ODGjRuiLs1nFoSHh585c6azs7OgoGD16tUqePbs2Y0bN1r0zMzM
LC4u7urqysvLy8jIQISIEAAQ4dhgyZIl5eXltkSoIS6Uak+18/Pz9+3bZ9EhOjr61q1b0mhqaoqJ
iUGEiBBGgGEPFQBE+H988cUXshxQhFI4rlq1SrWlHExISFi0aJEsRXsqGBQU1NPTIw2z2Sx3IUJE
CIgQEOFYYkAR7t+//9SpU1oRWVVV1dvbe/HixbS0NBX08fFRjb6+Pq09IL8dQYYnQllxeCL83xWH
JUJZcXjZTVYcnghlxeGJ8LfwsBn2UBk2Y2KoIDNEeP9F2NDQ8PLLL1vHxXkBAQGqLVVgd3e3NGQp
1SEVIRUhjOaKkKECiHAIImxubt6xY0dXV5f1XT09PcHBwaodHR0tPdWHqNJGhIgQECFDBRGOBxFe
uHBh48aNnZ2d+mBkZOTly5elHJR7t2/froLSyM/Pb29vl+W2bdsQISIERMhQQYRjWITazaVLl1p/
ZbCmpiYmJsbf33/9+vWtra0qWFtbGxUVJUFZ1tXVIUJECIiQoYIIxzBZWVnj70khQrIbImSoACIc
LDk5OYgQEZLdECFDBRECIkSEZDdEyFBBhIAIESHZDREyVBAhIEJESHZDhAwVRAiIEBGS3RAhQwUR
AiJEhGQ3RMhQQYSACBHhOM5uDBWGCiIEshvZDREyVBgqiBDIbmQ3RMhQYaggQiC7kd0QIUOFoYII
gexGdkOEDBWGCiIEshvZDREyVBgqiBDIbmQ3RMhQYaggQiC7kd0QIUOFoYIIgexGdkOEDBVEiAiB
7EZ2Y6gwVBAhIgSyG9mNocJQQYSIEMhuZDeGCkMFESJCILuR3RgqDBVEiAiB7EZ2Y6gwVBAhIgSy
G9mNocJQQYSIEMhuZDeGCkMFESJCILuR3RgqDBVEiAiB7EZ2Y6gwVAARAtmN7MZQYagAIgSyG9mN
ocJQAUQIZDeyG0OFoQKIEMhuZDeGCkMFECGQ3chuDBWGCiBCILuR3RgqDBVAhEB2I7sxVBgqgAiB
7EZ2Y6gwVAARAtmN7MZQYagAIgSyG9mNocJQAUQIZDeyG0OFoQKIEMhuZDeGCkMFECGQ3chuDBWG
CiBCILuR3RgqDBVAhEB2I7sxVBgqgAiB7EZ2Y6gwVAARAtmN7MZQYagAIgSyG9mNocJQAUQIZDey
G0OFoQKIEMhuZDeGCkMFECGQ3chuDBWGCiBCILuR3RgqDBVAhEB2I7sxVBgqgAhHlvr6epPJ5O/v
Hx8fX1NTQ3YjuyFChgoiRIQTi8zMzOLi4q6urry8vIyMDLIb2Q0RMlQQISKcWERHR9+6dUsaTU1N
MTExZDeyGyJkqCBCRDixCAoK6unpkYbZbF60aBHZjeyGCBkqiBARTix8fHxUo6+vT2uT3chuiJCh
gggR4URBqsDu7m5pyFKqw0GuNRUA4H5DQkaED+0cYXNzszRu3LghbQ4IAAAinFhs3749Pz+/vb1d
ltu2beOAAAAgwolFbW1tVFSUv7+/LOvq6jggAACIEAAAABECAAAgQgAAAEQIMJYwm80chHFz2Hk1
ARFCf3V19bJly5ydndPT069du3a/Njtp0iStoeHg4GB/rbq6uqeeemry5MmhoaFXr15VwZ6enp/+
9KcuLi5z585999137axup6fc1HbJcD8Hj6+vL8PgQaMfPw/0sA9+swMOlZEfvYAI4T5QW1s7ffr0
ioqKu3fvNjQ0REZG5ufnP6DHev311//zP//Tfp+QkJCzZ89KRjh58uSSJUtUUHbpF7/4RUdHR2Vl
5bx58+ysbqenZPn7JcLxl5JGchgM+yA/oMM++M0O2HPkRy8gQrgPrFmzZv/+/drNxsbG1NRU1W5u
bg4PD3/88ceXL1/e0tKi5YJdu3b5+flJ+9atWyaTydHRMSoq6vbt2/azhmwhICCgs7NTH4yOjj51
6pQ03n777ZUrV0pD3k2r32Xt7u6Wh1bdfvjDH0qmHszTsdVT3lDLc7Evwv/5n/+Rt/PyoLNmzTp4
8KB2b1lZ2b/927/JltWvImjVrZ1DZLHKuBwGhYWF06ZNmzp16htvvPHOO+94enrKa/eb3/xmkB0M
N/vll19GRERMmTKluLjYoiLUDvuCBQtk9yQiwrb4wcIBB6d0yM7OnjNnjrYn+lfTcBXDXRo9oxcQ
IdwHZsyY8fnnnxvelZycXFRUJP/SBQUFP/nJT7RUcuDAAakbpJ2env7RRx9Jh//+7//etGmTfRFu
27bNusioq6sLDAwUO4ojJa9JZOnSpfJv39vbe+7cOe09tbu7+8svvyxqWbhwofaJkyG2esobatmg
fRH6+vqKwLq6ug4fPizb0e5dv369vEkXT6xbt85iFVuHyHqV8TcMnnvuuTt37kgRKYd69+7dMiRE
LWKCQXYw3KwcNxldMh5kaFl/NKoaL7zwQl5enjRkuXXrVouX0v7glA4/+9nPrHdVNQxXMdyl0TN6
ARHCfUB7D2uNvJ2XRCaN1tZWaWtZQ00pJcycOVOtK//58n7fjggl9UiHtrY260fZvHmzpIwtW7ao
mxcuXJC35LKuvKGWtgo6ODi8+OKLoqg333xT3rPbeTqGPSU3SSqx9dGWdVCelD75qhNmsvPyfC1W
sXWIrFcZf8Pg5s2b2rFSHSykZb+D4WalFlfBTz/91JYIq6qqpIiUhry+qiDTv5T2B6d00Be1Fg3D
VQx3afSMXkCEcB+Q/3N9KdDX16elEu3CFskLjz32mLU2pIOdq2D0PaXSWr16teEOyFtp6fnJJ5+o
m0899dT7778v+UhyXFhYmAo6OTlJuuy/d4Gfs7Oznadj2FPyiLr0wL4IJXHv3LkzNjbW29tbnyXl
6auDYF1D2DpE1quMv2EgfaxfaP1xs9/BcLMSVGtZvBfRN6T/7Nmzm5ubp06danHB54CD09au2lnF
cJdGz+gFRAj3AfGTdj5Mvd3WztLL+/T29nbrUkBfK6hZNQzR90xNTT106JBhN/WeOiMjQ8sFKu/o
z7IsWLBAlRednZ1ubm52no5hz0l/jK39DAoKeumll44fP15XV6fPkuo8n4hhzpw51mWN4SGyXmUc
DwP7drHVNtys1GHKBDdu3LAlQvVx5caNG1etWmVnyBkOTvu7ariK4S6NntELiBDuA9XV1dOnT3/r
rbfkf+/SpUt+fn4FBQXqrpSUFKnk5O1tUVGRdumE/l9x3bp1sop0OHDgQGhoqJ2k4+vr+9FHH1k/
uihH9NPV1RUQEHDlyhWJSFr54IMPZJvvvffef/zHf6humZmZ2dnZEjx69GhSUpKdp2O/p/2K0MXF
5cMPP5Ss99xzz+mz5JYtW2QPX3vttZ/97GdalfDll1/aOUTWq4zjYTA8ERpuVo58YWGhHDo5boYV
mzrsb775ppTa0tPO62s4OG3VpmqzhqsY7tLoGb2ACOH+UFlZKf/Jkg7kze+ePXu0uLw5XbZsmaOj
o8lksj6z0n/vQtCoqChJSQsXLrx8+bKd/9snnnhCXcJggXbd3cmTJ2NiYqQh25EMIjsjS22bsm5c
XJzsiaSnpqYmO8/Ffk/7IiwvL5e35FOnTt27d68+C7/yyiuurq5Sf2gnuqQtD2HnEFmvMo6HwfBE
aLhZeRciN6UyE/dYb0o77Ldv39ZOxNp6fQ0Hp+GeaJs1XMVwl0bP6AVECPDA4VuGo5AzZ84MfoJr
AEQI49ZP1iDCCYJU22+88QajFxAhAAAAIgQAAECEAAAAiBAAAAARAsDohsn/ABECwASipKRk0qRJ
paWlWkSb/O9+TYmlwWR+gAgBYNQRFxcXGxsbHx9vrbr7LkIm8wNECACji7t377q7uzc1Nbm5uamf
FdV/Z05Vih4eHhazGKqGrUkQLWYT1DOMyfzUZEwODg6LFi3SikhbExmqmQ5FsWqCJFkuWLBgwP4M
A0QIABOX8vJy9cNj4omKigrrinD79u0iSMOpAW1Ngmg9m6DGMCbzUz9Y2tPTIxv08vJSQVsTGaqZ
Dp9//nn1K6yyYmZm5oD9GQaIEAAmLtqs9+IM7Sek9SLUZnoynAjCcBJEwx87VQxjMr/IyMi4uLjT
p093dHRoQVsTGaq9feedd9SsF/Hx8e+///6A/QERAsAEpbOz08XFRfss1NXVVSL9A/0q94ATPVqv
ojGMyfy++OKL8PBwR0dH2b2amhrtoe1MZCgbF9uJbufPn69mnRxw4kNAhAAwEamsrIyIiNBuim8k
MngRDmkSRMWwJ/OT/gcOHJDCTnto+xMZxsbGvvTSS9oHtgP2B0QIABOR5OTksrIy7WZJSUlKSkq/
bvI/+yIc0iSIimFM5ufr66seRX/SccCJDIuLi+WmdrXOgP0BEQLAhMNsNnt7e+u/Oy9Vl5eXl0S0
yf/si3BIkyAqhjGZX3V1tY+Pz2OPPaa/DHXAiQxl487OztqFMAP2B0QIAACACAEAABAhAAAAIgQA
AECEAAAAiBAAAAARAgAAIEIAAABECAAAgAgBAAAQIQAAACIEAABAhAAAAIgQAAAAEQIAACBCAAAA
RAgAAIAIAQAAECEAAAAiBAAAQIQAAACIEAAAABECAAAgQgAAAEQIAACACAEAABAhAAAAIgQAAECE
AAAAiBAAAGB4/D/xnyobsfjR4gAAAABJRU5ErkJggg==
--0016e68ac762f9edc6049b18aa4a--

From ekr@rtfm.com  Sun Jan 30 16:13:32 2011
Return-Path: <ekr@rtfm.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 2F25B3A6B5A for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 16:13:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.7
X-Spam-Level: 
X-Spam-Status: No, score=-102.7 tagged_above=-999 required=5 tests=[AWL=0.277,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 eAeb8ZJf8TFy for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 16:13:31 -0800 (PST)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by core3.amsl.com (Postfix) with ESMTP id 5D7243A6B59 for <hybi@ietf.org>; Sun, 30 Jan 2011 16:13:31 -0800 (PST)
Received: by ywk9 with SMTP id 9so2041393ywk.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 16:16:44 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.104.18 with SMTP id b18mr8051450agc.81.1296433003923; Sun, 30 Jan 2011 16:16:43 -0800 (PST)
Received: by 10.90.116.7 with HTTP; Sun, 30 Jan 2011 16:16:43 -0800 (PST)
In-Reply-To: <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com>
Date: Sun, 30 Jan 2011 16:16:43 -0800
Message-ID: <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 00:13:32 -0000

On Sun, Jan 30, 2011 at 3:29 PM, Greg Wilkins <gregw@webtide.com> wrote:
> On 31 January 2011 03:47, Eric Rescorla <ekr@rtfm.com> wrote:
>> I don't really see the problem of attaching a stream-id.
>
> Because we designed framing with extensions so that they could be used
> for things like MUX.

I'm not sure what "me" you're talking about. That certainly was never
my intention
and I think it's quite a bad idea.

-Ekr

From gregw@intalio.com  Sun Jan 30 16:37:56 2011
Return-Path: <gregw@intalio.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 3BDA03A6B58 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 16:37:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.927
X-Spam-Level: 
X-Spam-Status: No, score=-2.927 tagged_above=-999 required=5 tests=[AWL=0.050,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 xX+606Hwg-wb for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 16:37:55 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 5098F3A68EA for <hybi@ietf.org>; Sun, 30 Jan 2011 16:37:55 -0800 (PST)
Received: by qwi2 with SMTP id 2so5226182qwi.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 16:41:08 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.36.208 with SMTP id u16mr5712108qad.299.1296434467839; Sun, 30 Jan 2011 16:41:07 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Sun, 30 Jan 2011 16:41:07 -0800 (PST)
In-Reply-To: <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com>
Date: Mon, 31 Jan 2011 11:41:07 +1100
X-Google-Sender-Auth: ymBZ2fJeajl6IRKsrA89AFCXIHs
Message-ID: <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 00:37:56 -0000

On 31 January 2011 11:16, Eric Rescorla <ekr@rtfm.com> wrote:
> On Sun, Jan 30, 2011 at 3:29 PM, Greg Wilkins <gregw@webtide.com> wrote:
>> On 31 January 2011 03:47, Eric Rescorla <ekr@rtfm.com> wrote:
>>> I don't really see the problem of attaching a stream-id.
>>
>> Because we designed framing with extensions so that they could be used
>> for things like MUX.
>
> I'm not sure what "me" you're talking about. That certainly was never
> my intention
> and I think it's quite a bad idea.


Eric,

are you saying that you don't think mux is a good idea, or that mux as
an extension is not a good idea?

Eitherway, I invite you to review the list archives, where you will
see that MUX was definitely used as an exemplar  throughout the entire
framing/extension discussions:

http://www.google.com/search?client=ubuntu&channel=fs&q=ietf+hybi+archive+frame+multi+extension+&ie=utf-8&oe=utf-8#sclient=psy&hl=en&q=multiplex+extension+site:www.ietf.org%2Fmail-archive%2Fweb%2Fhybi%2F&aq=f&aqi=&aql=&oq=&pbx=1&fp=8bc3ae5f5881b3d2

If the frame extension data is not to be used for things like masking
keys and MUX stream IDs, then can you give me an example of what you
think the frame extension data could be used for?

regards

From ekr@rtfm.com  Sun Jan 30 16:48:45 2011
Return-Path: <ekr@rtfm.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 F41A63A6B5A for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 16:48:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.702
X-Spam-Level: 
X-Spam-Status: No, score=-102.702 tagged_above=-999 required=5 tests=[AWL=0.275, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 4r-KfbHdW7Hr for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 16:48:44 -0800 (PST)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by core3.amsl.com (Postfix) with ESMTP id EE3673A6B59 for <hybi@ietf.org>; Sun, 30 Jan 2011 16:48:43 -0800 (PST)
Received: by gyd12 with SMTP id 12so2050196gyd.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 16:51:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.91.20 with SMTP id o20mr8340237agb.27.1296435116604; Sun, 30 Jan 2011 16:51:56 -0800 (PST)
Received: by 10.90.116.7 with HTTP; Sun, 30 Jan 2011 16:51:56 -0800 (PST)
In-Reply-To: <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com> <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com>
Date: Sun, 30 Jan 2011 16:51:56 -0800
Message-ID: <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 00:48:45 -0000

On Sun, Jan 30, 2011 at 4:41 PM, Greg Wilkins <gregw@webtide.com> wrote:
> On 31 January 2011 11:16, Eric Rescorla <ekr@rtfm.com> wrote:
>> On Sun, Jan 30, 2011 at 3:29 PM, Greg Wilkins <gregw@webtide.com> wrote:
>>> On 31 January 2011 03:47, Eric Rescorla <ekr@rtfm.com> wrote:
>>>> I don't really see the problem of attaching a stream-id.
>>>
>>> Because we designed framing with extensions so that they could be used
>>> for things like MUX.
>>
>> I'm not sure what "me" you're talking about. That certainly was never
>> my intention
>> and I think it's quite a bad idea.
>
>
> Eric,
>
> are you saying that you don't think mux is a good idea, or that mux as
> an extension is not a good idea?


I think mux as an extension is a bad idea: it intermixes data supplied by t=
he
client with data supplied by the proxy.


> Eitherway, I invite you to review the list archives, where you will
> see that MUX was definitely used as an exemplar =A0throughout the entire
> framing/extension discussions:
>
> http://www.google.com/search?client=3Dubuntu&channel=3Dfs&q=3Dietf+hybi+a=
rchive+frame+multi+extension+&ie=3Dutf-8&oe=3Dutf-8#sclient=3Dpsy&hl=3Den&q=
=3Dmultiplex+extension+site:www.ietf.org%2Fmail-archive%2Fweb%2Fhybi%2F&aq=
=3Df&aqi=3D&aql=3D&oq=3D&pbx=3D1&fp=3D8bc3ae5f5881b3d2


Yes, I'm sure many people had it in mind. But it's not something I
agree with, and
since there wasn't ever a consensus call on this approachI don't
consider it a trumping
argument when we're discussing masking.


> If the frame extension data is not to be used for things like masking
> keys and MUX stream IDs, then can you give me an example of what you
> think the frame extension data could be used for?

My experience is that extension fields are an escape hatch that is
sometimes useful
in the field after the protocol is deployed. Such escape hatches often
don't come with
particular rationales. I wouldn't cry if it were removed, however.

-Ekr

From jat@google.com  Sun Jan 30 17:57:16 2011
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 10DDF3A6A79 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 17:57:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.306
X-Spam-Level: 
X-Spam-Status: No, score=-105.306 tagged_above=-999 required=5 tests=[AWL=0.670, 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 vqAXEUISBfk9 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 17:57:14 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 7212D3A6B03 for <hybi@ietf.org>; Sun, 30 Jan 2011 17:57:14 -0800 (PST)
Received: from hpaq3.eem.corp.google.com (hpaq3.eem.corp.google.com [172.25.149.3]) by smtp-out.google.com with ESMTP id p0V20Qrt030993 for <hybi@ietf.org>; Sun, 30 Jan 2011 18:00:27 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1296439227; bh=i7bC5yjlo8pZIgBEqEZZn3kwrBo=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=pMtYQ9XasBDlgdraDLH4AK7p+LI2mDymw7tvWdY7yZ83EulrDV6nY4/XJuZFuaoOo xWd2XVX/Y70YfA3cju2SQ==
Received: from ywf9 (ywf9.prod.google.com [10.192.6.9]) by hpaq3.eem.corp.google.com with ESMTP id p0V20OVl021801 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Sun, 30 Jan 2011 18:00:25 -0800
Received: by ywf9 with SMTP id 9so4516362ywf.25 for <hybi@ietf.org>; Sun, 30 Jan 2011 18:00:24 -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=AZUr8NHCNhZmdgQ4kHX+2wY5dmflax/7YmqzqG3KHEE=; b=ZeV9AFpJlHaPXteAFEFQRKQT0wj7kMaE5oGkVTjmHv7+To+R9YiFJHUah78993cyNO w/ARsUQQc+iiJI0PuRbA==
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=fiNwcllH9w5S6jAIpdmdCptb7EyztOvdNdT2kU9Gpf86oB5fJ1hTSX6ShFk6uUEVaT /xe6PHmlyjHuiQn/hhaQ==
Received: by 10.151.40.16 with SMTP id s16mr7412185ybj.35.1296439223873; Sun, 30 Jan 2011 18:00:23 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Sun, 30 Jan 2011 17:58:47 -0800 (PST)
In-Reply-To: <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com> <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com> <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Sun, 30 Jan 2011 20:58:47 -0500
Message-ID: <AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Content-Type: multipart/alternative; boundary=00151750edbc697062049b1ac76e
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 01:57:16 -0000

--00151750edbc697062049b1ac76e
Content-Type: text/plain; charset=UTF-8

On Sun, Jan 30, 2011 at 7:51 PM, Eric Rescorla <ekr@rtfm.com> wrote:

> I think mux as an extension is a bad idea: it intermixes data supplied by
> the
> client with data supplied by the proxy.


What data from the proxy is it intermixing?  How is this different than HTTP
going through a proxy and the proxy adding its own content to the proxied
content?  Are you suggesting that HTTP proxies should not be speaking HTTP
extended with additional headers, but should have instead invented a new
protocol for talking to servers?

One of the primary use-cases I see for a MUX extension to WebSockets is to
aggregate connections from one browser to one server (or a cluster of
servers pretending to be one).  For example, if WebSockets is successful,
you will wind up with different modules on a page contacting their own
backends over WebSockets, and having multiple tabs open you could easily
wind up with a large number of persistent connections.  This could easily
cause developers to not switch Comet-style uses to WebSockets because of the
increased server load that would be caused - I know this is definitely a
deployment concern within Google.

So, I think browsers will need to implement a MUX extension in order to
aggregate connections to to the same server to reduce the number of
persistent connections to a manageable level.  In this case, the "proxy" is
the same as the client.

Yes, I'm sure many people had it in mind. But it's not something I
> agree with, and
> since there wasn't ever a consensus call on this approachI don't
> consider it a trumping
> argument when we're discussing masking.


Part of the way we got past the endless discussions on framing was to show
that all the ideas people had about what sort of things they might want to
do with WebSockets was to show that the extension mechanism allowed that to
be added later in an extension without impacting implementations of the base
protocol.

To now discard those things during the discussion of masking is to discard
the hard-won consensus on framing as well.

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

--00151750edbc697062049b1ac76e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sun, Jan 30, 2011 at 7:51 PM, Eric Rescorla <=
span dir=3D"ltr">&lt;<a href=3D"mailto:ekr@rtfm.com">ekr@rtfm.com</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">I think mux as an extension is a bad idea: it intermixes =
data supplied by the</div>
client with data supplied by the proxy.</blockquote><div><br></div><div>Wha=
t data from the proxy is it intermixing? =C2=A0How is this different than H=
TTP going through a proxy and the proxy adding its own content to the proxi=
ed content? =C2=A0Are you suggesting that HTTP proxies should not be speaki=
ng HTTP extended with additional headers, but should have instead invented =
a new protocol for talking to servers?</div>

<div><br></div><div>One of the primary use-cases I see for a MUX extension =
to WebSockets is to aggregate connections from one browser to one server (o=
r a cluster of servers pretending to be one). =C2=A0For example, if WebSock=
ets is successful, you will wind up with different modules on a page contac=
ting their own backends over WebSockets, and having multiple tabs open you =
could easily wind up with a large number of persistent connections. =C2=A0T=
his could easily cause developers to not switch Comet-style uses to WebSock=
ets because of the increased server load that would be caused - I know this=
 is definitely a deployment concern within Google.</div>

<div><br></div><div>So, I think browsers will need to implement a MUX exten=
sion in order to aggregate connections to to the same server to reduce the =
number of persistent connections to a manageable level. =C2=A0In this case,=
 the &quot;proxy&quot; is the same as the client.</div>

<div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex;">Yes, I&#39;m sure many peopl=
e had it in mind. But it&#39;s not something I<br>
agree with, and<br>
since there wasn&#39;t ever a consensus call on this approachI don&#39;t<br=
>
consider it a trumping<br>
argument when we&#39;re discussing masking.</blockquote><div><br></div><div=
>Part of the way we got past the endless discussions on framing was to show=
 that all the ideas people had about what sort of things they might want to=
 do with WebSockets was to show that the extension mechanism allowed that t=
o be added later in an extension without impacting implementations of the b=
ase protocol.</div>

<div><br></div><div>To now discard those things during the discussion of ma=
sking is to discard the hard-won consensus on framing as well.</div></div><=
br>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br>

--00151750edbc697062049b1ac76e--

From mjs@apple.com  Sun Jan 30 19:47:01 2011
Return-Path: <mjs@apple.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 8A1853A6B83 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 19:47:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.552
X-Spam-Level: 
X-Spam-Status: No, score=-106.552 tagged_above=-999 required=5 tests=[AWL=0.046, BAYES_00=-2.599, 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 WDxFhEthDE3J for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 19:47:00 -0800 (PST)
Received: from mail-out4.apple.com (mail-out.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 68EA53A6B7E for <hybi@ietf.org>; Sun, 30 Jan 2011 19:47:00 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out4.apple.com (Postfix) with ESMTP id CB61ACF16A22 for <hybi@ietf.org>; Sun, 30 Jan 2011 19:50:13 -0800 (PST)
X-AuditID: 11807130-b7c9cae000004f84-88-4d46317528d6
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay11.apple.com (Apple SCV relay) with SMTP id 28.01.20356.571364D4; Sun, 30 Jan 2011 19:50:13 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_e9SUedSfG8KLKuaOwAumjA)"
Received: from [17.153.105.47] by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LFV006U0BZOUS00@et.apple.com> for hybi@ietf.org; Sun, 30 Jan 2011 19:50:13 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com>
Date: Sun, 30 Jan 2011 19:50:11 -0800
Message-id: <E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com> <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com> <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com> <AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com>
To: John Tamplin <jat@google.com>
X-Mailer: Apple Mail (2.1191.1)
X-Brightmail-Tracker: AAAAAA==
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 03:47:01 -0000

--Boundary_(ID_e9SUedSfG8KLKuaOwAumjA)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT


On Jan 30, 2011, at 5:58 PM, John Tamplin wrote:

> On Sun, Jan 30, 2011 at 7:51 PM, Eric Rescorla <ekr@rtfm.com> wrote:
> I think mux as an extension is a bad idea: it intermixes data supplied by the
> client with data supplied by the proxy.
> 
> What data from the proxy is it intermixing?  How is this different than HTTP going through a proxy and the proxy adding its own content to the proxied content?  Are you suggesting that HTTP proxies should not be speaking HTTP extended with additional headers, but should have instead invented a new protocol for talking to servers?
> 
> One of the primary use-cases I see for a MUX extension to WebSockets is to aggregate connections from one browser to one server (or a cluster of servers pretending to be one).  For example, if WebSockets is successful, you will wind up with different modules on a page contacting their own backends over WebSockets, and having multiple tabs open you could easily wind up with a large number of persistent connections.  This could easily cause developers to not switch Comet-style uses to WebSockets because of the increased server load that would be caused - I know this is definitely a deployment concern within Google.

For muxing at the client, these masking issues don't matter. The browser will not do anything different.

It's specifically the hypothetical case of muxing proxies, which take connections from multiple clients and combine them before farming out to endpoint servers, that introduce complications. It's not really clear to me if the same muxing scheme is necessary appropriate for multiplexing at the client and multiplexing at a proxy.

For a muxing proxy, you can either unmask and redo masking (necessary anyway in the protocol as currently spec'd) or introduce session IDs before the frame. Passing through pre-existing infrastructure is not a concern in this case, since the proxy is talking to a server inside the same data center in this scenario.

Regards,
Maciej


--Boundary_(ID_e9SUedSfG8KLKuaOwAumjA)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: quoted-printable

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><br><div><div>On Jan 30, 2011, at 5:58 PM, John Tamplin =
wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div class=3D"gmail_quote">On Sun, Jan 30, 2011 at 7:51 =
PM, Eric Rescorla <span dir=3D"ltr">&lt;<a =
href=3D"mailto:ekr@rtfm.com">ekr@rtfm.com</a>&gt;</span> =
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">I think mux as an extension is a bad idea: it =
intermixes data supplied by the</div>
client with data supplied by the =
proxy.</blockquote><div><br></div><div>What data from the proxy is it =
intermixing? &nbsp;How is this different than HTTP going through a proxy =
and the proxy adding its own content to the proxied content? &nbsp;Are =
you suggesting that HTTP proxies should not be speaking HTTP extended =
with additional headers, but should have instead invented a new protocol =
for talking to servers?</div>

<div><br></div><div>One of the primary use-cases I see for a MUX =
extension to WebSockets is to aggregate connections from one browser to =
one server (or a cluster of servers pretending to be one). &nbsp;For =
example, if WebSockets is successful, you will wind up with different =
modules on a page contacting their own backends over WebSockets, and =
having multiple tabs open you could easily wind up with a large number =
of persistent connections. &nbsp;This could easily cause developers to =
not switch Comet-style uses to WebSockets because of the increased =
server load that would be caused - I know this is definitely a =
deployment concern within =
Google.</div></div></blockquote><div><br></div><div>For muxing at the =
client, these masking issues don't matter. The browser will not do =
anything different.</div><div><br></div><div>It's specifically the =
hypothetical case of muxing proxies, which take connections from =
multiple clients and combine them before farming out to endpoint =
servers, that introduce complications. It's not really clear to me if =
the same muxing scheme is necessary appropriate for multiplexing at the =
client and multiplexing at a proxy.</div></div><div><br></div><div>For a =
muxing proxy, you can either unmask and redo masking (necessary anyway =
in the protocol as currently spec'd) or introduce session IDs before the =
frame. Passing through pre-existing infrastructure is not a concern in =
this case, since the proxy is talking to a server inside the same data =
center in this =
scenario.</div><br><div>Regards,</div><div>Maciej</div><div><br></div></bo=
dy></html>=

--Boundary_(ID_e9SUedSfG8KLKuaOwAumjA)--

From w@1wt.eu  Sun Jan 30 21:38:21 2011
Return-Path: <w@1wt.eu>
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 A81823A6AF0 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 21:38:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.051
X-Spam-Level: 
X-Spam-Status: No, score=-2.051 tagged_above=-999 required=5 tests=[AWL=-0.008, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 tbOI1OVmhZYq for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 21:38:20 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 7CDA83A6AA9 for <hybi@ietf.org>; Sun, 30 Jan 2011 21:38:19 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0V5fUvZ000573; Mon, 31 Jan 2011 06:41:30 +0100
Date: Mon, 31 Jan 2011 06:41:30 +0100
From: Willy Tarreau <w@1wt.eu>
To: Eric Rescorla <ekr@rtfm.com>
Message-ID: <20110131054130.GE30182@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <20110130212504.GB30182@1wt.eu> <AANLkTik6hka_-Et=RjW21V-3DwWD+HWBuam1XhnPCJZ3@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTik6hka_-Et=RjW21V-3DwWD+HWBuam1XhnPCJZ3@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 05:38:21 -0000

On Sun, Jan 30, 2011 at 02:29:45PM -0800, Eric Rescorla wrote:
> On Sun, Jan 30, 2011 at 1:25 PM, Willy Tarreau <w@1wt.eu> wrote:
> > On Sun, Jan 30, 2011 at 08:47:10AM -0800, Eric Rescorla wrote:
> >> If you're going to mux connections from multiple clients, you
> >> absolutely want the
> >> ultimate back-end server to know which client they came from, if for no other
> >> reason than it's generally attractive to tie requests into a single
> >> context (e.g.,
> >> once a client has authenticated overTLS you don't force reauthentication). So,
> >> I don't really see the problem of attaching a stream-id.
> >
> > Exactly. And if that stream ID is located where it is supposed to be (in the
> > extension data), it will be masked.
> 
> As Adam said, this isn't WebSockets. It's WillyTarreauSockets. Frame
> the WS messages and add the stream-id in the framing. This is better
> in any case because it avoids intermixing
> meta-data supplied by the proxy with data supplied by the client.

I don't see how this is different, perhaps I'm not getting what you mean.
Could you give an example of how some messages would be framed with your
proposal (let's call it EricRescorlaSockets if you like).

Thanks,
Willy


From w@1wt.eu  Sun Jan 30 22:03:44 2011
Return-Path: <w@1wt.eu>
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 6CDEF3A6B11 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 22:03:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.051
X-Spam-Level: 
X-Spam-Status: No, score=-2.051 tagged_above=-999 required=5 tests=[AWL=-0.008, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 34JdnXOQ+cIx for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 22:03:43 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 1407B3A6B24 for <hybi@ietf.org>; Sun, 30 Jan 2011 22:03:42 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0V66raO000630; Mon, 31 Jan 2011 07:06:53 +0100
Date: Mon, 31 Jan 2011 07:06:53 +0100
From: Willy Tarreau <w@1wt.eu>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Message-ID: <20110131060653.GF30182@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <20110130212504.GB30182@1wt.eu> <8B0A9FCBB9832F43971E38010638454F03FEA14F9D@SISPE7MB1.commscope.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03FEA14F9D@SISPE7MB1.commscope.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 06:03:44 -0000

On Mon, Jan 31, 2011 at 06:15:40AM +0800, Thomson, Martin wrote:
> On 2011-01-31 at 08:25:04, Willy Tarreau wrote:
> > On Sun, Jan 30, 2011 at 08:47:10AM -0800, Eric Rescorla wrote:
> > > If you're going to mux connections from multiple clients, you
> > > absolutely want the
> > > ultimate back-end server to know which client they came from, if for
> > no other
> > > reason than it's generally attractive to tie requests into a single
> > > context (e.g.,
> > > once a client has authenticated overTLS you don't force
> > reauthentication). So,
> > > I don't really see the problem of attaching a stream-id.
> > 
> > Exactly. And if that stream ID is located where it is supposed to be
> > (in the
> > extension data), it will be masked.
> 
> Perhaps the stream ID can be added before the masking key, in the clear.  After all, we're talking about a negotiated extension here.  It only appears when both sides have agreed to its necessity.

I see your point, but the negociation should be end-to-end and the client
doesn't care about what's in the middle.

In fact what I find annoying is that we have designed something in theory
extensible, but in practice we're doing everything we can to ensure we
won't ever use extensions. Masking and Multiplexing can't be done as
extension. Probably if we look a bit closer we'll find that compression
can't either. Due to frame masking we have to define a different framing
format for each combination we think of. This is not what I'd call an
extensible design. Also, we should keep in mind that a design which does
not easily let whatever component we can think of integrate with existing
applications will necessarily have to change once deployed (and servers
will have to support both). That's what happened with HTTP. The Host
header became mandatory some time after the protocol was widely deployed,
because it allowed much more flexibility.

With a per-frame mask, we can still decode the framing to find other important
extensions. With per-(frame+stream) mask, we can only do that if the framing
is not masked, otherwise we need different formats for different types of
streams (and different code parts on the server side).

> On the mechanism... The only extension that I would suggest is that M1 might be better derived from a combination of server and client produced noise.  That would let the browser have some say on the length of sequence.  For instance, if the server wanted to poison an intermediary, they could set a really small M1 to increase their chances of hitting the right combination.
> 
> Anything less than or equal to the frame mask in length is going to be as weak as having no M1 at all - leaving that in server control seems irresponsible.

Not necessarily. I see Maciej's point on this. What he wants is to make it
mandatory for the server to use a negociated mask, so that a too lazy server
cannot be spoon-fed some WS requests via a from sent as a POST request. Still
I'm sure that what will happen on such lazy servers will look like this :

  new_session()
  {
    session = calloc(1, sizeof(*session));
    session->key = get_header("Sec-WebSocket-Key");
    if (session->key)
       init_server_nonce(session);
    return session;
  }

  init_server_nonce(session)
  {
     session->M1 = random();
     session->nonce = compute_nonce(session->key);
     send_header("Sec-WebSocket-Nonce", session->nonce);
  }

See above ? If the server ignores the fact that client's key is missing,
it's very easy not to compute a nonce and then not to compute the random
either, which will remain zero (we're talking about lazy servers after
all). In this case, yes, M1 serves no purpose if the server is too lazy
and does not compute it.

We can't really force lazy implementers to implement the most important
parts of the protocol if those parts bring them nothing but complexity.

For instance, I'm pretty sure that on the client side, only browsers
will implement a real key and will check it. Simpler clients will just
send a constant key (possibly with their name in it) and won't ever
check the returned nonce since it brings them nothing.

Regards,
Willy


From gregw@intalio.com  Sun Jan 30 22:11:36 2011
Return-Path: <gregw@intalio.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 9818C3A6B99 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 22:11:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.928
X-Spam-Level: 
X-Spam-Status: No, score=-2.928 tagged_above=-999 required=5 tests=[AWL=0.049,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 syQttw-n2Iju for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 22:11:35 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 8B0C53A6B94 for <hybi@ietf.org>; Sun, 30 Jan 2011 22:11:35 -0800 (PST)
Received: by qwi2 with SMTP id 2so5404161qwi.31 for <hybi@ietf.org>; Sun, 30 Jan 2011 22:14:48 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.235.143 with SMTP id kg15mr3626014qcb.17.1296454487915; Sun, 30 Jan 2011 22:14:47 -0800 (PST)
Sender: gregw@intalio.com
Received: by 10.220.92.72 with HTTP; Sun, 30 Jan 2011 22:14:47 -0800 (PST)
In-Reply-To: <E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com> <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com> <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com> <AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com> <E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com>
Date: Mon, 31 Jan 2011 17:14:47 +1100
X-Google-Sender-Auth: FrfAmbhDk6MhlMD3TenTMsobaC4
Message-ID: <AANLkTikYRtYWz6qzW6VbtrX4Bzg6bDS7fvdsDY_BCmXB@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=ISO-8859-1
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 06:11:36 -0000

On 31 January 2011 14:50, Maciej Stachowiak <mjs@apple.com> wrote:
> For a muxing proxy, you can either unmask and redo masking (necessary anyway
> in the protocol as currently spec'd) or introduce session IDs before the
> frame.

In order to unmask at the proxy, it would need to effectively be the
endpoint of the connection and accept the handshake. The problem with
that scenario is  that having the intermediary accept the WS
connection is a different semantic to allowing the application server
to accept/reject handshakes.

I'm sure there will be some proxy's that do want to be the endpoint,
but I'm also sure that there are some that will simply want to whack
on a streamId and pass the packets on over a shared connection with
little or no processing.

From w@1wt.eu  Sun Jan 30 22:12:12 2011
Return-Path: <w@1wt.eu>
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 777AA3A6B99 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 22:12:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.051
X-Spam-Level: 
X-Spam-Status: No, score=-2.051 tagged_above=-999 required=5 tests=[AWL=-0.008, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 uGMY1CuutzaY for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 22:12:11 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 70DF33A6B94 for <hybi@ietf.org>; Sun, 30 Jan 2011 22:12:11 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0V6FFah000647; Mon, 31 Jan 2011 07:15:15 +0100
Date: Mon, 31 Jan 2011 07:15:15 +0100
From: Willy Tarreau <w@1wt.eu>
To: Maciej Stachowiak <mjs@apple.com>
Message-ID: <20110131061515.GG30182@1wt.eu>
References: <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com> <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com> <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com> <AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com> <E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 06:12:12 -0000

On Sun, Jan 30, 2011 at 07:50:11PM -0800, Maciej Stachowiak wrote:
> For a muxing proxy, you can either unmask and redo masking (necessary anyway
> in the protocol as currently spec'd)

except that if each frame is masked with a server-provided key, the server
won't be able to know what key to use to decode each frame.

> or introduce session IDs before the frame.

which basically means that code will need to be changed on the server before
this is possible, so that a new frame format is supported. It's a shame to
define a framing and not being able to use it at large scales without
redefining it :-/

Willy


From w@1wt.eu  Sun Jan 30 22:15:12 2011
Return-Path: <w@1wt.eu>
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 A62803A6B96 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 22:15:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.051
X-Spam-Level: 
X-Spam-Status: No, score=-2.051 tagged_above=-999 required=5 tests=[AWL=-0.008, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 NQ73dlID6NS2 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 22:15:12 -0800 (PST)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 685473A6B11 for <hybi@ietf.org>; Sun, 30 Jan 2011 22:15:11 -0800 (PST)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p0V6ILjX000673; Mon, 31 Jan 2011 07:18:21 +0100
Date: Mon, 31 Jan 2011 07:18:21 +0100
From: Willy Tarreau <w@1wt.eu>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20110131061821.GH30182@1wt.eu>
References: <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com> <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com> <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com> <AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com> <E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com> <AANLkTikYRtYWz6qzW6VbtrX4Bzg6bDS7fvdsDY_BCmXB@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <AANLkTikYRtYWz6qzW6VbtrX4Bzg6bDS7fvdsDY_BCmXB@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 06:15:13 -0000

On Mon, Jan 31, 2011 at 05:14:47PM +1100, Greg Wilkins wrote:
> I'm sure there will be some proxy's that do want to be the endpoint,

it's even certain because they won't always be able to decide for the
server what extensions to negociate. It's much better for them to pass
the connection to the appropriate server and adjust params afterwards
with the client.

Willy


From alex@noemax.com  Sun Jan 30 22:27:16 2011
Return-Path: <alex@noemax.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 C39A23A6B95 for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 22:27:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000,  BAYES_00=-2.599]
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 lDfxlXWSOmKe for <hybi@core3.amsl.com>; Sun, 30 Jan 2011 22:27:16 -0800 (PST)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by core3.amsl.com (Postfix) with ESMTP id AC52E3A6B90 for <hybi@ietf.org>; Sun, 30 Jan 2011 22:27:15 -0800 (PST)
Received: from HPdv73190ev by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id OHJ48122; Mon, 31 Jan 2011 08:30:22 +0200
From: "Alexander Philippou" <alex@noemax.com>
To: "'Willy Tarreau'" <w@1wt.eu>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>	<20110129151133.GE25459@1wt.eu>	<AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com>	<20110130064908.GL25459@1wt.eu>	<AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com>	<20110130212504.GB30182@1wt.eu>	<8B0A9FCBB9832F43971E38010638454F03FEA14F9D@SISPE7MB1.commscope.com> <20110131060653.GF30182@1wt.eu>
In-Reply-To: <20110131060653.GF30182@1wt.eu>
Date: Mon, 31 Jan 2011 08:30:13 +0200
Message-ID: <000b01cbc110$54e9d840$febd88c0$@com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcvBDRHycOuwomejQzyvFGFR1OPfpwAAs8oQ
Content-Language: en-us
Cc: 'Server-Initiated HTTP' <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 06:27:16 -0000

> For instance, I'm pretty sure that on the client side, only browsers =
will implement a real key and will check it. Simpler clients will just =
send a constant key (possibly with their name in it) and won't ever =
check the returned nonce since it brings them nothing.

Spot-on.

Alexander


From mjs@apple.com  Mon Jan 31 06:54:56 2011
Return-Path: <mjs@apple.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 059333A6C23 for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 06:54:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.533
X-Spam-Level: 
X-Spam-Status: No, score=-106.533 tagged_above=-999 required=5 tests=[AWL=0.066, BAYES_00=-2.599, 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 AUfypOidIgqk for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 06:54:55 -0800 (PST)
Received: from mail-out3.apple.com (mail-out.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 3F97F3A6C1F for <hybi@ietf.org>; Mon, 31 Jan 2011 06:54:55 -0800 (PST)
Received: from relay12.apple.com (relay12.apple.com [17.128.113.53]) by mail-out3.apple.com (Postfix) with ESMTP id CD052CB89429 for <hybi@ietf.org>; Mon, 31 Jan 2011 06:58:09 -0800 (PST)
X-AuditID: 11807135-b7be9ae000006bf6-33-4d46ce01814a
Received: from et.apple.com (et.apple.com [17.151.62.12]) by relay12.apple.com (Apple SCV relay) with SMTP id 17.AB.27638.10EC64D4; Mon, 31 Jan 2011 06:58:09 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [10.0.1.14] ([24.6.209.6]) by et.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LFW00CT06WW9D70@et.apple.com> for hybi@ietf.org; Mon, 31 Jan 2011 06:58:09 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTikYRtYWz6qzW6VbtrX4Bzg6bDS7fvdsDY_BCmXB@mail.gmail.com>
Date: Mon, 31 Jan 2011 06:58:08 -0800
Message-id: <B06C6150-BFB6-4C8D-8E32-3FCC2FE6419F@apple.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com> <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com> <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com> <AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com> <E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com> <AANLkTikYRtYWz6qzW6VbtrX4Bzg6bDS7fvdsDY_BCmXB@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 14:54:56 -0000

On Jan 30, 2011, at 10:14 PM, Greg Wilkins wrote:

> On 31 January 2011 14:50, Maciej Stachowiak <mjs@apple.com> wrote:
>> For a muxing proxy, you can either unmask and redo masking (necessary anyway
>> in the protocol as currently spec'd) or introduce session IDs before the
>> frame.
> 
> In order to unmask at the proxy, it would need to effectively be the
> endpoint of the connection and accept the handshake. The problem with
> that scenario is  that having the intermediary accept the WS
> connection is a different semantic to allowing the application server
> to accept/reject handshakes.

How would you solve this problem if masking didn't exist? The WebSocket protocol has no provision to do an additional handshake over an existing connection, and presumably would not even if multiplexing were added. So the proxy has to accept the handshake, unless it uses something other than WebSockets to talk to the app server.

> 
> I'm sure there will be some proxy's that do want to be the endpoint,
> but I'm also sure that there are some that will simply want to whack
> on a streamId and pass the packets on over a shared connection with
> little or no processing.

That doesn't seem compatible with the idea that accept/reject must be up to the application server. For that to happen, the app server would need to see a new client handshake.

Regards,
Maciej


From jat@google.com  Mon Jan 31 08:54:09 2011
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 82F543A6C4C for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 08:54:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.427
X-Spam-Level: 
X-Spam-Status: No, score=-104.427 tagged_above=-999 required=5 tests=[AWL=-1.450, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 ootMvH1JfEZO for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 08:54:08 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id CC23D3A6C55 for <hybi@ietf.org>; Mon, 31 Jan 2011 08:54:07 -0800 (PST)
Received: from hpaq1.eem.corp.google.com (hpaq1.eem.corp.google.com [172.25.149.1]) by smtp-out.google.com with ESMTP id p0VGvLHn015341 for <hybi@ietf.org>; Mon, 31 Jan 2011 08:57:21 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1296493041; bh=S2kuU3nTJlrzGGqh5fnpeK3aQHU=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MlmMIu9YbSusUf27oKFkJqblRqurqrbyEgaK+/zAgsj26GtFGJY0PHjcyLFxBYdUW la+yAwCqfcvt4nBBbNknw==
Received: from yxd30 (yxd30.prod.google.com [10.190.1.222]) by hpaq1.eem.corp.google.com with ESMTP id p0VGvJa4010818 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Mon, 31 Jan 2011 08:57:20 -0800
Received: by yxd30 with SMTP id 30so2116600yxd.8 for <hybi@ietf.org>; Mon, 31 Jan 2011 08:57:19 -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=IL4gd4vBx4Mo2iAE0HoqCRsuF+u5+I9Kmp7LK++nMJQ=; b=rUvGi+XXaSj881JV/Y8/ICs1aif0KrWzeVy9f+lOpshbtyKfKHvEGECz5ht936zYCD n4wwD2OutS8iky7NfVaQ==
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=VWP9LmVFuLcawJwqVlHpwqelLONwupNNwMKREFIqUhHL14xz8sy38LpWlnWutEP3NQ 1UkCVkCRpttsT+SE+xwg==
Received: by 10.151.9.11 with SMTP id m11mr8252846ybi.263.1296493039051; Mon, 31 Jan 2011 08:57:19 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.206.19 with HTTP; Mon, 31 Jan 2011 08:56:58 -0800 (PST)
In-Reply-To: <B06C6150-BFB6-4C8D-8E32-3FCC2FE6419F@apple.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com> <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com> <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com> <AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com> <E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com> <AANLkTikYRtYWz6qzW6VbtrX4Bzg6bDS7fvdsDY_BCmXB@mail.gmail.com> <B06C6150-BFB6-4C8D-8E32-3FCC2FE6419F@apple.com>
From: John Tamplin <jat@google.com>
Date: Mon, 31 Jan 2011 11:56:58 -0500
Message-ID: <AANLkTinFm8gQ3+VjDw+9L-kM4suhX9HCY_VhOsRMPMoM@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset=UTF-8
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 16:54:09 -0000

On Mon, Jan 31, 2011 at 9:58 AM, Maciej Stachowiak <mjs@apple.com> wrote:
> How would you solve this problem if masking didn't exist? The
> WebSocket protocol has no provision to do an additional handshake
> over an existing connection, and presumably would not even if
> multiplexing were added.

Actually, I think it has to be able to perform a handshake for a new
logical channel, if a multiplexed connection is to be treated the same
as a non-multiplexed one.  Imagine you have a non-MUX client and
server connected by a network that includes a mux/demux pair.  The
endpoints should behave identically to if they were connected without
multiplexing, which means the server has to see the handshake so it
can accept requested extensions and can reject based on the origin,
authentication credentials, etc.

So, in my current MUX extension design, AddChannel effectively
behaves as a handshake of a new connection.

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

From bruce@callenish.com  Mon Jan 31 09:55:11 2011
Return-Path: <bruce@callenish.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 A9C743A6C40 for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 09:55:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.431
X-Spam-Level: 
X-Spam-Status: No, score=-2.431 tagged_above=-999 required=5 tests=[AWL=-0.147, BAYES_00=-2.599, SARE_MILLIONSOF=0.315]
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 QwAUnOTwNu5u for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 09:55:10 -0800 (PST)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id 591C23A6C3F for <hybi@ietf.org>; Mon, 31 Jan 2011 09:55:10 -0800 (PST)
Received: from [24.108.133.142] (helo=[192.168.145.101]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1Pjy1A-00079z-FG for hybi@ietf.org; Mon, 31 Jan 2011 09:58:24 -0800
Message-ID: <4D46F841.5020806@callenish.com>
Date: Mon, 31 Jan 2011 09:58:25 -0800
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: Hybi <hybi@ietf.org>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com>	<20110129151133.GE25459@1wt.eu>	<AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com>	<20110130064908.GL25459@1wt.eu>	<AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com>	<AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com>	<AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com>	<AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com>	<AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com>	<AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com>	<E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com>	<AANLkTikYRtYWz6qzW6VbtrX4Bzg6bDS7fvdsDY_BCmXB@mail.gmail.com> <B06C6150-BFB6-4C8D-8E32-3FCC2FE6419F@apple.com>
In-Reply-To: <B06C6150-BFB6-4C8D-8E32-3FCC2FE6419F@apple.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 17:55:12 -0000

On 31/01/2011 6:58 AM, Maciej Stachowiak wrote:
> On Jan 30, 2011, at 10:14 PM, Greg Wilkins wrote:
>>
>> In order to unmask at the proxy, it would need to effectively be the
>> endpoint of the connection and accept the handshake. The problem with
>> that scenario is  that having the intermediary accept the WS
>> connection is a different semantic to allowing the application server
>> to accept/reject handshakes.
> How would you solve this problem if masking didn't exist? The WebSocket protocol has no provision to do an additional handshake over an existing connection, and presumably would not even if multiplexing were added. So the proxy has to accept the handshake, unless it uses something other than WebSockets to talk to the app server.
>

We already talked about this[1].

This "modest enhancement" would result in real costs in terms of 
debugging. Over the span of the internet and the life of the protocol, 
it wouldn't surprise me if the cost was in the tens of millions of 
dollars, perhaps more. I can't see the benefits make it worth that.

[1] http://www.ietf.org/mail-archive/web/hybi/current/msg05498.html


From mjs@apple.com  Mon Jan 31 10:36:28 2011
Return-Path: <mjs@apple.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 CC1F73A6ABC for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 10:36:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.553
X-Spam-Level: 
X-Spam-Status: No, score=-106.553 tagged_above=-999 required=5 tests=[AWL=0.046, BAYES_00=-2.599, 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 56nzwywJ6s21 for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 10:36:28 -0800 (PST)
Received: from mail-out3.apple.com (mail-out3.apple.com [17.254.13.22]) by core3.amsl.com (Postfix) with ESMTP id 164E53A6AB9 for <hybi@ietf.org>; Mon, 31 Jan 2011 10:36:28 -0800 (PST)
Received: from relay16.apple.com (relay16.apple.com [17.128.113.55]) by mail-out3.apple.com (Postfix) with ESMTP id 2D669CB97927 for <hybi@ietf.org>; Mon, 31 Jan 2011 10:39:43 -0800 (PST)
X-AuditID: 11807137-b7c69ae000003c40-7d-4d4701ef2df7
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay16.apple.com (Apple SCV relay) with SMTP id 68.67.15424.FE1074D4; Mon, 31 Jan 2011 10:39:43 -0800 (PST)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; charset=us-ascii
Received: from [17.153.58.52] by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0LFW00GDSH5Y4U00@elliott.apple.com> for hybi@ietf.org; Mon, 31 Jan 2011 10:39:42 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTinFm8gQ3+VjDw+9L-kM4suhX9HCY_VhOsRMPMoM@mail.gmail.com>
Date: Mon, 31 Jan 2011 10:39:33 -0800
Message-id: <0C8DED6B-AC99-45B8-8D00-3AF996300D78@apple.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com> <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com> <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com> <AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com> <E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com> <AANLkTikYRtYWz6qzW6VbtrX4Bzg6bDS7fvdsDY_BCmXB@mail.gmail.com> <B06C6150-BFB6-4C8D-8E32-3FCC2FE6419F@apple.com> <AANLkTinFm8gQ3+VjDw+9L-kM4suhX9HCY_VhOsRMPMoM@mail.gmail.com>
To: John Tamplin <jat@google.com>
X-Mailer: Apple Mail (2.1082)
X-Brightmail-Tracker: AAAAAA==
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 18:36:28 -0000

On Jan 31, 2011, at 8:56 AM, John Tamplin wrote:

> On Mon, Jan 31, 2011 at 9:58 AM, Maciej Stachowiak <mjs@apple.com> wrote:
>> How would you solve this problem if masking didn't exist? The
>> WebSocket protocol has no provision to do an additional handshake
>> over an existing connection, and presumably would not even if
>> multiplexing were added.
> 
> Actually, I think it has to be able to perform a handshake for a new
> logical channel, if a multiplexed connection is to be treated the same
> as a non-multiplexed one.  Imagine you have a non-MUX client and
> server connected by a network that includes a mux/demux pair.  The
> endpoints should behave identically to if they were connected without
> multiplexing, which means the server has to see the handshake so it
> can accept requested extensions and can reject based on the origin,
> authentication credentials, etc.
> 
> So, in my current MUX extension design, AddChannel effectively
> behaves as a handshake of a new connection.

Would AddChannel include all the same information that's in the client handshake? New channel on existing connection from the browser isn't the same semantic as new mixed in channel from an entirely different client. For instance, in the former case, you can assume any Cookie headers present in the original header are still valid. In the latter case, you cannot.

In any case, assuming multiplexing conveys the equivalent of a full handshake, I believe it gives multiplexing servers what they need to unmask at the mux point.

Regards,
Maciej


From jat@google.com  Mon Jan 31 10:55:59 2011
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 0683D3A6C40 for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 10:55:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.408
X-Spam-Level: 
X-Spam-Status: No, score=-104.408 tagged_above=-999 required=5 tests=[AWL=-1.432, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 Y2nZm2KbhZD1 for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 10:55:58 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id BC0293A6C37 for <hybi@ietf.org>; Mon, 31 Jan 2011 10:55:57 -0800 (PST)
Received: from wpaz29.hot.corp.google.com (wpaz29.hot.corp.google.com [172.24.198.93]) by smtp-out.google.com with ESMTP id p0VIxB4b028483 for <hybi@ietf.org>; Mon, 31 Jan 2011 10:59:11 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1296500352; bh=pFW2dtWC9rrm8DUqL+kIuW5CV8M=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MyfLbup1TpQyWTwcKY3rKukG0Wxzv/2AUb91Y9+12W7GcYnRMbhVFJ0QQ3C2kSM5h V6fLuh5yu5sne8jaWxUxQ==
Received: from qyk29 (qyk29.prod.google.com [10.241.83.157]) by wpaz29.hot.corp.google.com with ESMTP id p0VIsufk001998 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Mon, 31 Jan 2011 10:59:10 -0800
Received: by qyk29 with SMTP id 29so6330520qyk.11 for <hybi@ietf.org>; Mon, 31 Jan 2011 10:59:10 -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=dE8R7C9deJkfLor9g7Bfi61pAFKQ7GOI1aZ+/zQhZU4=; b=oioQibzdy7a8TfZTa3BmuATp2vqsyyIfgZ7Uz9BT+vdfH7jBnN2k3TmKwTfOL90FW5 lqRs8kGB3QmuXk6CrhKQ==
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=LpeESSjNw7dm7aebZQ6NYQY+UsFYfSrBeSd5zSHAQUOy9TdRxe7Q4Gw9tqNCjs1pFH rFVlsXrkQRVnDJ2jDvgA==
Received: by 10.229.97.1 with SMTP id j1mr6172240qcn.212.1296500288916; Mon, 31 Jan 2011 10:58:08 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.78.96 with HTTP; Mon, 31 Jan 2011 10:55:44 -0800 (PST)
In-Reply-To: <0C8DED6B-AC99-45B8-8D00-3AF996300D78@apple.com>
References: <AANLkTikEHDM__cLOMpAT6XZ00uHsR9=f9BoNpPa1Dpp8@mail.gmail.com> <20110129151133.GE25459@1wt.eu> <AANLkTikJkaKadj5R8xdLWQwr5Ai9gb42KZxQ410JpVcA@mail.gmail.com> <20110130064908.GL25459@1wt.eu> <AANLkTinbbkW0AZ7J7y_emM86AhC-WOQ7ArAPvydR2p-x@mail.gmail.com> <AANLkTimh-tJriL40WOWAmZjTwhPZkYXwxtWvnfRNrfEb@mail.gmail.com> <AANLkTimMHjnG9arjAur74zYyhOj8hwyE0dyLQ1jQiH4P@mail.gmail.com> <AANLkTi=NKoc1heLjL-1Lb=gPE7LUOsxck2NZURocCfzG@mail.gmail.com> <AANLkTimQkckwXO5-aSoLWdsR0UP6e4UuJAbdaKdyij4i@mail.gmail.com> <AANLkTim4gK5boNH=jDWKBD4z3riP01KyMrEp2WB8G6T2@mail.gmail.com> <E453C48F-BDB4-414D-90AE-5F870927ADE1@apple.com> <AANLkTikYRtYWz6qzW6VbtrX4Bzg6bDS7fvdsDY_BCmXB@mail.gmail.com> <B06C6150-BFB6-4C8D-8E32-3FCC2FE6419F@apple.com> <AANLkTinFm8gQ3+VjDw+9L-kM4suhX9HCY_VhOsRMPMoM@mail.gmail.com> <0C8DED6B-AC99-45B8-8D00-3AF996300D78@apple.com>
From: John Tamplin <jat@google.com>
Date: Mon, 31 Jan 2011 13:55:44 -0500
Message-ID: <AANLkTin3FfYzAWB3bM1f4HLAyeah0GwRiMtSJZwRtzWU@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: multipart/alternative; boundary=0016368325242c0ce6049b28fffc
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Modest enhancement to XOR-based masking
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: Mon, 31 Jan 2011 18:55:59 -0000

--0016368325242c0ce6049b28fffc
Content-Type: text/plain; charset=UTF-8

On Mon, Jan 31, 2011 at 1:39 PM, Maciej Stachowiak <mjs@apple.com> wrote:

> Would AddChannel include all the same information that's in the client
> handshake? New channel on existing connection from the browser isn't the
> same semantic as new mixed in channel from an entirely different client. For
> instance, in the former case, you can assume any Cookie headers present in
> the original header are still valid. In the latter case, you cannot.
>

The current proposal simply includes headers if they are different from
(including not present) those included in the original physical-channel
handshake.  So, a cookie header that is different would be sent in the
AddChannel, while one that was the same (even if from a different client)
would not.  On the server end, after the demux, processing a new connection
would be identical regardless of whether it was a physical connection or an
AddChannel on a mux'd connection.


> In any case, assuming multiplexing conveys the equivalent of a full
> handshake, I believe it gives multiplexing servers what they need to unmask
> at the mux point.
>

Right, but the question is if that is desirable.  The demux may be very busy
handling lots of requests -- it would be desirable if the processing
required to pass the payload to the ultimate server were minimal.

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

--0016368325242c0ce6049b28fffc
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Mon, Jan 31, 2011 at 1:39 PM, Maciej Stachowi=
ak <span dir=3D"ltr">&lt;<a href=3D"mailto:mjs@apple.com">mjs@apple.com</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class=3D"h5">Would AddChannel include all the same inf=
ormation that&#39;s in the client handshake? New channel on existing connec=
tion from the browser isn&#39;t the same semantic as new mixed in channel f=
rom an entirely different client. For instance, in the former case, you can=
 assume any Cookie headers present in the original header are still valid. =
In the latter case, you cannot.</div>

</div></blockquote><div><br></div><div>The current proposal simply includes=
 headers if they are different from (including not present) those included =
in the original physical-channel handshake. =C2=A0So, a cookie header that =
is different would be sent in the AddChannel, while one that was the same (=
even if from a different client) would not. =C2=A0On the server end, after =
the demux, processing a new connection would be identical regardless of whe=
ther it was a physical connection or an AddChannel on a mux&#39;d connectio=
n.</div>

<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex;">
In any case, assuming multiplexing conveys the equivalent of a full handsha=
ke, I believe it gives multiplexing servers what they need to unmask at the=
 mux point.<br></blockquote></div><div><br></div>Right, but the question is=
 if that is desirable. =C2=A0The demux may be very busy handling lots of re=
quests -- it would be desirable if the processing required to pass the payl=
oad to the ultimate server were minimal.<br clear=3D"all">

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

--0016368325242c0ce6049b28fffc--

From gregw@intalio.com  Mon Jan 31 13:43:46 2011
Return-Path: <gregw@intalio.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 AC0A23A6C92 for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 13:43:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.688
X-Spam-Level: 
X-Spam-Status: No, score=-2.688 tagged_above=-999 required=5 tests=[AWL=0.289,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 l4aj2RBVlD2i for <hybi@core3.amsl.com>; Mon, 31 Jan 2011 13:43:45 -0800 (PST)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by core3.amsl.com (Postfix) with ESMTP id 736013A6C8F for <hybi@ietf.org>; Mon, 31 Jan 2011 13:43:45 -0800 (PST)
Received: by qwi2 with SMTP id 2so6313827qwi.31 for <hybi@ietf.org>; Mon, 31 Jan 2011 13:47:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.224.36.208 with SMTP id u16mr6723866qad.299.1296510420277; Mon, 31 Jan 2011 13:47:00 -0800 (PST)
Received: by 10.220.92.72 with HTTP; Mon, 31 Jan 2011 13:47:00 -0800 (PST)
Date: Tue, 1 Feb 2011 08:47:00 +1100
Message-ID: <AANLkTindH-Eu8GvsdtG7dgr+8MpQaaeRA7KTEBGz0sh-@mail.gmail.com>
From: Greg Wilkins <gregw@intalio.com>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1
Subject: [hybi] Masked framing VS mask in frame
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: Mon, 31 Jan 2011 21:43:46 -0000

I think we still have a fundamental divide in opinions between masked framing:

   [ key1][masked frame1] [key2][masked frame 2] ..... [keyN][masked frame N]

vs mask in frame:

   [ key1, masked payload 1 ]  [ key2, masked payload 2]  ...  [keyN,
masked payload N]


I'd like to eventually call for a straw poll on this, but would first
like to have a thread dedicated to the pros and cons of each.



IMNSHO:


Masked Frames PROS:
 + all bytes other than the key are masked.  This prevents an attacker
from using frame fields like the length to send "clear text"

Masked Frame CONS:
 - Masking is not independent of framing - poor layered protocol design.
 - all WS handling that needs to be aware of frame boundaries will
need to implement masking.  This will mean that more infrastructure
will have masking hard coded into it, thus it will soon become very
difficult, if not impossible to change framing as it will be baked
into WS aware intermediaries.
 - Intermediaries that do not care about content will still need to
unmask and remask the frames.
 - the parser/generator code for WS becomes more complex and
asymmetric because it must implement masking for some WS streams but
not for others.
 - unmasking cannot be done as single optimised pass over the data,
but must be done on-the-fly in the parsing code.
 - the options for masking algorithms is limited.  For example session
based keys could not be used in a MUX environment as the session key
would need to be known to access the extension data to know the stream
ID, so the session ID could be known so you can't know the session
key.   While session based masking may not be desirable for other
reasons, this limitation indicates a fundamental limitation of the
masked frame approach.



Mask in Frame PROS:
 + Masking is independent of framing.   Good layered protocol design.
 + Intermediaries that do not process the payload will not need to
implement masking. This saves CPU, memory and also will make it easier
to change and/or remove masking in future.
 + WS parsing code is simple and symmetric.
 + session based masking algorithms can be used if desired
 + Can utilise the extension data space to carry the key - thus
testing the implementation of the parsing of extension data length and
preventing implementations assuming this will be zero.

Mask in Frame CONS:
 - The frame op-code, flags and length are sent in the clear.  Of
these, an attacker has reasonable control over the length field, so
could conceivably send 8 characters including "GET\n" as the length
(although this would be very difficult to do via the current
javascript API.  There are also simple heuristic defences for this,
such as fragmenting any frame that has a length that is all ascii and
has a CR)



In summary,   mask in frame is far more flexible, low cost and
demonstrable better design, at cost of exposing a very very unlikely
subcase of an already very very unlikely vulnerability to an as of yet
undiscovered threat, of which an exploitable variation is already in
the wild using non ws clients.
