Subject: [Teep] Formatting of the TEEP messages

From: Hannes Tschofenig <[email-masked]>
Date: Tue, 7 Apr 2020 09:58:46 +0000

Hi all,

I am posting this topic to the list (although it is also discussed in a Github issue at https://github.com/ietf-teep/teep-protocol/issues/21) because it blocks any implementation activity going forward.

I want to make sure that I understand the tentative conclusion from our virtual interim meeting yesterday correctly. The suggestion is to use an array for the mandatory fields of the requests and to use a map for the rest.

In the QueryRequest the first 3 elements of the array are type, token, requested (which are parameters defined in the TEEP protocol spec) followed by the last array entry, which is a map containing the optional parameters found in the QueryRequest message.

Here is an example:
[1, h'1C76CB4EF2665BC68B9198E76EE21C71', [2], {3 : 1, 5 : 1}]

Is my understanding correct?
Ciao
Hannes

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: Akira Tsukamoto <[email-masked]>
Date: Tue, 7 Apr 2020 20:59:18 +0900

Hi,

I just post current example in binary format with my hand binary encoding at the github.

https://github.com/ietf-teep/teep-protocol/issues/21

Which the

QueryRequest = {
      TYPE : int,  // TYPE is 1 for QueryRequest
      TOKEN : bstr, // TOKEN using 1C76CB4EF2665BC68B9198E76EE21C71
      REQUEST : [+data_item], // using 2 here as an example
     ...

will be something similar to

A4 // the map is A? and number of members, so if it has four members then it will be A4
58 04 45 95 05 54 // h'45950554' // TYPE label name in bstr will be embedded in map
01 // 1 for TYPE value
58 05 45 F4 B4 54 E4 // h'45F4B454E4' // TOKEN label name in bstr will be embedded in map
58 10 1C 76 CB 4E F2 66 5B C6 8B 91 98 E7 6E E2 1C 71 // h'1C76CB4EF2665BC68B9198E76EE21C71' // value for TOKEN in bstr
81 //  the array is 8? and number of members, so if it has one member then it will be 81
02
and ...

I will probably come back to this topic next week.

Best,

-Akira

On 4/7/20 18:58, Hannes Tschofenig wrote:
> Hi all,
> 
> I am posting this topic to the list (although it is also discussed in a Github issue at https://github.com/ietf-teep/teep-protocol/issues/21 <https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fietf-teep%2Fteep-protocol%2Fissues%2F21&data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7C5365f219da914118e7b308d7dada5068%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218503508524917&sdata=ZYoVKHTnCyy2OdbxBJwrMX2a9fS9tOOieX4sMTvNZXQ%3D&reserved=0>) because it blocks any implementation activity going forward.
> 
> _______________________________________________
> TEEP mailing list
> [email-masked]
> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fteep&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7C5365f219da914118e7b308d7dada5068%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218503508534866&amp;sdata=kqxqbjmv0%2BX%2BUZNAti8zaVamr4HN9BmE11bOAHAaIOs%3D&amp;reserved=0
>

---

From: Carsten Bormann <[email-masked]>
Date: Tue, 7 Apr 2020 14:08:58 +0200

> Is my understanding correct?

If you ignore that token was supposed to be a uint yesterday: That’s similar to what I would do.

Grüße, Carsten

---

From: Hannes Tschofenig <[email-masked]>
Date: Tue, 7 Apr 2020 12:09:17 +0000

Hi Akira,

In your example you still use a map instead of an array and for the type you should use the unsigned int instead of int. That's at least what was proposed yesterday in the virtual interim meeting.

Ciao
Hannes

-----Original Message-----
From: Akira Tsukamoto <[email-masked]>
Sent: Tuesday, April 7, 2020 1:59 PM
To: Hannes Tschofenig <[email-masked]>; [email-masked]
Subject: Re: [Teep] Formatting of the TEEP messages

Hi,

Which the

QueryRequest = {

Best,

-Akira

---

From: Hannes Tschofenig <[email-masked]>
Date: Tue, 7 Apr 2020 12:10:24 +0000

Thanks, that helps. If nobody objects we will make the change to the spec.

-----Original Message-----
From: Carsten Bormann <[email-masked]>
Sent: Tuesday, April 7, 2020 2:09 PM
To: Hannes Tschofenig <[email-masked]>
Cc: [email-masked]
Subject: Re: [Teep] Formatting of the TEEP messages

Grüße, Carsten

---

From: Carsten Bormann <[email-masked]>
Date: Tue, 7 Apr 2020 14:36:26 +0200

I converted the draft to markdown so

— there are no longer XML build errors
— I can contribute to the draft.

PR #25 (you can ignore #24 then).

Grüße, Carsten

> On 2020-04-07, at 14:10, Hannes Tschofenig <[email-masked]> wrote:
>

---

From: Akira Tsukamoto <[email-masked]>
Date: Tue, 7 Apr 2020 21:41:07 +0900

Hi Hannes,

Yes, I know,
my email was something similar to express the reason behind the array and uint are good choice what we discussed last night, for who was not attending the interim meeting...
Because the TOKEN was in bstr, and I thought it was the discussion of explanation...

Best,
-Akira

On 4/7/20 21:09, Hannes Tschofenig wrote:
> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fietf-teep%2Fteep-protocol%2Fissues%2F21&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7Cb8eafc62e3ac4be7f38008d7daec8ad2%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218581788571186&amp;sdata=TjApvLZb0fp89L3BIZMjQJkMedcZgQFNelkhg4TLKj0%3D&amp;reserved=0
> 
> Which the
> 
> QueryRequest = {
>> I am posting this topic to the list (although it is also discussed in a Github issue at https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fietf-teep%2Fteep-protocol%2Fissues%2F21&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7Cb8eafc62e3ac4be7f38008d7daec8ad2%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218581788571186&amp;sdata=TjApvLZb0fp89L3BIZMjQJkMedcZgQFNelkhg4TLKj0%3D&amp;reserved=0 <https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fietf-teep%2Fteep-protocol%2Fissues%2F21&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7Cb8eafc62e3ac4be7f38008d7daec8ad2%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218581788571186&amp;sdata=TjApvLZb0fp89L3BIZMjQJkMedcZgQFNelkhg4TLKj0%3D&amp;reserved=0>) because it blocks any implementation activity going forward.
>>
>> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fteep&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7Cb8eafc62e3ac4be7f38008d7daec8ad2%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218581788571186&amp;sdata=g0W9kaf8cHoXqVZ7AHrnFYk6vnOZ8jWrZsYPlBZpj64%3D&amp;reserved=0
>>
> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fteep&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7Cb8eafc62e3ac4be7f38008d7daec8ad2%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218581788571186&amp;sdata=g0W9kaf8cHoXqVZ7AHrnFYk6vnOZ8jWrZsYPlBZpj64%3D&amp;reserved=0
>

---

From: Akira Tsukamoto <[email-masked]>
Date: Tue, 7 Apr 2020 22:58:51 +0900

Hi all,

This is trying to replicate the discussion at the interim meeting last night for moving on to use array and uint in teep as Hannes and Dave mentioning at previous email.
I am not sure this is the right cddl format in array but let me try.

I need help from Carsten here. :)

TEEP_TYPE = uint .size 1 TEEP_TYPE_QueryRequest
TEEP_TOKEN = uint .size 8 // 1C76CB4E
TEEP_REQUEST /= uint .size 1 TEEP_attestation
TEEP_REQUEST /= uint .size 1 TEEP_trusted_apps
TEEP_REQUEST /= uint .size 1 TEEP_extensions
TEEP_REQUEST /= uint .size 1 TEEP_suit_commands

TEEP_QueryRequest = [
         TEEP_TYPE,   // 1 for TYPE value of QueryRequest
         TEEP_TOKEN,
         +TEEP_REQUEST, // 2 is TEEP_trusted_apps
    ...
]

84 // the array is 8? and number of members, so if it has four members then it will be A4
01 // 1 for TYPE value
1B 1C 76 CB 4E // TOKEN  being '1C76CB4E' in 4bytes uint
02 // 2 is TEEP_trusted_apps
...

Looks really nice in binary.

I think I need to sleep since it was late last night but one last comment.

I also post the same on the github.

Best,
-Akria

On 4/7/20 21:41, Akira Tsukamoto wrote:
>> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fietf-teep%2Fteep-protocol%2Fissues%2F21&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7C28d7f565a86a4ba0f17708d7daf0f822%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218600800220558&amp;sdata=fLM1DD6DOpGs6jRgGX4dkhKW7YB1C%2FjkxRTuqHeW5uo%3D&amp;reserved=0
>>
>> Which the
>>
>> QueryRequest = {
>>> I am posting this topic to the list (although it is also discussed in a Github issue at https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fietf-teep%2Fteep-protocol%2Fissues%2F21&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7C28d7f565a86a4ba0f17708d7daf0f822%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218600800220558&amp;sdata=fLM1DD6DOpGs6jRgGX4dkhKW7YB1C%2FjkxRTuqHeW5uo%3D&amp;reserved=0 <https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fietf-teep%2Fteep-protocol%2Fissues%2F21&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7C28d7f565a86a4ba0f17708d7daf0f822%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218600800220558&amp;sdata=fLM1DD6DOpGs6jRgGX4dkhKW7YB1C%2FjkxRTuqHeW5uo%3D&amp;reserved=0>) because it blocks any implementation activity going forward.
>>>
>>> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fteep&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7C28d7f565a86a4ba0f17708d7daf0f822%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218600800230554&amp;sdata=NCVr7CmQNN9h1plxsv13OAKeNfr5b%2BavZHJHKMYOCrQ%3D&amp;reserved=0
>>>
>> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fteep&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7C28d7f565a86a4ba0f17708d7daf0f822%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218600800230554&amp;sdata=NCVr7CmQNN9h1plxsv13OAKeNfr5b%2BavZHJHKMYOCrQ%3D&amp;reserved=0
>>
> 
> https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fteep&amp;data=02%7C01%7Cakira.tsukamoto%40aist.go.jp%7C28d7f565a86a4ba0f17708d7daf0f822%7C18a7fec8652f409b8369272d9ce80620%7C0%7C0%7C637218600800230554&amp;sdata=NCVr7CmQNN9h1plxsv13OAKeNfr5b%2BavZHJHKMYOCrQ%3D&amp;reserved=0