Re: [jose] Keys in the documents

Richard Barnes <rlb@ipv.sx> Tue, 16 July 2013 23:21 UTC

Return-Path: <rlb@ipv.sx>
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 9A7DF21F9D71 for <jose@ietfa.amsl.com>; Tue, 16 Jul 2013 16:21:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.976
X-Spam-Level:
X-Spam-Status: No, score=-2.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 MddVck3DNkol for <jose@ietfa.amsl.com>; Tue, 16 Jul 2013 16:21:15 -0700 (PDT)
Received: from mail-oa0-f46.google.com (mail-oa0-f46.google.com [209.85.219.46]) by ietfa.amsl.com (Postfix) with ESMTP id 12CEC21F9DA8 for <jose@ietf.org>; Tue, 16 Jul 2013 16:21:14 -0700 (PDT)
Received: by mail-oa0-f46.google.com with SMTP id h1so1641543oag.19 for <jose@ietf.org>; Tue, 16 Jul 2013 16:21:14 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=Eiqzxv73HHxkcvhiiz60BLNpUgW0OYNGSsVGNzvDEsA=; b=nuVNZwWYuGVaVdLjMwAbljQmpqKOABRkAQL3F9aFqFGLtOkEJOj5+XkkQ6jk/+B4Lq PWsA0jXWVBcG+CFIy4/aRO7lTjvltz0ourYFQeAuKlz2/LZ2SVJ06hf6vJLmosummrTm yUwee3jaitzQih4aJuV0LdTm6Y46bysPfK2e0oM62bhik/GrhsjqQrbSQkndYN4cFAIP 5BrveriJ3Ga37Pxd5tuTqSoObmJlc//UfMMTroLNiBdLHKSuvaERpuIo8QEFKBaT9+W8 NlpVb1XIJGDktRkpQ6nThbeZPOCn0vmnkHLDVubU/W0xt/GAl4wpbYoA0+n0Wa0/00D8 rkCg==
MIME-Version: 1.0
X-Received: by 10.60.134.239 with SMTP id pn15mr4643584oeb.99.1374016874142; Tue, 16 Jul 2013 16:21:14 -0700 (PDT)
Received: by 10.60.26.135 with HTTP; Tue, 16 Jul 2013 16:21:14 -0700 (PDT)
X-Originating-IP: [72.66.6.13]
In-Reply-To: <CA+k3eCTdORHQOZXjx5wys=8Q9doDq3FD783viYzfQe86-gbN_Q@mail.gmail.com>
References: <4E1F6AAD24975D4BA5B16804296739436787EB2A@TK5EX14MBXC283.redmond.corp.microsoft.com> <4E1F6AAD24975D4BA5B16804296739436B6BE7D1@TK5EX14MBXC283.redmond.corp.microsoft.com> <CA+k3eCTdORHQOZXjx5wys=8Q9doDq3FD783viYzfQe86-gbN_Q@mail.gmail.com>
Date: Tue, 16 Jul 2013 19:21:14 -0400
Message-ID: <CAL02cgR=OUQK1a2DVs1LX-xCpSqSXHsCZnr6i8E9XoCSbN5t9A@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
To: Brian Campbell <bcampbell@pingidentity.com>
Content-Type: multipart/alternative; boundary="047d7b41ce48b2e33604e1a93b5e"
X-Gm-Message-State: ALoCoQkmmeCQ/3yZaoT9Txy8hEmthr+c9oCs+dy1fnJoHo0i2X4QHtF39uY1RwADOVwHvAaFVLmQ
Cc: Mike Jones <Michael.Jones@microsoft.com>, Jim Schaad <ietf@augustcellars.com>, "jose@ietf.org" <jose@ietf.org>, "Matt Miller (mamille2)" <mamille2@cisco.com>
Subject: Re: [jose] Keys in the documents
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: Tue, 16 Jul 2013 23:21:32 -0000

On Tue, Jul 16, 2013 at 4:40 PM, Brian Campbell
<bcampbell@pingidentity.com>wrote:

> I like this change and think it will make it much more straightforward to
> consume the examples.
>
> One thing I noticed though, in Section 5.3.2 of JWA "JWK Parameters for
> RSA Private Keys" [1] it says that all the members (excepting "oth") are
> required for private keys.
>
> However the example JWK RSA keys in JWE [2] and JWS [3] only have the "d"
> (Private Exponent) Parameter part of the private portion.
>
> Can we relax/change JWA to say something like "d" is always required and
> either all of others (with the caveat for "oth") are required to be there
> together or that they all need to be omitted?
>
> The Private Exponent is all that's functionally needed, right? And the
> rest are optimizations? I honestly don't know much (okay anything) about
> CRT vs plain old RSA keys. But it seems like there are cases where it'd be
> totally reasonable to have just the "d" - and the examples in JWS and JWE
> seem to make that point.
>

Yes.  This change should be made.  Technically, only the modulus (n) and
private exponent (d) are required.  So the requirement levels for a private
key would be:
n, d: MUST
e: SHOULD (so that you can derive the corresponding public key)
p,q,dp,dq,qi: MAY (since these are all optimizations)

--Richard


