Skip to content

Commit 4f93056

Browse files
committed
Changed alg and signature to content_hash per IETF 121 meeting comments
1 parent faaa3bd commit 4f93056

File tree

1 file changed

+70
-47
lines changed

1 file changed

+70
-47
lines changed

draft-ietf-vcon-vcon-container.md

Lines changed: 70 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ normative:
5151

5252
HTTPS: RFC9110
5353

54+
IANA-COSE-ALG: "COSE Algorithms <https://www.iana.org/assignments/cose/cose.xhtml>", n.d..
55+
5456
JSON: RFC8259
5557

5658
JWS: RFC7515
@@ -94,6 +96,8 @@ informative:
9496

9597
SIP-XFER: RFC5589
9698

99+
STIR-PASS: I-D.draft-ietf-stir-passport-rcd
100+
97101
vCard: RFC7095
98102

99103
vCon-white-paper:
@@ -162,7 +166,7 @@ vCons may have two or more parties involved, but at least one should be a human.
162166
For instance, an interaction between a bot and a human is an appropriate scope for vCons, but a conversation between two bots would not.
163167

164168
Due to the size and complexity of some portions of a vCon, both inline and externally referenced dialog, analysis, attachments and other vCon reference assets are supported.
165-
For instance, vCons may reference a videoconference media recording as an external URL with an accompanying signature of the contents to detect tampering.
169+
For instance, vCons may reference a videoconference media recording as an external URL with an accompanying content hash of the contents to detect tampering.
166170
Alternatively, vCons may directly contain the media of the entire dialog internally, keeping the conversation in one place, and optionally encrypted.
167171

168172
vCons are designed to be a digital asset, versioned and signed.
@@ -305,7 +309,7 @@ Objects or arrays with no or null values MAY be excluded from the vCon.
305309

306310
Objects that contain a file or data inline (i.e. within the vCon) MUST have the parameters: body and encoding.
307311
JSON does not support binary data values.
308-
For this reason inline files MUST be base64url (see Section 2 [JWS]) encoded to be included as a valid JSON string value if they are not already valid JSON strings.
312+
For this reason inline files MUST be Base64url (see Section 2 [JWS]) encoded to be included as a valid JSON string value if they are not already valid JSON strings.
309313

310314
### body
311315

@@ -321,7 +325,7 @@ The encoding parameter describes the type of encoding that was performed on the
321325

322326
This MUST be one of the following strings:
323327

324-
* "base64url": The payload of the file has been base64url encoded and provided as the string value of the body parameter.
328+
* "base64url": The payload of the file has been Base64Url encoded and provided as the string value of the body parameter.
325329

326330
* "json": The value of the body string is a JSON object.
327331

@@ -330,10 +334,13 @@ The encoding parameter describes the type of encoding that was performed on the
330334
## Externally Referenced Files
331335

332336
Files and data stored externally from the vCon MUST be "signed" to ensure that they have not been modified.
333-
Objects that refer to a file which is externally stored from the vCon MUST have the parameters: url, alg and signature. These parameters are defined in the following subsections.
337+
Objects that refer to a file which is externally stored from the vCon MUST have the parameters: url,
338+
content_hash.
339+
These parameters are defined in the following subsections.
334340
The use of [SHA-512] hash for ensuring that the externally referenced data or file has not been modified, is defined in this document.
335341
Other methods of ensuring integrity may be added in the future.
336-
The following subsections define how the specific algorithm used and how that signature information is included in a vCon so that the content can be verified.
342+
The following subsections define how the specific algorithm used and how that content hash information is
343+
included in a vCon so that the content can be verified.
337344

338345
### url
339346

@@ -343,25 +350,35 @@ HTTPS MUST be used for retrieval to protect the privacy of the contents of the f
343350
* url: "String"
344351

345352

