<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.38 (Ruby 2.6.10) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-housley-lamps-rfc3161-update-02" category="std" consensus="true" submissionType="IETF" updates="3161" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.34.1 -->
  <front>
    <title abbrev="Update to RFC 3161">Update to the Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)</title>
    <seriesInfo name="Internet-Draft" value="draft-housley-lamps-rfc3161-update-02"/>
    <author initials="R." surname="Housley" fullname="Russ Housley">
      <organization abbrev="Vigil Security">Vigil Security, LLC</organization>
      <address>
        <postal>
          <city>Herndon, VA</city>
          <country>US</country>
        </postal>
        <email>housley@vigilsec.com</email>
      </address>
    </author>
    <author initials="S." surname="Santesson" fullname="Stefan Santesson">
      <organization abbrev="IDsec Solutions">IDsec Solutions AB</organization>
      <address>
        <postal>
          <street>Forskningsbyn Ideon</street>
          <city>Lund</city>
          <code>223 70</code>
          <country>SE</country>
        </postal>
        <email>sts@aaa-sec.com</email>
      </address>
    </author>
    <date year="2026" month="October" day="26"/>
    <workgroup>LAMPS</workgroup>
    <keyword>CMS</keyword>
    <keyword>attribute</keyword>
    <keyword>algorithm identifier</keyword>
    <abstract>
      <?line 47?>

<t>This document updates RFC 3161. It adds a requirement to ensure that the
id-ct-TSTInfo content type is used to align with the best practices for
signed attributes with CMS signed-data. In addition, cross-protocol attacks
are prevented by requiring that the Time Stamp Authority (TSA) dedicate
the signature key pair to the time-stamping service. Finally, the use of
id-kp-timeStamping in the TSA certificate is clarified.</t>
    </abstract>
  </front>
  <middle>
    <?line 56?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>This document updates <xref target="RFC3161"/>. It adds a requirement to ensure that the
id-ct-TSTInfo content type is used to align with the best practices for signed
attributes with CMS signed-data <xref target="I-D.ietf-lamps-cms-euf-cma-signeddata"/>. In
addition, cross-protocol attacks are prevented by requiring that the Time Stamp
Authority (TSA) dedicate the signature key pair to the time-stamping service.
Finally, the use of id-kp-timeStamping in the TSA certificate is clarified.</t>
    </section>
    <section anchor="conventions">
      <name>Conventions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="update-to-section-4-of-rfc-3161">
      <name>Update to Section 4 of RFC 3161</name>
      <t>Section 2.1 of <xref target="RFC3161"/> correctly requires that the time-stamping service
use a key exclusively for signing time-stamp tokens.  It says:</t>
      <artwork><![CDATA[
  10. to sign each time-stamp token using a key generated exclusively
      for this purpose and have this property of the key indicated on
      the corresponding certificate.
]]></artwork>
      <t>However, in real-world deployments, it has been reported that the same key pair
has been used to sign time-stamp tokens of various similar formats, which
creates the possibility for cross-protocol attacks.</t>
      <t>ADD:</t>
      <artwork><![CDATA[
  7. As stated in Section 2.1, the TSA is REQUIRED to sign each
     time-stamp token using a key generated exclusively for this
     purpose.  The use of the same private key to sign time stamps
     in different formats may introduce the possibility of
     cross-protocol attacks.
]]></artwork>
    </section>
    <section anchor="update-to-section-23-of-rfc-3161">
      <name>Update to Section 2.3 of RFC 3161</name>
      <t>OLD:</t>
      <artwork><![CDATA[
   The corresponding certificate MUST contain only one instance of
   the extended key usage field extension as defined in [RFC2459]
   Section 4.2.1.13 with KeyPurposeID having value:

   id-kp-timeStamping.  This extension MUST be critical.

   The following object identifier identifies the KeyPurposeID
   having value id-kp-timeStamping.

   id-kp-timeStamping OBJECT IDENTIFIER ::= {iso(1)
                   identified-organization(3) dod(6)
                   internet(1) security(5) mechanisms(5) pkix(7)
                   kp (3) timestamping (8)}
]]></artwork>
      <t>NEW:</t>
      <artwork><![CDATA[
   The corresponding TSA certificate MUST contain one and only one
   instance of the extended key usage extension as defined in
   Section 4.2.1.12 of [PKIX1]. The extended key usage extension
   MUST contain a single KeyPurposeId containing the following
   object identifier:
   
      id-kp-timeStamping OBJECT IDENTIFIER ::= { iso(1)
         identified-organization(3) dod(6) internet(1) security(5)
         mechanisms(5) pkix(7) kp (3) timestamping (8) }

   This extended key usage extension MUST be critical.

   Certification Authorities (CAs) MUST NOT include the
   id-kp-timeStamping KeyPurposeId in certificates issued to
   subjects that are not TSAs as specified in this document.

   An application MUST reject a time-stamp if the TSA certificate
   does not include a critical extended key usage extension with a
   single KeyPurposeId of id-kp-timeStamping.
]]></artwork>
      <t>Note that <xref target="PKIX1"/> is updated to reference the most recent specification.</t>
    </section>
    <section anchor="update-to-section-242-of-rfc-3161">
      <name>Update to Section 2.4.2 of RFC 3161</name>
      <t>OLD:</t>
      <artwork><![CDATA[
   eContentType is an object identifier that uniquely specifies the
   content type.  For a time-stamp token it is defined as:

   id-ct-TSTInfo  OBJECT IDENTIFIER ::= { iso(1) member-body(2)
   us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1) 4}
]]></artwork>
      <t>NEW:</t>
      <artwork><![CDATA[
   eContentType is an object identifier that uniquely specifies the
   content type.  For a time-stamp token defined in this document,
   eContentType MUST be:

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

   In addition, the TSA MUST include id-ct-TSTInfo as content-type
   signed attribute in the signedAttrs of the signerInfo [CMS].

   An application MUST reject a time-stamp if the CMS signed-data
   does not include id-ct-TSTInfo in both the eContentType within
   the EncapsulatedContentInfo structure and the content-type
   signed attribute in the signedAttrs of the signerInfo structure.
]]></artwork>
      <t>Note that <xref target="CMS"/> is updated to reference the most recent specification.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>No IANA registry updates are needed.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The above addition to the Security Considerations of <xref target="RFC3161"/> is
