Re: [Cbor] [Rats] Combining CBOR protocol libraries

Thomas Fossati <Thomas.Fossati@arm.com> Thu, 20 May 2021 20:14 UTC

Return-Path: <Thomas.Fossati@arm.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A5F8B3A2458; Thu, 20 May 2021 13:14:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=N8UphjFy; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.b=N8UphjFy
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 wiK_1CLhwWRd; Thu, 20 May 2021 13:14:32 -0700 (PDT)
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70085.outbound.protection.outlook.com [40.107.7.85]) (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 11CE13A2456; Thu, 20 May 2021 13:14:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5ceK6irckqP4PWbX6R+SJCQRS7cVaq2XeC9rrysfgYE=; b=N8UphjFyAZLYueGLZ3gItiJC3kV4yuoCN+Fv41QrLa4vy9SGnqiCk2nQjjowLUS/Eljz1e/CtS5NenubayHwFeHWSEya5ZODYtu8sIssor28w4UJHCUjoOY0ybVYD0JRdU4p9srrEwV2R8wYCsiSKM3eqdHoKMZO4as1vmieGiE=
Received: from AM0PR01CA0087.eurprd01.prod.exchangelabs.com (2603:10a6:208:10e::28) by VE1PR08MB4814.eurprd08.prod.outlook.com (2603:10a6:802:ad::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.28; Thu, 20 May 2021 20:14:28 +0000
Received: from AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:10e:cafe::71) by AM0PR01CA0087.outlook.office365.com (2603:10a6:208:10e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Thu, 20 May 2021 20:14:27 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; ietf.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;ietf.org; dmarc=pass action=none header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT014.mail.protection.outlook.com (10.152.16.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Thu, 20 May 2021 20:14:26 +0000
Received: ("Tessian outbound ea2c9a942a09:v92"); Thu, 20 May 2021 20:14:26 +0000
X-CheckRecipientChecked: true
X-CR-MTA-CID: 3c2b8e52f63404d6
X-CR-MTA-TID: 64aa7808
Received: from b7097b24e2d4.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3DB4848F-263F-4207-9623-D17F0B537724.1; Thu, 20 May 2021 20:14:20 +0000
Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b7097b24e2d4.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 20 May 2021 20:14:20 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i0urH0cuAM4JAY48UxyfBjZlpZ08K7xDlt2U4i9X0cl17Sdndd9WlBJYOlHXQUP8DqNecxI13YmB44Nxi0ZZSZ/FB4LMtZZ1Bo4NGDE3nKj+48T/+JMOq0sqbFokzHdlmW0gjY9DDRVTyrdWOTkcBuxqa3EUhlCxtxclN6lzJBt6vnKQ79rJDMPt7AZjsKBWMJ/q/XPPHW2O/jIg6iB7IkaWBLbsP5bmXjQwg2LJoDZhkgJ/eOn3Uf8zV2oZSbAI0RiU253epoN2ikhKH+kPruzRUiJDqLIUvdyx5BCfo/uOHeK9yz0I3zKPawNhvqNUEDkOHCfbYgUy83ug7tUrDw==
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=5ceK6irckqP4PWbX6R+SJCQRS7cVaq2XeC9rrysfgYE=; b=k2DtfEG/WJv/VvADklN8wyXIfr4CW5PQIBzfI6yIUbtU/iLwRcWK1QJfJeiBmbr5kdNXgax7BA8jnevnlnzzP/iLWZzL7BIWGVgGSv8VanLoxkjU8oAEYHIfaluT8v8YP5cZTGYQ2o8/YhOkbn15kapA2gSbRRVHlLvNNhL+5uS9Cw0HmXWwP7Ss2eccUZE/NFWr2d/Fb5a6LOWkLue7akRQzB0DdWoDi24XwZ1syvdXaNz7bkDFwlXYKeoZEYylxHo+YfJhh0XO5fqVCsNElrSc9h9PXwTeiMxBbpvYHeVzVMSkhPoIcidaakfHkSUyqHK3JWNr9PF7pPiZx5qsRw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5ceK6irckqP4PWbX6R+SJCQRS7cVaq2XeC9rrysfgYE=; b=N8UphjFyAZLYueGLZ3gItiJC3kV4yuoCN+Fv41QrLa4vy9SGnqiCk2nQjjowLUS/Eljz1e/CtS5NenubayHwFeHWSEya5ZODYtu8sIssor28w4UJHCUjoOY0ybVYD0JRdU4p9srrEwV2R8wYCsiSKM3eqdHoKMZO4as1vmieGiE=
Received: from DB9PR08MB6524.eurprd08.prod.outlook.com (2603:10a6:10:251::8) by DB6PR0801MB1927.eurprd08.prod.outlook.com (2603:10a6:4:75::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.28; Thu, 20 May 2021 20:14:20 +0000
Received: from DB9PR08MB6524.eurprd08.prod.outlook.com ([fe80::e9e7:ea3a:3bca:5b3c]) by DB9PR08MB6524.eurprd08.prod.outlook.com ([fe80::e9e7:ea3a:3bca:5b3c%7]) with mapi id 15.20.4150.023; Thu, 20 May 2021 20:14:19 +0000
From: Thomas Fossati <Thomas.Fossati@arm.com>
To: Laurence Lundblade <lgl@island-resort.com>, "cbor@ietf.org" <cbor@ietf.org>
CC: "rats@ietf.org" <rats@ietf.org>, Thomas Fossati <Thomas.Fossati@arm.com>
Thread-Topic: [Rats] Combining CBOR protocol libraries
Thread-Index: AQHXTa+n/Am9dSiwdEa6W3h4yY1PfKrs3tKA
Date: Thu, 20 May 2021 20:14:19 +0000
Message-ID: <3382F797-49C8-4ECC-AA86-08AD53240D73@arm.com>
References: <2AE5612D-B305-4F2C-BC1A-F36F0093F0C0@island-resort.com>
In-Reply-To: <2AE5612D-B305-4F2C-BC1A-F36F0093F0C0@island-resort.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.49.21050901
Authentication-Results-Original: island-resort.com; dkim=none (message not signed) header.d=none;island-resort.com; dmarc=none action=none header.from=arm.com;
x-originating-ip: [82.12.10.179]
x-ms-publictraffictype: Email
X-MS-Office365-Filtering-Correlation-Id: 9ebab0de-7914-479f-17e6-08d91bcbde35
x-ms-traffictypediagnostic: DB6PR0801MB1927:|VE1PR08MB4814:
x-ms-exchange-transport-forked: True
X-Microsoft-Antispam-PRVS: <VE1PR08MB4814E4A95B09E344909A46C79C2A9@VE1PR08MB4814.eurprd08.prod.outlook.com>
x-checkrecipientrouted: true
nodisclaimer: true
x-ms-oob-tlc-oobclassifiers: OLM:1923;OLM:6430;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original: V68urQGMAcjDQSPDOyH5XTEC4ziABsYulYqY8/vZ4m7vAM7wHZC19Nqe+ZRih31QFleI6HTI3a9XSxjxoNWGtABIvcR2Ccb3xFYNsk2316A+XayK/TTmxsPX+tSvIp+aNWPHtWUzJc9UrR2PEKDyGlwT1AVavwNgHunuXohgITQa1COfP9OnV48SxDAnWopVQanqWgPxaRWLqdtDmEHA23njZHuoo81pyp6SOJQyq4DUXC9jdaXOboLMjXiK6wEeD4YiIkqtuO4WEzkqMZK4uzAYu8BST4peXGHK9nSuUHpfgHNJ4pA8UIulhQ7otJZ6PP/EUuUfigfto0EQmHXTP53+ZjRYq6Gjga/znPboZ7BtcNrCVzk1M5fLYRcxyTYz3d2PgZ9jbSM+33KOk4vcL+r3Ws/i11d0zP6YhOq0ygF90oR8yfIz+oCYKYgKs2zPl0ksSeiS4C3il2uXyD3PXOCcsUjcOQf4KwZZK2UmA9qrKHDGGJIywwFVDCbAS78nbZ5rM1bPeUViK5ykOIbTE5v4yK09jWHY/Xs5Ul8gvfSFatvpp3xEbN6HfOHI3rh+yxKFr32CW5F72h+cIsaXYlQ7cpjn0g1eDGbJKOmCdwsuUajrJNb6vErQU/ixZrY/76muBNx0GI0qzgrEDKKIxpW77/1bvOI50xg3P+KMwx0jg08JF35aNmp4DbxIki7FGB2EqkcqwpPA7NyC3sdborw8koW7aiZvHefc7ebgBZh0pbWp2imLMv5fxOwyw5cC
X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR08MB6524.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(346002)(396003)(39850400004)(376002)(366004)(6506007)(86362001)(2616005)(2906002)(91956017)(53546011)(76116006)(186003)(316002)(6512007)(36756003)(71200400001)(83380400001)(66446008)(66556008)(66476007)(64756008)(8936002)(478600001)(110136005)(54906003)(66946007)(26005)(122000001)(966005)(38100700002)(6486002)(5660300002)(4326008)(8676002)(33656002)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: XmiAOwLTG2KI/rQyCO0KQww1UUSB2QtLiFw1axIxypHDwy9ySY5bvlvqmUHqOQ9LaPLQ/JbGVqg+dOnLxSUP2rkmnu0f4gIPW96hKvDdyfSOxGwD50Z6o6w+3AM7qqde38nyXjrF1mr3f/jWaJGAr2eTKw9RQ7Ifm679ooITkzsL42k1WJ9Bm3KAvon2tnO1MESj6qDTfu3zr4TN79orRiQ/g5AwWTd3q5yUAneLnu1VoLrMDIwslWUpptvnjKDHFkZa2/tQOYbcl/MsdqW3/vdO09IpfEsCVejPs82QJ9epYG7VBSK+YFYPVAGsuj5UK8tRTZJW2zFTkBs2q5YhwNFo+RJltIxC0bmAg5Ci2pgiYmef1LjTccHkthybKNuN4kCDG1xy8p7tbh09nVtom8orWecGIivmyhjdIL6htR+d6md4Tt1CLbD0tefu2YDrAdvkd5R4WLXlcDAXSt0jQnozWVvwk7iZKctZzpevi8YP9c1fnnJ6DU4Y/BIAaFaT2b1YyQVHFek/FQscULHFoRpshGE93Tl+pT2RpLkR3EaiTshT8moquAQbkrgieuzNXU8l3ePgPMIVaD5D8f5N9szY8U6xZbo7riGMQIFTReCE7MP9xPiL3yqjZBX26ifGFZMUE6q70m/Jg63pS352jGo/UvwBOe8Tm/YvxXF48gjARkAIpApbv+vHAg2hE17h2rP12o55qqJckDt27I/YQcRUxZa0WqvnnpT/WHoMTGK+jcZoVLM7hRC2+y+u7bdr6roZDyO3wTNep7ENasu1+RRTYBEQIydhF5/+CyT8T0rlPrquoKD0rS8lJusbWZEEda7Az6eklkeWXilaIE1S0Lm0L3fxjbyYyeTotidgIaIi2J0UgniBSaTw7WcOoL5AwRsxseoF2aqs2PG1a1NQfZzWAWeme+6mQ1iReXxf3Wt/iJ7MMhUbF8E4Vc8nGsWZp2UDfYlKXKyr862QO0Iu/GtuNjOL5d6xZGXzhHGI6k2C0O+sYJEW81/sY/DqGkcoGubBoldt6H2wlfka2wC72r69/Yz0I/uiYBs6Cux+MIFD14ESVD/CGMD52TCM5p5ObC/SrktEDyqyENMwzZyht8kqsIj6XfdLcX5R2Zx5oyzdDl1NHw4f7hb5p8gfClqiMP/8z41DvLvonBiB2VtH4mIX+VrPYRtbhEcVAnkFMo95hP3fmg0Yp1tnANAjBZilESVhDhPDOrufCcdvELxi8RKmLd4FfOEQ4iAGeyRAx+gqo5jakCy9pv1+1f9ZvI/YFIOLb+d9NVH+5leKeoB52EGkr4czE1mHLa6NCQZeZf3pe1K++qAZ411o+aLLH2pv
Content-Type: text/plain; charset="utf-8"
Content-ID: <96CB3F8CAB23C84FA1031D347619BC4C@eurprd08.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1927
Original-Authentication-Results: island-resort.com; dkim=none (message not signed) header.d=none;island-resort.com; dmarc=none action=none header.from=arm.com;
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs: e1890b10-dd18-476d-50ab-08d91bcbd9fe
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: B1dopKw43DahhF8dwoegSMU/0uTVAcRJ4FEBIPwJLdZ68a71mMi6/mWBHBPUd1M3xq9tnCKQMUBSvYjZJEOOKMgHs9oj+vlm4DjQaI54icy3S65DlRvq1WyjdNG2xIMqD5uAsGW4Wi6RpjPDWON5rALyli3xqEdGV8jMGSTnQs6/MwFIwPXnnWZcBZTydtJL0sAQXrI3CrA40pnkj2eEUh+DV8rMF0PQKCr2znv2CLTY4POBlRBIArczMZLeJrVR+BKhQLcMPeI+BXy6imPhBW+ULWjG40tZ/YfffrJ0g7vCMOYyySSMmaP/WWQN4FDBzIXj1SsJmQQWtglh3+8Gy4/SW0EGxnBTFyK9y8Mx2VVAuEqMgY74pSLdMptUa61a8UpTjz7EzYbU6Ntl93TdgKE4IobdlxMrIkGT92s+4Qpa2MJtpBQPClUNYUnV8KDz+tVqsxggDGRrjm3JcWnxkYbAHlFWudZTQBCeLScFUV0mb05Aeki7YEmcKNHQZlyXHpcwnTnrIP3/gFmFF1MPWeI5iEXBE9CPJwihsBehdZDDHdK8qwnm+yC01xs4/DYLUbXq2V+Gc2CiSsy2YGO5d8X+Ubu5g0Zy5zKIIyUe0nypr7MVxmDR+QsA8PsDxyEevl63G/WZJ6LhWdNI9CCXY0PG8c6WtVoRNk/HspZNT7EwNJCkVlHJ6s5nE86yh57l3HFPaEqrray9Xsm8uBmSkbhNthHPbDp8+mvve0HZxR5IqNwUxXryThwmokuVFBj/ZyC+bUrACc38bWpgorG62Q==
X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(396003)(376002)(39850400004)(136003)(346002)(36840700001)(46966006)(478600001)(8676002)(186003)(6512007)(336012)(8936002)(6506007)(110136005)(966005)(316002)(53546011)(4326008)(450100002)(2616005)(26005)(54906003)(2906002)(82310400003)(70206006)(83380400001)(36756003)(356005)(33656002)(82740400003)(86362001)(36860700001)(81166007)(6486002)(70586007)(5660300002)(47076005); DIR:OUT; SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2021 20:14:26.9228 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 9ebab0de-7914-479f-17e6-08d91bcbde35
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com]
X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4814
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/8MW-y0q0_i3PesHutrzjCyWkH6g>
Subject: Re: [Cbor] [Rats] Combining CBOR protocol libraries
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 20 May 2021 20:14:37 -0000

Hi Laurence,

On 20/05/2021, 20:38, "Laurence Lundblade" <lgl@island-resort.com> wrote:
> This is in the context of defining how CoSWID should be integrated
> into EAT <https://github.com/ietf-rats-wg/eat/pull/102>, but seems
> like a general CBOR protocol library implementation issue.  Let’s say
> you have a CoSWID library that uses tinyCBOR for CBOR decoding.
> Further let’s say all you have is a header and lib, no source. You
> have a .h file and a .a file.
>
> Same for an EAT implementation, but it uses QCBOR for CBOR decoding.
>
> I assume the input to the CoSWID decoding library is a binary byte
> string with the encoded CBOR. Can’t really be anything else, can it?
>
> How to you take the binary encoded CoSWID out of the EAT and feed it
> to the CoSWID library?

The CBOR library we use follows the glorious Golang institution of
providing the RawMessage type [1].

It goes both ways: you can use it to delay decoding or to pre-encode.

Maybe the C libraries could be extended to do something similar?

Cheers!

[1] https://github.com/fxamacker/cbor













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.