Skip to content

Commit

Permalink
Align CDDL between appendix and body
Browse files Browse the repository at this point in the history
Addresses #262

Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler committed Oct 20, 2022
1 parent c8ac364 commit c8ae95c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 15 deletions.
9 changes: 5 additions & 4 deletions draft-ietf-teep-protocol.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ data-item-requested = &(
attestation: 0,
trusted-components: 1,
extensions: 2,
suit-reports: 3,
)

query-request = [
Expand All @@ -51,7 +52,7 @@ query-request = [
;operations, and OPTIONAL to support additional ones such as
;COSE_Sign_Tagged, COSE_Encrypt0_Tagged, etc.

COSE_Sign1_Tag = 18
cose-sign1 = 18 ; CoAP Content-Format value

;MANDATORY for TAM to support the following, and OPTIONAL to implement
;any additional algorithms from the IANA COSE Algorithms registry.
Expand All @@ -63,8 +64,8 @@ cose-alg-es256 = -7 ; ECDSA w/ SHA-256
;to support any additional ones that use COSE_Sign_Tagged, or other
;signing, encryption, or MAC algorithms.

teep-operation-sign1-eddsa = [ COSE_Sign1_Tag, cose-alg-eddsa ]
teep-operation-sign1-es256 = [ COSE_Sign1_Tag, cose-alg-es256 ]
teep-operation-sign1-eddsa = [ cose-sign1, cose-alg-eddsa ]
teep-operation-sign1-es256 = [ cose-sign1, cose-alg-es256 ]

teep-cipher-suite-sign1-eddsa = [ teep-operation-sign1-eddsa ]
teep-cipher-suite-sign1-es256 = [ teep-operation-sign1-es256 ]
Expand Down Expand Up @@ -110,7 +111,7 @@ update = [
type: TEEP-TYPE-update,
options: {
? token => bstr .size (8..64),
? manifest-list => [ + bstr .cbor SUIT_Envelope_Tagged ],
? manifest-list => [ + bstr .cbor SUIT_Envelope ],
* $$update-extensions,
* $$teep-option-extensions
}
Expand Down
39 changes: 28 additions & 11 deletions draft-ietf-teep-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,30 @@ TEEP messages are protected by the COSE_Sign1 structure.
The TEEP protocol messages are described in CDDL format {{RFC8610}} below.

~~~~
{
teep-message => (query-request /
query-response /
update /
teep-success /
teep-error ),
}
teep-message = $teep-message-type .within teep-message-framework

teep-message-framework = [
type: $teep-type / $teep-type-extension,
options: { * teep-option },
* any; further elements, e.g., for data-item-requested
]

teep-option = (uint => any)

; messages defined below:
$teep-message-type /= query-request
$teep-message-type /= query-response
$teep-message-type /= update
$teep-message-type /= teep-success
$teep-message-type /= teep-error

; message type numbers, uint (0..23)
$teep-type = uint .size 1
TEEP-TYPE-query-request = 1
TEEP-TYPE-query-response = 2
TEEP-TYPE-update = 3
TEEP-TYPE-teep-success = 5
TEEP-TYPE-teep-error = 6
~~~~

## Creating and Validating TEEP Messages
Expand Down Expand Up @@ -314,11 +331,11 @@ query-request = [
? supported-freshness-mechanisms => [ + $freshness-mechanism ],
? challenge => bstr .size (8..512),
? versions => [ + version ],
* $$query-request-extensions
* $$query-request-extensions,
* $$teep-option-extensions
},
supported-cipher-suites: [ + $cipher-suite ],
data-item-requested: data-item-requested
data-item-requested: uint .bits data-item-requested
]
~~~~

Expand Down Expand Up @@ -431,7 +448,7 @@ query-response = [

requested-tc-info = {
component-id => SUIT_Component_Identifier,
? tc-manifest-sequence-number => .within uint .size 8
? tc-manifest-sequence-number => .within uint .size 8,
? have-binary => bool
}
~~~~
Expand Down Expand Up @@ -990,7 +1007,7 @@ teep-error = [
* $$teep-error-extensions,
* $$teep-option-extensions
},
err-code: uint (0..23)
err-code: 0..23
]
~~~~

Expand Down

0 comments on commit c8ae95c

Please sign in to comment.