Re: [hybi] AES-128-CTR not much safer, but not fast either

Adam Barth <ietf@adambarth.com> Mon, 10 January 2011 00:29 UTC

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, 09 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    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.

Kind regards,
Adam