<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

<!-- XML source generated using id2xml February 2018 -->

<!ENTITY RFC5652 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5652.xml">
<!ENTITY RFC5485 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5485.xml">
<!ENTITY RFC0959 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.0959.xml">
<!ENTITY RFC5751 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5751.xml">
<!ENTITY RFC7997 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7997.xml">
<!ENTITY RFC6949 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6949.xml">
<!ENTITY RFC0854 SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.0854.xml">
]>
<rfc submissionType="IETF" number="8358" category="info" consensus="yes" updates="5485">
  <?rfc compact="yes"?>
	<?rfc text-list-symbols="o*+-"?>
	<?rfc subcompact="no"?>
	<?rfc sortrefs="yes"?>
	<?rfc symrefs="yes"?>
	<?rfc strict="yes"?>
	<?rfc toc="yes"?>
	<front>
	<title abbrev="Update to Digital Signatures">Update to Digital Signatures on Internet-Draft Documents</title>
	<author fullname="Russell Housley" initials="R." surname="Housley">
	<organization abbrev="Vigil Security">Vigil Security, LLC</organization>
	<address><postal><street>918 Spring Knoll Drive</street>
	<street>Herndon, VA 20170</street>
	<street>USA</street>
	</postal>
	<email>housley@vigilsec.com</email>
	</address>
	</author>

	<date month="March" year="2018"/>

	
	<abstract><t>
   RFC 5485 specifies the conventions for digital signatures on
   Internet-Drafts.  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.</t>

	<t>
   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-Drafts that contain
	non-ASCII characters in a text file.</t>
	

	<t>
   This document updates RFC 5485.</t>

	</abstract>
	</front>

	<middle>
	<section title="Introduction" anchor="section-1"><t>
   RFC 5485 <xref target="IDSIG"/> specifies the conventions for digital signatures on
   Internet-Drafts.  The Cryptographic Message Syntax (CMS)
   <xref target="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.</t>

	<t>
   The RFC Editor recently published the first RFC that includes non-ASCII characters in a text file.  The conventions specified in RFC
   7997 <xref target="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-Drafts
   that contain non-ASCII characters in a text file.</t>

	<t>
   This document updates RFC 5485 <xref target="IDSIG"/>, which
   contains the conventions that have been used by the IETF Secretariat to
   digitally sign Internet-Drafts for the past few years.  The IETF
   Secretariat generates the digital signature shortly after the
   Internet-Draft is posted in the repository.</t>

	<t>
   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.</t>

	<t>
   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 generated; it is not intended to
   provide a trusted timestamp.</t>

   <section title="Terminology" anchor="section-1.1"><t>

             
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
    "MAY", and "OPTIONAL" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="STDWORDS"/> <xref target="STDWORDS2"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
 

	</section>

	<section title="ASN.1" anchor="section-1.2"><t>
   The CMS uses Abstract Syntax Notation One (ASN.1) <xref target="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) <xref target="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) <xref target="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.</t>

	</section>

	</section>

	<section title="Detached Signature Files" anchor="section-2"><t>
   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.</t>

	<t>
   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 <xref target="RFCSERIES"/>.  Each file
   format employs a different suffix.</t>

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

	<t>
   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 <xref target="MSG"/>.  Here
   are a few example names:</t>
<?rfc subcompact="yes"?>
	<t><list hangIndent="3" style="hanging"><t>
      Internet-Draft: draft-ietf-example-widgets-03.txt</t>
      <t>Signature File: draft-ietf-example-widgets-03.txt.p7s</t>

	</list>
	</t>

	<t><list hangIndent="3" style="hanging"><t>
      Internet-Draft: draft-ietf-example-widgets-03.pdf</t>
      <t>Signature File: draft-ietf-example-widgets-03.pdf.p7s</t>

	</list>
	</t>

	<t><list hangIndent="3" style="hanging"><t>
      Internet-Draft: draft-housley-internet-draft-sig-file-00.txt</t>
      <t>Signature File: draft-housley-internet-draft-sig-file-00.txt.p7s</t>

	</list>
	</t>
