Re: [hybi] On TLS-only Approaches

John Tamplin <jat@google.com> Mon, 23 August 2010 04:05 UTC

Return-Path: <jat@google.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id DB79D3A67E3 for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 21:05:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.341
X-Spam-Level:
X-Spam-Status: No, score=-105.341 tagged_above=-999 required=5 tests=[AWL=0.635, 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 RR+D8p8wnU9B for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 21:05:13 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.35]) by core3.amsl.com (Postfix) with ESMTP id 21FD33A67E2 for <hybi@ietf.org>; Sun, 22 Aug 2010 21:05:11 -0700 (PDT)
Received: from hpaq6.eem.corp.google.com (hpaq6.eem.corp.google.com [172.25.149.6]) by smtp-out.google.com with ESMTP id o7N45ici008483 for <hybi@ietf.org>; Sun, 22 Aug 2010 21:05:45 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1282536345; bh=EfrAh1wzc23fhqE4QYsmWG092nI=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=qSMCnmQDx6n4x9uHE/+3v2rpgiYILULumnl7zAL2oLNpSc0KnYcHEk5hyi2dP9Qgw zmDo0iaoesMQTL2OWG8lw==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:from:date:message-id: subject:to:cc:content-type:x-system-of-record; b=tww0dRPm9gaVGZIBzCgtan2asiEdm85Pf0nFRX9TvaTWU4TShj6+SN1051rYw4Yar 1OiSMoWlkshv5/CIHBiZg==
Received: from gxk10 (gxk10.prod.google.com [10.202.11.10]) by hpaq6.eem.corp.google.com with ESMTP id o7N45hYJ008255 for <hybi@ietf.org>; Sun, 22 Aug 2010 21:05:43 -0700
Received: by gxk10 with SMTP id 10so1940748gxk.9 for <hybi@ietf.org>; Sun, 22 Aug 2010 21:05:43 -0700 (PDT)
Received: by 10.151.106.3 with SMTP id i3mr4303800ybm.405.1282536342982; Sun, 22 Aug 2010 21:05:42 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.151.103.4 with HTTP; Sun, 22 Aug 2010 21:05:22 -0700 (PDT)
In-Reply-To: <A8694FF9-334D-42D9-ADDB-6AC23890F9DA@apple.com>
References: <AANLkTikJcbyEZ-Y0FOXni89L8Awa_UBmMMDvLgsOuoou@mail.gmail.com> <AANLkTin3r+f1Fn_X5O401PSANRrcgttLR-P4qMJZWKtV@mail.gmail.com> <A8694FF9-334D-42D9-ADDB-6AC23890F9DA@apple.com>
From: John Tamplin <jat@google.com>
Date: Mon, 23 Aug 2010 00:05:22 -0400
Message-ID: <AANLkTinmfRG3qDUK0gYeDV2JEZP74CKWjSD42Mhi=+R+@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: multipart/alternative; boundary="001517510d382291d4048e75c3aa"
X-System-Of-Record: true
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] On TLS-only Approaches
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@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, 23 Aug 2010 04:05:15 -0000

On Sun, Aug 22, 2010 at 11:47 PM, Maciej Stachowiak <mjs@apple.com> wrote:

> 1) Would such devices be likely to offer WebSocket services? That doesn't
> seem likely to me, given my knowledge of the typical uses for this sort of
> thing (embedded Web-based configuration interface).
>

They currently offer AJAX web pages, so I would not be surprised if they
would.


> 2) Even the very underpowered hardware in embedded devices is rapidly
> getting more powerful. I don't think TLS is unreasonable in terms of
> computational cost for future embedded services.
>

I am thinking code size is a problem, especially if you mandate any
base cipher set, as well as the computation required for low-end devices to
run RSA.


> 3) I would guess the challenge for embedded devices that *do* want to
> provide WebSocket services is that they can't practically ship with a valid
> certificate. To address this without creating security holes, we would
> likely need two URI schemes (ws: and wss:) with two different NPN protocol
> identifiers. ws: would not require a valid cert, wss: would. The reason two
> different NPN protocol identifiers are required is to prevent
> man-in-the-middle attacks against wss: services accessed using ws: by making
> it impossible to access them via ws:.
>

Another related question:  as I understand it, TLS has some fairly
significant per-message overhead, on the order of 5 bytes per record, plus
the overhead for the encryption algorithm.  For AES128 CBC with SHA1, you
have a 20 byte hash plus padding up to 16 byte multiples, so that means
small frames will be enormously inefficient under TLS.  For example, we have
just been arguing for a handful of bytes in the framing, and this would
immediately use a minimum of 25 extra bytes per frame.   By the time you
count uncompressed TCP/IP headers and WS framing, we have used more than
half of the bytes in a low-power FACH frame for mobile devices (depending on
the carrier configuration about 128-256 bytes).

Unless there is some lower overhead option, it doesn't seem like that can be
mandated for all WebSocket connections.

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