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

Willy Tarreau <w@1wt.eu> Wed, 12 January 2011 09:39 UTC

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