Subject: [pkix] [Editorial Errata Reported] RFC5280 (3085)

From: RFC Errata System <[email-masked]>
Date: Fri, 6 Jan 2012 20:02:02 -0800 (PST)

The following errata report has been submitted for RFC5280,
"Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile".

--------------------------------------
You may review the report below and at:
http://www.rfc-editor.org/errata_search.php?rfc=5280&eid=3085

--------------------------------------
Type: Editorial
Reported by: Jim Wigginton <[email-masked]>

Section: A.1

Original Text
-------------
BuiltInStandardAttributes ::= SEQUENCE {
   country-name                  CountryName OPTIONAL,
   administration-domain-name    AdministrationDomainName OPTIONAL,
   network-address           [0] IMPLICIT NetworkAddress OPTIONAL,
     -- see also extended-network-address
   terminal-identifier       [1] IMPLICIT TerminalIdentifier OPTIONAL,
   private-domain-name       [2] PrivateDomainName OPTIONAL,
   organization-name         [3] IMPLICIT OrganizationName OPTIONAL,
     -- see also teletex-organization-name
   numeric-user-identifier   [4] IMPLICIT NumericUserIdentifier
                                 OPTIONAL,
   personal-name             [5] IMPLICIT PersonalName OPTIONAL,
     -- see also teletex-personal-name
   organizational-unit-names [6] IMPLICIT OrganizationalUnitNames
                                 OPTIONAL }
     -- see also teletex-organizational-unit-names

Corrected Text
--------------
BuiltInStandardAttributes ::= SEQUENCE {
   country-name                  CountryName OPTIONAL,
   administration-domain-name    AdministrationDomainName OPTIONAL,
   network-address           [0] IMPLICIT NetworkAddress OPTIONAL,
     -- see also extended-network-address
   terminal-identifier       [1] IMPLICIT TerminalIdentifier OPTIONAL,
   private-domain-name       [2] IMPLICIT PrivateDomainName OPTIONAL,
   organization-name         [3] IMPLICIT OrganizationName OPTIONAL,
     -- see also teletex-organization-name
   numeric-user-identifier   [4] IMPLICIT NumericUserIdentifier
                                 OPTIONAL,
   personal-name             [5] IMPLICIT PersonalName OPTIONAL,
     -- see also teletex-personal-name
   organizational-unit-names [6] IMPLICIT OrganizationalUnitNames
                                 OPTIONAL }
     -- see also teletex-organizational-unit-names

Notes
-----
Seems to me that private-domain-name ought to be tagged IMPLICIT just like everything else?

Instructions:
-------------
This errata is currently posted as "Reported". If necessary, please
use "Reply All" to discuss whether it should be verified or
rejected. When a decision is reached, the verifying party (IESG)
can log in to change the status and edit the report, if necessary. 

--------------------------------------
RFC5280 (draft-ietf-pkix-rfc3280bis-11)
--------------------------------------
Title               : Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
Publication Date    : May 2008
Author(s)           : D. Cooper, S. Santesson, S. Farrell, S. Boeyen, R. Housley, W. Polk
Category            : PROPOSED STANDARD
Source              : Public-Key Infrastructure (X.509)
Area                : Security
Stream              : IETF
Verifying Party     : IESG

---

From: Stephen Farrell <[email-masked]>
Date: Sun, 08 Jan 2012 15:04:06 +0000

Regardless of whether or not this change would be
correct, its not editorial if you change the asn.1
module IMO.

And changing the x.400 syntax is also not a thing
for pkix so I'd also argue that this ought be
rejected regardless of editorial/technical unless
we made a mistake copying the x.400 stuff or
something like that.

S

On 01/07/2012 04:02 AM, RFC Errata System wrote:
> Reported by: Jim Wigginton<[email-masked]>
>
> Section: A.1
>
> Original Text
> -------------

---

From: Stefan Santesson <[email-masked]>
Date: Mon, 09 Jan 2012 04:41:45 +0100

I believe this Errata is wrong and should be rejected.

PrivateDomainName (unlike the other tagged components) is an untagged
CHOICE type.

Quote from X.680:

'30.8       The IMPLICIT alternative shall not be used if the type defined
by "Type" is an
untagged choice type or an untagged open type or an untagged
"DummyReference" (see ITU-T Rec. X.683 | ISO/IEC 8824-4, 8.3).'

/Stefan

On 12-01-08 4:04 PM, "Stephen Farrell" <[email-masked]> wrote:

>> Title               : Internet X.509 Public Key Infrastructure
>>Certificate and Certificate Revocation List (CRL) Profile

---

From: Sean Turner <[email-masked]>
Date: Mon, 09 Jan 2012 09:16:59 -0500

I'm going to reject this errata based on Stefan's response.

spt

