RFC 9921 | TST Header | February 2026
Birkholz, et al. | Standards Track | [Page]

Stream:
  Internet Engineering Task Force (IETF)
RFC:
  9921
Category:
  Standards Track
Published:
  February 2026
ISSN:
  2070-1721
Authors:
  H. Birkholz
  Fraunhofer SIT
  T. Fossati
  Linaro
  M. Riechert
  Microsoft

# RFC 9921

# CBOR Object Signing and Encryption (COSE) Header Parameter for Timestamp Tokens as Defined in RFC 3161

## Abstract

This document defines two CBOR Object Signing and Encryption (COSE) header parameters for incorporating timestamping based on RFC 3161 into COSE message structures (`COSE_Sign` and `COSE_Sign1`). This enables the use of established timestamping infrastructure per RFC 3161 in COSE-based protocols.¶

## Status of This Memo

This is an Internet Standards Track document.¶

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc9921.¶

## Copyright Notice

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

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶

## 1. Introduction

RFC 3161 [RFC3161] provides a method for timestamping a message digest to prove that it was created before a given time.¶

This document defines two new CBOR Object Signing and Encryption (COSE) [RFC9052] header parameters that carry the `TimeStampToken` (TST) output [RFC3161], thus allowing existing and widely deployed trust infrastructure to be used with COSE structures used for signing (`COSE_Sign` and `COSE_Sign1`).¶

### 1.1. Use Cases

This section discusses two use cases, each representing one of the two modes of use defined in Section 2. As the security characteristics of the two cases differ, care must be taken when choosing the appropriate mode for a given application. See Section 5.1 for a discussion on the security of the implementations.¶

The primary use case is that of "long-term signatures", i.e., signatures that can still be verified even after the signing certificate has expired. This can address situations where it is important to prevent subsequent denial by the signer or to verify signatures made using (very) short-term certificates. To achieve this, the document signer acquires a fresh TST for the document's signature from a trusted Time Stamping Authority (TSA) [RFC3161] and concatenates it with the document. Later, when a relying party verifies the signed document and its associated TST, they can be certain that the document was signed at least at the time specified by the TSA and that the signing certificate was valid at the time the signature was made.¶

This primary usage scenario motivates the "COSE, Then Timestamp" mode described in Section 2.1.¶

The second use case is new. It is the notarization of a signed document by registering it with a transparency service. This is common practice for ensuring the accountability and auditability of issued documents, which are typically referred to as "statements" in this context. It is also common practice to only register the signed parts of a statement (the "signed statement" portion) with a transparency service, in order to reduce the complexity of consistency checks at a later stage and to avoid the need to retrieve or reconstruct unsigned parts. Once the signed parts of a document have been registered in the append-only log at a transparency service, the log entry cannot be changed. In order to avoid losing the TST during the registration process, the TST must be included in the signed statement. To achieve this, the issuer acquires a TST from a TSA, includes it in the to-be-signed part of the statement so that the resulting signed statement includes the TST, and then registers the signed parts (rendering it a "transparent statement"). Later on, a relying party consuming the transparent statement including the TST can be certain that the statement was signed by the issuer at least at the time specified by the TSA. If the issuer's signing key has expired (or has been compromised), the authenticity of the statement can be ascertained by ensuring that no revocation information was made public before the time asserted by the issuer and registered at the transparency service.¶

This new usage scenario motivates the "Timestamp, Then COSE" mode defined in Section 2.2.¶

### 1.2. Requirements Notation

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 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶

## 2. Modes of Use

There are two different modes of composing COSE protection and timestamping, motivated by the usage scenarios discussed above.¶

The diagrams in this section illustrate the processing flow of the specified modes. For simplicity, only the `COSE_Sign1` processing is shown. Similar diagrams for `COSE_Sign` can be derived by allowing multiple `private-key` parallelogram boxes and replacing the label `[signature]` with `[signatures]`.¶

### 2.1. COSE, Then Timestamp (CTT)

Figure 1 shows the case where the signature(s) field of the COSE Signed Message is digested and submitted to a TSA to be timestamped. The obtained timestamp token is then added back as an unprotected header into the same COSE object.¶

This mode is utilized when a record of the timing of the signature operation is desired.¶

¶
Figure 1: COSE, Then Timestamp (CTT)

