Skip to content

Commit

Permalink
add a profile flags field
Browse files Browse the repository at this point in the history
Fix #12

Signed-off-by: Thomas Fossati <[email protected]>
  • Loading branch information
thomas-fossati committed Jan 29, 2025
1 parent 17eccc3 commit a5c9fef
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cddl/ex1.diag
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
1ca1ec',
h'4277bb97ba7b51577a0d38151d3e08b40bdf946753f5b5bdeb814d6ff5
7a8a5e'
]
],
/ profile-flags / 4: h'00000101'
}
15 changes: 15 additions & 0 deletions cddl/ex2.diag
Original file line number Diff line number Diff line change
@@ -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'
}
1 change: 1 addition & 0 deletions cddl/mc.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ measured-component = {
&(id: 1) => component-id
&(measurement: 2) => corim.digest
? &(signers: 3) => [ + signer-type ]
? &(flags: 4) => profile-flags
}
3 changes: 3 additions & 0 deletions cddl/measured-component.cddlc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,3 +25,5 @@ corim.digest = [
alg: (int / text)
val: bytes
]

profile-flags = bytes .size 4
9 changes: 6 additions & 3 deletions draft-ietf-rats-eat-measured-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit a5c9fef

Please sign in to comment.