Re: [jose] Secdir review of draft-ietf-jose-json-web-signature-31

Mike Jones <Michael.Jones@microsoft.com> Tue, 23 September 2014 23:56 UTC

Return-Path: <Michael.Jones@microsoft.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4AF751A896F; Tue, 23 Sep 2014 16:56:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3bo-BuMEEnlB; Tue, 23 Sep 2014 16:56:16 -0700 (PDT)
Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0103.outbound.protection.outlook.com [65.55.169.103]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 297021A88F6; Tue, 23 Sep 2014 16:56:16 -0700 (PDT)
Received: from CH1PR03CA003.namprd03.prod.outlook.com (10.255.156.148) by DM2PR03MB397.namprd03.prod.outlook.com (10.141.84.139) with Microsoft SMTP Server (TLS) id 15.0.1034.13; Tue, 23 Sep 2014 23:56:14 +0000
Received: from BL2FFO11FD046.protection.gbl (10.255.156.132) by CH1PR03CA003.outlook.office365.com (10.255.156.148) with Microsoft SMTP Server (TLS) id 15.0.1034.13 via Frontend Transport; Tue, 23 Sep 2014 23:56:13 +0000
Received: from mail.microsoft.com (131.107.125.37) by BL2FFO11FD046.mail.protection.outlook.com (10.173.161.208) with Microsoft SMTP Server (TLS) id 15.0.1029.15 via Frontend Transport; Tue, 23 Sep 2014 23:56:13 +0000
Received: from TK5EX14MBXC286.redmond.corp.microsoft.com ([169.254.1.23]) by TK5EX14MLTC104.redmond.corp.microsoft.com ([157.54.79.159]) with mapi id 14.03.0195.002; Tue, 23 Sep 2014 23:55:29 +0000
From: Mike Jones <Michael.Jones@microsoft.com>
To: Tero Kivinen <kivinen@iki.fi>
Thread-Topic: Secdir review of draft-ietf-jose-json-web-signature-31
Thread-Index: AQHPyDgrWdMUgOdf8EqNa4N9Ytbe4ZvzQwoggARGNkCADAcqAIAFVMkQgARgVwCAAFyUwIAA6/kAgAD0NgA=
Date: Tue, 23 Sep 2014 23:55:27 +0000
Message-ID: <4E1F6AAD24975D4BA5B16804296739439BA6F814@TK5EX14MBXC286.redmond.corp.microsoft.com>
References: <21512.21725.209461.976375@fireball.kivinen.iki.fi> <4E1F6AAD24975D4BA5B16804296739439AEABA21@TK5EX14MBXC292.redmond.corp.microsoft.com> <21528.638.485017.482257@fireball.kivinen.iki.fi> <4E1F6AAD24975D4BA5B16804296739439BA5A04D@TK5EX14MBXC286.redmond.corp.microsoft.com> <21536.10026.506235.155913@fireball.kivinen.iki.fi> <4E1F6AAD24975D4BA5B16804296739439BA6811A@TK5EX14MBXC286.redmond.corp.microsoft.com> <21537.15046.788802.440800@fireball.kivinen.iki.fi>
In-Reply-To: <21537.15046.788802.440800@fireball.kivinen.iki.fi>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.78]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-EOPAttributedMessage: 0
X-Forefront-Antispam-Report: CIP:131.107.125.37; CTRY:US; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(438002)(51914003)(13464003)(199003)(377454003)(189002)(51704005)(52044002)(92566001)(33656002)(54356999)(76482002)(230783001)(106116001)(23726002)(90102001)(92726001)(106466001)(95666004)(4396001)(81156004)(21056001)(85806002)(76176999)(10300001)(19580405001)(74502003)(74662003)(79102003)(50466002)(97736003)(120916001)(99396002)(80022003)(31966008)(77096002)(6806004)(81342003)(81542003)(46102003)(110136001)(19580395003)(77982003)(44976005)(15975445006)(69596002)(46406003)(66066001)(104016003)(2656002)(47776003)(20776003)(85852003)(86612001)(83322001)(107046002)(50986999)(55846006)(84676001)(83072002)(85306004)(68736004)(86362001)(93886004)(87936001)(64706001)(97756001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR03MB397; H:mail.microsoft.com; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en;
X-Microsoft-Antispam: UriScan:;
X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB397;
X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY)
X-Forefront-PRVS: 0343AC1D30
Received-SPF: Pass (protection.outlook.com: domain of microsoft.com designates 131.107.125.37 as permitted sender) receiver=protection.outlook.com; client-ip=131.107.125.37; helo=mail.microsoft.com;
Authentication-Results: spf=pass (sender IP is 131.107.125.37) smtp.mailfrom=Michael.Jones@microsoft.com;
X-OriginatorOrg: microsoft.onmicrosoft.com
Archived-At: http://mailarchive.ietf.org/arch/msg/jose/e4XjzDn5NBRJngXpN1D1wD4p488
Cc: "jose@ietf.org" <jose@ietf.org>, "ietf@ietf.org" <ietf@ietf.org>, "iesg@ietf.org" <iesg@ietf.org>, "draft-ietf-jose-json-web-signature.all@tools.ietf.org" <draft-ietf-jose-json-web-signature.all@tools.ietf.org>, "secdir@ietf.org" <secdir@ietf.org>
Subject: Re: [jose] Secdir review of draft-ietf-jose-json-web-signature-31
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.15
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: Tue, 23 Sep 2014 23:56:19 -0000

