Skip to main content

Update to Digital Signatures on Internet-Draft Documents
draft-housley-id-sig-update-01

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft that was ultimately published as RFC 8358.
Author Russ Housley
Last updated 2017-12-04 (Latest revision 2017-11-13)
RFC stream Internet Engineering Task Force (IETF)
Formats
Reviews
Additional resources
Stream WG state Submitted to IESG for Publication
Document shepherd Jim Schaad
Shepherd write-up Show Last changed 2017-11-13
IESG IESG state Became RFC 8358 (Informational)
Consensus boilerplate Unknown
Telechat date (None)
Responsible AD Alissa Cooper
Send notices to (None)
draft-housley-id-sig-update-01
INTERNET-DRAFT                                                R. Housley
Intended Status: Informational                            Vigil Security
Updates: RFC 5485 (once approved)
Expires: 13 May 2018                                    13 November 2017

        Update to Digital Signatures on Internet-Draft Documents
                  <draft-housley-id-sig-update-01.txt>

Abstract

   RFC 5485 specifies the conventions for digital signatures on
   Internet-Draft documents.  The Cryptographic Message Syntax (CMS) is
   used to create a detached signature, which is stored in a separate
   companion file so that no existing utilities are impacted by the
   addition of the digital signature.

   The RFC Editor recently published the first RFC that includes non-
   ASCII characters in a "text" file.  The conventions specified in RFC
   7997 were followed.  We assume that non-ASCII characters will soon
   start appearing in Internet-Drafts as well.  This document updates
   the handling of digital signatures on Internet-Draft document for
   non-ASCII characters in a "text" file.

   This document (once approved) updates RFC 5485.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

Copyright Notice

   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

Housley                                                         [Page 1]
INTERNET-DRAFT                                             November 2017

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  2
     1.1.  Terminology  . . . . . . . . . . . . . . . . . . . . . . .  3
     1.2.  ASN.1  . . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Detached Signature Files . . . . . . . . . . . . . . . . . . .  3
   3.  Additional Content Types . . . . . . . . . . . . . . . . . . .  4
   4.  Need for Canonicalization  . . . . . . . . . . . . . . . . . .  5
     4.1.  ASCII, UTF8, and HTML File Canonicalization  . . . . . . .  5
     4.2.  XML File Canonicalization  . . . . . . . . . . . . . . . .  6
     4.3.  No Canonicalization of Other File Formats  . . . . . . . .  6
   5.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  6
   6.  Security Considerations  . . . . . . . . . . . . . . . . . . .  7
   7.  Deployment and Operational Considerations  . . . . . . . . . .  7
   8.  Normative References . . . . . . . . . . . . . . . . . . . . .  7
   9.  Informative References . . . . . . . . . . . . . . . . . . . .  7
   10.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  8
   Author's Address . . . . . . . . . . . . . . . . . . . . . . . . .  8

1.  Introduction

   RFC 5485 [IDSIG] specifies the conventions for digital signatures on
   Internet-Draft documents.  The Cryptographic Message Syntax (CMS)
   [CMS] is used to create a detached signature, which is stored in a
   separate companion file so that no existing utilities are impacted by
   the addition of the digital signature.

   The RFC Editor recently published the first RFC that includes non-
   ASCII characters in a "text" file.  The conventions specified in RFC
   7997 [RFCED] were followed.  We assume that non-ASCII characters will
   soon start appearing in Internet-Drafts as well.  This document
   updates the handling of digital signatures on Internet-Draft document
   for non-ASCII characters in a "text" file.

   This document (once approved) updates RFC 5485 [IDSIG], which
   contains the conventions that have been used by IETF Secretariat to
   digitally sign Internet-Drafts for the past few years.  The IETF
   Secretariat generates the digital signature shortly after the

Housley                                                         [Page 2]
INTERNET-DRAFT                                             November 2017

   Internet-Draft is posted in the repository.

   The digital signature allows anyone to confirm that the contents of
   the Internet-Draft have not been altered since the time that the
   document was signed.

   The digital signature is intended to provide a straightforward way
   for anyone to determine whether a particular file contains the
   Internet-Draft that was made available by the IETF Secretariat.  The
   signing-time associated with the signature provides the wall clock
   time at which the signature was generate; it is not intended to
   provide a trusted timestamp.

1.1.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [STDWORDS].

1.2.  ASN.1

   The CMS uses Abstract Syntax Notation One (ASN.1) [X.680].  ASN.1 is
   a formal notation used for describing data protocols, regardless of
   the programming language used by the implementation.  Encoding rules
   describe how the values defined in ASN.1 will be represented for
   transmission.  The Basic Encoding Rules (BER) [X.690] are the most
   widely employed rule set, but they offer more than one way to
   represent data structures.  For example, definite length encoding and
   indefinite length encoding are supported.  This flexibility is not
   desirable when digital signatures are used.  As a result, the
   Distinguished Encoding Rules (DER) [X.690] were invented.  DER is a
   subset of BER that ensures a single way to represent a given value.
   For example, DER always employs definite length encoding.

