Re: [hybi] It's time to ship

Takeshi Yoshino <tyoshino@google.com> Thu, 13 January 2011 09:07 UTC

Return-Path: <tyoshino@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 EB84B3A69EE for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 01:07:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.092
X-Spam-Level:
X-Spam-Status: No, score=-102.092 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_FONT_FACE_BAD=0.884, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, 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 Xs3jHeTi61RT for <hybi@core3.amsl.com>; Thu, 13 Jan 2011 01:07:22 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by core3.amsl.com (Postfix) with ESMTP id 619E03A69C2 for <hybi@ietf.org>; Thu, 13 Jan 2011 01:07:21 -0800 (PST)
Received: from wpaz24.hot.corp.google.com (wpaz24.hot.corp.google.com [172.24.198.88]) by smtp-out.google.com with ESMTP id p0D99gBt030044 for <hybi@ietf.org>; Thu, 13 Jan 2011 01:09:43 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294909783; bh=OukcvB+pye/MclYHWgpJ3wvlPFc=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=VWVqseYxNn7pnLm1s/0/11Z4D0XztcTHige5vvanqhTnvIC2fpl3C8ehyytujqNNo l0yaH+RNchGWg0R0b1VFQ==
Received: from iwn37 (iwn37.prod.google.com [10.241.68.101]) by wpaz24.hot.corp.google.com with ESMTP id p0D99EON023966 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for <hybi@ietf.org>; Thu, 13 Jan 2011 01:09:41 -0800
Received: by iwn37 with SMTP id 37so1617094iwn.39 for <hybi@ietf.org>; Thu, 13 Jan 2011 01:09:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=Lwwebws+7xiYL9EIsGJN8z+1BJHxvsZ4Awf8bcWJCH8=; b=kxkW1fUSE1ZWTRQpmZgwMwUX3ybbglkJOeMW5KzsbTvE7HTFqHmoP6CVWfYTTtcjle ut7afXYCs6D+ql2xHDnw==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=uXk2/y4yZYWQhYPQ83l/MMBXgGfrt6WWRLVx7YHagdfR94tmHF0FY5lSa05iGudtRj GXRyGXZafpSlCQYsuS3g==
Received: by 10.231.173.67 with SMTP id o3mr2187765ibz.29.1294909780013; Thu, 13 Jan 2011 01:09:40 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.15.139 with HTTP; Thu, 13 Jan 2011 01:09:19 -0800 (PST)
In-Reply-To: <AANLkTinBZeMoTLUjPUxjixB7sfhJ4yeHi3REk=oz76FC@mail.gmail.com>
References: <AANLkTim2VGfH2FiJ4iH85wYiuXNKQ1Arh1C1Kg4M58Fs@mail.gmail.com> <sk1si6dvl4s1lmroa5qdt0ra2erd5066ri@hive.bjoern.hoehrmann.de> <AANLkTinBZeMoTLUjPUxjixB7sfhJ4yeHi3REk=oz76FC@mail.gmail.com>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Thu, 13 Jan 2011 18:09:19 +0900
Message-ID: <AANLkTi=CpyVwMYjqaaWizB0=Q5w-oD=xyBFg3_Bs_w5E@mail.gmail.com>
To: Adam Barth <ietf@adambarth.com>
Content-Type: multipart/alternative; boundary="0016364edb0c743e6b0499b6ad19"
X-System-Of-Record: true
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: Thu, 13 Jan 2011 09:07:24 -0000

On Thu, Jan 13, 2011 at 06:15, Adam Barth <ietf@adambarth.com> wrote:

> 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.)
>
>
So, this part can be rewritten like this, I thought. do you think it's
correct?

----
...[snip]
   the initial counter value equal to the masking-nonce followed by 12

...[snip]

  initial-counter = masking-nonce << 96
  for i = 0 to size-of-clear-text - 1
    j = i MOD 16
    if j == 0
      frame-key = AES_k(initial-counter + i / 16)

    masked-octet-i = clear-text-octet-i XOR octet-j-of-frame-key
----

and, since masking-key is 20 octet length, it looks like we must
truncated/padded key to fit AES key size?


> Adam
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>