>
> [1]
> http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-13#section-5.3.2
> [2]
> http://tools.ietf.org/html/draft-ietf-jose-json-web-encryption-13#appendix-A.1.4
> [3]
> http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-13#appendix-A.2.1
>
>
> On Sun, Jul 14, 2013 at 3:03 PM, Mike Jones <Michael.Jones@microsoft.com>wrote:
>
>>  FYI – this was done in the -12 drafts.****
>>
>> ** **
>>
>>                                                             -- Mike****
>>
>> ** **
>>
>> *From:* Mike Jones [mailto:Michael.Jones@microsoft.com]
>> *Sent:* Friday, June 21, 2013 8:58 AM
>> *To:* Matt Miller (mamille2); Richard Barnes
>>
>> *Cc:* Jim Schaad; draft-ietf-jose-json-web-encryption@tools.ietf.org;
>> jose@ietf.org
>> *Subject:* RE: [jose] Keys in the documents****
>>
>>  ** **
>>
>> Will do.****
>>   ------------------------------
>>
>> *From: *Matt Miller (mamille2)
>> *Sent: *6/21/2013 6:06 AM
>> *To: *Richard Barnes
>> *Cc: *Jim Schaad; draft-ietf-jose-json-web-encryption@tools.ietf.org;
>> jose@ietf.org
>> *Subject: *Re: [jose] Keys in the documents
>>
>> +1
>>
>> On Jun 20, 2013, at 8:48 PM, Richard Barnes <rlb@ipv.sx>
>> wrote:
>>
>> > +1
>> >
>> > On Thursday, June 20, 2013, Jim Schaad wrote:
>> >
>> >> Is there any reason not to provide the public and private keys in the
>> >> appendixes as JWK objects?  This would make them easier to understand
>> and
>> >> put them into a format that one expects to be understood by JOSE
>> systems.*
>> >> ***
>> >>
>> >> ** **
>> >>
>> >> Jim****
>> >>
>> >> ** **
>> >>
>>
>> - m&m
>>
>> Matt Miller < mamille2@cisco.com >
>> Cisco Systems, Inc.****
>>
>> _______________________________________________
>> jose mailing list
>> jose@ietf.org
>> https://www.ietf.org/mailman/listinfo/jose
>>
>>
>


On Tue, Jul 16, 2013 at 4:40 PM, Brian Campbell
<bcampbell@pingidentity.com>wrote:

> I like this change and think it will make it much more straightforward to
> consume the examples.
>
> One thing I noticed though, in Section 5.3.2 of JWA "JWK Parameters for
> RSA Private Keys" [1] it says that all the members (excepting "oth") are
> required for private keys.
>
> However the example JWK RSA keys in JWE [2] and JWS [3] only have the "d"
> (Private Exponent) Parameter part of the private portion.
>
> Can we relax/change JWA to say something like "d" is always required and
> either all of others (with the caveat for "oth") are required to be there
> together or that they all need to be omitted?
>
> The Private Exponent is all that's functionally needed, right? And the
> rest are optimizations? I honestly don't know much (okay anything) about
> CRT vs plain old RSA keys. But it seems like there are cases where it'd be
> totally reasonable to have just the "d" - and the examples in JWS and JWE
> seem to make that point.
>
> [1]
> http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-13#section-5.3.2
> [2]
> http://tools.ietf.org/html/draft-ietf-jose-json-web-encryption-13#appendix-A.1.4
> [3]
> http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-13#appendix-A.2.1
>
>
> On Sun, Jul 14, 2013 at 3:03 PM, Mike Jones <Michael.Jones@microsoft.com>wrote:
>
>>  FYI – this was done in the -12 drafts.****
>>
>> ** **
>>
>>                                                             -- Mike****
>>
>> ** **
>>
>> *From:* Mike Jones [mailto:Michael.Jones@microsoft.com]
>> *Sent:* Friday, June 21, 2013 8:58 AM
>> *To:* Matt Miller (mamille2); Richard Barnes
>>
>> *Cc:* Jim Schaad; draft-ietf-jose-json-web-encryption@tools.ietf.org;
>> jose@ietf.org
>> *Subject:* RE: [jose] Keys in the documents****
>>
>>  ** **
>>
>> Will do.****
>>   ------------------------------
>>
>> *From: *Matt Miller (mamille2)
>> *Sent: *6/21/2013 6:06 AM
>> *To: *Richard Barnes
>> *Cc: *Jim Schaad; draft-ietf-jose-json-web-encryption@tools.ietf.org;
>> jose@ietf.org
>> *Subject: *Re: [jose] Keys in the documents
>>
>> +1
>>
>> On Jun 20, 2013, at 8:48 PM, Richard Barnes <rlb@ipv.sx>
>> wrote:
>>
>> > +1
>> >
>> > On Thursday, June 20, 2013, Jim Schaad wrote:
>> >
>> >> Is there any reason not to provide the public and private keys in the
>> >> appendixes as JWK objects?  This would make them easier to understand
>> and
>> >> put them into a format that one expects to be understood by JOSE
>> systems.*
>> >> ***
>> >>
>> >> ** **
>> >>
>> >> Jim****
>> >>
>> >> ** **
>> >>
>>
>> - m&m
>>
>> Matt Miller < mamille2@cisco.com >
>> Cisco Systems, Inc.****
>>
>> _______________________________________________
>> jose mailing list
>> jose@ietf.org
>> https://www.ietf.org/mailman/listinfo/jose
>>
>>
>