346-
### alg
347-
348-
The alg parameter describes the method used for signing the file payload at the given url.
349-
Only one method of signing of externally referenced files is defined in this document.
350-
So only one value is defined for the alg parameter.
351-
352-
* alg: "String"
353-
354-
This SHOULD be the following string:
355-
356-
+ "SHA-512": The algorithm used for signing the externally referenced file is defined in section 6.3 and 6.4 of [SHA-512].
357-
358-
### signature
359-
360-
The [SHA-512] hash on the externally referenced file is included in the signature string value.
361-
362-
* signature: "String"
363-
364-
The string value of the signature parameter is the Base64Url Encoded value of the SHA-512 hash (as defined in section 6.3 and 6.4 [SHA-512]) of the body of the content at the given url.
353+
### content_hash
354+
355+
The integrity of externally referenced files are protected using a hash of the external content.
356+
The algorithm and hash value are contained in the content_hash parameter.
357+
The value of the content_hash can be a single token or an array of tokens if multiple hash
358+
algorithms are desired to be provided.
359+
The SHA-512 [SHA-512] algorithm MUST be supported.
360+
Other algorythms MAY be included.
361+
The algorithm used for signing the externally referenced file is defined in section 6.3 and 6.4 of [SHA-512].
362+
363+
content_hash: "String" \| String[]
364+
365+
The string token value(s) for the content_hash parameter use the same approach used in section 6 of [STIR-PASS].
366+
The relevant text is copied here for convenience and to remove the normative dependency.
367+
The hash string token values in the content_hash parameter are formed from combining a string that
368+
defines the crypto algorithm used to generate the digest along with the Base64Url Encoded value of the
369+
SHA-512 hash
370+
(as defined in section 6.3 and 6.4 [SHA-512]) of the body of the content at the given url.
371+
372+
The hash algorithm is identified by "sha512".
373+
SHA-512 is part of the SHA-2 set of cryptographic hash functions [SHA-512] defined by the US National
374+
Institute of Standards and Technology (NIST).
375+
Implementations MAY support additional recommended hash algorithms in [IANA-COSE-ALG]; that is, the hash
376+
algorithm has "Yes" in the "Recommended" column of the IANA registry.
377+
Hash algorithm identifiers MUST use only lowercase letters, and they MUST NOT contain hyphen characters.
378+
The character following the algorithm string MUST be a hyphen character, "-", or ASCII 45.
379+
The subsequent characters are the Base64Url encoded (see Section 2 [JWS]) digest of a canonicalized and concatenated string
380+
or binary data based on the JSON pointer referenced elements of "rcd" claim or the URI referenced content
381+
contained in the claim.
365382

366383
# vCon JSON Object
367384

