Re: [jose] 192 bit AES keys

Mike Jones <Michael.Jones@microsoft.com> Fri, 19 July 2013 18:15 UTC

Return-Path: <Michael.Jones@microsoft.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 C64D021E80DC for <jose@ietfa.amsl.com>; Fri, 19 Jul 2013 11:15:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.217
X-Spam-Level:
X-Spam-Status: No, score=-5.217 tagged_above=-999 required=5 tests=[AWL=1.381, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jr8Ldel7DUPc for <jose@ietfa.amsl.com>; Fri, 19 Jul 2013 11:15:53 -0700 (PDT)
Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe003.messaging.microsoft.com [65.55.88.13]) by ietfa.amsl.com (Postfix) with ESMTP id 40F8C11E8147 for <jose@ietf.org>; Fri, 19 Jul 2013 11:15:52 -0700 (PDT)
Received: from mail52-tx2-R.bigfish.com (10.9.14.238) by TX2EHSOBE012.bigfish.com (10.9.40.32) with Microsoft SMTP Server id 14.1.225.22; Fri, 19 Jul 2013 18:15:52 +0000
Received: from mail52-tx2 (localhost [127.0.0.1]) by mail52-tx2-R.bigfish.com (Postfix) with ESMTP id 098AD3401AD; Fri, 19 Jul 2013 18:15:52 +0000 (UTC)
X-Forefront-Antispam-Report: CIP:131.107.125.8; KIP:(null); UIP:(null); IPV:NLI; H:TK5EX14HUBC102.redmond.corp.microsoft.com; RD:autodiscover.service.exchange.microsoft.com; EFVD:NLI
X-SpamScore: -23
X-BigFish: VS-23(zz98dI9371I936eIc85fhdb82hzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1d7338h1de098h1033IL17326ah18c673h1de097h1de096h8275bh8275dhz2fh2a8h668h839hd25hf0ah1288h12a5h12bdh137ah1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h19ceh1b0ah1bceh1d0ch1d2eh1d3fh1dfeh1dffh1e1dh1155h)
Received-SPF: pass (mail52-tx2: domain of microsoft.com designates 131.107.125.8 as permitted sender) client-ip=131.107.125.8; envelope-from=Michael.Jones@microsoft.com; helo=TK5EX14HUBC102.redmond.corp.microsoft.com ; icrosoft.com ;
Received: from mail52-tx2 (localhost.localdomain [127.0.0.1]) by mail52-tx2 (MessageSwitch) id 1374257749950450_8989; Fri, 19 Jul 2013 18:15:49 +0000 (UTC)
Received: from TX2EHSMHS025.bigfish.com (unknown [10.9.14.238]) by mail52-tx2.bigfish.com (Postfix) with ESMTP id E3388240071; Fri, 19 Jul 2013 18:15:49 +0000 (UTC)
Received: from TK5EX14HUBC102.redmond.corp.microsoft.com (131.107.125.8) by TX2EHSMHS025.bigfish.com (10.9.99.125) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 19 Jul 2013 18:15:49 +0000
Received: from TK5EX14MBXC284.redmond.corp.microsoft.com ([169.254.1.38]) by TK5EX14HUBC102.redmond.corp.microsoft.com ([157.54.7.154]) with mapi id 14.03.0136.001; Fri, 19 Jul 2013 18:15:47 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Richard Barnes <rlb@ipv.sx>, Jim Schaad <ietf@augustcellars.com>
Thread-Topic: [jose] 192 bit AES keys
Thread-Index: Ac6D/C12cBeywWJlQkC7ZUVSucIBIQACHm4AACa+gwAAANUWAAAAFcEAAABsewAAAQFYgAAAMVMAAABP0jA=
Date: Fri, 19 Jul 2013 18:15:47 +0000
Message-ID: <4E1F6AAD24975D4BA5B16804296739436B6F30E9@TK5EX14MBXC284.redmond.corp.microsoft.com>
References: <4E1F6AAD24975D4BA5B16804296739436B6EC698@TK5EX14MBXC284.redmond.corp.microsoft.com> <5CC365A3-7A21-40B3-B5A1-044E4B82D221@ve7jtb.com> <CAL02cgQH5czkGRn2daZh71Jci5oKFBoOfTzOfmHVD-Tah0g-sw@mail.gmail.com> <038401ce84a2$f670a970$e351fc50$@augustcellars.com> <CFB27D5A-1EE5-42DC-B873-859FEA94CF48@ve7jtb.com> <CAL02cgR2ruVU-x7vbsNaL8KBVr79Nbg7Je3FkAHrB4N7QV-3ZQ@mail.gmail.com> <03a501ce84a9$0450b2a0$0cf217e0$@augustcellars.com> <CAL02cgSdmbvxCsTG=26MRkb5senZM=ovQgjLRvvwp7rxo6vQNg@mail.gmail.com>
In-Reply-To: <CAL02cgSdmbvxCsTG=26MRkb5senZM=ovQgjLRvvwp7rxo6vQNg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.76]
Content-Type: multipart/alternative; boundary="_000_4E1F6AAD24975D4BA5B16804296739436B6F30E9TK5EX14MBXC284r_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
Cc: John Bradley <ve7jtb@ve7jtb.com>, "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] 192 bit AES keys
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: Fri, 19 Jul 2013 18:15:58 -0000

To me, the proposal to change the algorithm identifiers this late in the game doesn't seem to meet the criteria that Karen expressed in her note "thoughts on deployed code and breaking changes<http://www.ietf.org/mail-archive/web/jose/current/msg02542.html>":