intended to ensure that implementations do not use a signature private key
that is used to sign a time-stamp token for any other purpose.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC3161">
          <front>
            <title>Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)</title>
            <author fullname="C. Adams" initials="C." surname="Adams"/>
            <author fullname="P. Cain" initials="P." surname="Cain"/>
            <author fullname="D. Pinkas" initials="D." surname="Pinkas"/>
            <author fullname="R. Zuccherato" initials="R." surname="Zuccherato"/>
            <date month="August" year="2001"/>
            <abstract>
              <t>This document describes the format of a request sent to a Time Stamping Authority (TSA) and of the response that is returned. It also establishes several security-relevant requirements for TSA operation, with regards to processing requests to generate responses. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3161"/>
          <seriesInfo name="DOI" value="10.17487/RFC3161"/>
        </reference>
        <reference anchor="CMS">
          <front>
            <title>Cryptographic Message Syntax (CMS)</title>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="September" year="2009"/>
            <abstract>
              <t>This document describes the Cryptographic Message Syntax (CMS). This syntax is used to digitally sign, digest, authenticate, or encrypt arbitrary message content. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="70"/>
          <seriesInfo name="RFC" value="5652"/>
          <seriesInfo name="DOI" value="10.17487/RFC5652"/>
        </reference>
        <reference anchor="PKIX1">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
            <author fullname="D. Cooper" initials="D." surname="Cooper"/>
            <author fullname="S. Santesson" initials="S." surname="Santesson"/>
            <author fullname="S. Farrell" initials="S." surname="Farrell"/>
            <author fullname="S. Boeyen" initials="S." surname="Boeyen"/>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <author fullname="W. Polk" initials="W." surname="Polk"/>
            <date month="May" year="2008"/>
            <abstract>
              <t>This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet. An overview of this approach and model is provided as an introduction. The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms. Standard certificate extensions are described and two Internet-specific extensions are defined. A set of required certificate extensions is specified. The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions. An algorithm for X.509 certification path validation is described. An ASN.1 module and examples are provided in the appendices. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5280"/>
          <seriesInfo name="DOI" value="10.17487/RFC5280"/>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <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>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="I-D.ietf-lamps-cms-euf-cma-signeddata">
          <front>
            <title>Best Practices for Signed Attributes in CMS SignedData</title>
            <author fullname="Daniel Van Geest" initials="D." surname="Van Geest">
              <organization>CryptoNext Security</organization>
            </author>
            <author fullname="Falko Strenzke" initials="F." surname="Strenzke">
              <organization>MTG AG</organization>
            </author>
            <date day="14" month="September" year="2026"/>
            <abstract>
              <t>   The Cryptographic Message Syntax (CMS) has different signature
   verification behaviour based on whether signed attributes are present
   or not.  This results in a potential existential forgery
   vulnerability in CMS and protocols which use CMS.  This document
   describes the vulnerability and lists mitigations and best practices
   to avoid it.  This document updates RFC 5652 by prohibiting the use
   of the id-data content type for new uses of the CMS SignedData type.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-lamps-cms-euf-cma-signeddata-03"/>
        </reference>
      </references>
    </references>
    <?line 204?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>Thanks to Tom Tervoort for being the first person to spot the need for
improvements to <xref target="RFC3161"/>.</t>
      <t>Thanks to Tom Tervoort, Tim Hollebeek, Carl Wallace, and Mike StJohns
for their careful review and insightful suggestions.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIADcO4GoAA71Y6XLbthb+j6fAVf/IHVMjyXYSa7opXsZqvV1L6TKZ/IBI
SMIVRbAAaUfX4zzLfZY+Wb8DkJRoSUmT26lnPCK2g7N9Z0EQBCxTWSx7vPEm
jUQmeaZ5NpN8kGTSJDLjv7aO2sf8Nh/HKuQ/ySVWJkbYzORhlhvJR2ohg2Em
Fim/NTrToY55czS83WswMR4beV8jfXd+wg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