<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.35 (Ruby 2.5.1) -->
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-cose-tsa-tst-header-parameter-00" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 2.46.0 -->
  <front>
    <title abbrev="TST Header">COSE Header parameter for RFC 3161 Time-Stamp Tokens</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-cose-tsa-tst-header-parameter-00"/>
    <author initials="H." surname="Birkholz" fullname="Henk Birkholz">
      <organization abbrev="Fraunhofer SIT">Fraunhofer SIT</organization>
      <address>
        <postal>
          <street>Rheinstrasse 75</street>
          <city>Darmstadt</city>
          <code>64295</code>
          <country>Germany</country>
        </postal>
        <email>henk.birkholz@sit.fraunhofer.de</email>
      </address>
    </author>
    <author initials="T." surname="Fossati" fullname="Thomas Fossati">
      <organization>arm</organization>
      <address>
        <email>Thomas.Fossati@arm.com</email>
      </address>
    </author>
    <author initials="M." surname="Riechert" fullname="Maik Riechert">
      <organization>Microsoft</organization>
      <address>
        <postal>
          <country>UK</country>
        </postal>
        <email>Maik.Riechert@microsoft.com</email>
      </address>
    </author>
    <date year="2023" month="September" day="10"/>
    <area>Security</area>
    <workgroup>COSE Working Group</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <?line 48?>

<t>RFC 3161 provides a method to time-stamp a message digest to prove that it was created before a given time. This document defines how signatures of CBOR Signing And Encrypted (COSE) message structures can be time-stamped using RFC 3161 along with the needed header parameter to carry the corresponding time-stamp.</t>
    </abstract>
  </front>
  <middle>
    <?line 52?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>This document defines a new COSE <xref target="STD96"/> header parameter that carries the TST output of RFC 3161.</t>
      <section anchor="requirements-notation">
        <name>Requirements Notation</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&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
        <?line -18?>

</section>
    </section>
    <section anchor="mybody">
      <name>RFC 3161 Time-Stamp Tokens COSE Header Parameter</name>
      <t>The use of RFC 3161 Time-Stamp Tokens, often in combination with X.509 certificates, allows for an existing trust infrastructure to be used with COSE.</t>
      <t>The new COSE header parameter for carrying time-stamp tokens is defined as:</t>
      <ul spacing="normal">
        <li>Name: rfc3161-tst</li>
        <li>Label: TBD</li>
        <li>Value Type: bstr / [2*bstr]</li>
        <li>Value Registry: none</li>
        <li>Description: One or more RFC 3161 time-stamp tokens.</li>
        <li>Reference: TBD</li>
      </ul>
      <t>FIXME(tho)
The content of the byte string are the bytes of the DER-encoded RFC 3161 TimeStampToken structure. FooFIXME matches the content of the equivalent header attribute defined in <xref target="RFC3161"/> for Cryptographic Message Syntax (CMS, see <xref target="STD70"/>) envelopes.</t>
      <t>A rfc3161-tst header parameter allows for a single time-stamp token or multiple time-stamp tokens to be carried in COSE header maps. If a single time-stamp token is conveyed, it is placed in a CBOR byte string. If multiple time-stamp tokens are conveyed, a CBOR array of two or more byte strings is used, with each time-stamp token being in its own byte string.</t>
      <t>Time-stamp tokens in this context are similar to a countersignature <xref target="RFC9338"/>. Therefore, the header parameter is included in the unprotected header of COSE envelopes.</t>
      <t>When sending a request to an RFC 3161 Time Stamping Authority (TSA, see <xref target="RFC3161"/>) to obtain a time-stamp token, the message imprint (<xref section="2.4" sectionFormat="of" target="RFC3161"/>) of the request <bcp14>MUST</bcp14> be the hash of the signature field of the COSE envelope to be time-stamped. The hash algorithm does not have to match the algorithm used for signing the COSE message.</t>
      <t>RFC 3161 time-stamp tokens use CMS as signature envelope format. <xref target="STD70"/> illustrates details of signature verification and <xref target="RFC3161"/> provides the details specific to time-stamp token validation. The payload of the signed time-stamp token is a TSTInfo structure as defined in <xref target="RFC3161"/> and contains the message imprint that was sent to the TSA. As part of validation of the COSE envelope, the message imprint <bcp14>MUST</bcp14> match the hash of the signature field of the time-stamped COSE envelope. The hash algorithm is contained in the message imprint structure, together with the hash itself.</t>
      <t>WHY_ALWAYS_ME?(tho)