These specifications have been evolving for a long time. I am sure that they could be improved in a myriad of ways, but at this point, without a strong rationale and a ground swell of working group support, we should work to complete what we have. Any major refactoring or new functionality should be deferred as future work.

Yes, we could have used different algorithm identifiers or refactored them in various ways, but those that we have already have been shown to work, and work well in practice.  There is no functionality gap that needs to be corrected by changing them.

I'll plan to add the 192 bit AES identifiers as you requested Richard, at which point I think we should call it good.

                                                                -- Mike

From: Richard Barnes [mailto:rlb@ipv.sx]
Sent: Friday, July 19, 2013 11:00 AM
To: Jim Schaad
Cc: John Bradley; Mike Jones; jose@ietf.org
Subject: Re: [jose] 192 bit AES keys

We could just shift the key length up in to the algorithm identifier, like with the other KDF-based algorithms ("ECDH-ES-128").  Or maybe this argues more for making dkLen explicit.

On Fri, Jul 19, 2013 at 1:54 PM, Jim Schaad <ietf@augustcellars.com<mailto:ietf@augustcellars.com>> wrote:
Richard,

You still need to address the case of using ECDH-ES plus a KDF to get the CEK directly.  I.e. not using a KEK step.

Jim


From: Richard Barnes [mailto:rlb@ipv.sx<mailto:rlb@ipv.sx>]
Sent: Friday, July 19, 2013 10:26 AM
To: John Bradley
Cc: Jim Schaad; Mike Jones; jose@ietf.org<mailto:jose@ietf.org>

Subject: Re: [jose] 192 bit AES keys

I wasn't saying that it should be a separate parameter.  It's just not necessary in a lot of cases.   If you have a 16-octet value in "encrypted_key", then you don't need to specify the key length; you could just say "AES-GCM", and the implementation would know it was AES-128-GCM based on the length of the key.  Worse, as it is, there can be conflict.  What should an implementation do with "enc":"A128GCM" with a 32-octet "encrypted_key"?  Use the first 16 octets?  The last?  Reject?

OTOH, for the cases where a KEK is derived, you do need to specify a key length for the KEK.  So you could either do (1) "ECDH-ES+AES-KW" with a "dkLen" parameter (as in PKCS#5), or (2) "ECDH-ES+A128KW".  If I were designing from clean slate, I would prefer #1, but I can live with #2.

PROPOSAL: Remove key lengths in cases where it's not required ("A*GCM", "A*KW", "A*GCMKW"), since the length of the key will be clear from the "encrypted_key" value (or for "dir", from provisioning).  Leave them in the "alg" values, since you need to specify key length there.

PROS:
-- Mitigate combinatorial explosion (don't need one identifier per key type)
-- Avoid conflict issues
-- Save 3 octets if you don't care about being pretty ("AGCM" instead of "A128GCM", though I would prefer "AES-GCM")
-- Parallelism with the JWS algorithms (e.g., "HS256"), which don't specify key length

CONS:
-- Requires existing implementations to support additional algorithm identifiers (note: doesn't preclude supporting the old algorithm identifiers!)




On Fri, Jul 19, 2013 at 1:13 PM, John Bradley <ve7jtb@ve7jtb.com<mailto:ve7jtb@ve7jtb.com>> wrote:
+1   I don't think taking the length out of the algorithm and making it a separate parameter is a good way to go.

On 2013-07-19, at 1:11 PM, "Jim Schaad" <ietf@augustcellars.com<mailto:ietf@augustcellars.com>> wrote:

We need to keep key lengths in algorithm ids for the purpose of key derivation.  Additionally there would need to be some way to signal the key length to the system when doing key generation

i.e. you would need to change
jose.SetCEKAlgorithm("AES128") to
jose.SetCEKAlgoirthm("AES", 128)

jim


From: jose-bounces@ietf.org<mailto:jose-bounces@ietf.org> [mailto:jose-<mailto:jose->bounces@ietf.org<mailto:bounces@ietf.org>] On Behalf Of Richard Barnes
Sent: Friday, July 19, 2013 9:47 AM
To: John Bradley
Cc: Mike Jones; jose@ietf.org<mailto:jose@ietf.org>
Subject: Re: [jose] 192 bit AES keys

Or we could just remove the key lengths from the algorithm IDs altogether ;)  They really don't add any value.

On Thu, Jul 18, 2013 at 6:17 PM, John Bradley <ve7jtb@ve7jtb.com<mailto:ve7jtb@ve7jtb.com>> wrote:
I am OK with registering the 192 bit versions.

Sent from my iPhone

On Jul 18, 2013, at 5:17 PM, Mike Jones <Michael.Jones@microsoft.com<mailto:Michael.Jones@microsoft.com>> wrote:
Richard had previously requested that we register algorithm identifiers for AES using 192 bit keys.  As he previously pointed out, "It seems like if we're going to support AES, then we should support AES.  Every AES library I know of supports all three key lengths, so it's not like there's extra cost besides the registry entry."  (I'll note that we already have algorithm identifiers for the "mid-size" HMAC and signature functions "HS384", "RS384", and "ES384".)

I heard no objections at the time.  I'm therefore thinking that we should register algorithm identifiers for these key sizes as well.  Specifically, we would add:
"A192KW", "ECDH-ES+A192KW", "A192GCMKW", "PBES2-HS256+A192KW", "A192CBC-HS384", and "A192GCM".  Support for these algorithms would be optional.

What do people think?

                                                            -- Mike

_______________________________________________
jose mailing list
jose@ietf.org<mailto:jose@ietf.org>
https://www.ietf.org/mailman/listinfo/jose

_______________________________________________
jose mailing list
jose@ietf.org<mailto:jose@ietf.org>
https://www.ietf.org/mailman/listinfo/jose