diff --git a/cddl/ex1.diag b/cddl/ex1.diag index ece11b5..f733af7 100644 --- a/cddl/ex1.diag +++ b/cddl/ex1.diag @@ -16,5 +16,6 @@ 1ca1ec', h'4277bb97ba7b51577a0d38151d3e08b40bdf946753f5b5bdeb814d6ff5 7a8a5e' - ] + ], + / profile-flags / 4: h'00000101' } diff --git a/cddl/ex2.diag b/cddl/ex2.diag new file mode 100644 index 0000000..b6534bc --- /dev/null +++ b/cddl/ex2.diag @@ -0,0 +1,15 @@ +{ + / id / 1: [ + / name / "boot loader X", + / version / [ + "1.2.3rc2", + 16384 / semver / + ] + ], + / measurement / 2: [ + / alg / "sha-256", + / val / h'3996003d486fb91ffb056f7d03f2b2992b215b31dbe7af4b37 + 3431fc7d319da3' + ], + / profile-flags / 4: h'00000101' +} diff --git a/cddl/mc.cddl b/cddl/mc.cddl index 979fdee..0a2d54d 100644 --- a/cddl/mc.cddl +++ b/cddl/mc.cddl @@ -4,4 +4,5 @@ measured-component = { &(id: 1) => component-id &(measurement: 2) => corim.digest ? &(signers: 3) => [ + signer-type ] + ? &(flags: 4) => profile-flags } diff --git a/cddl/measured-component.cddlc b/cddl/measured-component.cddlc index f6ec5e2..d1938e7 100644 --- a/cddl/measured-component.cddlc +++ b/cddl/measured-component.cddlc @@ -2,6 +2,7 @@ measured-component = { &(id: 1) => component-id &(measurement: 2) => corim.digest ? &(signers: 3) => [ + signer-type ] + ? &(flags: 4) => profile-flags } signer-type = bytes @@ -24,3 +25,5 @@ corim.digest = [ alg: (int / text) val: bytes ] + +profile-flags = bytes .size 4 diff --git a/draft-ietf-rats-eat-measured-component.md b/draft-ietf-rats-eat-measured-component.md index 1a26f07..c656bf3 100644 --- a/draft-ietf-rats-eat-measured-component.md +++ b/draft-ietf-rats-eat-measured-component.md @@ -105,7 +105,7 @@ The information model of a "measured component" is described in {{tab-mc-info-el | Signers | One or more unique identifiers of entities signing the measured component. | OPTIONAL | {: #tab-mc-info-elems title="Measured Component Information Elements"} -The format should also allow a limited amount of extensibility to accommodate profile-specific semantics. +The format SHOULD also allow a limited amount of extensibility to accommodate profile-specific semantics. # Data Model @@ -128,7 +128,7 @@ The data model is inspired by the "PSA software component" claim ({{Section 4.4. : One or more signing entities, see {{signer}}. `profile-flags` -: a 64-bits field with profile-defined semantics, see {{profile-flags}}. +: a 64-bit field with profile-defined semantics, see {{profile-flags}}. ### Component Identifier {#component-id} @@ -161,12 +161,15 @@ If it is used, the profile MUST also specify what each of the entries in the `si ### Profile Flags {#profile-flags} -TODO(tho) desc +This field contains at most 64-bit of profile-defined semantics. ~~~ cddl {::include cddl/profile-flags.cddl} ~~~ +If an EAT profile ({{Section 6 of -rats-eat}}) uses measured components, it MUST specify whether the `profile-flags` field is used. +If it is used, the profile MUST also specify how to interpret the 64 bits. + ## EAT `measurements-format` Extensions The CDDL in {{fig-eat-plug}} extends the `$measurements-body-cbor` and `$measurements-body-json` EAT sockets to add support for `measured-component`s to the `Measurements` claim.