Re: [jose] comments on draft-jones-json-web-signature and draft-jones-json-web-encryption

Mike Jones <Michael.Jones@microsoft.com> Thu, 17 November 2011 01:28 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 D32EC1F0C69 for <jose@ietfa.amsl.com>; Wed, 16 Nov 2011 17:28:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.304
X-Spam-Level:
X-Spam-Status: No, score=-10.304 tagged_above=-999 required=5 tests=[AWL=0.295, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
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 K3odGYqE0Ufx for <jose@ietfa.amsl.com>; Wed, 16 Nov 2011 17:28:27 -0800 (PST)
Received: from smtp.microsoft.com (mailb.microsoft.com [131.107.115.215]) by ietfa.amsl.com (Postfix) with ESMTP id 239441F0C68 for <jose@ietf.org>; Wed, 16 Nov 2011 17:28:27 -0800 (PST)
Received: from TK5EX14MLTC104.redmond.corp.microsoft.com (157.54.79.159) by TK5-EXGWY-E802.partners.extranet.microsoft.com (10.251.56.168) with Microsoft SMTP Server (TLS) id 8.2.176.0; Wed, 16 Nov 2011 17:28:27 -0800
Received: from TK5EX14MBXC285.redmond.corp.microsoft.com ([169.254.3.172]) by TK5EX14MLTC104.redmond.corp.microsoft.com ([157.54.79.159]) with mapi id 14.01.0355.003; Wed, 16 Nov 2011 17:28:26 -0800
From: Mike Jones <Michael.Jones@microsoft.com>
To: Jim Schaad <ietf@augustcellars.com>, 'David McGrew' <mcgrew@cisco.com>
Thread-Topic: [jose] comments on draft-jones-json-web-signature and draft-jones-json-web-encryption
Thread-Index: AcykyCvDGK943AyCQbqMBco8NF/3Ow==
Date: Thu, 17 Nov 2011 01:28:25 +0000
Message-ID: <4E1F6AAD24975D4BA5B16804296739435F7211B0@TK5EX14MBXC285.redmond.corp.microsoft.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.34]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] comments on draft-jones-json-web-signature and draft-jones-json-web-encryption
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: Thu, 17 Nov 2011 01:28:27 -0000

Thanks for writing this up, Jim.

Considering this at a meta-level, I believe that one of the most important things for the working group to be doing at present is collecting potential scenario descriptions and use cases and systematically determining what features are needed to support those use cases.  Done well, that will give us a fairly comprehensive view of the space of choices available to us.  Then the working group can make informed decisions about which scenarios it decides to enable, which not to, and how to factor the solutions(s) enabling those scenarios we choose to support.  One product of this work should be a document clearly describing the rationale for which scenarios the WG decided to support and which it decided were out of scope, so others can understand the reasons for the choices we made.

If the working group can reach consensus at the requirements level, I believe we'll have a decent chance of reaching consensus on actual specifications and meeting our self-declared delivery timelines.  In the absence of that, I suspect that the working group will experience multiple painful rounds with near-final specs, only to have new groups come to us saying "You can do X, Y, and Z that I need, but I also need you to do P, Q, and R", resulting in contentious debates about whether to leave the specs as-is or to open up the box again, potentially making breaking changes, and adding ever more features.

I'll take your note below as one such scenario description for the working group to consider.  (I know that there are others that we should also capture from XMPP, Alto, etc.)

In that light, I'll also take a stab at writing up the web authentication/authorization security token scenario and the resulting requirements behind the current specs.  In that use case, making life simple for developers is paramount.  Complexity is the enemy of adoption. ;-)

				Cheers,
				-- Mike

-----Original Message-----
From: Jim Schaad [mailto:ietf@augustcellars.com] 
Sent: Wednesday, November 16, 2011 4:55 PM
To: 'David McGrew'; Mike Jones
Cc: jose@ietf.org
Subject: RE: [jose] comments on draft-jones-json-web-signature and draft-jones-json-web-encryption

Mike,

I think that while the structures for JWS might need to undergo some changes that will mean that while the MAC and Digital Signature structures.  As I mentioned at the F2F meeting, I know of someone is doing some small device work where they are sending messages from the devices to more central locations.  In this case there is not a pre-existing shared secret generally between the two entities and they are not using TLS so they could not derive one from the session key.  Mapping what they do into the current JWS work would require some changes. Specifically

Header Object
   - contains a MAC algorithm to be used - generally AES-GMAC
   - contains a key wrapping algorithm - generally AES key wrap
   - contains a key agreement algorithm - generally EC-DH Key Exchange Value - the CEK wrapped by the KEK where the KEK came from the static-static EC-DH algorithm Body MAC value

In this case we have four not three items that need to be placed in the sequence of items to be sent between the originator and the verifier.  I would still compute the MAC value in much the same way, only I would compute the MAC over the first three elements instead of the two elements.

This is the sort of thing that is used in a more store and forward environment or one where the answer is going to be pre-computed or where it needs to last longer than just the current session (i.e. later validation).

The same type of thing can be used for a long term shared KEK value on both the sender and recipient, where a unique CEK is generated for each message and wrapped.  David would be a better person than I am to address the question of security.  -"Do you have more security by doing an indirection and have a fresh key for doing the MAC on each operation rather than using the long term key for doing the MAC."  

If we did the above change, then I would say that the "Key Exchange Value" would become and empty string if you have a key derivied from the TLS session that you are using - but this would still lead to having four not three elements in the MAC case.

Jim