Skip to content

Commit cc8b275

Browse files
authored
Merge pull request #47 from achamayou/patch-1
Update draft-ietf-cose-hash-envelope.md
2 parents 895a692 + 79c8d01 commit cc8b275

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

draft-ietf-cose-hash-envelope.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,23 @@ The terms COSE, CDDL, and EDN are defined in {{-COSE}}, {{-CDDL}}, {{-EDN}} resp
7979

8080
This document specifies the following new header parameters commonly used alongside hashes to identify resources:
8181

82-
TBD_1:
82+
258:
8383
: the hash algorithm used to produce the payload.
8484

85-
TBD_2:
85+
259:
8686
: the content type of the bytes that were hashed (preimage) to produce the payload, given as a content-format number ({{Section 12.3 of RFC7252}}) or as a media-type name optionally with parameters ({{Section 8.3 of RFC9110}}).
8787

88-
TBD_3:
88+
260:
8989
: an identifier enabling retrieval of the original resource (preimage) identified by the payload.
9090

9191
# Hash Envelope CDDL
9292

9393
~~~ cddl
9494
Hash_Envelope_Protected_Header = {
9595
? &(alg: 1) => int,
96-
&(payload_hash_alg: TBD_1) => int
97-
&(payload_preimage_content_type: TBD_2) => uint / tstr
98-
? &(payload_location: TBD_3) => tstr
96+
&(payload_hash_alg: 258) => int
97+
&(payload_preimage_content_type: 259) => uint / tstr
98+
? &(payload_location: 260) => tstr
9999
* int / tstr => any
100100
}
101101

@@ -114,15 +114,15 @@ Hash_Envelope = #6.18(Hash_Envelope_as_COSE_Sign1)
114114
~~~
115115

116116
- Label `1` (alg) Cryptographic algorithm to use
117-
- Label `TBD_1` (payload hash alg) MUST be present in the protected header and MUST NOT be present in the unprotected header.
118-
- Label `TBD_2` (content type of the preimage of the payload) MAY be present in the protected header or unprotected header.
119-
- Label `TBD_3` (payload_location) MAY be added to the protected header and MUST NOT be presented in the unprotected header.
117+
- Label `258` (payload hash alg) MUST be present in the protected header and MUST NOT be present in the unprotected header.
118+
- Label `259` (content type of the preimage of the payload) MAY be present in the protected header or unprotected header.
119+
- Label `260` (payload_location) MAY be added to the protected header and MUST NOT be presented in the unprotected header.
120120
- Label `3` (content_type) MUST NOT be present in the protected or unprotected headers.
121121

122-
Label `3` is easily confused with label `TBD_2` payload_preimage_content_type.
122+
Label `3` is easily confused with label `259` payload_preimage_content_type.
123123
The difference between content_type (3) and payload_preimage_content_type (TBD2) is content_type is used to identify the content format associated with payload, whereas payload_preimage_content_type is used to identify the content format of the bytes which are hashed to produce the payload.
124124

125-
Profiles that rely on this specification MAY choose to mark TBD_1, TBD_2, TBD_3 (or other header parameters) critical, see {{Section C.1.3 of RFC9052}} for more details.
125+
Profiles that rely on this specification MAY choose to mark 258, 259, 260 (or other header parameters) critical, see {{Section C.1.3 of RFC9052}} for more details.
126126

127127
# Envelope EDN
128128

@@ -134,10 +134,10 @@ The following informative example demonstrates how to construct a hash envelope
134134
/ signature alg / 1: -35, # ES384
135135
/ key identifier / 4: h'75726e3a...32636573',
136136
/ cose sign1 type / 16: "application/example+cose",
137-
/ hash algorithm / TBD_1: -16, # sha256
138-
/ media type / TBD_2: "application/spdx+json",
137+
/ hash algorithm / 258: -16, # sha256
138+
/ media type / 259: "application/spdx+json",
139139
/ location /
140-
TBD_3: "https://sbom.example/.../manifest.spdx.json"
140+
260: "https://sbom.example/.../manifest.spdx.json"
141141
}>>
142142
/ unprotected / {},
143143
/ payload / h'935b5a91...e18a588a',
@@ -190,9 +190,9 @@ IANA is requested to add the COSE header parameters defined in {{param-spec}}, a
190190

191191
| Name | Label | Value Type | (1) | Description | Reference |
192192
|-------------------------|-------|-------------|--------|-----------------------------------------------------------------------------------------------------------------------------------|-----------------------|
193-
| `payload-hash-alg` | TBD_1 | int | (2) | The hash algorithm used to produce the payload of a COSE_Sign1 | {{&SELF}}, {{param-spec}} |
194-
| `preimage content type` | TBD_2 | uint / tstr | (3) | The content-format number or content-type (media-type name) of data that has been hashed to produce the payload of the COSE_Sign1 | {{&SELF}}, {{param-spec}} |
195-
| `payload-location` | TBD_3 | tstr | (none) | The string or URI hint for the location of the data hashed to produce the payload of a COSE_Sign1 | {{&SELF}}, {{param-spec}} |
193+
| `payload-hash-alg` | 258 | int | (2) | The hash algorithm used to produce the payload of a COSE_Sign1 | {{&SELF}}, {{param-spec}} |
194+
| `preimage-content-type` | 259 | uint / tstr | (3) | The content-format number or content-type (media-type name) of data that has been hashed to produce the payload of the COSE_Sign1 | {{&SELF}}, {{param-spec}} |
195+
| `payload-location` | 260 | tstr | (none) | The string or URI hint for the location of the data hashed to produce the payload of a COSE_Sign1 | {{&SELF}}, {{param-spec}} |
196196
{: #iana-header-params title="Newly registered COSE Header Parameters
197197
&br;(1): Value Registry
198198
&br;(2): https://www.iana.org/assignments/cose/cose.xhtml#algorithms

0 commit comments

Comments
 (0)