<?rfc subcompact="no"?>
	</section>

	<section title="Additional Content Types" anchor="section-3"><t>
   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 <xref target="IDSIG"/>.</t>

	<t>
   The SignedData.SignerInfo.EncapsulatedContentInfo.eContentType value
   MUST identify the format of the Internet-Draft that is being signed.
   Section 5 of RFC 5485 <xref target="IDSIG"/> lists the file formats and the
   associated content type.  This document expands that list as follows:</t>

	<figure><artwork><![CDATA[
   File Format                        Content Type
   -----------                        ------------
   ASCII text                         id-ct-asciiTextWithCRLF
   UTF-8 text (includes non-ASCII)    id-ct-utf8TextWithCRLF
   HyperText Markup Language (HTML)   id-ct-htmlWithCRLF
   EPUB                               id-ct-epub
   Extensible Markup Language (XML)   id-ct-xml
   Portable Document Format (PDF)     id-ct-pdf
   PostScript                         id-ct-postscript

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-utf8TextWithCRLF OBJECT IDENTIFIER ::= { id-ct 37 }

   id-ct-htmlWithCRLF OBJECT IDENTIFIER ::= { id-ct 38 }

   id-ct-epub OBJECT IDENTIFIER ::= { id-ct 39 }

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

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

   id-ct-postscript OBJECT IDENTIFIER ::= { id-ct 30 }
]]></artwork>
	</figure>
	</section>

	<section title="Need for Canonicalization" anchor="section-4"><t>
   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.</t>

	<section title="ASCII, UTF-8, and HTML File Canonicalization" anchor="section-4.1"><t>
   The canonicalization procedure follows the conventions used for text
   files in the File Transfer Protocol (FTP) <xref target="FTP"/>.  Such files must be
   supported by FTP implementations, so code reuse seems likely.</t>

	<t>
   The canonicalization procedure converts the data from its internal
   character representation to the standard 8-bit NVT-ASCII
   representation (see TELNET <xref target="TELNET"/>).  In accordance with the NVT
   standard, the &lt;CRLF&gt; 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.</t>

	<t>
   Trailing space characters MUST NOT appear on a line of text.  That
   is, the space character must not be followed by the &lt;CRLF&gt; sequence.</t>

	<t>
   Thus, a blank line is represented solely by the &lt;CRLF&gt; sequence.</t>

	<t>
   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.</t>

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

	<t>
   In some environments, a byte-order-mark (BOM) (U+FEFF) is used at the
   beginning of a file to indicate that it contains non-ASCII
   characters.  In UTF-8 or HTML files, a BOM at the beginning of the
   file is not considered to be part of the file content.  One or more
   consecutive leading byte-order-marks, if present, MUST NOT be
   processed by the digital signature algorithm.</t>

	<t>
   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.</t>

	<t>
   Note: This text file canonicalization procedure is consistent with
   the NVT-ASCII definition offered in Appendix B of RFC 5198 <xref target="UFNI"/>.</t>

	</section>

	<section title="XML File Canonicalization" anchor="section-4.2"><t>
   Utilities that produce XML files are expected to follow the guidance
   provided by the World Wide Web Consortium (W3C) in Section 2.11 of
   <xref target="R20081126"/>.  If this guidance is followed, no canonicalization is
   needed.</t>

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

	</section>

	<section title="No Canonicalization of Other File Formats" anchor="section-4.3"><t>
   No canonicalization is needed for file formats currently used or
   planned for Internet-Drafts other than ASCII, UTF-8, HTML, and XML
   files.  Other file formats, including PDF <xref target="PDF"/>, PostScript
   <xref target="PS"/>, and
   EPUB <xref target="EPUB"/> are treated as a simple sequence of octets by the digital
   signature algorithm.</t>

	</section>

      </section>



	<section title="IANA Considerations" anchor="section-5"><t>
   IANA has registered object identifiers for three
   content types in the "SMI Security for S/MIME CMS Content Type
   (1.2.840.113549.1.9.16.1)" registry as follows:</t>

	<figure><artwork><![CDATA[
Description             OID                         Specification
-----------------------------------------------------------------
id-ct-utf8TextWithCRLF  1.2.840.113549.1.9.16.1.37  [RFC8358]
id-ct-htmlWithCRLF      1.2.840.113549.1.9.16.1.38  [RFC8358]
id-ct-epub              1.2.840.113549.1.9.16.1.39  [RFC8358]
]]></artwork>
	</figure>
	</section>

	<section title="Security Considerations" anchor="section-6"><t>
   The security considerations in RFC 5485 <xref target="IDSIG"/> are unchanged.</t>

	</section>

	<section title="Deployment and Operational Considerations" anchor="section-7"><t>
   The deployment considerations in RFC 5485 <xref target="IDSIG"/> are unchanged.</t>

	</section>

	</middle>

	<back>
	<references title="Normative References">