In this context, timestamp tokens are similar to a countersignature made by the TSA.¶

### 2.2. Timestamp, Then COSE (TTC)

Figure 2 shows the case where a datum is first digested and submitted to a TSA to be timestamped.¶

This mode is used to wrap the signed document and its timestamp together in an immutable payload.¶

A COSE Signed Message is then built as follows:¶

- The obtained timestamp token is added to the protected headers.¶
- The original datum becomes the payload of the COSE Signed Message.¶

¶
Figure 2: Timestamp, Then COSE (TTC)

## 3. Timestamp Tokens per RFC 3161: COSE Header Parameters

The two modes described in Sections 2.2 and 2.1 use different inputs into the timestamping machinery and consequently create different kinds of bindings between COSE and TST. To clearly separate their semantics, two different COSE header parameters are defined as described in the following subsections.¶

### 3.1. `3161-ctt`

The `3161-ctt` COSE unprotected header parameter MUST be used for the mode described in Section 2.1.¶

The `3161-ctt` unprotected header parameter contains a DER-encoded TST [RFC3161] wrapped in a CBOR byte string (Major type 2).¶

The `MessageImprint` sent in the request to the TSA MUST be¶

- the hash of the CBOR-encoded signature field of the `COSE_Sign1` message, or¶
- the hash of the CBOR-encoded signatures field of the `COSE_Sign` message.¶

In either case, to minimize dependencies, the hash algorithm SHOULD be the same as the algorithm used for signing the COSE message. This may not be possible if the timestamp token has been obtained outside the processing context in which the COSE object is assembled.¶

Refer to Sections 3.1.1 and 3.1.2 for concrete examples of `MessageImprint` computation.¶

#### 3.1.1. `MessageImprint` Computation for `COSE_Sign1`

The following illustrates how `MessageImprint` is computed using a sample `COSE_Sign1` message.¶

Given the `COSE_Sign1` message¶

    18(
      [
        / protected h'a10126' / << {
            / alg / 1:-7 / ECDSA 256 /
          } >>,
        / unprotected / {
          / kid / 4:'11'
        },
        / payload / 'This is the content.',
        / signature / h'8eb33e4ca31d1c465ab05aac34cc6b23d58fef5c083106c4
    d25a91aef0b0117e2af9a291aa32e14ab834dc56ed2a223444547e01f11d3b0916e5
    a4c345cacb36'
      ]
    )

¶

the `bstr`-wrapped `signature`¶

    58 40                                     # bytes(64)
       8eb33e4ca31d1c465ab05aac34cc6b23
       d58fef5c083106c4d25a91aef0b0117e
       2af9a291aa32e14ab834dc56ed2a2234
       44547e01f11d3b0916e5a4c345cacb36

¶

(including the heading bytes `0x5840`) is used as input for computing the `MessageImprint`.¶

When using SHA-256, the resulting `MessageImprint` is¶

    SEQUENCE {
      SEQUENCE {
        OBJECT IDENTIFIER sha-256 (2 16 840 1 101 3 4 2 1)
        NULL
        }
      OCTET STRING
        44 C2 41 9D 13 1D 53 D5 55 84 B5 DD 33 B7 88 C2
        4E 55 1C 6D 44 B1 AF C8 B2 B8 5E 69 54 76 3B 4E
      }

¶

#### 3.1.2. `MessageImprint` Computation for `COSE_Sign`

The following illustrates how `MessageImprint` is computed using a sample `COSE_Sign` message.¶

Given the `COSE_Sign` message¶

    98(
      [
        / protected / h'',
        / unprotected / {},
        / payload / 'This is the content.',
        / signatures / [
          [
            / protected h'a10126' / << {
                / alg / 1:-7 / ECDSA 256 /
              } >>,
            / unprotected / {
              / kid / 4:'11'
            },
            / signature / h'e2aeafd40d69d19dfe6e52077c5d7ff4e408282cbefb
    5d06cbf414af2e19d982ac45ac98b8544c908b4507de1e90b717c3d34816fe926a2b
    98f53afd2fa0f30a'
          ]
        ]
      ]
    )

¶

