Re: [certid] Need to define "most specific RDN"

Bruno Harbulot <Bruno.Harbulot@manchester.ac.uk> Tue, 29 June 2010 22:31 UTC

Return-Path: <Bruno.Harbulot@manchester.ac.uk>
X-Original-To: certid@core3.amsl.com
Delivered-To: certid@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 7A8AB28C0EB for <certid@core3.amsl.com>; Tue, 29 Jun 2010 15:31:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.209
X-Spam-Level:
X-Spam-Status: No, score=-3.209 tagged_above=-999 required=5 tests=[AWL=0.790, BAYES_50=0.001, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tMQuQ6tWGlLU for <certid@core3.amsl.com>; Tue, 29 Jun 2010 15:31:24 -0700 (PDT)
Received: from probity.mcc.ac.uk (probity.mcc.ac.uk [130.88.200.94]) by core3.amsl.com (Postfix) with ESMTP id 58AFD28C0DD for <certid@ietf.org>; Tue, 29 Jun 2010 15:31:02 -0700 (PDT)
Received: from rankine.its.manchester.ac.uk ([130.88.25.196]) by probity.mcc.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from <Bruno.Harbulot@manchester.ac.uk>) id 1OTjKi-0004kY-1e; Tue, 29 Jun 2010 23:31:12 +0100
Received: from 94-192-243-24.zone6.bethere.co.uk ([94.192.243.24]:54906 helo=mymachine) by rankine.its.manchester.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from <Bruno.Harbulot@manchester.ac.uk>) id 1OTjKh-0004E9-QI; Tue, 29 Jun 2010 23:31:11 +0100
Message-ID: <4C2A7428.3060801@manchester.ac.uk>
Date: Tue, 29 Jun 2010 23:31:04 +0100
From: Bruno Harbulot <Bruno.Harbulot@manchester.ac.uk>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4
MIME-Version: 1.0
To: Peter Saint-Andre <stpeter@stpeter.im>
References: <p062408bcc83880a30dd0@[10.20.30.158]> <4C2A6E8B.7060005@stpeter.im>
In-Reply-To: <4C2A6E8B.7060005@stpeter.im>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Authenticated-Sender: Bruno Harbulot from 94-192-243-24.zone6.bethere.co.uk (mymachine) [94.192.243.24]:54906
X-Authenticated-From: Bruno.Harbulot@manchester.ac.uk
Cc: certid@ietf.org
Subject: Re: [certid] Need to define "most specific RDN"
X-BeenThere: certid@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Representation and verification of identity in certificates <certid.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/certid>, <mailto:certid-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/certid>
List-Post: <mailto:certid@ietf.org>
List-Help: <mailto:certid-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/certid>, <mailto:certid-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 29 Jun 2010 22:31:26 -0000

On 29/06/2010 23:07, Peter Saint-Andre wrote:
> On 6/11/10 6:10 PM, Paul Hoffman wrote:
>>> However, if this legacy identifer configuration is employed, then
>>> the server's fully-qualified DNS domain name MUST be placed in the
>>> last (most specific) RDN within the RDN sequence making up the
>>> certificate's subjectName, as the order of RDNs is determined by
>>> the DER- encoded Name within the server's PKIX certificate.
>>
>> I always get this wrong, so I assume people less familiar with PKIX
>> do as well. Before you say "(most specific)" as if it was a toss-off,
>> you should define "most specific RDN" as "the last RDN within a
>> sequence", probably in section 1.3.
>
> Two questions:
>
> 1. Some people use "most significant" and "most specific"
> interchangeably. Which is correct?
>
> 2. More substantially, we currently have this text:
>
>     The subject field of a PKIX certificate is defined as an X.501 type
>     Name and known as a Distinguished Name (DN) -- see [X.501] and
>     [PKIX].  A DN is an ordered sequence of Relative Distinguished Names
>     (RDNs), where each RDN is a set (i.e., an unordered group) of type-
>     and-value pairs or "attribute value assertions" (AVAs) [LDAP-DN],
>     each of which asserts some attribute about the subject of the
>     certificate.  In the DER encoding of a DN, the RDNs are always in
>     order from most significant to least significant (i.e., the first RDN
>     is most significant and the last RDN is least significant); however,
>     in the string representation of a DN as used in various protocols and
>     data formats, the RDNs might be ordered from most significant to
>     least significant (e.g., this is true of LDAP) or from least
>     significant to most significant.
>
> Is the first RDN most specific, or is the last RDN most specific? I
> realize that the first one now will later be last [1] depending on the
> string representation, but my understanding is that in the DER encoding
> it's the first RDN that is most specific. Corrections are welcome.

I've always understood (perhaps by mistake) that the most specific was 
the last in the sequence. This also seems to reflect going "deeper" in 
the LDAP tree.

For example, (from www.google.com:443), the Subject DN is:

  156  104:     SEQUENCE {
  158   11:       SET {
  160    9:         SEQUENCE {
  162    3:           OBJECT IDENTIFIER countryName (2 5 4 6)
  167    2:           PrintableString 'US'
          :           }
          :         }
  171   19:       SET {
  173   17:         SEQUENCE {
  175    3:           OBJECT IDENTIFIER stateOrProvinceName (2 5 4 8)
  180   10:           PrintableString 'California'
          :           }
          :         }
  192   22:       SET {
  194   20:         SEQUENCE {
  196    3:           OBJECT IDENTIFIER localityName (2 5 4 7)
  201   13:           TeletexString 'Mountain View'
          :           }
          :         }
  216   19:       SET {
  218   17:         SEQUENCE {
  220    3:           OBJECT IDENTIFIER organizationName (2 5 4 10)
  225   10:           TeletexString 'Google Inc'
          :           }
          :         }
  237   23:       SET {
  239   21:         SEQUENCE {
  241    3:           OBJECT IDENTIFIER commonName (2 5 4 3)
  246   14:           TeletexString 'www.google.com'
          :           }
          :         }
          :       }



I think most I've seen follow this naming structure: country first and 
CN last. Intuitively, this seems to suggest that the first in the 
sequence is the least specific and that the last in the sequence is the 
most specific, if we use this terminology. (Is this correct?)


Best wishes,

Bruno.