On 1/8/12 10:41 PM, Stefan Santesson wrote:
> On 12-01-08 4:04 PM, "Stephen Farrell"<[email-masked]>  wrote:
>
>>

---

From: Martin Rex <[email-masked]>
Date: Tue, 10 Jan 2012 17:34:37 +0100 (MET)

> we made a mistake copying the x.400 stuff or

I'm _no_ ASN.1 expert, but the reported issue looks like
one of several inconsistencies of rfc5280 with ITU-T/X.509.

rfc5280 claims to be a profile of X.509 08/2005, but I see the definition
of "BuiltInStandardAttributes" only in X.509 11/2008, Annex J, page 163.

In X.509 11/2008, the relevant ASN.1 module says:

  DEFINITIONS IMPLICIT TAGS ::=
  BEGIN

    [...]

  BuiltInStandardAttributes ::= SEQUENCE {
      country-name                   CountryName              OPTIONAL,
      administration-domain-name     AdministrationDomainName OPTIONAL,
      network-address            [0] NetworkAddress           OPTIONAL,
            -- see also extended-network-address
      terminal-identifier        [1] TerminalIdentifier       OPTIONAL,
      private-domain-name        [2] PrivateDomainName        OPTIONAL,
      organization-name          [3] OrganizationName         OPTIONAL,
            -- see also teletex-organization-name
      numeric-user-identifier    [4] NumericUserIdentifier    OPTIONAL,
      personal-name              [5] PersonalName             OPTIONAL,
            -- see also teletex-personal-name
      organizational-unit-names  [6] OrganizationalUnitNames  OPTIONAL
            -- see also teletex-organizational-unit-names
  }

whereas rfc5280 Appendix A.1 says:

  A.1. Explicitly Tagged Module, 1988 Syntax

  DEFINITIONS EXPLICIT TAGS ::=

  BEGIN

    [...]

      numeric-user-identifier   [4] IMPLICIT NumericUserIdentifier   OPTIONAL,
      organizational-unit-names [6] IMPLICIT OrganizationalUnitNames OPTIONAL }

So the divergence from X.509 appears to exists not only for
"PrivateDomainName", but also CountryName and AdministrativeDomainName.

-Martin

---

From: Stefan Santesson <[email-masked]>
Date: Tue, 10 Jan 2012 19:36:46 +0100

Martin,

Even though it might look to be different, I see no inconsistency between
X.509 and RFC 5280. I'm not ASN.1 expert either, but I will try to sort
this out, allowing others to shoot me down if I say something wrong here.

The difference between IMPLICIT and EXPLICIT tags is that IMPLICIT tagging
replaces the original tag of the underlying type. While EXPLICIT tag
creates an outer "wrapping" TLV element with the specified tag value for
the wrapping element, preserving the original tag on the underlying type
in the inner element.

IMPLICIT tagging is illegal if the underlying type has not tag, which is
the case for the CHOICE type. This is easy to understand if the choice is
between an integer or string element. It would be impossible to decode
this if the universal tags for integer/stringType was replaced by an
implicit tag. The decoder would not know if the chosen underlying value
was an integer or a string.

So even if you would specify IMPLICIT tagging for a CHOICE type, it will
in fact result in EXPLICIT tagging, since there is not tag to replace.

X.680 explains this:

30.6       The tagging construction specifies explicit tagging if any of
the following holds:
a)    the "Tag EXPLICIT Type" alternative is used;
b)    the "Tag Type" alternative is used and the value of "TagDefault" for
the module is either EXPLICIT TAGS or is empty;
c)    the "Tag Type" alternative is used and the value of "TagDefault" for
the module is IMPLICIT TAGS or AUTOMATIC TAGS, but the type defined by
"Type" is an untagged choice type, an untagged open type, or an untagged
"DummyReference" (see ITU-T Rec. X.683 | ISO/IEC 8824-4, Error! Reference
source not found.).

So as you see c) is the case for the X.509 spec.
X.509 has specified IMPLICIT as the default tagging for the module (set by
"DEFINITIONS IMPLICIT TAGS")
PrivateDomainName is in face of type CHOICE, which means that according to
c), it will be provided with EXPLICIT tagging.

The quoted RFC 5280 ASN.1 module has EXPLICIT tagging set as default (set
by "DEFINITIONS EXPLICIT TAGS")
This means that unlike the X.509 module, the RFC 5280 must specify where
tags are IMPLICIT.

The RFC 5280 module does this by defining IMPLICIT for all attributes
except for PrivateDomainName, which is an untagged CHOICE type and thus
have an EXPLICIT tag.

CountryName and AdministrativeDomainName has no tags at all, so not
differences here between X.509 and RFC 5280.

So to sum this up, as I see it, X.509 and RFC 5280 uses identical tagging,
expressed through different syntax.
And, the errata is wrong.

/Stefan