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

Edmund Jay <ejay@mgi1.com> Wed, 28 August 2013 22:02 UTC

Return-Path: <edmundjay@sbcglobal.net>
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 12B9421E8082 for <jose@ietfa.amsl.com>; Wed, 28 Aug 2013 15:02:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.448
X-Spam-Level:
X-Spam-Status: No, score=-2.448 tagged_above=-999 required=5 tests=[AWL=0.150, BAYES_00=-2.599, HTML_MESSAGE=0.001]
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 8+YxZBFz3ByL for <jose@ietfa.amsl.com>; Wed, 28 Aug 2013 15:02:35 -0700 (PDT)
Received: from nm8-vm8.access.bullet.mail.bf1.yahoo.com (nm8-vm8.access.bullet.mail.bf1.yahoo.com [216.109.114.183]) by ietfa.amsl.com (Postfix) with ESMTP id 915BD21E8063 for <jose@ietf.org>; Wed, 28 Aug 2013 15:02:32 -0700 (PDT)
Received: from [66.196.81.159] by nm8.access.bullet.mail.bf1.yahoo.com with NNFMP; 28 Aug 2013 22:02:31 -0000
Received: from [66.196.81.145] by tm5.access.bullet.mail.bf1.yahoo.com with NNFMP; 28 Aug 2013 22:02:31 -0000
Received: from [127.0.0.1] by omp1021.access.mail.bf1.yahoo.com with NNFMP; 28 Aug 2013 22:02:31 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 685078.73574.bm@omp1021.access.mail.bf1.yahoo.com
Received: (qmail 23785 invoked by uid 60001); 28 Aug 2013 22:02:31 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sbcglobal.net; s=s1024; t=1377727351; bh=VRQJfi0W3c7hC75V7bM/mXsIaYM1ANvQ0A2kqVuG8UQ=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=2j4795LS1F6UGe7P1VPdiAlUwpUgisI/HvEHOk3Ejci202E5yydaUQdthp3PYlbk4cO9+funa9VdQQlpBEvOH50WS8BeN3dyL4otdBrLIFDtrrdxLPSo5PYup4wAAynXQBbJhr1yc3m3eJrGok1xwmco7LwTGtzDlGbyVKSBwfo=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=lkW/TlWGDjdNfFngmb9ZaFyeWy5/kMVrenYK6EQzMLq4zpc79n8ezW4vBO+R6nKlWgC3icLSGaP1F3PcXcQpfIghoTOOK06nibxoF7bB9qK8hIVUcFGWwhLpdpG+0aoEqE8EbMLOCzC2+us/+jgaQLuOSlUTMZK/Ov4V71K0LMM=;
X-YMail-OSG: Qc26HeMVM1l8EKRpDzfZ0xxQmpJ8TTFSOX24ZD7h1CFZfQ4 xRSBSJLaAEkoAuhLjqpUlHUHddws1aMaNFmgfwpHFVCPS1xFnFKaDl5_se3_ 2FIwFKmZjL5rDKroBPGtgr2Q8EjfFVfWayxO4ZH.yo26oEYulR4lyWTtSlGT C2rg7JzHgXm5y5nuwi6g.kcBIQS78csIM4osl_1cgYo3QR9EJKPcMmwIeuq3 bHYD917bR4xPmVaaw.N3Of5MgBDOgbLbkFiz0bn_pfDG9t9vT481dEgytmYu 4hYVonwJbBseXKX_.iW1lHyTp.LdyB9u72A2c.uCaRzjc1QoXVBO.nrr3YXP C59iiUiaIOQ90Buw7lKDeR_IiAiI4_PS5IWDxagBm5O75hakVtNawHLErK2t qGMtjfcCJRCBDs6W.l.AJCvPJNnqyMpn39RTjwSTl3WsTvfepRsqR1MoE4kG YSnZOpJmC9asjXaBwyVIfQdBpJ28MBTurqXjXwvg7he.aE_Gvg31g9Es2eFQ qphJMGoLe1FISAigMv7_Q_5foroS8mNcgHQFQ7Txo8CyWST2oHK9Db_AkAX7 oni_WUX6hC3KGbVVeSBQD.IK6bwNMrMl_E35Olft7jIBv58qZmpfgKQ--
Received: from [70.36.254.42] by web184404.mail.bf1.yahoo.com via HTTP; Wed, 28 Aug 2013 15:02:31 PDT
X-Rocket-MIMEInfo: 002.001, KzEKCkl0J3MgYXBwYXJlbnQgZnJvbSB0aGUgY3VycmVudCBmb3JtYXQgd2hldGhlciBhbiBhc3ltbWV0cmljIGtleSBpcyBwdWJsaWMgb3IgcHJpdmF0ZS4gQWRkaW5nIGFub3RoZXIgZWxlbWVudCBqdXN0IGNhdXNlcyBleHRyYSBjaGVja3Mgb24gdGhlIGZvcm1hdC4KCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwogRnJvbTogSnVzdGluIFJpY2hlciA8anJpY2hlckBtaXRyZS5vcmc.ClRvOiBNaWtlIEpvbmVzIDxNaWNoYWVsLkpvbmVzQG1pY3Jvc29mdC5jb20.IApDYzogImpvc2VAaWV0Zi4BMAEBAQE-
X-RocketYMMF: edmundjay@sbcglobal.net
X-Mailer: YahooMailWebService/0.8.156.576
References: <4E1F6AAD24975D4BA5B16804296739436B7FBEA6@TK5EX14MBXC283.redmond.corp.microsoft.com> <521E552B.6060100@mitre.org>
Message-ID: <1377727351.405.YahooMailNeo@web184404.mail.bf1.yahoo.com>
Date: Wed, 28 Aug 2013 15:02:31 -0700
From: Edmund Jay <ejay@mgi1.com>
To: Justin Richer <jricher@mitre.org>, Mike Jones <Michael.Jones@microsoft.com>
In-Reply-To: <521E552B.6060100@mitre.org>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="-420974808-570573868-1377727351=:405"
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
Reply-To: Edmund Jay <ejay@mgi1.com>
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 22:02:44 -0000

+1

It's apparent from the current format whether an asymmetric key is public or private. Adding another element just causes extra checks on the format.


________________________________
 From: Justin Richer <jricher@mitre.org>
To: Mike Jones <Michael.Jones@microsoft.com> 
Cc: "jose@ietf.org" <jose@ietf.org> 
Sent: Wednesday, August 28, 2013 12:53 PM
Subject: Re: [jose] FOR WG DISCUSSION: #82 part A - Possibly changing representation of private JWK fields
 

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".
> 

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