<reference  anchor='STDWORDS' target='https://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
<date year='1997' month='March' />
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>



<reference  anchor='STDWORDS2' target='https://www.rfc-editor.org/info/rfc8174'>
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author initials='B.' surname='Leiba' fullname='B. Leiba'><organization /></author>
<date year='2017' month='May' />
<abstract><t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='8174'/>
<seriesInfo name='DOI' value='10.17487/RFC8174'/>
</reference>



<reference  anchor='CMS' target='https://www.rfc-editor.org/info/rfc5652'>
<front>
<title>Cryptographic Message Syntax (CMS)</title>
<author initials='R.' surname='Housley' fullname='R. Housley'><organization /></author>
<date year='2009' month='September' />
</front>
<seriesInfo name='STD' value='70'/>
<seriesInfo name='RFC' value='5652'/>
<seriesInfo name='DOI' value='10.17487/RFC5652'/>
</reference>

	<reference anchor="EPUB" target="http://www.idpf.org/epub/31/spec/epub-contentdocs.html"><front>
	<title>EPUB Content Documents 3.1</title>
	<author>
	<organization>International Digital Publishing Forum</organization>
	</author>

	<date year="January 2017"/>
	</front>

	</reference>


<reference  anchor='IDSIG' target='https://www.rfc-editor.org/info/rfc5485'>
<front>
<title>Digital Signatures on Internet-Draft Documents</title>
<author initials='R.' surname='Housley' fullname='R. Housley'><organization /></author>
<date year='2009' month='March' />
</front>
<seriesInfo name='RFC' value='5485'/>
<seriesInfo name='DOI' value='10.17487/RFC5485'/>
</reference>


<reference anchor="PDF" >
  <front>
    <title>Document management -- Electronic document file format for                                       
    long-term preservation -- Part 3: Use of ISO 32000-1 with support for                                   
    embedded files (PDF/A-3)</title>
    <author >
      <organization>International Organization for
      Standardization</organization>
    </author>
    <date year="2012"/>
  </front>
  <seriesInfo name="ISO" value="19005-3:2012"/>
</reference>

<reference anchor="PS" >
<front>
<title>PostScript Language Reference Manual, third edition</title>
<author><organization>Adobe Systems Incorporated</organization></author>
<date year="1999"/>

</front>
<seriesInfo name="Addison-Wesley" value="Publishing Company"/>
<seriesInfo name="ISBN" value="0-201-37922-8"/>
</reference>


<reference anchor='R20081126'
           target='http://www.w3.org/TR/2008/REC-xml-20081126'>
<front>
<title>Extensible Markup Language (XML) 1.0 (Fifth Edition)</title>
<author initials='T.' surname='Bray' fullname='Tim Bray'>
    <organization />
</author>
<author initials='J.' surname='Paoli' fullname='Jean Paoli'>
    <organization />
</author>
<author initials='M.' surname='Sperberg-McQueen'
fullname='C. M. Sperberg-McQueen'>
    <organization />
</author>
<author initials='E.' surname='Maler' fullname='Eve Maler'>
    <organization />
</author>
<author initials='F.' surname='Yergeau' fullname='Francois Yergeau'>
    <organization />
</author>
<date month='November' day='26' year='2008' />
</front>
<seriesInfo name='World Wide Web Consortium Recommendation'
value='REC-xml-20081126' />
</reference>

<reference anchor='X.680'>
        <front>
          <title>Information Technology - Abstract Syntax Notation One:                                     