2.  Detached Signature Files

   All Internet-Draft file names begin with "draft-".  The next portion
   of the file name depends on the source of the document.  For example,
   documents from IETF working groups usually have "ietf-" followed by
   the working group abbreviation, and this is followed by a string that
   helps people figure out the subject of the document.

   All Internet-Draft file names end with a hyphen followed by a two
   digit version number and a suffix.  The suffix indicates the type of
   file.  For example, a text file will have a suffix of ".txt".  Today,
   plain text files are the most common, but the RFC Editor has
   announced plans to make use of other formats [RFCSERIES].  Each file
   format employs a different suffix.

Housley                                                         [Page 3]
INTERNET-DRAFT                                             November 2017

   Going forward, one cannot assume that a text file with a suffix of
   ".txt" will contain only ASCII characters.

   The companion signature file has exactly the same file name as the
   RFC or Internet-Draft, except that ".p7s" is added to the end.  This
   file name suffix conforms to the conventions in RFC 5751 [MSG].  Here
   are a few example names:

      Internet-Draft: draft-ietf-example-widgets-03.txt
      Signature File: draft-ietf-example-widgets-03.txt.p7s

      Internet-Draft: draft-ietf-example-widgets-03.pdf
      Signature File: draft-ietf-example-widgets-03.pdf.p7s

      Internet-Draft: draft-housley-internet-draft-sig-file-00.txt
      Signature File: draft-housley-internet-draft-sig-file-00.txt.p7s

3.  Additional Content Types

   The CMS is used to construct the detached signatures for Internet-
   Drafts.  The CMS ContentInfo content type MUST always be present, and
   it MUST encapsulate the CMS SignedData content type.  Since a
   detached signature is being created, the CMS SignedData content type
   MUST NOT encapsulate the Internet-Draft.  The CMS detached signature
   is summarized in RFC 5485 [IDSIG].

   The SignedData.SignerInfo.EncapsulatedContentInfo.eContentType value
   MUST identify the format of the Internet-Draft that is being signed.
   Section 5 of RFC 5485 [IDSIG] lists the file formats and the
   associated content type.  This document expands that list as follows:

      File Format                        Content Type
      -----------                        ------------
      ASCII text                         id-ct-asciiTextWithCRLF
      UTF8 text (includes non-ASCII)     id-ct-utf8TextWithCRLF
      HyperText Markup Language (HTML)   id-ct-htmlWithCRLF
      Extensible Markup Language (XML)   id-ct-xml
      Portable Document Format (PDF)     id-ct-pdf
      PostScript                         id-ct-postscript

Housley                                                         [Page 4]
INTERNET-DRAFT                                             November 2017

   The object identifiers associated with the content types listed above
   table are:

      id-ct  OBJECT IDENTIFIER  ::= { iso(1) member-body(2)
           us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) 1 }

      id-ct-asciiTextWithCRLF  OBJECT IDENTIFIER  ::= { id-ct 27 }

      id-ct-htmlWithCRLF  OBJECT IDENTIFIER  ::= { id-ct <TBD1> }

      id-ct-xml  OBJECT IDENTIFIER  ::= { id-ct 28 }

      id-ct-pdf  OBJECT IDENTIFIER  ::= { id-ct 29 }

      id-ct-postscript  OBJECT IDENTIFIER  ::= { id-ct 30 }

      id-ct-utf8TextWithCRLF  OBJECT IDENTIFIER  ::= { id-ct <TBD2> }

4.  Need for Canonicalization

   In general, the content of an Internet-Draft is treated like a single
   octet string for the generation of the digital signature.
   Unfortunately, the text and HTML files require canonicalization to
   avoid signature validation problems.  The primary concern is the
   manner in which different operating systems indicate the end of a
   line of text.  Some systems use a single new-line character, other
   systems use the combination of the carriage-return character followed
   by a line-feed character, and other systems use fixed-length records
   padded with space characters.  For the digital signature to validate
   properly, a single convention must be employed.

4.1.  ASCII, UTF8, and HTML File Canonicalization

   The canonicalization procedure follows the conventions used for text
   files in the File Transfer Protocol (FTP) [FTP].  Such files must be
   supported by FTP implementations, so code reuse seems likely.

   The canonicalization procedure converts the data from its internal
   character representation to the standard 8-bit NVT-ASCII
   representation (see TELNET [TELNET]).  In accordance with the NVT
   standard, the <CRLF> sequence MUST be used to denote the end of a
   line of text.  Using the standard NVT-ASCII representation means that
   data MUST be interpreted as 8-bit bytes.

   Trailing space characters MUST NOT appear on a line of text.  That
   is, the space character must not be followed by the <CRLF> sequence.
   Thus, a blank line is represented solely by the <CRLF> sequence.

