Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce tagged-type definitions #89

Merged
merged 6 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions cddl/cbor-tags.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
corim = #6.500($concise-rim-type-choice)
$concise-rim-type-choice /= #6.501(corim-map)
$concise-rim-type-choice /= #6.502(signed-corim)
$concise-tag-type-choice /= #6.505(bytes .cbor concise-swid-tag)
$concise-tag-type-choice /= #6.506(bytes .cbor concise-mid-tag)
$concise-tag-type-choice /= #6.508(bytes .cbor concise-bom-tag)
tagged-concise-rim-type-choice = #6.500($concise-rim-type-choice)
tagged-corim-map = #6.501(corim-map)
tagged-signed-corim = #6.502(signed-corim)
tagged-concise-swid-tag = #6.505(bytes .cbor concise-swid-tag)
tagged-concise-mid-tag = #6.506(bytes .cbor concise-mid-tag)
tagged-concise-bom-tag = #6.508(bytes .cbor concise-bom-tag)
tagged-ueid-type = #6.550(ueid-type)
tagged-int-type = #6.551(int)
tagged-svn = #6.552(svn)
Expand All @@ -12,4 +12,5 @@ tagged-pkix-base64-key-type = #6.554(tstr)
tagged-pkix-base64-cert-type = #6.555(tstr)
tagged-pkix-base64-cert-path-type = #6.556(tstr)
tagged-thumbprint-type = #6.557(digest)
$raw-value-type-choice /= #6.560(bytes)
tagged-bytes = #6.560(bytes)

6 changes: 3 additions & 3 deletions cddl/concise-tag-type-choice.cddl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$concise-tag-type-choice /= #6.505(bytes .cbor concise-swid-tag)
$concise-tag-type-choice /= #6.506(bytes .cbor concise-mid-tag)
$concise-tag-type-choice /= #6.508(bytes .cbor concise-bom-tag)
$concise-tag-type-choice /= tagged-concise-swid-tag
$concise-tag-type-choice /= tagged-concise-mid-tag
$concise-tag-type-choice /= tagged-concise-bom-tag
5 changes: 5 additions & 0 deletions cddl/corim-frags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ CORIM_FRAGS += profile-type-choice.cddl
CORIM_FRAGS += protected-corim-header-map.cddl
CORIM_FRAGS += signed-corim.cddl
CORIM_FRAGS += tagged-corim-map.cddl
CORIM_FRAGS += tagged-concise-rim-type-choice.cddl
CORIM_FRAGS += tagged-signed-corim.cddl
CORIM_FRAGS += tagged-concise-swid-tag.cddl
CORIM_FRAGS += tagged-concise-mid-tag.cddl
CORIM_FRAGS += tagged-concise-bom-tag.cddl
CORIM_FRAGS += unprotected-corim-header-map.cddl
CORIM_FRAGS += validity-map.cddl

Expand Down
6 changes: 3 additions & 3 deletions cddl/corim.cddl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
corim = #6.500($concise-rim-type-choice)
corim = tagged-concise-rim-type-choice

$concise-rim-type-choice /= #6.501(corim-map)
$concise-rim-type-choice /= #6.502(signed-corim)
$concise-rim-type-choice /= tagged-corim-map
$concise-rim-type-choice /= tagged-signed-corim
3 changes: 2 additions & 1 deletion cddl/raw-value.cddl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
$raw-value-type-choice /= #6.560(bytes)
tagged-bytes = #6.560(bytes)
$raw-value-type-choice /= tagged-bytes

raw-value-mask-type = bytes
1 change: 1 addition & 0 deletions cddl/tagged-concise-bom-tag.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tagged-concise-bom-tag = #6.508(bytes .cbor concise-bom-tag)
1 change: 1 addition & 0 deletions cddl/tagged-concise-mid-tag.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tagged-concise-mid-tag = #6.506(bytes .cbor concise-mid-tag)
2 changes: 2 additions & 0 deletions cddl/tagged-concise-rim-type-choice.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

