Re: [jose] A Unified Theory of JOSE Keys

Anthony Nadalin <tonynad@microsoft.com> Fri, 08 March 2013 19:43 UTC

Return-Path: <tonynad@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 64F7721F888E for <jose@ietfa.amsl.com>; Fri, 8 Mar 2013 11:43:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.533
X-Spam-Level:
X-Spam-Status: No, score=0.533 tagged_above=-999 required=5 tests=[AWL=-0.001, BAYES_00=-2.599, HTML_MESSAGE=0.001, UNRESOLVED_TEMPLATE=3.132]
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 RnnNdIjCLEWv for <jose@ietfa.amsl.com>; Fri, 8 Mar 2013 11:43:22 -0800 (PST)
Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2lp0239.outbound.protection.outlook.com [207.46.163.239]) by ietfa.amsl.com (Postfix) with ESMTP id ED46921F8738 for <jose@ietf.org>; Fri, 8 Mar 2013 11:43:21 -0800 (PST)
Received: from BL2FFO11FD016.protection.gbl (10.173.161.201) by BL2FFO11HUB022.protection.gbl (10.173.161.46) with Microsoft SMTP Server (TLS) id 15.0.620.12; Fri, 8 Mar 2013 19:43:19 +0000
Received: from TK5EX14HUBC104.redmond.corp.microsoft.com (131.107.125.37) by BL2FFO11FD016.mail.protection.outlook.com (10.173.160.224) with Microsoft SMTP Server (TLS) id 15.0.620.12 via Frontend Transport; Fri, 8 Mar 2013 19:43:19 +0000
Received: from co1outboundpool.messaging.microsoft.com (157.54.51.113) by mail.microsoft.com (157.54.80.25) with Microsoft SMTP Server (TLS) id 14.2.318.3; Fri, 8 Mar 2013 19:43:07 +0000
Received: from mail157-co1-R.bigfish.com (10.243.78.238) by CO1EHSOBE005.bigfish.com (10.243.66.68) with Microsoft SMTP Server id 14.1.225.23; Fri, 8 Mar 2013 19:42:31 +0000
Received: from mail157-co1 (localhost [127.0.0.1]) by mail157-co1-R.bigfish.com (Postfix) with ESMTP id 50C133600F0 for <jose@ietf.org.FOPE.CONNECTOR.OVERRIDE>; Fri, 8 Mar 2013 19:42:31 +0000 (UTC)
X-Forefront-Antispam-Report-Untrusted: CIP:157.56.240.21; KIP:(null); UIP:(null); (null); H:BL2PRD0310HT002.namprd03.prod.outlook.com; R:internal; EFV:INT
X-SpamScore: -15
X-BigFish: PS-15(zz9371Ic85fh4015Idb82hzz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ah1082kzz1730fah1033IL177df4h17326ah1777e0h8275dh18c673h5eeeK8275bhf65c6kz31h2a8h668h839hd24hf0ah1288h12a5h12bdh137ah1441h1504h1537h153bh162dh1631h1758h18e1h1946h19b5h1ad9h1b0ah17ej9a9j1155h)
Received-SPF: softfail (mail157-co1: transitioning domain of microsoft.com does not designate 157.56.240.21 as permitted sender) client-ip=157.56.240.21; envelope-from=tonynad@microsoft.com; helo=BL2PRD0310HT002.namprd03.prod.outlook.com ; .outlook.com ;
X-Forefront-Antispam-Report-Untrusted: SFV:SKI; SFS:; DIR:OUT; SFP:; SCL:-1; SRVR:BY2PR03MB042; H:BY2PR03MB041.namprd03.prod.outlook.com; LANG:en;
Received: from mail157-co1 (localhost.localdomain [127.0.0.1]) by mail157-co1 (MessageSwitch) id 136277174948689_21452; Fri, 8 Mar 2013 19:42:29 +0000 (UTC)
Received: from CO1EHSMHS017.bigfish.com (unknown [10.243.78.228]) by mail157-co1.bigfish.com (Postfix) with ESMTP id 07AEC54004B; Fri, 8 Mar 2013 19:42:29 +0000 (UTC)
Received: from BL2PRD0310HT002.namprd03.prod.outlook.com (157.56.240.21) by CO1EHSMHS017.bigfish.com (10.243.66.27) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 8 Mar 2013 19:42:28 +0000
Received: from BY2PR03MB042.namprd03.prod.outlook.com (10.255.241.146) by BL2PRD0310HT002.namprd03.prod.outlook.com (10.255.97.37) with Microsoft SMTP Server (TLS) id 14.16.275.5; Fri, 8 Mar 2013 19:42:27 +0000
Received: from BY2PR03MB041.namprd03.prod.outlook.com (10.255.241.145) by BY2PR03MB042.namprd03.prod.outlook.com (10.255.241.146) with Microsoft SMTP Server (TLS) id 15.0.620.20; Fri, 8 Mar 2013 19:42:25 +0000
Received: from BY2PR03MB041.namprd03.prod.outlook.com ([169.254.7.143]) by BY2PR03MB041.namprd03.prod.outlook.com ([169.254.7.89]) with mapi id 15.00.0620.020; Fri, 8 Mar 2013 19:42:25 +0000
From: Anthony Nadalin <tonynad@microsoft.com>
To: Richard Barnes <rlb@ipv.sx>, "jose@ietf.org" <jose@ietf.org>
Thread-Topic: [jose] A Unified Theory of JOSE Keys
Thread-Index: AQHOHC0Jc61Dw5z8MEmuQ9Q5+y6VFZicMa0Q
Date: Fri, 08 Mar 2013 19:42:25 +0000
Message-ID: <63519de2d2c44b159bb7dad208368348@BY2PR03MB041.namprd03.prod.outlook.com>
References: <CAL02cgQ=p1WphXHujBTEbN3NSZt8rnO3SLtS37oiQ4pYEy6j2g@mail.gmail.com>
In-Reply-To: <CAL02cgQ=p1WphXHujBTEbN3NSZt8rnO3SLtS37oiQ4pYEy6j2g@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [2001:4898:2a:2:3946:6b19:608a:fa1]
Content-Type: multipart/alternative; boundary="_000_63519de2d2c44b159bb7dad208368348BY2PR03MB041namprd03pro_"
MIME-Version: 1.0
X-OrganizationHeadersPreserved: BY2PR03MB042.namprd03.prod.outlook.com
X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn%
X-FOPE-CONNECTOR: Id%59$Dn%IETF.ORG$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn%
X-FOPE-CONNECTOR: Id%59$Dn%IPV.SX$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn%
X-CrossPremisesHeadersPromoted: TK5EX14HUBC104.redmond.corp.microsoft.com
X-CrossPremisesHeadersFiltered: TK5EX14HUBC104.redmond.corp.microsoft.com
X-Forefront-Antispam-Report: CIP:131.107.125.37; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(243025002)(377454001)(189002)(199002)(164054002)(54356001)(76482001)(47976001)(59766001)(47736001)(53806001)(33646001)(74662001)(15395725002)(5343635001)(6806001)(4396001)(51856001)(512954001)(56776001)(16236675001)(50986001)(5343655001)(47446002)(15202345001)(20776003)(15380165003)(69226001)(44976002)(54316002)(16676001)(65816001)(15198665001)(74502001)(79102001)(56816002)(77982001)(31966008)(63696002)(561944001)(80022001)(46102001)(49866001)(10090945005)(42262001)(24736002)(3826001); DIR:OUT; SFP:; SCL:1; SRVR:BL2FFO11HUB022; H:TK5EX14HUBC104.redmond.corp.microsoft.com; RD:InfoDomainNonexistent; MX:1; A:1; LANG:en;
X-OriginatorOrg: microsoft.onmicrosoft.com
X-Forefront-PRVS: 077929D941
Subject: Re: [jose] A Unified Theory of JOSE 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, 08 Mar 2013 19:43:24 -0000

