Re: [pkix] draft-turner-additional-methods-4kis to ISE

Sean Turner <turners@ieca.com> Thu, 21 June 2012 16:34 UTC

Return-Path: <turners@ieca.com>
X-Original-To: pkix@ietfa.amsl.com
Delivered-To: pkix@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 82B2A21F875B for <pkix@ietfa.amsl.com>; Thu, 21 Jun 2012 09:34:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.234
X-Spam-Level:
X-Spam-Status: No, score=-102.234 tagged_above=-999 required=5 tests=[AWL=0.031, BAYES_00=-2.599, IP_NOT_FRIENDLY=0.334, USER_IN_WHITELIST=-100]
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 yAYWt+tAsFWg for <pkix@ietfa.amsl.com>; Thu, 21 Jun 2012 09:34:37 -0700 (PDT)
Received: from gateway02.websitewelcome.com (gateway02.websitewelcome.com [69.41.242.20]) by ietfa.amsl.com (Postfix) with ESMTP id 5C63D21F8754 for <pkix@ietf.org>; Thu, 21 Jun 2012 09:34:37 -0700 (PDT)
Received: by gateway02.websitewelcome.com (Postfix, from userid 5007) id D3ECA8D81D0C7; Thu, 21 Jun 2012 11:34:36 -0500 (CDT)
Received: from gator1743.hostgator.com (gator1743.hostgator.com [184.173.253.227]) by gateway02.websitewelcome.com (Postfix) with ESMTP id C926A8D81D0A7 for <pkix@ietf.org>; Thu, 21 Jun 2012 11:34:36 -0500 (CDT)
Received: from [96.231.119.66] (port=42308 helo=thunderfish.local) by gator1743.hostgator.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77) (envelope-from <turners@ieca.com>) id 1ShkL6-0007o1-HN; Thu, 21 Jun 2012 11:34:36 -0500
Message-ID: <4FE34D1C.1040704@ieca.com>
Date: Thu, 21 Jun 2012 12:34:36 -0400
From: Sean Turner <turners@ieca.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120601 Thunderbird/13.0
MIME-Version: 1.0
To: "Manger, James H" <James.H.Manger@team.telstra.com>
References: <20120530193526.22578.94157.idtracker@ietfa.amsl.com> <4FC6775F.3070206@ieca.com> <4FE09FA0.7070006@ieca.com> <255B9BB34FB7D647A506DC292726F6E114F593B71D@WSMSG3153V.srv.dir.telstra.com>
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E114F593B71D@WSMSG3153V.srv.dir.telstra.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - gator1743.hostgator.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - ieca.com
X-BWhitelist: no
X-Source:
X-Source-Args:
X-Source-Dir:
X-Source-Sender: (thunderfish.local) [96.231.119.66]:42308
X-Source-Auth: sean.turner@ieca.com
X-Email-Count: 5
X-Source-Cap: ZG9tbWdyNDg7ZG9tbWdyNDg7Z2F0b3IxNzQzLmhvc3RnYXRvci5jb20=
Cc: "pkix@ietf.org" <pkix@ietf.org>
Subject: Re: [pkix] draft-turner-additional-methods-4kis to ISE
X-BeenThere: pkix@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: PKIX Working Group <pkix.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pkix>, <mailto:pkix-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/pkix>
List-Post: <mailto:pkix@ietf.org>
List-Help: <mailto:pkix-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pkix>, <mailto:pkix-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Jun 2012 16:34:38 -0000

James - thanks for the review.

On 6/21/12 3:22 AM, Manger, James H wrote:
> A few comments on "Additional methods for key identifiers":
>
>
> Truncation: are the "least significant bits" of a hash the right-most bits? I would have though keeping the leftmost bits was slightly more intuitive.

I'll add "(i.e., leftmost)" after "least significant bits".

> I think we better put an example in the draft: a SubjectPublicKeyValue; 2 (or 4) subjectKeyId extension values; and 2 (or 4) corresponding ext-skiSemantics values.

I'll add a new section:

****

This section provides some examples.  The keys and key identifiers are 
presented in hexadecimal (two hex digits per byte).

Given the following P-256 ECDSA key:

   047F7F35A79794C950060B8029FC8F363A28F11159692D9D34E6AC94819043
   4735F833B1A66652DC514337AFF7F5C9C75D670C019D95A5D639B72744C64A
   9128BB

The SHA-256 hash output of the key is as follows:

   E72EE6C9C63D2B7F960F0E0611B9800917B5F9494182403EF1BBA8927A57625E

Using method 1 in Section 2, the output is truncated as follows:

   E72EE6C9C63D2B7F960F0E0611B9800917B5F949

