Re: [hybi] Counter-proposal for initial HTTP handshake

"Simon Pieters" <simonp@opera.com> Mon, 06 December 2010 09:51 UTC

Return-Path: <simonp@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 6C6CA3A6B35 for <hybi@core3.amsl.com>; Mon, 6 Dec 2010 01:51:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.688
X-Spam-Level:
X-Spam-Status: No, score=-5.688 tagged_above=-999 required=5 tests=[AWL=0.596, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, 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 C9nRnRcqUdsi for <hybi@core3.amsl.com>; Mon, 6 Dec 2010 01:51:01 -0800 (PST)
Received: from smtp.opera.com (smtp.opera.com [213.236.208.81]) by core3.amsl.com (Postfix) with ESMTP id 509A63A69AC for <hybi@ietf.org>; Mon, 6 Dec 2010 01:51:01 -0800 (PST)
Received: from simon-pieterss-macbook.local (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 oB69qDwL029392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 6 Dec 2010 09:52:13 GMT
Content-Type: text/plain; charset="utf-8"; format="flowed"; delsp="yes"
To: John Tamplin <jat@google.com>, Bjoern Hoehrmann <derhoermi@gmx.net>
References: <2416.1291380785.015157@puncture> <AANLkTi=7DCCVSO9jJ8osAzbkQrH__A_GDJ6Hed--KMcq@mail.gmail.com> <2416.1291385767.679839@puncture> <AANLkTikXRk41kkBxi7na65rwAjibryapGatdUKV9b9wu@mail.gmail.com> <AANLkTike_Y76WGu0vCwE74g51E4u0AnzsisfX2urS=70@mail.gmail.com> <or2jf65dgbqtlavbse5m7q19u0qo0bnfpi@hive.bjoern.hoehrmann.de>
Date: Mon, 06 Dec 2010 10:52:11 +0100
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
From: Simon Pieters <simonp@opera.com>
Message-ID: <op.vnado9kbidj3kv@simon-pieterss-macbook.local>
In-Reply-To: <or2jf65dgbqtlavbse5m7q19u0qo0bnfpi@hive.bjoern.hoehrmann.de>
User-Agent: Opera Mail/11.00 (MacIntel)
X-Scanned-By: MIMEDefang 2.64 on 213.236.208.81
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Counter-proposal for initial HTTP 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: Mon, 06 Dec 2010 09:51:02 -0000

On Sat, 04 Dec 2010 01:38:37 +0100, Bjoern Hoehrmann <derhoermi@gmx.net>  
wrote:

> * John Tamplin wrote:
>> The reason it is expensive is that doing any processing on the payload
>> data means you can't do the equivalent of sendfile() to let the OS
>> send a large file for you while you go and do other things.  Also,
>> even inexpensive processes matter when you have to worry about very
>> large scale -- doubling the cost of processing WebSocket payload data
>> on a machine serving thousands or millions of them is a problem.
>
> (I do note in passing that client->server and server->client do not
> necessarily have to use the same message format; the two directions
> differ greatly in their achievable throughputs, odds of long messages,
> and security considerations in most settings. Unfortunately, as far
> as security goes, server->client has not been studied all that much.)

Indeed. Maybe there's no reason to mask the server-sent messages at all.  
It has been pointed out that masking is a performance hit for sendfile()  
use cases.

If the server is under the attacker's control, he can send whatever he  
wants, so masking doesn't help there. If the server is legitimate but the  
attacker succeeds with connecting to it with XHR or something and can read  
the bytes, then masking doesn't help since the attacker can unmask. Are  
there other scenarios where it is helpful to mask the server-sent messages?

-- 
Simon Pieters
Opera Software