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

Anders Rundgren <anders.rundgren.net@gmail.com> Wed, 23 March 2022 05:53 UTC

Return-Path: <anders.rundgren.net@gmail.com>
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 88DD63A043E for <cose@ietfa.amsl.com>; Tue, 22 Mar 2022 22:53:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.109
X-Spam-Level:
X-Spam-Status: No, score=-7.109 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, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 xNuy4OvyWd9d for <cose@ietfa.amsl.com>; Tue, 22 Mar 2022 22:53:18 -0700 (PDT)
Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BBEF53A0490 for <cose@ietf.org>; Tue, 22 Mar 2022 22:53:17 -0700 (PDT)
Received: by mail-wr1-x430.google.com with SMTP id w4so522714wrg.12 for <cose@ietf.org>; Tue, 22 Mar 2022 22:53:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=GdvAxg0OueH7JodPrH8Pn6UTiKwYtdppCt+XCOMZs+E=; b=bFTFn6bTDqwdMt2u5e9HeaqSjoiBiKwTa0vHvT2ssu1TmvXo4Fa8xnYz6GdwmBoXa0 n/43GWqaT3i/L9jKW7oqvR5xmC6V53RegsFbDacH/1+z5Enbst2cMcu1CX2E7lCdMFLl fTmYLWzqx9MRKJB4t6A93Mk3wrRO7FYucR4OGMUf3+MHAeWmEWxf6F0JtzXd2RNIlcQW 5moD5L7ReZHzUXtOsqQe+kRoCc6En/qHClmYT28RSEDFbn4/oO/J1pMxUw1Qq2fF6SDu AKKrm8Ke54n3/J7eVKtDSlonRJs0ISFb83SExMW2fbn272dwoyTfUG0FVEmv9NeqcORF rarg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=GdvAxg0OueH7JodPrH8Pn6UTiKwYtdppCt+XCOMZs+E=; b=kwF6FjyE/unkeZ95Vw01/5jwmzwNbAPCS5C46Od9PqkYnQHHcGJ/He6EuYiV5L/n49 13XwZ/9ZSqH68q7IlPbbYmOz35+FawG9jKufMrIVbxrVYVR/sHBIzJxgvlZASwR9JBbJ tZJKPwvyAPtFZc9EzTZOefuPqW0dv5fsgvxKOx59ALJ+OJIx8GSernigoBW85ZiNdiun Lc5i0suQGpD+ujj5q5MTlAWsxN4xTWF6je+wAO2b3BljHKL52T5tZ7mG9Fa4Af0ktSoX n3/isNemcyoJC7npQ9Jv3G05pZ4SNRC7gEtMKDjqwd4HcEGnPlMsenLZzZKrcKHs0D7U zisw==
X-Gm-Message-State: AOAM5307+KOsN/KCUlE7dZ7fGfvpG3VViE/YZPvy3MIc2YRLZeD9MAX4 iCHUBSwkgiUsJd/WznmqHg/zhTQ9CzU=
X-Google-Smtp-Source: ABdhPJxCJaJZLv1jWDcgYCDGUqckO0cPgXT2mImZs2w7M3mlW4Acfe3v2zTfiDu9C14C8gCfrYj/Sg==
X-Received: by 2002:adf:db4b:0:b0:203:e76f:fc45 with SMTP id f11-20020adfdb4b000000b00203e76ffc45mr24308102wrj.549.1648014795321; Tue, 22 Mar 2022 22:53:15 -0700 (PDT)
Received: from [192.168.1.67] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id c12-20020a05600c0a4c00b00381141f4967sm4014269wmq.35.2022.03.22.22.53.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Mar 2022 22:53:14 -0700 (PDT)
Message-ID: <f48d83ab-a6eb-12e6-f5aa-a08dee9b3714@gmail.com>
Date: Wed, 23 Mar 2022 06:53:13 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0
Content-Language: en-US
To: Orie Steele <orie@transmute.industries>, Göran Selander <goran.selander=40ericsson.com@dmarc.ietf.org>
Cc: "cose@ietf.org" <cose@ietf.org>
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> <AM4PR0701MB21958541C07CEA44DB1B1578F4169@AM4PR0701MB2195.eurprd07.prod.outlook.com> <CAN8C-_+3sWckZKo7KS2fsPU4pBHo+NNGgQpxg7p8LytFX01eEw@mail.gmail.com> <AM4PR0701MB2195D76D8CFCC873C1D05A04F4169@AM4PR0701MB2195.eurprd07.prod.outlook.com> <CAN8C-_K4EfFSar9H_QR+cV_pz+xhXtWA=pKK+rFv241E5DQofQ@mail.gmail.com> <DC1C335A-629D-4E4F-97BD-B4CA3519EDC6@island-resort.com> <641639.1647901233@dooku> <3724F698-FB9A-44F2-B942-A6034B9D207E@tzi.org> <AM4PR0701MB21952FA024433E978BDE05DCF4179@AM4PR0701MB2195.eurprd07.prod.outlook.com> <CAN8C-_L1JmUtP=YbueFp4Px_NFnKZGmxjR0W_cm4Yf_j0eernw@mail.gmail.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <CAN8C-_L1JmUtP=YbueFp4Px_NFnKZGmxjR0W_cm4Yf_j0eernw@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/zMn-w-AbIswA1KnkhDYHMouOgnY>
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: Wed, 23 Mar 2022 05:53:25 -0000