Thanks for the additional information, Tero.  That's useful.

Speaking as an individual, rather than as an editor, I'd still suggest that someone with expertise in this area write up a quick individual submission draft defining this additional thumbprint format and if people appear to be using it, ask for it to become a JOSE working group item.  The registry makes adding new parameters like this easy.

Feel free to copy as much text from my individual submission draft as makes sense for yours.

				Best wishes,
				-- Mike

-----Original Message-----
From: Tero Kivinen [mailto:kivinen@iki.fi] 
Sent: Tuesday, September 23, 2014 2:18 AM
To: Mike Jones
Cc: iesg@ietf.org; secdir@ietf.org; ietf@ietf.org; draft-ietf-jose-json-web-signature.all@tools.ietf.org; jose@ietf.org
Subject: RE: Secdir review of draft-ietf-jose-json-web-signature-31

Mike Jones writes:
> >> For your point "4) Thumbprint formats" if you or someone else wants 
> >> to define an additional thumbprint format for use in IoT contexts 
> >> (or any other contexts), I encourage you to write an Internet Draft 
> >> that does so, registering the new header parameter defined in the 
> >> JSON Web Signature and Encryption Header Parameters registry.
> >
> > That can of course be done, but I would have hoped the initial 
> > version of the specification would also be usable in the IoT 
> > context, where the use of raw public keys will most likely arise.
> 
> If what you want is a thumbprint over a raw key, see the individual 
> submission draft 
> https://tools.ietf.org/html/draft-jones-jose-jwk-thumbprint-01,
> which defines a method for doing this.  The -01 version incorporates 
> working group feedback from Toronto.  In Toronto, I'd asked whether 
> the working group wanted to adopt it as a working group draft and a 
> decision hasn't been made on that yet.  If this would be useful for 
> IoT applications, that would be good to know.

That looks ok for the jwk use, but for the hash over the SPKI parts of the X.509 is better because that is already used in other places. I.e.
if you want to create fingerprint that can be used to match the key used in other protocols, they are not using that format defined in your draft, thus you need to regenerate the JWK format from their internal public/private key formats and generate new hash.

For example DANE x 1 x format (i.e. 3 1 1 for SHA-256, or 3 1 2 for
SHA-512) defined RFC6698 section 2.1.3 are calculated over the exact same binary object which is transmitted in the raw keys used in the TLS (RFC7250 section 3), which is again same binary object used in the in the IKEv2 (draft-kivinen-ipsecme-oob-pubkey).

In the IoT context it will most likely be quite common to define the configuration of who can connect to you by using list of hashes of raw public keys. I.e. the device has list of hashes, and when connection comes (either over TLS or IKEv2 or whatever), then that raw public key sent inside the connection protocol is hashed and it is matched against that list of hashes. If match is found, the connection is allowed, if not the connection is dropped. Now json might be one way of this configuration could be transmitted to the IoT device, thus ability to be able to represent hashes in the format that makes it possible to match the binary blobs used on the wire, would be useful.

One of the reasons the SPKI is used, that it can also be extracted from the self-signed certificate, i.e. early implementations might use self-signed certificates in the TLS (for example) before the RFC7250 implementations come out.

The draft-jones-jose-jwk-thumbprint format is in such format that it is quite hard to match that against the binary blob we get from the wire, as to do so would require to format the public key received to JWK and then calculating the fingerprint of that newly created object.
Parsing SPKI format (and parsing JSON also if we use that for
configurations) is required in the implementations anyways, but in normal case the IoT devices do not need code for generating JSON objects.

So I do not think the format you are specifying there is suitable for IoT uses, but I assume it will still be useful in the JWK in general.
--
kivinen@iki.fi