Subject: [Teep] Review request for TEEP cddl format.

From: Akira Tsukamoto <[email-masked]>
Date: Mon, 6 Apr 2020 15:54:20 +0900

Hi all,

This is based on the work of virtual hackathon.

I tried to remove bstr in the teep message as much as possible,
since cbor is all about the size reduction comparing the other binary formats.

Would you mind reviewing the revised TEEP cddl format?
We only managed until TEEP_QueryRequest and TEEP_QueryResponse.
I tried to remove ambiguity as much as possible from the implementation perspective.

I will reflect the comments on the first two messages and apply to the
rest of TrustedAppInstall and etc.

```

    TEEP_msg-authenc-wrapper = 1
    TEEP_message = 2

    TEEP_Msg_AuthEnc_Wrapper = [ *(COSE_Mac_Tagged /
                                   COSE_Sign_Tagged /
                                   COSE_Mac0_Tagged /
                                   COSE_Sign1_Tagged)]

    TEEP_Outer_Wrapper = {
        TEEP_msg-authenc-wrapper    => bstr .cbor
                                       TEEP_Msg_AuthEnc_Wrapper / nil,
        TEEP-message                => bstr .cbor
                                       (TEEP_QueryRequest /
                                        TEEP_QueryResponse /
                                        TEEP_TrustedAppInstall /
                                        TEEP_TrustedAppDelete /
                                        TEEP_Error /
                                        TEEP_Success ),
    }

TEEP_TYPE_QueryRequest      = 1
TEEP_TYPE_QueryResponse     = 2
TEEP_TYPE_TrustedAppInstall = 3
TEEP_TYPE_TrustedAppDelete  = 4
TEEP_TYPE_TEEP_Error        = 5
TEEP_TYPE_TEEP_Success      = 6

TEEP_attestation   = 1
TEEP_trusted_apps  = 2
TEEP_extensions    = 3
TEEP_suit_commands = 4

TEEP_REQUEST_COMMAND /= TEEP_attestation
TEEP_REQUEST_COMMAND /= TEEP_trusted_apps
TEEP_REQUEST_COMMAND /= TEEP_extensions
TEEP_REQUEST_COMMAND /= TEEP_suit_commands

TEEP_AES-CCM-16-64-128_HMAC256/256_X25519_EdDSA = 1
TEEP_AES-CCM-16-64-128_HMAC256/256_P-256_ES256  = 2

TEEP_suite /= TEEP_AES-CCM-16-64-128_HMAC256/256_X25519_EdDSA
TEEP_suite /= TEEP_AES-CCM-16-64-128_HMAC256/256_P-256_ES256

TEEP_version = uint .size 4

TEEP_TYPE         = 1
TEEP_TOKEN        = 2
TEEP_REQUEST      = 3
TEEP_CIPHER_SUITE = 4
TEEP_NONCE        = 5
TEEP_VERSION      = 6
TEEP_OCSP_DATA    = 7

    TEEP_QueryRequest = {
         TEEP_TYPE => uint .size 1 TEEP_TYPE_QueryRequest,
         TEEP_TOKEN => uint .size 4,
         TEEP_REQUEST => uint .size 1 TEEP_REQUEST_COMMAND,
         ? TEEP_CIPHER_SUITE => uint .size 1 [+TEEP_suite],
         ? TEEP_NONCE => bstr .size (8..64),
         ? TEEP_VERSION => [+TEEP_version],
         ? TEEP_OCSP_DATA => bstr,
         * $$extensions
    }

TEEP_install = 1
TEEP_delete  = 2
TEEP_update  = 3

TEEP_DEVICE_DESIRE /= TEEP_install
TEEP_DEVICE_DESIRE /= TEEP_delete
TEEP_DEVICE_DESIRE /= TEEP_update

TEEP_SELECTED_CIPHER_SUITE = 8
TEEP_SELECTED_VERSION      = 9
TEEP_EAT                   = 10
TEEP_TA_LIST               = 11
TEEP_EXT_LIST              = 12

    TEEP_QueryResponse = {
         TEEP_TYPE =>  uint .size 1 TEEP_TYPE_QueryResponse,
         TEEP_TOKEN => uint .size 4,
         ? TEEP_DEVICE_REQUEST => uint .size 1 TEEP_DEVICE_DESIRE,
         ? TEEP_SELECTED_CIPHER_SUITE => uint .size 1 TEEP_suite,
         ? TEEP_SELECTED_VERSION => TEEP_version,
         ? TEEP_EAT => bstr,
         ? TEEP_TA_LIST  => [+bstr],
         ? TEEP_EXT_LIST => [+ext_info],
         * $$extensions
    }

```