Hi Richard,

As I read your note, you're proposing a special-purpose encryption format to use for keys.  I think it would be simpler to use the general-purpose encryption format we already have (JWE) to encrypt keys.  Indeed, draft-miller-jose-jwe-protected-jwk already clearly describes using JWE to encrypt JWKs and it's straightforward.  No invention required.

I also think that you're wrong in saying that we don't have the capability to encrypt private keys.  The Miller draft can be used to encrypt both symmetric and private keys.

I also think that you're wrong in saying that we don't have the capability to have attributes for keys.  The JWK format allows fields to be added for additional key attributes, as needed.

Let's keep things simple and use the general-purpose encryption format we already have, rather than inventing a special-purpose one.


From: jose-bounces@ietf.org [mailto:jose-bounces@ietf.org] On Behalf Of Richard Barnes
Sent: Friday, March 8, 2013 10:43 AM
To: jose@ietf.org
Subject: [jose] A Unified Theory of JOSE Keys

I've posted some draft slides for my presentation on JOSE keys:
<http://ipv.sx/ietf86/jose-keys.pdf>
Some thoughts are below to get the discussion started early...

What I'm proposing here is that we re-factor JWK and JWA to address all of the use cases we have for keys -- including public keys, wrapped/unwrapped private/symmetric keys, and key attributes.  That is, instead of doing wrapped symmetric keys in JWE, public keys in JWK, and the remainder somewhere else, we should just do all key management in JWK.

This actually entails less work than you might imagine.  JWE provides us with a wrapped symmetric key format, and Mike's recent draft provides an unwrapped, JSON-based symmetric key format.  From these we can extrapolate to wrapped private keys in a pretty straightforward fashion, and pick up the ability to add attributes to keys as a bonus.  The slide deck illustrates a proposed wrapping algorithm that would do this.

At the end of the slide deck, there's a proposal to edit JWK and JWA to add key wrapping.  To make that a little more precise, I would imagine the contents of the revised JWK draft to look something like the following (omitting identical sections):
-----BEGIN-----
4.  JSON Web Key (JWK) Format
4.1.  "kty" (Key Type) Parameter
4.2.  "use" (Key Use) Parameter
4.3.  "alg" (Algorithm) Parameter
4.4.  "kid" (Key ID) Parameter
4.5.  "kat" (Wrapped Key Attributes) Parameter
4.6.  "wk" (Wrapped Key) Parameter
4.7.  "epk" (Ephemeral Public Key) Header Parameter
4.8.  "jku" (JWK Set URL) Header Parameter
4.9.  "jwk" (JSON Web Key) Header Parameter
4.10. "x5u" (X.509 URL) Header Parameter
4.11. "x5t" (X.509 Certificate Thumbprint) Header Parameter
4.12. "x5c" (X.509 Certificate Chain) Header Parameter
4.13. "apu" (Agreement PartyUInfo) Header Parameter
4.14. "apv" (Agreement PartyVInfo) Header Parameter
5. Wrapped keys
5.1. Key Wrapping Procedure
5.2. Key Unwrapping Procedure
-----END-----
The revised JWA draft would just fold in the fields from draft-jones-jose-json-private-and-symmetric-key, and add the obvious encoding rules for RSA and EC keys.

Comments welcome!

Thanks,
--Richard