Re: [COSE] Key identifier of type bstr / int

Tobias Looker <tobias.looker@mattr.global> Thu, 24 March 2022 00:57 UTC

Return-Path: <tobias.looker@mattr.global>
X-Original-To: cose@ietfa.amsl.com
Delivered-To: cose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BBBAC3A12B7 for <cose@ietfa.amsl.com>; Wed, 23 Mar 2022 17:57:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.398
X-Spam-Level:
X-Spam-Status: No, score=0.398 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URI_GOOGLE_PROXY=2.497] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=mattr.global
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 2sfslSQ8M0vS for <cose@ietfa.amsl.com>; Wed, 23 Mar 2022 17:57:33 -0700 (PDT)
Received: from AUS01-SY4-obe.outbound.protection.outlook.com (mail-sy4aus01on20706.outbound.protection.outlook.com [IPv6:2a01:111:f403:7005::706]) (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 D1CF63A12C1 for <cose@ietf.org>; Wed, 23 Mar 2022 17:57:32 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UoyaqYxDWiwrvCT1vclDWCxdQB0BxIMdDvfmNCBOWlvp8hj+HZzQfgBOSTWU+5tb3y3nAOmUN0veD/r5uUI+6+ilaSzHLNo/8a0pLxN8v+6yu/V9BDkLfgU8KEKjju6MCOLVpmGfwbXxYti0hVHyUAhYPHFjabtt0CB7NpJeqDchVfcWh7Sq+byAzLgN9EKVdyjo5lq+ilOdklBWugxzT40Ju9Cq3qPljXWAFwUAcuWqL2Nf6MRroTVQY0KcC0uKT5jjIqhQqwhJo86N1tciDZzAqc4wzkJ/3Wj6vnHr3CM9/Lj63/wXaJ5y9d5UjRQr8h8WQ/Zich4Oyei+Pf2L+w==
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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=snnlGbfropoVNX2FJ37iaPaS8vZRoZCqhktJr4JWtRY=; b=SHDlv+Me792+1EBD09le6oOMDETZBEnRSjVgcMDSg4e6BHaW2ApWmksTwNpc3l3xg5QCbOPQXDZ3j7EME1Nh7VJCEulgW+MhY/xYZUL1SKfbIgBZMTsnFJESq6AUtVf7mJdChd0i83Dy77z0N0C6fhL86FQDxHz4QWH+AtaJLLF18K9/sVtt7JvaO3E6Xm+B8mMFGhp9gWSUnCmLRkgB/v1z/hewH2H2R35wsOIVqHAzUEPDF9TmftHLfVd7dV1MtYgDM/5SNHosm9vZVrAP05szUhDTZzwZtOfgZZ/zdZ7eXX5Ym8Ml0DNCgAgob/yEpg5icd46NkfxbCoGlppYwA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mattr.global; dmarc=pass action=none header.from=mattr.global; dkim=pass header.d=mattr.global; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mattr.global; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=snnlGbfropoVNX2FJ37iaPaS8vZRoZCqhktJr4JWtRY=; b=eyPDZ8tnMaAFt8Hc5BBonmxnSMxgp/EUUwAqZ0RTOqi2pc+xa/aRUmPUGw5jvVC/qOxf9XPlAnY6yPeXdqakRe4hPCEpahxvmJQMCGPo0tsybh6at6cHwM83+qCd8WDikECZk8sQuY2Uoh9Z9L7x0Zsx8hWbAsNgpTLNAT03T5Q=
Received: from SY4P282MB1274.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:b2::12) by SYYP282MB2045.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:de::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.16; Thu, 24 Mar 2022 00:57:27 +0000
Received: from SY4P282MB1274.AUSP282.PROD.OUTLOOK.COM ([fe80::e5be:555c:28b4:86aa]) by SY4P282MB1274.AUSP282.PROD.OUTLOOK.COM ([fe80::e5be:555c:28b4:86aa%5]) with mapi id 15.20.5102.017; Thu, 24 Mar 2022 00:57:27 +0000
From: Tobias Looker <tobias.looker@mattr.global>
To: Ilari Liusvaara <ilariliusvaara@welho.com>, "cose@ietf.org" <cose@ietf.org>
Thread-Topic: [COSE] Key identifier of type bstr / int
Thread-Index: AQHYPSWYFigF7KIyjUuTVl8O3kachazMxg8AgAC7n9E=
Date: Thu, 24 Mar 2022 00:57:27 +0000
Message-ID: <SY4P282MB1274D757E003725775C9CB9B9D189@SY4P282MB1274.AUSP282.PROD.OUTLOOK.COM>
References: <95B75634-B147-4756-A950-C6B139CF3ADD@ericsson.com> <9DF382AC-12A8-47A5-AAE7-2B0D75EAA669@island-resort.com> <EDFDB6E4-2BDE-4E2E-9CF0-D771E2DEF3C6@ericsson.com> <823C00C2-4F6C-4DF5-99B0-87D8524D4A9C@island-resort.com> <C059B669-4C5D-4980-A665-96A39F4457C3@island-resort.com> <Yjr1XF5A2Cl2Jn1s@LK-Perkele-VII2.locald>
In-Reply-To: <Yjr1XF5A2Cl2Jn1s@LK-Perkele-VII2.locald>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mattr.global;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 498d9e81-6f8c-4ddb-0924-08da0d314445
x-ms-traffictypediagnostic: SYYP282MB2045:EE_
x-microsoft-antispam-prvs: <SYYP282MB2045FBB5F0E95EFA9736DB2B9D199@SYYP282MB2045.AUSP282.PROD.OUTLOOK.COM>
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: sNLwo/tCvcGqCQPJVgMcyZyVwUZDoSgnWShaVz0roOtfrnr8T3yW8ozuK95RyttDqOjDP3T9eejg6qq/lwtFhI9RnGCe7EbQ9LDnKRVxkSy/iDXH6+VwJ8hUI0i1iB93s+BakmrtalGop7UrsJ2OxGasDh2x3oRpRh1hkBOJY81HadMSimI5/FxBQu3TdDW29RUnwVaCDgEAguIEwZJkf+ISy/ecx1UpRQUbgjYJJYH8NpPb3tITduWyD8bggG4Oeg01IC7qB1Rh8HDZ91LY7oCy19OKDTNJK8ccXXb2QQNsmxIsKdFqCL0y5F4LKZvjv1rLbdTAWDRrGih9O92uxwoD/oWr17GfX0ktpRRgezAI3dFZvNqcdzlUrQW6VRFizBehkh2bQYgpZxbyxVvK568cjEJqmLIj4vun1la4fh2+i6sYlgLJPcPsPyOVXCHYohwNErI+1svmYrTufiIo/7alTisw9KNvEntYFrEYbICaa65KC9Pb9jJl6wf38h3ZVRhR/lzIuaw6ncMgE+n0mKvNOaX8qSL4lq/ntLx8wML+PomeeUz3gMdkChstez7ZTB19/Dc25xBtG/SEVjedvLzs+0sB0azYGG/WFewoVA1at4xVR9LH2+136klKYwbC2815zm8qpGsvjrCoyR6peZDXnNcqpho/eHG7Bug5hXfTb9ii7LgtVvHzJFuUQNQnviE5uBjy0cwV4in5sEEIEPr33SoGL8s8RnVG+/T0bS2Yf3UEHdl1/YcIWXldFbckWOed9+XS8Jtg8WLRHXbT9fs37ETdLChPaMWpfHCpossHZigpSV40jNFIALOT8SovcA4pci0FxEiIAlxa/LJe7Q==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SY4P282MB1274.AUSP282.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230001)(376002)(396003)(39830400003)(346002)(366004)(136003)(38070700005)(86362001)(55016003)(66476007)(19627405001)(2906002)(8936002)(52536014)(316002)(44832011)(5660300002)(38100700002)(166002)(71200400001)(9686003)(966005)(83380400001)(66556008)(186003)(26005)(110136005)(122000001)(33656002)(508600001)(53546011)(6506007)(66946007)(8676002)(64756008)(76116006)(7696005)(66446008); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: F0mCSjuDYfqEwgKoR7xuOazviMEVzfwakDa3sFIIpziIA7fNry0J7mxz0gZAAnWMSspiAHSieziaVYc8UtESeGdGxRAqyVenCMBUSrVB1dtHipDn+d9lMAOsk4Ed2XJC+IDb06SftbhSSuwnXRxGHuc/lE0gTV/kS/CpL6BXhcJeEda8mEXoLi2EBdgbBeat+v/KEKShK0s2CfUJ8Rn6VSNAOcOc1ZtfDJUN1uj6FLl+9B++Dif8BJnOrlZuvY7+kzXBlUSF6MkjicWeoQd68v1FR3zIwucvYU5b4nEGh9UjWtqnEtNHPUzWXpLkvm8E7PrgmoJ8hPNj2P3zFFbM01U91Tte+xitr3EwEFNbYGyYAPjc48IMLAmPaqrBMpuCywCH5VmL5FO5AyXWLHZkoBVEyvEyZcMYoi6SMhL37S00AzZZXBrVPrS7lfLoJoyMxmitl3cwa5BMvh2co//i1ODUf/AO1/+CG7Bgulv6ZZZzY/CEgyWNuR49S1tidS8kQ/pFVYcxnNGx4E5LSqRcRuk+OPMpXZXqhdQKXmAhSRI0AGTkFe8ZPxFOWRG2hBIxb/iz6EpJHWX+3nDvaBNbG9fKUWq00/kFACdPv8bzDP/BQvsNcgXrqoQ0Mo7d6lp9jMT+05FtJvGSYAgBSjIA1DBpgFHBa2e7V0uBoeL+wOF50kHI2C9y5HoWq6q6e7yoA1UqOE7AkQqSaAesh0n4gxMDe3zO4+7tR4M093fUD+xm+c3IwHh550X/GOXeFJFX/2mhSuCcj/jVxodxyykVzSXjCw3vB0b5Fl6B/K8Di3RCXApYKnc9T34hSQBuWxbV+Ir+1sIyri68x737xZDhP5fSfFLPVDapuRbBp4LQVlLBn1NkH9ufU4lQHsUNDNrV9j/nY4yuc5y9xBgbYnLfeZU/gIwL1a6WcXBA2vWc0LPiqVqVv5atDmcx1yB09uEVcZh9lnHGHr5qOyqfnmIguXdnG5y3shyrwdEjXtmqEnvkGUUN1o33M81I6ej9vRkYfzq5pEQH8t4gOCe4Z/vdL+Or0fVxmsfRfuZIpzRzPH+ElBC6sThezLfSQb7hmIcPx4V9ujV9Dv6qX7UmWn7xbVjPi3BUODuHcOx2I7SdqlmguysLPWuCBTQFhKVn6/Ggt7PkHQHD+Iox713yHRglPCNQeOk2/Kkk5KmdiIArBzw27j/nR/oIF5QX64gYkoQleASszZhdPCjn7ikWBqUjkVZ5aopCBwEf5DSl1OMCS6eQ1GLKxTkuGkeGpFx7vjqQVbQsaEs2/sDVF6/baVI+Pi/irKEEAHE5AfVdQUzf9ew9jgCfpO+hBczTtuBi8eLjHtmyjzX6elMVTwJMvtafVnlh/d3eyZE622MXALJ8N/mEMW9mGv2sUMawlBmdHJkcbC+56ly6KaiOPafoEUn8Mnx6MPDwWem5DxhLkkT03o091fNLG1Xpu570r6ZEtIA4oLivp4MAMQ7ont1ZN2aRcg==
Content-Type: multipart/alternative; boundary="_000_SY4P282MB1274D757E003725775C9CB9B9D189SY4P282MB1274AUSP_"
MIME-Version: 1.0
X-OriginatorOrg: mattr.global
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SY4P282MB1274.AUSP282.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 498d9e81-6f8c-4ddb-0924-08da0d314445
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2022 00:57:27.5967 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: c2c9cf73-6aae-4702-9844-02adab723771
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: q4ZUJwq4ApfZwDQCEIZ+diYZfxm7MvqkeOyzuc3MVS6ZBeo6fQjQn8LBdGUanckxJACmO29nj4qHsBDV9Q6rqyT5AViIiZ3p4Ek4ZJvAhFo=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SYYP282MB2045
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/e3sWcrCfyT8Sjdd02xWgumn_-oU>
Subject: Re: [COSE] Key identifier of type bstr / int
X-BeenThere: cose@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: CBOR Object Signing and Encryption <cose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cose>, <mailto:cose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cose/>
List-Post: <mailto:cose@ietf.org>
List-Help: <mailto:cose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cose>, <mailto:cose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Mar 2022 00:57:38 -0000

