You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-steele-cose-hash-envelope.md
+61-56Lines changed: 61 additions & 56 deletions
Original file line number
Diff line number
Diff line change
@@ -37,24 +37,25 @@ author:
37
37
country: Germany
38
38
39
39
normative:
40
-
RFC9052: RFC9052
40
+
RFC9596: RFC9596
41
41
I-D.ietf-cose-typ-header-parameter: COSE-TYP
42
42
43
43
informative:
44
44
45
45
--- abstract
46
46
47
-
This document defines new COSE header parameters for signaling that a payload is the output of a hash function.
47
+
This document defines new COSE header parameters for signaling a payload as an output of a hash function.
48
48
This mechanism enables faster validation as access to the original payload is not required for signature validation.
49
-
Additionally, hints of the detached payload's content format and availability are defined.
49
+
Additionally, hints of the detached payload's content format and availability are defined providing optional discovery of the original payload content.
50
50
51
51
--- middle
52
52
53
53
# Introduction
54
54
55
55
COSE defined detached payloads in Section 2 of {{-RFC9052}}, using `nil` as the payload.
56
56
57
-
In order to verify a signature over a detached payload, the verifier must have access to the payload content. Storing a hash of the content allows for small signature envelopes, that are easy to transport and verify independently.
57
+
In order to verify a signature over a detached payload, the verifier must have access to the payload content.
58
+
Storing a hash of the content allows for small signature envelopes, that are easy to transport and verify independently.
58
59
59
60
Additional hints in the protected header ensure cryptographic agility for the hashing & signing algorithms, and discoverability for the original content which could be prohibitively large to move over a network.
60
61
@@ -64,18 +65,18 @@ Additional hints in the protected header ensure cryptographic agility for the ha
64
65
65
66
# Header Parameters
66
67
67
-
To represent a hash of a detached payload, the following headers are defined:
68
+
To represent a hash of a payload, the following headers are defined:
68
69
69
-
TBD 0:
70
-
: will be assigned by {{-COSE-TYP}}, represents the content type of the code envelope, including the protected header and payload
70
+
typ 16:
71
+
: Assigned by {{-COSE-TYP}}, represents the content type of the code envelope, including the protected header and payload
71
72
72
-
TBD 1:
73
+
TBD_1:
73
74
: the hash algorithm used to generate the hash of the payload
74
75
75
-
TBD 2:
76
+
TBD_2:
76
77
: the content type of the payload the hash represents
77
78
78
-
TBD 3:
79
+
TBD_3:
79
80
: an identifier enabling a verifier to retrieve the full payload preimage.
TBD 0 (typ), TBD 1 (payload hash alg) and TBD 2 (content type of the preimage of the payload) MUST be present in the protected header and MUST NOT be present in the unprotected header.
127
+
16 (typ), TBD_1 (payload hash alg) and TBD_2 (content type of the preimage of the payload) MUST be present in the protected header and MUST NOT be present in the unprotected header.
128
+
TBD_3 (payload_location) MAY be added to the protected header and MUST NOT be presented in the unprotected header.
TBD 0 will be assigned by {{-COSE-TYP}}, it represents the content type of the code envelope, which includes the protected header and payload.
143
+
{{-COSE-TYP}} represents the content type of the code envelope, which includes the protected header and payload.
154
144
155
-
TBD 1 will be assigned by this draft.
156
-
TBD 2 will be assigned by this draft.
157
-
TBD 3 will be assigned by this draft.
145
+
TBD_1 will be assigned by this draft.
146
+
TBD_2 will be assigned by this draft.
147
+
TBD_3 will be assigned by this draft.
158
148
159
149
## Attached Payload
160
150
161
-
The payload MAY be attached.
151
+
COSE_sign1 envelope with an attached payload, providing for signature validation.
162
152
163
153
~~~~ cbor-diag
164
154
18( / COSE Sign 1 /
@@ -173,7 +163,7 @@ The payload MAY be attached.
173
163
174
164
## Detached Payload
175
165
176
-
The payload MAY be detached.
166
+
COSE_sign1 detached payload (`nil`), which is compact, but the payload must be distributed out of band to validate the signature
177
167
178
168
~~~~ cbor-diag
179
169
18( / COSE Sign 1 /
@@ -186,6 +176,21 @@ The payload MAY be detached.
186
176
)
187
177
~~~~
188
178
179
+
## Hashed Payload
180
+
181
+
A hashed payload functions equivalently to an attached payload, with the benefits of being compact in size and providing the ability to validate the signature.
182
+
183
+
~~~~ cbor-diag
184
+
18( / COSE Sign 1 /
185
+
[
186
+
h'a4013822...3a616263', / Protected /
187
+
{} / Unprotected /
188
+
h'935b5a91...e18a588a', / Payload /
189
+
h'15280897...93ef39e5' / Signature /
190
+
]
191
+
)
192
+
~~~~
193
+
189
194
# Encrypted Hashes
190
195
191
196
Should we define this?
@@ -203,25 +208,25 @@ For example, when signing with ECDSA using P-256 and SHA-256, use SHA-256 to has
203
208
204
209
## COSE Header Algorithm Parameters
205
210
206
-
* Name: payload hash algorithm
207
-
* Label: TBD_1
208
-
* Value type: int
209
-
* Value registry: https://www.iana.org/assignments/named-information/named-information.xhtml
210
-
* Description: Hash algorithm used to produce the payload.
-Description: Hash algorithm used to produce the payload.
211
216
212
217
## Named Information Hash Algorithm Registry
213
218
214
-
* Name: SHAKE256
215
-
* Label: TBD_2
216
-
* Value type: int
217
-
* Value registry: https://www.iana.org/assignments/named-information/named-information.xhtml
218
-
* Description: SHAKE256 a described in https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf
219
-
220
-
* Name: ASCON128
221
-
* Label: TBD_3
222
-
* Value type: int
223
-
* Value registry: https://www.iana.org/assignments/named-information/named-information.xhtml
224
-
* Description: ASCON128 a described in https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/round-2/spec-doc-rnd2/ascon-spec-round2.pdf
-Description: ASCON128 a described in https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/round-2/spec-doc-rnd2/ascon-spec-round2.pdf
0 commit comments