0

The RFC3161 (https://www.ietf.org/rfc/rfc3161.txt) specification states

3. Transports

   There is no mandatory transport mechanism for TSA messages in this
   document.  The mechanisms described below are optional; additional
   optional mechanisms may be defined in the future.

It lists a few examples such as

3.2. File Based Protocol

   A file containing a time-stamp message MUST contain only the DER
   encoding of one TSA message, i.e., there MUST be no extraneous header
   or trailer information in the file.  Such files can be used to
   transport time stamp messages using for example, FTP.

   A Time-Stamp Request SHOULD be contained in a file with file
   extension .tsq (like Time-Stamp Query).  A Time-Stamp Response
   SHOULD be contained in a file with file extension .tsr (like
   Time-Stamp Reply).

I would like to attach a timestamp token in PEM format (=base64 econded) to a document. What I wonder now is whether there are any already standardized header/footer lines for this? maybe such as

-----BEGIN TST-----
[...]
-----END TST-----

or

-----BEGIN RFC3161 TOKEN-----
[...]
-----BEGIN RFC3161 TOKEN-----

or should I just use default PKCS7 header/footer?

1 Answers1

1

Pick whatever you want.

The label only serves humans to be able to identify what the data is, without having to decode it and parse the DER data. As such, labels like -----BEGIN TIME STAMP RESPONSE----- would work perfectly fine.

  • well there is for example https://tools.ietf.org/html/rfc7468 that specifies the labels to be used for a few textual encodings. Maybe there are also guidelines for RFC3161 tokens (couldn't find any yet) hence the question. – matthias_buehlmann Feb 04 '21 at 13:12
  • 1
    @matthias_buehlmann The RFC shows in section 4 that these specific labels should be used for the following things. However, the RFC also specifies that parsers must not fail if the label is not recognized. –  Feb 04 '21 at 13:25