Explicit guidance is illustrated in <xref section="B" sectionFormat="of" target="RFC3161"/> via an example that shows how time-stamp tokens can be used during signature verification of a time-stamped message when using X.509 certificates.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>Similar security considerations as described in RFC 3161 as well as the security considerations of RFC 9338 apply.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>TBD</t>
      <t>IANA is requested to register the new COSE Header parameter described in section TBD in the "COSE Header Parameters" registry.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="STD70">
          <front>
            <title>Cryptographic Message Syntax (CMS)</title>
            <seriesInfo name="DOI" value="10.17487/RFC5652"/>
            <seriesInfo name="RFC" value="5652"/>
            <seriesInfo name="STD" value="70"/>
            <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>
        </reference>
        <reference anchor="RFC3161">
          <front>
            <title>Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)</title>
            <seriesInfo name="DOI" value="10.17487/RFC3161"/>
            <seriesInfo name="RFC" value="3161"/>
            <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>
        </reference>
        <reference anchor="STD96">
          <front>
            <title>CBOR Object Signing and Encryption (COSE): Structures and Process</title>
            <seriesInfo name="DOI" value="10.17487/RFC9052"/>
            <seriesInfo name="RFC" value="9052"/>
            <seriesInfo name="STD" value="96"/>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <date month="August" year="2022"/>
            <abstract>
              <t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need to be able to define basic security services for this data format. This document defines the CBOR Object Signing and Encryption (COSE) protocol. This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization. This specification additionally describes how to represent cryptographic keys using CBOR.</t>
              <t>This document, along with RFC 9053, obsoletes RFC 8152.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="BCP" value="14"/>
            <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>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="BCP" value="14"/>
            <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>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC9338">
          <front>
            <title>CBOR Object Signing and Encryption (COSE): Countersignatures</title>
            <seriesInfo name="DOI" value="10.17487/RFC9338"/>
            <seriesInfo name="RFC" value="9338"/>
            <seriesInfo name="STD" value="96"/>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <date month="December" year="2022"/>
            <abstract>
              <t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. CBOR Object Signing and Encryption (COSE) defines a set of security services for CBOR. This document defines a countersignature algorithm along with the needed header parameters and CBOR tags for COSE. This document updates RFC 9052.</t>
            </abstract>
          </front>
        </reference>
      </references>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAFEJ/mQAA41Y23LbOBJ951f0Og9Jpkyt7dhJrJqdRLacsWstOyspm0lN
TaUgEhJRpggOAFrmuPwv+y3zZXMavIiKlKl9cIlooBt9OX2BwzAMnHKp7NPz
89vJBV1KEUtDuTBiKR2+5trQ+MM5vTp8fUhTtZThxIllTlN9JzP7PBCzmZH3
fZpOpjVzEOsoA3efYiPmLlTSzcNIWxk6K/DnwsSfC9tLwoODYLXok9fgszZ3
KlvQz0YXeWCdyOKvItUZ5DlTyEDlxn9Zd3RwcHpwFAgjRZ8mMiqMcmVwt+rT
VQapmXThkDUIIuH6ZF0c5KofEDkd9amUFp9WG2fk3LbrcrleBqJwiTb9ICSV
gXbZozNl7hKd/oGjlYmXMrvrUrWBHR+MKLJEz+G+ydUU1MZJWxtyKVTapwRS
erNaynurXG/enuzFkhWDmhJWjBMJXZwR1kp6c4KdSMccvdfHR6cnz3kNJ/Rp
KMwSvoudP1FkzoD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