Re: [Teep] Formatting of the TEEP messages

Akira Tsukamoto <akira.tsukamoto@aist.go.jp> Tue, 07 April 2020 13:58 UTC

Return-Path: <akira.tsukamoto@aist.go.jp>
X-Original-To: teep@ietfa.amsl.com
Delivered-To: teep@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E5A903A0A50 for <teep@ietfa.amsl.com>; Tue, 7 Apr 2020 06:58:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.899
X-Spam-Level:
X-Spam-Status: No, score=0.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, BITCOIN_SPAM_02=2.499, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, PDS_BTC_ID=0.499, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=aist.go.jp
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5JIlf479Re5X for <teep@ietfa.amsl.com>; Tue, 7 Apr 2020 06:58:54 -0700 (PDT)
Received: from JPN01-OS2-obe.outbound.protection.outlook.com (mail-eopbgr1410077.outbound.protection.outlook.com [40.107.141.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1D80C3A0A48 for <teep@ietf.org>; Tue, 7 Apr 2020 06:58:53 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mlg1l4+nv3YMYW6zXcg9TebRIxN5pyG9EU2JbPgM0JmWoZmB/rX92oD6stKXnOElgZxDeD/JFbI8NhaA04hVVTf1dbB/lixdS8k3/AZVc12TyKgLYh3rUwvRsIPsLCZ9Z74O5A2rOMw9vj6BaiQMMNdHxKP5QYlz6YrH4nSOzjtJ7lHScrEtCK2KZaGqH8PoM+l2qu4tOZPQuij+HL9lz24J3nXFnh89iaEzx9imBx/zC8b3UR3Xox3bcd2veyoMtk2uuU7daFOiQFwKl5BAIrM55NT721mNJC2gtWWZsFJ33DQVWftXsOyVfcB7J1ePf1vJ4QMPSXBMdYHC7kE8ew==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0WRkgUFmiC6DLQ2K8zokLRav+dw4VQyC3fICOT0jWCE=; b=mwmaJx0nOZKaJxXJILqTtP39n29BGVpP0QxmwoN3Mjlq98z5t+RPmAUMPBOy2W5MYMUYBpRupXUjNzjJVf0vvTPHonMcVsfDfl/RS+e3B2gGlSrlca60AicQLB6VkJ+KMB5kIm6NtyVect/+hkyG90IRFisWGbOhjS5CC0BxdVWh0vByFnV+M6HlDrXmmfJU8HeGfXkuclX7v9qs5yokDx+JJvWI+TY/r/OTxHb5rJ97rREAWVLp71qIBD4Ciuop27RVDZsrrBjG7DnEmsW0nbF+ekahzFY6oc4gYLxvlXczcCDlkcFKAUblO43tOmJ82Hc9+vNMnpWJbEN6muahIw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=aist.go.jp; dmarc=pass action=none header.from=aist.go.jp; dkim=pass header.d=aist.go.jp; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aist.go.jp; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0WRkgUFmiC6DLQ2K8zokLRav+dw4VQyC3fICOT0jWCE=; b=k+hiUkHX6lqaKxBRmTsztzvVXkvfL8Jq3lMUCZvg5fJP6vy+B1hWY04AInWofrBmhNNln3dn7br0negPzcAgK0P6ITj9AGUxzJormrXJ8GhikCNO/3bm+Xj0+qa92yUwKzFYBRScU9rbz5MdcDrkaXoaQCzQpBLLn/6WCnfw6U8=
Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=akira.tsukamoto@aist.go.jp;
Received: from TYAPR01MB3406.jpnprd01.prod.outlook.com (20.178.140.147) by TYAPR01MB4317.jpnprd01.prod.outlook.com (20.179.173.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.19; Tue, 7 Apr 2020 13:58:51 +0000
Received: from TYAPR01MB3406.jpnprd01.prod.outlook.com ([fe80::df1:d999:dc75:cdf2]) by TYAPR01MB3406.jpnprd01.prod.outlook.com ([fe80::df1:d999:dc75:cdf2%7]) with mapi id 15.20.2878.018; Tue, 7 Apr 2020 13:58:51 +0000
From: Akira Tsukamoto <akira.tsukamoto@aist.go.jp>
To: Hannes Tschofenig <Hannes.Tschofenig@arm.com>, "teep@ietf.org" <teep@ietf.org>
References: <AM0PR08MB3716EC86266D9325B021C7F7FAC30@AM0PR08MB3716.eurprd08.prod.outlook.com> <ec056bca-45f9-a0ca-67f8-2564980d15fc@aist.go.jp> <AM0PR08MB371642313A40A14CDA062957FAC30@AM0PR08MB3716.eurprd08.prod.outlook.com> <34e91e42-1d67-666a-402c-5931ebe9c69e@aist.go.jp>
Message-ID: <8b31d98f-8d89-0ab2-5c3d-6ce2f15fa41e@aist.go.jp>
Date: Tue, 07 Apr 2020 22:58:51 +0900
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1
In-Reply-To: <34e91e42-1d67-666a-402c-5931ebe9c69e@aist.go.jp>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: TYCPR01CA0097.jpnprd01.prod.outlook.com (2603:1096:405:4::13) To TYAPR01MB3406.jpnprd01.prod.outlook.com (2603:1096:404:cc::19)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from [192.168.1.153] (217.178.18.13) by TYCPR01CA0097.jpnprd01.prod.outlook.com (2603:1096:405:4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.17 via Frontend Transport; Tue, 7 Apr 2020 13:58:51 +0000
X-Originating-IP: [217.178.18.13]
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-HT: Tenant
X-MS-Office365-Filtering-Correlation-Id: 979d15aa-40e9-4ff0-60e3-08d7dafbcd55
X-MS-TrafficTypeDiagnostic: TYAPR01MB4317:
X-Microsoft-Antispam-PRVS: <TYAPR01MB4317111F89B56F25AA0D5F0BD8C30@TYAPR01MB4317.jpnprd01.prod.outlook.com>
X-MS-Oob-TLC-OOBClassifiers: OLM:10000;
X-Forefront-PRVS: 036614DD9C
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYAPR01MB3406.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(39860400002)(136003)(396003)(346002)(376002)(366004)(6486002)(16526019)(66476007)(26005)(186003)(86362001)(316002)(8676002)(31696002)(110136005)(66946007)(66556008)(15650500001)(16576012)(36756003)(5660300002)(966005)(956004)(81156014)(81166006)(31686004)(2906002)(52116002)(478600001)(2616005)(53546011)(44832011)(45080400002)(8936002); DIR:OUT; SFP:1101;
Received-SPF: None (protection.outlook.com: aist.go.jp does not designate permitted sender hosts)
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: wlQeVZgKnFsh10p0lQACU22jZ1tLheB704gsXs5IfaPH5Uhy3ryECDxaSqzqt4gpOYWzff63tswMQYp8Xu3dzWDnI7auT/XiqGbCZOJ/IuckT2+kJuYd6Tbq+XZpAh0aOF388tqfYmmx41D8x51KY4rqcNNtuLmC0MX583pQ2dlGS20ZPWL02imiogakU8Oqs0flgGB/+P0IO3kFw8IVAcajyH/Lh+mJh/THZIDMxcSKSr7eKOuB7gwRHC43ftCSdqkg+3SMCKecqEbwpJYU/PCR8xGN4fLXK/fcE1qavGmcfB5R5fQB+64H3VKDYo9dNSJJSjj6p95mhO+ehLxCl143hYiOSLmlzNgeBDOwdKpiSOkEihiFSmrZIOoK5n1ezgR62PGF6FKOrC4VTcAKPS46g06NIjsmrmKP2U5wqHbZiTnGKotrTa4gl63bJJsGQwHFRinIRDz/ken057dTKKSilD22vEv1h/wlvYe/JLNJEHevInOJGO4aHbrGdnkfF5/3NmaYUNoGkL7/bv8yzw==
X-MS-Exchange-AntiSpam-MessageData: w+lesCsmw99Sb+xDXlm/v0wYD/YrHggA5Lb+RI+1OGV4xVMg7fvFuUjx61APKk1+WUNxJUjWatyRYmVNA8NGapyckUMWt/M+APWHdjO8+ga2Dl/ZFTwxtuXVHh5rcTA4QpuCA8CkPT2TPSYp9hJl9g==
X-OriginatorOrg: aist.go.jp
X-MS-Exchange-CrossTenant-Network-Message-Id: 979d15aa-40e9-4ff0-60e3-08d7dafbcd55
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2020 13:58:51.5084 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 18a7fec8-652f-409b-8369-272d9ce80620
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: QtrknaC6nq+I+GQ0a1Vl8yBBf1O8WQwQ9XQ4ockPofQd3AlG8IS0WTKwmWs54OZi3Gf7c75CZP2vRGjQ7oHaKbD6Z69n8ofs4LQzQf3Lkak=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB4317
Archived-At: <https://mailarchive.ietf.org/arch/msg/teep/K1dBrsY7mjFb-5NPyyHCtJo9hHQ>
Subject: Re: [Teep] Formatting of the TEEP messages
X-BeenThere: teep@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: A Protocol for Dynamic Trusted Execution Environment Enablement <teep.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/teep>, <mailto:teep-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/teep/>
List-Post: <mailto:teep@ietf.org>
List-Help: <mailto:teep-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/teep>, <mailto:teep-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Apr 2020 13:58:56 -0000

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:
> 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:
>> 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 <akira.tsukamoto@aist.go.jp>
>> Sent: Tuesday, April 7, 2020 1:59 PM
>> To: Hannes Tschofenig <Hannes.Tschofenig@arm.com>; teep@ietf.org
>> Subject: Re: [Teep] Formatting of the TEEP messages
>>
>> Hi,
>>
>> I just post current example in binary format with my hand binary encoding at the github.
>>
>> 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 = {
>>        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://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.
>>>
>>> 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.
>>>
>>> _______________________________________________
>>> TEEP mailing list
>>> TEEP@ietf.org
>>> 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
>>>
>> 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.
>>
>> _______________________________________________
>> TEEP mailing list
>> TEEP@ietf.org
>> 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
>>
> 
> _______________________________________________
> TEEP mailing list
> TEEP@ietf.org
> 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