Specification of Basic Notation</title>

          <author>
            <organization>ITU-T</organization>
          </author>
          <date year='2002'/>
	  </front>
        <seriesInfo name="Recommendation" value="X.680"/>
	<seriesInfo name="ISO/IEC" value="8824-1:2002"/>
      </reference>

 <reference anchor="X.690">
        <front>
          <title>                                                                                           
            Information technology -- ASN.1 encoding rules:                                                 
            Specification of Basic Encoding Rules (BER), Canonical                                          
            Encoding Rules (CER) and Distinguished Encoding Rules (DER)                                     
          </title>

          <author>
            <organization>ITU-T</organization>
          </author>

          <date month="November" year="2008" />
        </front>
        <seriesInfo name='ITU-T Recommendation X.690,'
                    value='ISO/IEC International Standard 8825-1:2008'/>
 </reference>
	</references>

	<references title="Informative References">

<reference  anchor='FTP' target='https://www.rfc-editor.org/info/rfc959'>
<front>
<title>File Transfer Protocol</title>
<author initials='J.' surname='Postel' fullname='J. Postel'><organization /></author>
<author initials='J.' surname='Reynolds' fullname='J. Reynolds'><organization /></author>
<date year='1985' month='October' />
</front>
<seriesInfo name='STD' value='9'/>
<seriesInfo name='RFC' value='959'/>
<seriesInfo name='DOI' value='10.17487/RFC0959'/>
</reference>

<reference  anchor='MSG' target='https://www.rfc-editor.org/info/rfc5751'>
<front>
<title>Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Message Specification</title>
<author initials='B.' surname='Ramsdell' fullname='B. Ramsdell'><organization /></author>
<author initials='S.' surname='Turner' fullname='S. Turner'><organization /></author>
<date year='2010' month='January' />
</front>
<seriesInfo name='RFC' value='5751'/>
<seriesInfo name='DOI' value='10.17487/RFC5751'/>
</reference>

<reference  anchor='RFCED' target='https://www.rfc-editor.org/info/rfc7997'>
<front>
<title>The Use of Non-ASCII Characters in RFCs</title>
<author initials='H.' surname='Flanagan' fullname='H. Flanagan' role='editor'><organization /></author>
<date year='2016' month='December' />
</front>
<seriesInfo name='RFC' value='7997'/>
<seriesInfo name='DOI' value='10.17487/RFC7997'/>
</reference>

<reference  anchor='RFCSERIES' target='https://www.rfc-editor.org/info/rfc6949'>
<front>
<title>RFC Series Format Requirements and Future Development</title>
<author initials='H.' surname='Flanagan' fullname='H. Flanagan'><organization /></author>
<author initials='N.' surname='Brownlee' fullname='N. Brownlee'><organization /></author>
<date year='2013' month='May' />
</front>
<seriesInfo name='RFC' value='6949'/>
<seriesInfo name='DOI' value='10.17487/RFC6949'/>
</reference>

<reference  anchor='TELNET' target='https://www.rfc-editor.org/info/rfc854'>
<front>
<title>Telnet Protocol Specification</title>
<author initials='J.' surname='Postel' fullname='J. Postel'><organization /></author>
<author initials='J.K.' surname='Reynolds' fullname='J.K. Reynolds'><organization /></author>
<date year='1983' month='May' />
</front>
<seriesInfo name='STD' value='8'/>
<seriesInfo name='RFC' value='854'/>
<seriesInfo name='DOI' value='10.17487/RFC0854'/>
</reference>

<reference  anchor='UFNI' target='https://www.rfc-editor.org/info/rfc5198'>
<front>
<title>Unicode Format for Network Interchange</title>
<author initials='J.' surname='Klensin' fullname='J. Klensin'><organization /></author>
<author initials='M.' surname='Padlipsky' fullname='M. Padlipsky'><organization /></author>
<date year='2008' month='March' />
</front>
<seriesInfo name='RFC' value='5198'/>
<seriesInfo name='DOI' value='10.17487/RFC5198'/>
</reference>

	</references>
	<section title="Acknowledgements" anchor="section-10" numbered="no"><t>
   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, Chris Newman, and Glen
   Barney.  Glen Barney also played a key role in implementing Internet-Draft signatures as specified in RFC 5485 <xref target="IDSIG"/>.</t>

	</section>

	</back>

	</rfc>
	