the `signatures` array¶

    81                                        # array(1)
       83                                     # array(3)
          43                                  # bytes(3)
             a10126
          a1                                  # map(1)
             04                               # unsigned(4)
             42                               # bytes(2)
                3131                          # "11"
          58 40                               # bytes(64)
             e2aeafd40d69d19dfe6e52077c5d7ff4
             e408282cbefb5d06cbf414af2e19d982
             ac45ac98b8544c908b4507de1e90b717
             c3d34816fe926a2b98f53afd2fa0f30a

¶

is used as input for computing the `MessageImprint`.¶

When using SHA-256, the resulting `MessageImprint` is¶

    SEQUENCE {
      SEQUENCE {
        OBJECT IDENTIFIER sha-256 (2 16 840 1 101 3 4 2 1)
        NULL
        }
      OCTET STRING
        80 3F AD A2 91 2D 6B 7A 83 3A 27 BD 96 1C C0 5B
        C1 CC 16 47 59 B1 C5 6F 7A A7 71 E4 E2 15 26 F7
      }

¶

### 3.2. `3161-ttc`

The `3161-ttc` COSE protected header parameter MUST be used for the mode described in Section 2.2.¶

The `3161-ttc` protected header parameter contains a DER-encoded TST [RFC3161] wrapped in a CBOR byte string (Major type 2).¶

The `MessageImprint` sent to the TSA (Section 2.4 of [RFC3161]) MUST be the hash of the payload of the COSE Signed Message. This does not include the `bstr` wrapping -- only the payload bytes. (For an example, see Appendix A.1.)¶

To minimize dependencies, the hash algorithm used for signing the COSE message SHOULD be the same as the algorithm used in the `MessageImprint` [RFC3161]. However, this may not be possible if the timestamp requester and the COSE message signer are different entities.¶

## 4. Timestamp Processing

Timestamp tokens [RFC3161] use Cryptographic Message Syntax (CMS) as the signature envelope format. [RFC5652] provides details about signature verification, and [RFC3161] provides details specific to timestamp token validation. The payload of the signed timestamp token is the `TSTInfo` structure defined in [RFC3161], which contains the `MessageImprint` that was sent to the TSA. The hash algorithm is contained in the `MessageImprint` structure, together with the hash itself.¶

As part of the signature verification, the receiver MUST make sure that the `MessageImprint` in the embedded timestamp token matches a hash of either the payload, signature, or signature fields, depending on the mode of use and type of COSE structure.¶

Appendix B of [RFC3161] provides an example that illustrates how timestamp tokens can be used to verify signatures of a timestamped message when utilizing X.509 certificates.¶

## 5. Security Considerations

Please review the Security Considerations section in [RFC3161]; these considerations apply to this document as well.¶

Also review the Security Considerations section in [RFC9052]. These considerations apply to this document as well, particularly with regard to the need for implementations to protect private key material. Additionally, solutions based on the COSE header parameters defined in this document must be able to report compromised keys promptly.¶

The following scenario assumes that an attacker can manipulate the clocks on the COSE signer and its relying parties, but not the TSA. It is also assumed that the TSA is a trusted third party, so the attacker cannot impersonate the TSA and create valid timestamp tokens. In such a setting, any tampering with the COSE signer's clock does not have an impact, because once the timestamp is obtained from the TSA, it becomes the only reliable source of time. However, in both CTT mode and TTC mode, a denial of service can occur if the attacker can adjust the relying party's clock so that the CMS validation fails. This could disrupt the timestamp validation.¶

In CTT mode, an attacker could manipulate the unprotected header by removing or replacing the timestamp. To avoid that, the COSE Signed Message should be integrity protected during transit and at rest.¶

In TTC mode, the TSA is given an opaque identifier (a cryptographic hash value) for the payload. While this means that the content of the payload is not directly revealed, to prevent comparison with known payloads or disclosure of identical payloads being used over time, the payload would need to be armored, e.g., with a nonce that is shared with the recipient of the header parameter but not the TSA. Such a mechanism is out of scope for this document.¶

The resolution, accuracy, and precision of the TSA clock, as well as the expected latency introduced by round trips to and from the TSA, must be taken into account when implementing solutions based on the COSE header parameters defined in this document.¶

### 5.1. Avoiding Semantic Confusion

CTT mode and TTC mode have different semantic meanings. An implementation must ensure that the contents of the CTT and TTC headers are interpreted according to their specific semantics. In particular, symmetric to the signature and assembly mechanics, each mode has its own separate verification algorithm.¶