@@ -447,7 +464,7 @@ A redacted vCon SHOULD provide a reference to the unredacted or prior, less reda
447464
The purpose of the Redacted Object is to provide the reference to the unredacted or less redacted version of the vCon from which this vCon was derived.
448465
For privacy reasons, it may be necessary to redact a vCon to construct another vCon without the PII.
449466
This allows the non-PII portion of the vCon to still be analyzed or used in a broader scope.
450-
The Redacted Object SHOULD contain the uuid parameter and MAY include the vCon inline via the body and encoding parameters or alternatively the url, alg and signature parameters (see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
467+
The Redacted Object SHOULD contain the uuid parameter and MAY include the vCon inline via the body and encoding parameters or alternatively the url, content_hash parameters (see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
451468
If the unredacted vCon is included in the body, the unredacted vCon MUST be in the encrypted form.
452469
If a reference to the unredacted vCon is provided in the url parameter, the access to that URL MUST be restricted to only those who should be allowed to see the identity or PII for the redacted vCon.
453470

@@ -482,11 +499,11 @@ As defined in [Inline Files](#inline-files) body and encoding MAY be included:
482499
* body: "String"
483500
* encoding: "String"
484501

485-
Alternatively, as defined in [Externally Referenced Files](#externally-referenced-files) url, alg and signature MAY be included:
502+
Alternatively, as defined in [Externally Referenced Files](#externally-referenced-files) url SHOULD be
503+
included unless redacted and content_hash MUST be included:
486504

487505
* url: "String"
488-
* alg: "String"
489-
* signature: "String"
506+
* content_hash: "String" \| "String[]"
490507

491508
The following diagram illustrates an example partial JSON object tree for a redacted vCon.
492509
The top level object is a JWS signed vCon which contains a vCon in the unsigned form in the payload parameter.
@@ -507,7 +524,7 @@ In these cases, to allow for adding of additional information a new vCon instanc
507524
The prior vCon instance version is referenced by the Appended Object.
508525
Then the appended information is added to the new vCon instance version (i.e. top level vCon object).
509526

510-
The prior vCon instance version SHOULD be referenced via the uuid of the prior vCon instance version, and MAY include the body and encoding parameters or alternatively the url, alg and signature parameters (see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
527+
The prior vCon instance version SHOULD be referenced via the uuid of the prior vCon instance version, and MAY include the body and encoding parameters or alternatively the url and content_hash parameters (see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
511528

512529
* appended: "Appended" (optional, mutually exclusive with redacted and group parameters)
513530

@@ -522,11 +539,11 @@ Alternatively, as defined in [Inline Files](#inline-files) body and encoding MAY
522539
* body: "String"
523540
* encoding: "String"
524541

525-
Alternatively, as defined in [Externally Referenced Files](#externally-referenced-files) url, alg and signature MAY be included:
542+
Alternatively, as defined in [Externally Referenced Files](#externally-referenced-files) url and content_hash
543+
MAY be included:
526544

527545
* url: "String"
528-
* alg: "String"
529-
* signature: "String"
546+
* content_hash: "String" \| "String[]"
530547

531548
The following figure illustrates an example partial JSON object tree for an appended vCon.
532549
The top level object is the JWS signed appended vCon which contains the unsigned form of the vCon in it's payload parameter.
@@ -836,7 +853,10 @@ This can be done in the filename parameter.
836853

837854
### Dialog Content
838855

839-
The Dialog Object SHOULD contain the body and encoding parameters or the url, alg and signature parameters for all dialog types other than "incomplete" and "transfer", these parameters MUST NOT be present for "incomplete" or "transfer" dialog types (see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
856+
The Dialog Object SHOULD contain the body and encoding parameters or the url and content_hash parameters for
857+
all dialog types other than "incomplete" and "transfer", these parameters MUST NOT be present for
858+
"incomplete" or "transfer" dialog types (see [Inline Files](#inline-files) and
859+
[Externally Referenced Files](#externally-referenced-files)).
840860

841861
For inline included dialog:
842862

@@ -846,8 +866,7 @@ For inline included dialog:
846866
Alternatively, for externally referenced dialog:
847867

848868
* url: "String" (optional in an a redacted vCon)
849-
* alg: "String"
850-
* signature: "String"
869+
* content_hash: "String" \| "String[]"
851870

852871
### disposition
853872

@@ -1072,7 +1091,8 @@ The schema parameter allows the data format, schema or configuration used to gen
10721091

10731092
### Analysis Content
10741093

1075-
The Analysis Object SHOULD contain the body and encoding parameters or the url, alg and signature parameters (see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
1094+
The Analysis Object SHOULD contain the body and encoding parameters or the url and content_hash parameters
1095+
(see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
10761096

10771097
For inline included analysis:
10781098

@@ -1082,8 +1102,7 @@ For inline included analysis:
10821102
Alternatively, for externally referenced analysis:
10831103

10841104
* url: "String"
1085-
* alg: "String"
1086-
* signature: "String"
1105+
* content_hash: "String" \| "String[]"
10871106

10881107
## Attachment Object
10891108

@@ -1130,7 +1149,8 @@ This can be done in the filename parameter.
11301149

11311150
### Attachment Content
11321151

1133-
The Attachment Object SHOULD contain the body and encoding parameters or the url, alg and signature parameters (see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
1152+
The Attachment Object SHOULD contain the body and encoding parameters or the url and content_hash parameters
1153+
(see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
11341154

11351155
For inline included attachments:
11361156

@@ -1140,8 +1160,7 @@ For inline included attachments:
11401160
Alternatively, for externally referenced attachments:
11411161

11421162
* url: "String"
1143-
* alg: "String"
1144-
* signature: "String"
1163+
* content_hash: "String" \| "String[]"
11451164

11461165
## Group Object
11471166

@@ -1153,7 +1172,8 @@ There are situations in the above example, where it is desired to treat these as
11531172
For this reason, it may be necessary to aggregate the separate vCon into a single vCon which is considered the whole of a conversation.
11541173
The Group Object includes or refers to a vCon to be aggregated into the whole of a single vCon conversation.
11551174

1156-
The Group Object SHOULD contain the uuid and either the body and encoding parameters or the url, alg and signature parameters (see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
1175+
The Group Object SHOULD contain the uuid and either the body and encoding parameters or the url content_hash
1176+
parameters (see [Inline Files](#inline-files) and [Externally Referenced Files](#externally-referenced-files)).
11571177
The vCon MAY be referenced via UUID:
11581178

11591179
* uuid: "String"
@@ -1172,11 +1192,11 @@ The encoding parameter MUST be included with the body parameter, if provided, to
11721192
The encoding string MUST have the value: "json".
11731193

11741194
Alternatively, the vCon can be externally referenced.
1175-
The url, alg and signature parameters and values are defined in [Externally Referenced Files](#externally-referenced-files).
1195+
The url and content_hash parameters and values are defined in
1196+
[Externally Referenced Files](#externally-referenced-files).
11761197

11771198
* url: "String"
1178-
* alg: "String"
1179-
* signature: "String"
1199+
* content_hash: "String" \| "String[]"
11801200

11811201
# Security Considerations
11821202

@@ -1239,7 +1259,8 @@ In some deployments, it is not practical to include all of the file contents of
12391259
In support of that, a file may be externally referenced.
12401260
When external files are referenced, the signature on the vCon does not secure the file contents from modification.
12411261
For this reason any externally referenced files SHOULD also have a signature.
1242-
vCons use the [SHA-512] hash method for integrity checking of externally referenced file content and include its url, alg and signature in the vCon which are included in the integrity signature for the whole vCon.
1262+
vCons use the [SHA-512] hash method for integrity checking of externally referenced file content and include
1263+
its url and content_hash in the vCon which are included in the integrity signature for the whole vCon.
12431264

12441265
After retrieving externally referenced files, before using its content, the payload of the HTTPS request should be verified using the signature parameter value for the hash for the url body using the procedure defined in section 6.3 and 6.4 of [SHA-512].
12451266

@@ -1405,7 +1426,9 @@ Change controller: IETF
14051426

14061427
## Version 0.0.1 to 0.0.2
14071428

1408-
"mimetype" parameters were renamed to "mediatype"
1429+
* "mimetype" parameters were renamed to "mediatype"
1430+
1431+
* "alg" and "signature" were combined into "content_hash"
14091432

14101433

14111434
--- back

0 commit comments

Comments
 (0)