Re: [hybi] It's time to ship

Ian Fette (イアンフェッティ) <ifette@google.com> Mon, 10 January 2011 18:23 UTC

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: "Ian Fette (イアンフェッティ)" <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

2011/1/10 Eric Rescorla <ekr@rtfm.com>

> 2011/1/10 Ian Fette (イアンフェッティ) <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
>

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?

-Ian