Implementers MUST clearly differentiate between TSA timestamps [RFC3161] proving the existence of payload data at an earlier point in time (TTC) and timestamps explicitly providing evidence of the existence of the cryptographic signature (CTT). Failure to clearly distinguish between these timestamp semantics can result in vulnerabilities, such as incorrectly accepting signatures created after key revocation based on older payload-only timestamps. Validators must not interpret protected-header payload timestamps as proof of signature creation time and should rely exclusively on TSA timestamps [RFC3161] explicitly covering signature data for determining signature validity timing.¶

## 6. IANA Considerations

IANA has allocated the COSE header parameters defined in Table 1 in the "COSE Header Parameters" registry [IANA.cose_header-parameters] as follows:¶

Table 1: New COSE Header Parameters
Name | Label | Value Type | Value Registry | Description | Reference
--- | --- | --- | --- | --- | ---
`3161-ttc` | 269 | `bstr` | - | Timestamp Token per [RFC3161]: Timestamp, Then COSE | RFC 9921, Section 3.2
`3161-ctt` | 270 | `bstr` | - | Timestamp Token per [RFC3161]: COSE, Then Timestamp | RFC 9921, Section 3.1

## 7. Normative References

[IANA.cose_header-parameters]
  IANA, "COSE Header Parameters", <https://www.iana.org/assignments/cose>.
[RFC2119]
  Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.
[RFC3161]
  Adams, C., Cain, P., Pinkas, D., and R. Zuccherato, "Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)", RFC 3161, DOI 10.17487/RFC3161, August 2001, <https://www.rfc-editor.org/info/rfc3161>.
[RFC5652]
  Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, RFC 5652, DOI 10.17487/RFC5652, September 2009, <https://www.rfc-editor.org/info/rfc5652>.
[RFC8174]
  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC9052]
  Schaad, J., "CBOR Object Signing and Encryption (COSE): Structures and Process", STD 96, RFC 9052, DOI 10.17487/RFC9052, August 2022, <https://www.rfc-editor.org/info/rfc9052>.

## Appendix A. Examples

### A.1. TTC

The payload¶

    'This is the content.'

¶

is hashed using SHA-256 to create the following `TimeStampReq` object¶

    SEQUENCE {
      INTEGER 1
      SEQUENCE {
        SEQUENCE {
          OBJECT IDENTIFIER sha-256 (2 16 840 1 101 3 4 2 1)
          NULL
          }
        OCTET STRING
          09 E6 38 D4 AA 95 FD 72 71 86 62 03 59 53 03 BC
          E2 32 F4 62 A9 4D 38 E3 93 77 3C D3 AA E3 F6 B0
        }
      BOOLEAN TRUE
      }

¶

which is sent to the TSA.¶

