Re: [hybi] It's time to ship

Adam Barth <ietf@adambarth.com> Wed, 12 January 2011 21:13 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 17E4F3A6AA0 for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:13:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.856
X-Spam-Level:
X-Spam-Status: No, score=-3.856 tagged_above=-999 required=5 tests=[AWL=-0.879, 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 0DTpQmUjhsmi for <hybi@core3.amsl.com>; Wed, 12 Jan 2011 13:13:29 -0800 (PST)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by core3.amsl.com (Postfix) with ESMTP id BBDC33A6A91 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:13:28 -0800 (PST)
Received: by fxm9 with SMTP id 9so1070785fxm.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:15:48 -0800 (PST)
Received: by 10.223.96.202 with SMTP id i10mr1514319fan.50.1294866948500; Wed, 12 Jan 2011 13:15:48 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id b7sm401846faa.42.2011.01.12.13.15.46 (version=SSLv3 cipher=RC4-MD5); Wed, 12 Jan 2011 13:15:46 -0800 (PST)
Received: by iyi42 with SMTP id 42so998612iyi.31 for <hybi@ietf.org>; Wed, 12 Jan 2011 13:15:45 -0800 (PST)
Received: by 10.231.156.1 with SMTP id u1mr1588232ibw.52.1294866945240; Wed, 12 Jan 2011 13:15:45 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.11.140 with HTTP; Wed, 12 Jan 2011 13:15:15 -0800 (PST)
In-Reply-To: <sk1si6dvl4s1lmroa5qdt0ra2erd5066ri@hive.bjoern.hoehrmann.de>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <sk1si6dvl4s1lmroa5qdt0ra2erd5066ri@hive.bjoern.hoehrmann.de>
From: Adam Barth <ietf@adambarth.com>
Date: Wed, 12 Jan 2011 13:15:15 -0800
Message-ID: <AANLkTinBZeMoTLUjPUxjixB7sfhJ4yeHi3REk=oz76FC@mail.gmail.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
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
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 21:13:30 -0000

On Wed, Jan 12, 2011 at 12:28 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> * Adam Barth wrote:
>>http://www.ietf.org/id/draft-abarth-thewebsocketprotocol-01.txt
>
> This says:
>
>  The masked-data is the clear-text frame encrypted under AES-128-CTR
>  (see [TODO: Cite AES-128-CTR]) using the masking-key as the key and
>  the initial counter value equal to the masking-nonce followed by 28
>  zero octets.
>
>  For example, octet i of the masked-data is computed from octet i of
>  the clear-text frame as follows:
>
>    initial-counter = masking-nonce << 96
>    masked-octet-i = clear-text-octet-i XOR AES_k(initial-counter + i)
>
>  where AES_k is AES keyed with the masking-key.
>
> Could you give a reference for AES-128-CTR and explain the example?

Here's an example RFC that uses AES-128-CTR

http://www.ietf.org/rfc/rfc4344.txt

I believe it's technically defined by combining
http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf and
http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf, the
later of which contains test vectors.  (Careful readers will notice
that my example is wrong.)

Adam