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

Orie Steele <orie@transmute.industries> Tue, 22 March 2022 13:58 UTC

Return-Path: <orie@transmute.industries>
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 33DC13A14EB for <cose@ietfa.amsl.com>; Tue, 22 Mar 2022 06:58:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, 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=transmute.industries
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 qMswkeSxDf12 for <cose@ietfa.amsl.com>; Tue, 22 Mar 2022 06:58:35 -0700 (PDT)
Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (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 38B0D3A14CE for <cose@ietf.org>; Tue, 22 Mar 2022 06:58:35 -0700 (PDT)
Received: by mail-lj1-x22a.google.com with SMTP id h11so24072494ljb.2 for <cose@ietf.org>; Tue, 22 Mar 2022 06:58:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=transmute.industries; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r0qOEwdUAFXCaD6pgHabeJleuo45Vat/XgY79hQGTTI=; b=YAQXT7PMo9C3B3OaS9NPnNHfxX23hsV2RdopKiVYxYK4lIdsGWH91HQvQ9MPspQvZx Ed1yAXmoMQ+OZ7UIuHV4lPamo6LXubE2ZzPZJRcU53RvIzCxigCZXNEf+dkWHM6mMh0W UpRQZyB/4wj4YBptuFYbjmafEfwne+mMdQ6nGIK7NshFENzPKHiwE6fNPOLef8Gbp1La bk62hTd40rVqlqyI0DVYGi1fFkyS451KsjtGlEMRrYUePveoDOvg/fLzB0V1J9mqnA8l hBlQJ3xSvWEc3Wazf1ERjbdxJD+iys+pIyfDahNoIA6F6slcaE+v0qpc694P26sihiwf Oj4w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r0qOEwdUAFXCaD6pgHabeJleuo45Vat/XgY79hQGTTI=; b=XkbNVUdh25ni02id056krynlfrDB1NH9U8+Ob4julAIfL6hhS5nRx0FqDHxOm/LKKg IjP287T44v3hAKuQRHUpjp+BQFFd1cl9K9tThnBhl8QkqxdBDCRI7ZdD0OowGAnmVayy uHWQrVpBM8/E82rinwR9fbFEci3HZ5Ogc5IgHXhHGFhrYmTy0RnbRevKdjkAKpmD143s sogdMi/utC6uyiFI7j7tNDjxhHxBv7gTdU6C0BwcEjNo7eLegdLW/YoIvnDbiBhVtyVW dD6BWxXN9KT6bZgGRkYMjajqZdvUqq0lQHN34wwzyjufWYmEOHztk6PHS3hHSoQ9Fh5T ZEOA==
X-Gm-Message-State: AOAM530Qj5ApUo/icG3TJlBlqY3IvqJXy0yRQfFhr+Sto+K2HgVfs4d3 cWOUYjdstX5Pvkynlz+SjFjqIA3G+rHn2eAhaxulPd/zl7Q=
X-Google-Smtp-Source: ABdhPJzjlltPOn76KoxISfbZuqeuENC7bVY7ZGKAL03FsflwEiTEyeYWdlsmFS01ch2HSfYEhqdQJ0uWyT9VmHcK0kg=
X-Received: by 2002:a2e:a4b4:0:b0:246:2930:53d7 with SMTP id g20-20020a2ea4b4000000b00246293053d7mr19250396ljm.74.1647957512718; Tue, 22 Mar 2022 06:58:32 -0700 (PDT)
MIME-Version: 1.0
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>
In-Reply-To: <AM4PR0701MB21952FA024433E978BDE05DCF4179@AM4PR0701MB2195.eurprd07.prod.outlook.com>
From: Orie Steele <orie@transmute.industries>
Date: Tue, 22 Mar 2022 08:58:21 -0500
Message-ID: <CAN8C-_L1JmUtP=YbueFp4Px_NFnKZGmxjR0W_cm4Yf_j0eernw@mail.gmail.com>
To: Göran Selander <goran.selander=40ericsson.com@dmarc.ietf.org>
Cc: "cose@ietf.org" <cose@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000026a1ac05dacf02bf"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/ozG-jYrFpcr1HrmGw9SNxAp3kuQ>
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: Tue, 22 Mar 2022 13:58:49 -0000

I prefer A, and have appreciated learning the history of the issue... I
think the other proposals are not worth the cost.

OS

On Tue, Mar 22, 2022 at 3:42 AM Göran Selander <goran.selander=
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/
>
>
>
>
>
>
>
>
>
> *From: *Carsten Bormann <cabo@tzi.org>
> *Date: *Tuesday, 22 March 2022 at 00:00
> *To: *Michael Richardson <mcr+ietf@sandelman.ca>
> *Cc: *Laurence Lundblade <lgl@island-resort.com>, Orie Steele
> <orie@transmute.industries>, Göran Selander <goran.selander@ericsson.com>,
> cose@ietf.org <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>
> 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
> https://www.ietf.org/mailman/listinfo/cose
>


-- 
*ORIE STEELE*
Chief Technical Officer
www.transmute.industries

<https://www.transmute.industries>