A `TimeStampResp` containing the following TST is returned:¶

    SEQUENCE {
      OBJECT IDENTIFIER signedData (1 2 840 113549 1 7 2)
      [0] {
        SEQUENCE {
          INTEGER 3
          SET {
            SEQUENCE {
              OBJECT IDENTIFIER sha-512 (2 16 840 1 101 3 4 2 3)
              NULL
              }
            }
          SEQUENCE {
            OBJECT IDENTIFIER tSTInfo (1 2 840 113549 1 9 16 1 4)
            [0] {
              OCTET STRING, encapsulates {
                SEQUENCE {
                  INTEGER 1
                  OBJECT IDENTIFIER '1 2 3 4 1'
                  SEQUENCE {
                    SEQUENCE {
                      OBJECT IDENTIFIER sha-256 (2 16 840 1 101 3 4 2 1)
                      NULL
                      }
                    OCTET STRING
                      09 E6 38 D4 AA 95 FD 72 71 86 62 03 59 53 03 BC
                      E2 32 F4 62 A9 4D 38 E3 93 77 3C D3 AA E3 F6 B0
                    }
                  INTEGER 12096870
                  GeneralizedTime 29/08/2025 07:45:46 GMT
                  BOOLEAN TRUE
    [...]

¶

The contents of the TST are `bstr`-wrapped and added to the protected headers bucket, which is then signed alongside the original payload to obtain the `COSE_Sign1` object.¶

    18([
            <<{1: -7, 269: h'3082154906092a864886f70d010702a082153a308215
    [encoded data, 10833 characters]
    11e33482e45c9b4f948bff15eba70'}>>,
            {4: '11'},
            'This is the content.',
            h'f5f0f27964f178dcb2254b30fdfdc48abc4499beaea7cb80f4004f30403
    f13a44bcca24fc61c5d71d3823bac04b923011dc7d31de35df1aefcd5a8ec5fe0fe6e
    '
        ])

¶

### A.2. CTT

Starting with the following `COSE_Sign1` object,¶

    18(
      [
        / protected h'a10126' / << {
            / alg / 1:-7 / ECDSA 256 /
          } >>,
        / unprotected / {
          / kid / 4:'11'
        },
        / payload / 'This is the content.',
        / signature / h'8eb33e4ca31d1c465ab05aac34cc6b23d58fef5c083106c4d
    25a91aef0b0117e2af9a291aa32e14ab834dc56ed2a223444547e01f11d3b0916e5a4
    c345cacb36'
      ]
    )

¶

the CBOR-encoded signature field is hashed using SHA-256 to create the following `TimeStampReq` object¶

    SEQUENCE {
      INTEGER 1
      SEQUENCE {
        SEQUENCE {
          OBJECT IDENTIFIER sha-256 (2 16 840 1 101 3 4 2 1)
          NULL
          }
        OCTET STRING
          DD 94 71 EF E7 43 C4 05 13 35 DF 8F 6D 28 82 F3
          BA DC 38 77 00 F7 ED 3F 70 91 67 2A 3E EA F7 C8
        }
      BOOLEAN TRUE
      }

¶

which is sent to the TSA.¶

A `TimeStampResp` containing the following TST is returned:¶

    SEQUENCE {
      OBJECT IDENTIFIER signedData (1 2 840 113549 1 7 2)
      [0] {
        SEQUENCE {
          INTEGER 3
          SET {
            SEQUENCE {
              OBJECT IDENTIFIER sha-512 (2 16 840 1 101 3 4 2 3)
              NULL
              }
            }
          SEQUENCE {
            OBJECT IDENTIFIER tSTInfo (1 2 840 113549 1 9 16 1 4)
            [0] {
              OCTET STRING, encapsulates {
                SEQUENCE {
                  INTEGER 1
                  OBJECT IDENTIFIER '1 2 3 4 1'
                  SEQUENCE {
                    SEQUENCE {
                      OBJECT IDENTIFIER sha-256 (2 16 840 1 101 3 4 2 1)
                      NULL
                      }
                    OCTET STRING
                      DD 94 71 EF E7 43 C4 05 13 35 DF 8F 6D 28 82 F3
                      BA DC 38 77 00 F7 ED 3F 70 91 67 2A 3E EA F7 C8
                    }
                  INTEGER 12100074
                  GeneralizedTime 29/08/2025 07:53:00 GMT
                  BOOLEAN TRUE
    [...]

¶

The contents of the TST are `bstr`-wrapped and added to the unprotected headers bucket in the original `COSE_Sign1` object to obtain the following:¶

    18(
      [
        / protected h'a10126' / << {
            / alg / 1:-7 / ECDSA 256 /
          } >>,
        / unprotected / {
          / 3161-ctt / 270 : h'3082154906092a864886f70d010702a082153a3082
    [encoded data, 10833 characters]
    450855dcb3b2a528063d426dc30268f',
          / kid / 4:'11'
        },
        / payload / 'This is the content.',
        / signature / h'8eb33e4ca31d1c465ab05aac34cc6b23d58fef5c083106c4
    d25a91aef0b0117e2af9a291aa32e14ab834dc56ed2a223444547e01f11d3b0916e5
    a4c345cacb36'
      ]
    )

¶

## Acknowledgments

The authors would like to thank Alexey Melnikov, Carl Wallace, Carsten Bormann, Deb Cooley, Éric Vyncke, Francesca Palombini, Leonard Rosenthol, Linda Dunbar, Michael B. Jones, Michael Prorock, Mike Bishop, Mohamed Boucadair, Orie Steele, Roman Danyliw, Shuping Peng, Stefan Santesson, Steve Lasker, and Yingzhen Qu for their reviews and comments.¶

## Contributors

Carsten contributed part of the security considerations.¶

Orie contributed an improved version of the diagrams.¶

## Authors' Addresses