This value is then DER-encoded and placed in the SKI's OCTET STRING.

The SHA-512 hash output of the key is as follows:

   4EF48AB572113ADEC402CC415CF201D5C9969A8A41FE093C1C1D32D67DF66D58
   CD2A35607DC4452DF87750663668E2FE197E58A69059618CF0BA9D5C269106E9

Using method 2 in Section, the output is truncated as follows:

   4EF48AB572113ADEC402CC415CF201D5C9969A8A

This value is then DER-encoded and placed in the SKI's OCTET STRING.

******

> The ext-skiSemantics extension would be better if it held a single AlgorithmIdentifier -- identifying the algorithm used to generate the subject key id. Then the spec can define two such algorithms.
>
>    ext-skiSemantics EXTENSION ::= {
>      SYNTAX AlgorithmIdentifier
>      IDENTIFIED BY id-pe-skiSemantics }
>
>    alg-keyHash ALGORITHM ::= { AlgorithmIdentifier IDENTIFIER id-keyHash }
>
>    alg-keyInfoHash ALGORITHM ::= { AlgorithmIdentifier IDENTIFIER id-keyInfoHash }
>
>    alg-keyHash indicates that the key id is the, possibly truncated, hash of
>    the value of the BIT STRING subjectPublicKey (excluding the tag, length,
>    and number of unused bits). The amount of truncation can be determined from the
>    length of the actual key identifier. Truncation keeps the least significant bits
>    of the hash. The required parameter of this algorithm identifies the hash
>    algorithm that is used.
>
>    alg-keyInfoHash differs from alg-keyHash in that the hash covers the
>    key algorithm id in addition to the actual public key.  alg-keyInfoHash
>    indicates that the key id is the, possibly truncated, hash of the
>    subjectPublicKeyInfo field. The amount of truncation can be determined from the
>    actual key identifier value. Truncation keeps the least significant bits
>    of the hash. The required parameter of this algorithm identifies the hash
>    algorithm that is used.

If skiOutput was dumped (see the response below about my horrible c/p 
error), then this might be a possibility.

My objection to the proposed syntax is that the predominant use case I 
see is where a CA only wants to indicate that it used SHA-256/512 
instead of SHA-1 to make the SKI.  With the current syntax it collapses 
to one oid: id-sha256/512 in skiAlgorithm, skiInput and skiOutput are 
omitted.  With the proposed syntax we'd need to carry two oids.

> If the spec is going to define alg-keyInfoHash (which it currently does under
> the name id-subjectPublicKeyInfo) for the extension (section 3) it really needs
> to define it as additional methods for generating key ids (section 2).

There's only one there because only one was asked for.  I'm willing to 
add more - got any in mind?

> The current model of the extension consists of a hash algorithm, an input id, and an output id. This is confusing and too restrictive. The skiOutput field, in particular, is unclear. It talks about the *input*, and repeats a sentence from the skiInput definition.
>
>       o skiOutput indicates the key identifier's semantics.  If this
>         field is absent, then key identifier is the hash (algorithm
>         identified in kiAlgorithm) of the value of the BIT STRING
>         subjectPublicKey (excluding the tag, length, and number of unused
>         bits).  This document defines the OID id-subjectPublicKeyInfo to
>         be used when the input to the hash algorithm is the certificate's
>         SubjectPublicKeyInfo field [RFC5280].

Wow now wonder you're confused.  An amazingly bad c/p error on my part. 
Apologies.  That last two sentences should be replaced with:

  If this field is absent, then key identifier is *the output of*
  the hash (algorithm identified in skiAlgorithm) of the value of
  the BIT STRING subjectPublicKey (excluding the tag, length, and
  number of unused bits).  *That is, it is just like using the 1st
  key identifier example method in [RFC5280], but instead of
  using SHA-1 the truncated output of the algorithm in
  skiAlgorithm is used.  This document does not define any OIDs
  for this field.*

Some thought that it would be good to include a field to indicate the 
semantics of the output.  No real examples were given so I've left this 
one open (i.e., undefined).  If anybody's got any suggestions I'd be 
glad to add it/them.

> Typos:
>
> 1 "Introduction", 2nd paragraph, last sentence, "*" brackets changes.
>
>    In addition, some *security* protocols (e.g., SMIME [RFC5751])
>    *use key identifiers* as a shorthand way to refer to a cert.
>
> 3 "Subject Key identifier Semantics Extension", 1st and 2nd dot points.
>    WRONG "akiAlgorithm" and "akiInput"
>    RIGHT "skiAlgorithm" and "skiInput"

Fixed both of these thanks.  Steve also caught some other typos in the 
intro.

spt