Subject: [pkix] [Technical Errata Reported] RFC5912 (4145)

From: RFC Errata System <[email-masked]>
Date: Thu, 23 Oct 2014 12:23:33 -0700 (PDT)

The following errata report has been submitted for RFC5912,
"New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)".

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

--------------------------------------
Type: Technical
Reported by: Pierce Leonberger <[email-masked]>

Section: 14

Original Text
-------------
  --  3.  A more complex version, but one that automatically ties
  --      together both the signature algorithm and the
  --      signature value for automatic decoding.
  --
  SIGNED{ToBeSigned} ::= SEQUENCE {
     toBeSigned           ToBeSigned,
     algorithmIdentifier  SEQUENCE {
         algorithm        SIGNATURE-ALGORITHM.
                            &id({SignatureAlgorithms}),
         parameters       SIGNATURE-ALGORITHM.
                            &Params({SignatureAlgorithms}
                              [email-masked]}) OPTIONAL
     },
     signature BIT STRING (CONTAINING SIGNATURE-ALGORITHM.&Value(
                              {SignatureAlgorithms}
                              [email-masked]}))
  }

Corrected Text
--------------
  SIGNED{ToBeSigned} ::= SEQUENCE {
     toBeSigned           ToBeSigned,
     algorithmIdentifier  SEQUENCE {
         algorithm        SIGNATURE-ALGORITHM.
                            &id({SignatureAlgorithms}),
         parameters       SIGNATURE-ALGORITHM.
                            &Params({SignatureAlgorithms}
                              [email-masked]}) OPTIONAL
     },
     signature BIT STRING 
  }

Notes
-----
I *believe* the 3rd option for SIGNED{} is invalid.  The "signature" BIT STRING contains an OpenType which references an optional class field.  It's possible to define objects with no type and OpenTypes must refer to a type.  There's no mechanism to allow an OpenType to reference random bytes (not ASN.1 encoded).

I understand the intent is to allow for automatic decoding, but unless the "&Value" is required in SIGNATURE-ALGORITHM this will not work.  Requiring it will not work because not all signature algorithms require the signature value to be encoded (e.g. RSA).  The syntax would be valid is if "signature" was OPTIONAL (obviously not desirable).

So I propose we revert "signature" to "BIT STRING" without constraints.

Instructions:
-------------
This erratum 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. 

--------------------------------------
RFC5912 (draft-ietf-pkix-new-asn1-08)
--------------------------------------
Title               : New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)
Publication Date    : June 2010
Author(s)           : P. Hoffman, J. Schaad
Category            : INFORMATIONAL
Source              : Public-Key Infrastructure (X.509)
Area                : Security
Stream              : IETF
Verifying Party     : IESG