2. Modes of Use
Dieser Abschnitt bewahrt den RFC-Text zu COSE timestamp token header parameters, einschliesslich CTT and TTC modes, TimeStampToken handling, MessageImprint computation, COSE_Sign and COSE_Sign1 examples, IANA registrations und security considerations.
Originaler RFC-Text
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.
.--------. .-----.
| Signer | | TSA |
+--------+----------------------------------. +-----+-------------.
| .-------------. .-----------. .-------. | | .-------------. |
| / private-key / | protected | | datum | | | / private-key / |
| '-----+-------' '---+-------' '---+---' | | '------+------' |
| | | | | | | |
| +---------------+------------' | | | |
| | | | .+. |
| v .---------. | | | L | Clock |
| .---------. .----. | Message | | | '+' |
| | Sign1 +->+ hash +->+ Imprint +-------->| | |
| '-+-------' '----' '---------' | | v |
| | .-------. | | .---------. |
| | | nonce +--------->| | timestamp | |
| | '-------' | | '---------' |
'----|--------------------------------------' '---------+---------'
| .-------------. |
+-------------+-----------+ | unprotected | |
| | | | .-----. | |
[protected] [payload] [signature] | | TST |<-----'
| | | | '-----' |
| v v '------+------'
| .-------+------------+-----. |
'--->+ rfc3161-ctt COSE +<-----'
'--------------------------'
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.
.--------. .-----.
| Signer | | TSA |
+--------+----------------------------------. +-----+-------------.
| .-------------. .-------. | | .-------------. |
| / private-key / | nonce +-------->+ / private-key / |
| '-+-----------' '-------' | | '------+------' |
| | .---------. | | | |
| | .-------. .----. | Message | | | | |
| | + datum +->+ hash +->+ Imprint +------->+ .+. |
| | '-+-----' '----' '---------' | | | L | Clock |
| | | | | '+' |
| | | .-------------. | | | |
| v v | protected | | | v |
| .-------. | .-----. | | | .---------. |
| | Sign1 +<-----------+ | TST |<----------+ | timestamp | |
| '-+-----' | '-----' | | | '---------' |
| | '-------------' | | |
'----|--------------------------------------' '-------------------'
| .-------------.
+-------------+-----------+ | unprotected |
| | | | .-----. |
[protected] [payload] [signature] | | ... | |
| | | | '-----' |
| v v '------+------'
| .-------+------------+-----. |
'--->+ rfc3161-ttc COSE +<-----'
'--------------------------'
Figure 2: Timestamp, Then COSE (TTC)