> What does your code do if it encounters a recipient with int kid?

I agree with this concern but I may be miss understanding the underlying proposal here. I get the inclination to favour A as the option, but would it not involve changing the supported data type of a parameter? As an implementer I can see how some would view this as a breaking change specifically those who validate the value type of the parameter in accordance with its IANA registration. I don't think we should be encouraging a pattern where future specifications are able to redefine the value types supported for a particular parameter.


Thanks,

[Mattr website]<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscanmail.trustwave.com%2F%3Fc%3D15517%26d%3Dw46s4eMXULV_ns1ZfAKYLbVKcqey_PHiW1WeN4boYw%26u%3Dhttps%253a%252f%252fmattr.global%252f&data=04%7C01%7CSteve.Lowes%40mbie.govt.nz%7C5a65fe33c70b41fd8ba908d976f3a2f1%7C78b2bd11e42b47eab0112e04c3af5ec1%7C0%7C0%7C637671611076709977%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tKqCMzLUQNCeORd908YqfqZoT7tCy%2FMVwXdjpch1sDY%3D&reserved=0>



Tobias Looker

MATTR
CTO

+64 (0) 27 378 0461
tobias.looker@mattr.global<mailto:tobias.looker@mattr.global>

[Mattr website]<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscanmail.trustwave.com%2F%3Fc%3D15517%26d%3Dw46s4eMXULV_ns1ZfAKYLbVKcqey_PHiW1WeN4boYw%26u%3Dhttps%253a%252f%252fmattr.global%252f&data=04%7C01%7CSteve.Lowes%40mbie.govt.nz%7C5a65fe33c70b41fd8ba908d976f3a2f1%7C78b2bd11e42b47eab0112e04c3af5ec1%7C0%7C0%7C637671611076709977%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tKqCMzLUQNCeORd908YqfqZoT7tCy%2FMVwXdjpch1sDY%3D&reserved=0>

