Re: [jose] FOR WG DISCUSSION: #82 part A - Possibly changing representation of private JWK fields

Justin Richer <jricher@mitre.org> Wed, 28 August 2013 19:53 UTC

Return-Path: <jricher@mitre.org>
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 6060021F9FF9 for <jose@ietfa.amsl.com>; Wed, 28 Aug 2013 12:53:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.503
X-Spam-Level:
X-Spam-Status: No, score=-6.503 tagged_above=-999 required=5 tests=[AWL=0.096, BAYES_00=-2.599, 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 Vg-E9H3w7Pa4 for <jose@ietfa.amsl.com>; Wed, 28 Aug 2013 12:53:29 -0700 (PDT)
Received: from smtpksrv1.mitre.org (smtpksrv1.mitre.org [198.49.146.77]) by ietfa.amsl.com (Postfix) with ESMTP id 8BB0711E8134 for <jose@ietf.org>; Wed, 28 Aug 2013 12:53:27 -0700 (PDT)
Received: from smtpksrv1.mitre.org (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 2528A1F0AE1; Wed, 28 Aug 2013 15:53:25 -0400 (EDT)
Received: from IMCCAS04.MITRE.ORG (imccas04.mitre.org [129.83.29.81]) by smtpksrv1.mitre.org (Postfix) with ESMTP id E1B891F0782; Wed, 28 Aug 2013 15:53:24 -0400 (EDT)
Received: from [10.146.15.13] (129.83.31.56) by IMCCAS04.MITRE.ORG (129.83.29.81) with Microsoft SMTP Server (TLS) id 14.2.342.3; Wed, 28 Aug 2013 15:53:24 -0400
Message-ID: <521E552B.6060100@mitre.org>
Date: Wed, 28 Aug 2013 15:53:15 -0400
From: Justin Richer <jricher@mitre.org>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7
MIME-Version: 1.0
To: Mike Jones <Michael.Jones@microsoft.com>
References: <4E1F6AAD24975D4BA5B16804296739436B7FBEA6@TK5EX14MBXC283.redmond.corp.microsoft.com>
In-Reply-To: <4E1F6AAD24975D4BA5B16804296739436B7FBEA6@TK5EX14MBXC283.redmond.corp.microsoft.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Originating-IP: [129.83.31.56]
Cc: "jose@ietf.org" <jose@ietf.org>
Subject: Re: [jose] FOR WG DISCUSSION: #82 part A - Possibly changing representation of private JWK fields
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: Wed, 28 Aug 2013 19:53:44 -0000

If the leak is going to happen, it's not going to be on part of the JWK 
object or JWK set, it's going to be on the whole thing. Stuffing it into 
a sub-object isn't going to make it any safer in practice. If you want 
to generate a public key from a public/private pair, you could argue 
that it'd be simpler to have an outbound thing filter out just the 
".private" sub-object as opposed to having something key-specific, but I 
think the latter is actually more robust against different key types 
since it enforces a per-type evaluation of what's "public" and what's 
"private".

I agree with Mike's contention regarding symmetric keys, below -- it's 
tricky though. In the Nimbus-JOSE-JWT implementation of JWK we've taken 
the approach of saying that the "public" version of an OctetSequenceKey 
is null.

Parallelism on the keying material overall is a good thing though, so 
I'd prefer to leave it how it is.

  -- Justin

On 08/28/2013 03:40 PM, Mike Jones wrote:
> This is a second issue in the issue tracker that I wanted to bring to the working group’s attention for discussion.  My personal view is stated in the issue tracker comment below.
>
> 				-- Mike
>
> -----Original Message-----
> From: jose issue tracker [mailto:trac+jose@trac.tools.ietf.org]
> Sent: Wednesday, August 28, 2013 12:36 PM
> To: draft-ietf-jose-json-web-key@tools.ietf.org; Mike Jones
> Cc: jose@ietf.org
> Subject: Re: [jose] #82: Section 6. Encrypted JWK and Encrypted JWK Set Format
>
> #82: Section 6. Encrypted JWK and Encrypted JWK Set Format
>
> Comment (by michael.jones@microsoft.com):
>
> This comment is about part A of this issue - the suggestion that private key material within a JWK be moved into a "private" element.  While I  understand the motivation for the suggestion, this doesn't seem like a  necessary or particularly useful change.  If an implementation leaks its private or shared key information by disclosing a JWK containing it to a party not entitled to have it, there's no security difference in whether that information is in a top-level member or a member of a "private" field.  The information will have still been inappropriately disclosed.
>
> This suggestion is also ambiguously specified.  While yes, the "d" elements of elliptic curve and RSA keys could be moved to be within a "private" structure, what would be done for the "k" element of a symmetric key?  Would that also be moved into a "private" element?  (At that point,  there would be no symmetric key information at the top level of the JWK,  which seems more than a little odd.)
>
> Finally, I'll note that the specs already clearly delineate public from private fields, through use of the Parameter Information Class value in the JSON Web Key Parameters registry (with values "Public" and "Private").  So there should be no confusion which is which.
>
> I therefore recommend that this suggestion be resolved as "wontfix".
>