On 2022-03-22 14:58, Orie Steele wrote:
> I prefer A, and have appreciated learning the history of the issue... I think the other proposals are not worth the cost.

Right, it is backward compatible and doesn't break existing code and applications.  This would be similar to an API method where you add an optional argument.  You obviously have to update associated documents, with something like "introduced in API level 3".  Why couldn't that apply to RFCs as well?


Personally I would (in the name of symmetry), make "kid" arguments comparable to CBOR map keys.  That is, kid => CBOR data item.

Anders

> 
> OS
> 
> On Tue, Mar 22, 2022 at 3:42 AM Göran Selander <goran.selander=40ericsson.com@dmarc.ietf.org <mailto:40ericsson.com@dmarc.ietf.org>> wrote:
> 
>     > I’d like to ask those who are proposing kid => int / bytes: are the two kid name spaces disjoint ____
> 
>     __ __
> 
>     Yes. An integer kid is considered different from a byte string kid. ____
> 
>     __ __
> 
>     __ __
> 
>     Just to be clear on the source. This proposal is based on a previous conclusion on the COSE mailing list considering different solutions:____
> 
>     __ __
> 
>     Solution A.____
> 
>     kid => int / bytes____
> 
>     __ __
> 
>     Solution B.____
> 
>     kid => bytes____
> 
>     kid2 => int / bytes____
> 
>     __ __
> 
>     Solution C.____
> 
>     kid => bytes____
> 
>     kid2 => int____
> 
>     __ __
> 
>     In this previous discussion (see first part of this thread [1]) there was a mild preference for A. We can revisit this now, but it is good if people participating in the discussion are aware of the arguments made previously.____
> 
>     __ __
> 
>     __ __
> 
>     Göran____
> 
>     __ __
> 
>     [1] https://mailarchive.ietf.org/arch/msg/cose/q_6kay8Z_4Wr48TFBXZU2oGRqoE/ <https://mailarchive.ietf.org/arch/msg/cose/q_6kay8Z_4Wr48TFBXZU2oGRqoE/>____
> 
>     __ __
> 
>     __ __
> 
>     __ __
> 
>     __ __
> 
>     *From: *Carsten Bormann <cabo@tzi.org <mailto:cabo@tzi.org>>
>     *Date: *Tuesday, 22 March 2022 at 00:00
>     *To: *Michael Richardson <mcr+ietf@sandelman.ca <mailto:mcr%2Bietf@sandelman.ca>>
>     *Cc: *Laurence Lundblade <lgl@island-resort.com <mailto:lgl@island-resort.com>>, Orie Steele <orie@transmute.industries>, Göran Selander <goran.selander@ericsson.com <mailto:goran.selander@ericsson.com>>, cose@ietf.org <mailto:cose@ietf.org> <cose@ietf.org <mailto:cose@ietf.org>>
>     *Subject: *Re: [COSE] Key identifier of type bstr / int____
> 
>     On 21. Mar 2022, at 23:20, Michael Richardson <mcr+ietf@sandelman.ca <mailto:mcr%2Bietf@sandelman.ca>> wrote:
>     > 
>     >> kid => int / bstr
>     > 
>     > It's one of the features of CBOR, as a self-describing format, that we can
>     > introduce new ways to do things.
> 
>     Indeed.
> 
>     So this is obviously an extension.  Old implementations can’t use the new data items enabled by that extension.
>     New implementations don’t have problems with old data items, so we call this backwards compatible, but not forward compatible.
>     We didn’t identify this as an extension point, so the lack of forward compatibility is likely to be universal — if you use an integer kid, old systems overwhelmingly will not understand you.
> 
>     Now, there is also API compatibility — can you upgrade the COSE library without upgrading the using application.
> 
>     I’d like to ask those who are proposing kid => int / bytes: are the two kid name spaces disjoint (so you need an API extension, too), or is an integer kid just a way to express the same kid as was already possible to express using a byte string kid.  Another way to say the latter is that all kids are byte strings and the integer representation is just a compressed way to express such a byte string.  Obviously, the latter way to interpret kids is slightly less efficient, because there are now two ways to express certain kids.  But the change is also local, i.e. you can do it in your library without changing anything else.
> 
>     If we go for the latter, we will want to make sure that in particular the integers -24..23 map to useful byte strings and v.v.  Note that there is no need to make these byte strings short; e.g., a decimal representation (‘-24’ to ‘-1’ and ‘0' to ’23’ in CBOR DN), or maybe an octal one (’50’ to ’77’ and ’00’ to ’27’) would work well.  We don’t even need to support integers outside -24..23.
> 
>     Grüße, Carsten____
> 
>     _______________________________________________
>     COSE mailing list
>     COSE@ietf.org <mailto:COSE@ietf.org>
>     https://www.ietf.org/mailman/listinfo/cose <https://www.ietf.org/mailman/listinfo/cose>
> 
> 
> 
> -- 
> *ORIE STEELE*
> Chief Technical Officer
> www.transmute.industries
> 
> <https://www.transmute.industries>
> 
> _______________________________________________
> COSE mailing list
> COSE@ietf.org
> https://www.ietf.org/mailman/listinfo/cose