[Mattr on LinkedIn]<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscanmail.trustwave.com%2F%3Fc%3D15517%26d%3Dw46s4eMXULV_ns1ZfAKYLbVKcqey_PHiW1SbN9fvNg%26u%3Dhttps%253a%252f%252fwww.linkedin.com%252fcompany%252fmattrglobal&data=04%7C01%7CSteve.Lowes%40mbie.govt.nz%7C5a65fe33c70b41fd8ba908d976f3a2f1%7C78b2bd11e42b47eab0112e04c3af5ec1%7C0%7C0%7C637671611076719975%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=t%2BidOI32oaKuTJf1AkcG%2B%2FirIJwbrgzXVZnjOAC52Hs%3D&reserved=0>

[Mattr on Twitter]<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscanmail.trustwave.com%2F%3Fc%3D15517%26d%3Dw46s4eMXULV_ns1ZfAKYLbVKcqey_PHiW1WdMte6ZA%26u%3Dhttps%253a%252f%252ftwitter.com%252fmattrglobal&data=04%7C01%7CSteve.Lowes%40mbie.govt.nz%7C5a65fe33c70b41fd8ba908d976f3a2f1%7C78b2bd11e42b47eab0112e04c3af5ec1%7C0%7C0%7C637671611076729970%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BD9WWyXEjVGlbpbCja93yW%2FzLJZpe%2Ff8lGooe8V6i7w%3D&reserved=0>