tagged-concise-rim-type-choice = #6.500($concise-rim-type-choice)
1 change: 1 addition & 0 deletions cddl/tagged-concise-swid-tag.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tagged-concise-swid-tag = #6.505(bytes .cbor concise-swid-tag)
1 change: 1 addition & 0 deletions cddl/tagged-signed-corim.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tagged-signed-corim = #6.502(signed-corim)
18 changes: 8 additions & 10 deletions draft-ietf-rats-corim.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ identifiers. Other types of identifiers could be defined as needed.
### Tags {#sec-corim-tags}

A `$concise-tag-type-choice` is a tagged CBOR payload that carries either a
CoMID ({{sec-comid}}) or a CoSWID {{-coswid}}.
CoMID ({{sec-comid}}), a CoSWID {{-coswid}}, or a CoBOM {{sec-cobom}}.

~~~ cddl
{::include cddl/concise-tag-type-choice.cddl}
Expand Down Expand Up @@ -1274,20 +1274,18 @@ groups to use this information as they see fit".

## New CBOR Tags {#sec-iana-cbor-tags}

[^issue] https://github.com/ietf-rats-wg/draft-ietf-rats-corim/issues/13

IANA is requested to allocate the following tags in the "CBOR Tags" registry {{!IANA.cbor-tags}}, preferably with the specific CBOR tag value requested:

| Tag | Data Item | Semantics | Reference |
| --- | --------- | --------- | --------- |
| 500 | `tag` | A corim, one out of $concise-rim-type-choice, see {{sec-corim-tags}} | {{&SELF}} |
| 501 | `map` | A corim-map, see {{sec-corim-map}} | {{&SELF}} |
| 502 | `tag` | A signed-corim, see {{sec-corim-signed}} | {{&SELF}} |
| 500 | `tag` | A tagged-concise-rim-type-choice, see {{sec-corim-tags}} | {{&SELF}} |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for addressing my comment. Please keep the existing typographic alignment though.

| 501 | `map` | A tagged-corim-map, see {{sec-corim-map}} | {{&SELF}} |
| 502 | `tag` | A tagged-signed-corim, see {{sec-corim-signed}} | {{&SELF}} |
| 503-504 | `any` | Earmarked for CoRIM | {{&SELF}} |
| 505 | `bytes` | An encoded concise-swid-tag, see {{sec-corim-tags}} | {{&SELF}} |
| 506 | `bytes` | An encoded concise-mid-tag, see {{sec-corim-tags}}} | {{&SELF}} |
| 505 | `bytes` | A tagged-concise-swid-tag, see {{sec-corim-tags}} | {{&SELF}} |
| 506 | `bytes` | A tagged-concise-mid-tag, see {{sec-corim-tags}} | {{&SELF}} |
| 507 | `any` | Earmarked for CoRIM | {{&SELF}} |
| 508 | `bytes` | An encoded concise-bom-tag, see {{sec-corim-tags}}} | {{&SELF}} |
| 508 | `bytes` | A tagged-concise-bom-tag, see {{sec-corim-tags}} | {{&SELF}} |
| 509-549 | `any` | Earmarked for CoRIM | {{&SELF}} |
| 550 | `bytes .size 33` | tagged-ueid-type, see {{sec-common-ueid}} | {{&SELF}} |
| 551 | `int` | tagged-int-type, see {{sec-common-tagged-int}} | {{&SELF}} |
Expand All @@ -1298,7 +1296,7 @@ IANA is requested to allocate the following tags in the "CBOR Tags" registry {{!
| 556 | `text` | tagged-pkix-base64-cert-path-type, see {{sec-crypto-keys}} | {{&SELF}} |
| 557 | `[int/text, bytes]` | tagged-thumbprint-type, see {{sec-common-hash-entry}} | {{&SELF}} |
| 558-559 | `any` | Earmarked for CoRIM | {{&SELF}} |
| 560 | `bytes` | $raw-value-type-choice, see {{sec-comid-raw-value-types}} | {{&SELF}} |
| 560 | `bytes` | tagged-bytes, see {{sec-comid-raw-value-types}} | {{&SELF}} |
| 561-599 | `any` | Earmarked for CoRIM | {{&SELF}} |

Tags designated as "Earmarked for CoRIM" can be reassigned by IANA based on advice from the designated expert for the CBOR Tags registry.
Expand Down