Housley                                                         [Page 5]
INTERNET-DRAFT                                             November 2017

   The form-feed nonprintable character (0x0C) is expected in Internet-
   Drafts.  Other non-printable characters, such as tab and backspace,
   are not expected, but they do occur.  Non-printable or non-ASCII
   characters (ones outside the range 0x20 to 0x7E) MUST NOT be changed
   in any way not covered by the rules for end-of-line handling in the
   previous paragraph.

   Trailing blank lines MUST NOT appear at the end of the file.  That
   is, the file must not end with multiple consecutive <CRLF> sequences.

   A byte-order-mark (BOM) used at the beginning of a UTF8 file is not
   considered to be part of the file content.  When present, a leading
   BOM MUST NOT be processed by the digital signature algorithm.

   Any end-of-file marker used by an operating system is not considered
   to be part of the file content.  When present, such end-of-file
   markers MUST NOT be processed by the digital signature algorithm.

   Note: This text file canonicalization procedure is consistent with
   the NVT-ASCII definition offered in Appendix B of RFC 5198 [UFNI].

4.2.  XML File Canonicalization

   Utilities that produce XML files are expected to follow the guidance
   provided by the World Wide Web Consortium (W3C) in Section 2.11 of
   [R20060816].  If this guidance is followed, no canonicalization is
   needed.

   A robust signature generation process MAY perform canonicalization to
   ensure that the W3C guidance has been followed.  This guidance says
   that a <LF> character MUST be used to denote the end of a line of
   text within a XML file.  Therefore, any two-character <CRLF> sequence
   and any <CR> that is not followed by <LF> are to be translated to a
   single <LF> character.

4.3.  No Canonicalization of Other File Formats

   No canonicalization is needed for file formats currently used or
   planned for Internet-Drafts other than ASCII, UTF8, HTML, and XML
   files.  Other file formats are treated as a simple sequence of octets
   by the digital signature algorithm.

5.  IANA Considerations

   Please assign and object identifiers for id-ct-utf8TextWithCRLF and
   id-ct-htmlWithCRLF in the SMI Security for S/MIME CMS Content Type
   registry (1.2.840.113549.1.9.16.1).

Housley                                                         [Page 6]
INTERNET-DRAFT                                             November 2017

6.  Security Considerations

   The security consideration in RFC 5485 [IDSIG] are unchanged.

7.  Deployment and Operational Considerations

   The deployment consideration in RFC 5485 [IDSIG] are unchanged.

8.  Normative References

   [CMS]       Housley, R., "Cryptographic Message Syntax (CMS)",
               RFC 5652, September 2009.

   [IDSIG]     Housley, R., "Digital Signatures on Internet-Draft
               Documents", RFC 5485, March 2009.

   [PDF]       ISO, "Portable document format -- Part 1: PDF 1.7",
               ISO 32000-1, 2008.

   [STDWORDS]  S. Bradner, "Key words for use in RFCs to Indicate
               Requirement Levels", BCP 14, RFC 2119, March 1997.

   [X.680]     ITU-T Recommendation X.680 (2002) | ISO/IEC 8824-1:2002,
               Information technology - Abstract Syntax Notation One
               (ASN.1):  Specification of basic notation.

   [X.690]     ITU-T Recommendation X.690 (2002) | ISO/IEC 8825-1:2002,
               Information technology - ASN.1 encoding rules:
               Specification of Basic Encoding Rules (BER), Canonical
               Encoding Rules (CER) and Distinguished Encoding Rules
               (DER).

9.  Informative References

   [FTP]       Postel, J. and J. Reynolds, "File Transfer Protocol",
               STD 9, RFC 959, October 1985.

   [MSG]       Ramsdell, B., and S. Turner, "Secure/Multipurpose
               Internet Mail Extensions (S/MIME) Version 3.2 Message
               Specification", RFC 5751, January 2010.

   [R20060816] Bray, T., J. Paoli, C. M. Sperberg-McQueen, E. Maler,
               and F. Yergeau, "Extensible Markup Language (XML) 1.0
               (Fourth Edition)", W3C Recommendation, 16 August 2006.
               http://www.w3.org/TR/2006/REC-xml-20060816.

   [RFCED]     Flanagan, H., "The Use of Non-ASCII Characters in RFCs",
               RFC 7997, December 2016.

Housley                                                         [Page 7]
INTERNET-DRAFT                                             November 2017

   [RFCSERIES] Flanagan, H., and N. Brownlee, "RFC Series Format
               Requirements and Future Development", RFC 6949, May 2013.

   [TELNET]    Postel, J. and J. Reynolds, "Telnet Protocol
               Specification", STD 8, RFC 854, May 1983.

   [UFNI]      J. Klensin, J. and M. Padlipsky, "Unicode Format for
               Network Interchange", RFC 5198, March 2008.

10.  Acknowledgements

   The idea for the Internet-Draft signature file came from a discussion
   with Scott Bradner at IETF 69 in Chicago, IL, USA.  Many helpful
   suggestions came from Jim Schaad, Pasi Eronen, and Chris Newman.
   Glen Barney played a key role in implementing Internet-Draft
   signatures as specified in RFC 5485 [IDSIG].

Author's Address

   Russell Housley
   Vigil Security, LLC
   918 Spring Knoll Drive
   Herndon, VA 20170
   USA

   EMail: housley@vigilsec.com

Housley                                                         [Page 8]