[Mattr on Github]<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscanmail.trustwave.com%2F%3Fc%3D15517%26d%3Dw46s4eMXULV_ns1ZfAKYLbVKcqey_PHiWwGdMoDtMw%26u%3Dhttps%253a%252f%252fgithub.com%252fmattrglobal&data=04%7C01%7CSteve.Lowes%40mbie.govt.nz%7C5a65fe33c70b41fd8ba908d976f3a2f1%7C78b2bd11e42b47eab0112e04c3af5ec1%7C0%7C0%7C637671611076729970%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4AhRuXZCnU5i3hcngo4H3UiNayYUtXpRcImV4slS1mw%3D&reserved=0>

This communication, including any attachments, is confidential. If you are not the intended recipient, you should not read it - please contact me immediately, destroy it, and do not copy or use any part of this communication or disclose anything about it. Thank you. Please note that this communication does not designate an information system for the purposes of the Electronic Transactions Act 2002.

________________________________
From: COSE <cose-bounces@ietf.org> on behalf of Ilari Liusvaara <ilariliusvaara@welho.com>
Sent: 23 March 2022 23:24
To: cose@ietf.org <cose@ietf.org>
Subject: Re: [COSE] Key identifier of type bstr / int

EXTERNAL EMAIL: This email originated outside of our organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.


On Mon, Mar 21, 2022 at 02:13:50PM +0100, Laurence Lundblade wrote:
> Thinking about Mike’s comment today in COSE/Vienna about backwards
> compatibility. Looked at my code around this. That definitely seems
> like an issue.

What does your code do if it encounters a recipient with int kid?

1. Treats the entiere message as malformed?
2. Ignores the recipient?
3. Something else? What?


And it is the implementations that do 1. (or 3. with some oddball
semantics) that worry me the most here. Not so much 2., as such
recipient is probably not correct anyway.



This also connects to the COSE-HPKE work: Where does one stick the
encapsulated ciphertext? It is naturally a bstr. It would seem natural
to stick it to the -1 (ephremeral key) field. Except that field is
defined to be a dictionary. However, this does not seem to stop editors'
copy from sticking a bstr to -1 field.



-Ilari

_______________________________________________
COSE mailing list
COSE@ietf.org
https://www.ietf.org/mailman/listinfo/cose