By the way, is the COSE_Mac*_Tagged/COSE_Sign*_Tagged defined somewaher?
I tried to look into IANA and other rfc but could not find the exact place.

Best,
-Akira

---

From: Hannes Tschofenig <[email-masked]>
Date: Mon, 6 Apr 2020 07:50:41 +0000

Hi Akira,

to answer your question: The COSE structures can be found in the COSE specification but I noticed that the currently listed tags are either not applicable anymore or less than ideal. I don't think we need any tagged COSE structures nor do we need to use anything other than COSE_Sign1.

Ciao
Hannes

-----Original Message-----
From: Akira Tsukamoto <[email-masked]>
Sent: Monday, April 6, 2020 8:54 AM
To: [email-masked]; Hannes Tschofenig <[email-masked]>; Nancy Cam-Winget (ncamwing) <[email-masked]>; Russ Housley <[email-masked]>; Mingliang Pei <[email-masked]>; Dave Thaler <[email-masked]>
Subject: Review request for TEEP cddl format.

Hi all,

I tried to remove bstr in the teep message as much as possible, since cbor is all about the size reduction comparing the other binary formats.

I will reflect the comments on the first two messages and apply to the rest of TrustedAppInstall and etc.

```

    TEEP_Outer_Wrapper = {

TEEP_attestation   = 1
TEEP_trusted_apps  = 2
TEEP_extensions    = 3
TEEP_suit_commands = 4

TEEP_REQUEST_COMMAND /= TEEP_attestation TEEP_REQUEST_COMMAND /= TEEP_trusted_apps TEEP_REQUEST_COMMAND /= TEEP_extensions TEEP_REQUEST_COMMAND /= TEEP_suit_commands

TEEP_TYPE         = 1
TEEP_TOKEN        = 2
TEEP_REQUEST      = 3
TEEP_CIPHER_SUITE = 4
TEEP_NONCE        = 5
TEEP_VERSION      = 6
TEEP_OCSP_DATA    = 7

    TEEP_QueryRequest = {

TEEP_install = 1
TEEP_delete  = 2
TEEP_update  = 3

    TEEP_QueryResponse = {

```

Best,
-Akira
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

---

From: Hannes Tschofenig <[email-masked]>
Date: Mon, 6 Apr 2020 07:48:01 +0000

Hi Akira,

Thanks for this work. I created an issue on Github for discussion today.

Ciao
Hannes

-----Original Message-----
From: Akira Tsukamoto <[email-masked]>
Sent: Monday, April 6, 2020 8:54 AM
To: [email-masked]; Hannes Tschofenig <[email-masked]>; Nancy Cam-Winget (ncamwing) <[email-masked]>; Russ Housley <[email-masked]>; Mingliang Pei <[email-masked]>; Dave Thaler <[email-masked]>
Subject: Review request for TEEP cddl format.

Hi all,

```

    TEEP_Outer_Wrapper = {

TEEP_attestation   = 1
TEEP_trusted_apps  = 2
TEEP_extensions    = 3
TEEP_suit_commands = 4

TEEP_TYPE         = 1
TEEP_TOKEN        = 2
TEEP_REQUEST      = 3
TEEP_CIPHER_SUITE = 4
TEEP_NONCE        = 5
TEEP_VERSION      = 6
TEEP_OCSP_DATA    = 7

    TEEP_QueryRequest = {

TEEP_install = 1
TEEP_delete  = 2
TEEP_update  = 3

    TEEP_QueryResponse = {

```

Best,
-Akira

---

From: Akira Tsukamoto <[email-masked]>
Date: Tue, 7 Apr 2020 10:10:54 +0900

Hi Hannes,

Thanks, this is the link for who is reading this email thread.
https://github.com/ietf-teep/teep-protocol/issues/21

-Akira

---

From: Akira Tsukamoto <[email-masked]>
Date: Tue, 7 Apr 2020 10:19:48 +0900

Hi,

The link to the pull request which Hannes made on the COSE tag discussion.
https://github.com/ietf-teep/teep-protocol/pull/19/files

-Akira