Re: [jose] Choice for WG: Use a KDF with AES CBC or use a longer key

Michael Jones <michael_b_jones@hotmail.com> Mon, 12 November 2012 01:30 UTC

Return-Path: <michael_b_jones@hotmail.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7DBD321F852C for <jose@ietfa.amsl.com>; Sun, 11 Nov 2012 17:30:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.933
X-Spam-Level:
X-Spam-Status: No, score=-1.933 tagged_above=-999 required=5 tests=[AWL=0.665, BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zplj0xMmDBcJ for <jose@ietfa.amsl.com>; Sun, 11 Nov 2012 17:30:58 -0800 (PST)
Received: from bay0-omc1-s17.bay0.hotmail.com (bay0-omc1-s17.bay0.hotmail.com [65.54.190.28]) by ietfa.amsl.com (Postfix) with ESMTP id CC6F621F8522 for <jose@ietf.org>; Sun, 11 Nov 2012 17:30:58 -0800 (PST)
Received: from BAY171-W136 ([65.54.190.59]) by bay0-omc1-s17.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 11 Nov 2012 17:30:55 -0800
Message-ID: <BAY171-W1363D7DE3972B29DE2DC221B76D0@phx.gbl>
Content-Type: multipart/alternative; boundary="_5c2bb073-a2f9-49e0-9b03-3cb3efadc5e3_"
X-Originating-IP: [50.47.91.23]
From: Michael Jones <michael_b_jones@hotmail.com>
To: james.h.manger@team.telstra.com, jose@ietf.org
Date: Sun, 11 Nov 2012 17:30:54 -0800
Importance: Normal
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E11500331CA9@WSMSG3153V.srv.dir.telstra.com>
References: <BAY171-W32DD53461B3DF4235F053DB7680@phx.gbl>, <255B9BB34FB7D647A506DC292726F6E11500331CA9@WSMSG3153V.srv.dir.telstra.com>
MIME-Version: 1.0
X-OriginalArrivalTime: 12 Nov 2012 01:30:55.0273 (UTC) FILETIME=[5C1D1990:01CDC075]
Subject: Re: [jose] Choice for WG: Use a KDF with AES CBC or use a longer key
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/jose>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Nov 2012 01:30:59 -0000

Using draft-mcgrew-aead-aes-cbc-hmac-sha2 is not the same thing as (1).  For instance, as was discussed after David's presentation at IETF 84, draft-mcgrew-aead-aes-cbc-hmac-sha2 does not follow the pattern of AEAD algorithms such as AES GCM, which have two inputs (plaintext, "additional authenticated data"), and two outputs (ciphertext, "authentication tag").  Instead, it adds a step combining the ciphertext and "authentication tag" outputs. If you read the draft, implementation of draft-mcgrew-aead-aes-cbc-hmac-sha2 has a lot more steps than what we have for A128CBC+HS256 and A256CBC+HS512.  It requires generating and adding specific padding bytes.  It prefixes the ciphertext with the IV.  It includes the length of the "additional authenticated data" in the MAC calculation.  It combines the two outputs into one.  For decryption, likewise, the two outputs must be split apart, the IV must be split apart, etc. All of these are steps that implementations could get wrong, resulting in interoperability problems.  By keeping all the parameters separate, our current A128CBC+HS256 and A256CBC+HS512 algorithms eliminate those steps. I'm sorry for the apparent confusion between (1) and draft-mcgrew-aead-aes-cbc-hmac-sha2.  While they both explicitly represent the CMK and CEK, and use the same underlying crypto operations, the details differ in ways that are likely to matter to implementers.  If there was a version of draft-mcgrew-aead-aes-cbc-hmac-sha2 that kept all the inputs and outputs separate, I agree that it would be a reasonable candidate for JOSE to consider.  But unlike AES GCM, that's not what it does. -- Mike
 > From: James.H.Manger@team.telstra.com
> To: michael_b_jones@hotmail.com; jose@ietf.org
> Date: Mon, 12 Nov 2012 09:23:37 +1100
> Subject: RE: [jose] Choice for WG: Use a KDF with AES CBC or use a longer key
> 
> > So I’d like to explicitly ask the working group.  Do you want us to:
> >
> > (1) Use the concatenation of random CEK and CIK values as the CMK for AES CBC, resulting in a longer CMK?
> > (2) Continue to use a KDF to generate the CEK and CIK from a shorter CMK?
> 
> 
> 1. Use draft-mcgrew-aead-aes-cbc-hmac-sha2
> 
> --
> James Manger