Re: [COSE] tstr values for kty, alg, crv, etc.

Laurence Lundblade <lgl@island-resort.com> Fri, 06 August 2021 04:56 UTC

Return-Path: <lgl@island-resort.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 8060A3A1D20 for <cose@ietfa.amsl.com>; Thu, 5 Aug 2021 21:56:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.894
X-Spam-Level:
X-Spam-Status: No, score=-1.894 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 liWIBGiRo_sN for <cose@ietfa.amsl.com>; Thu, 5 Aug 2021 21:56:53 -0700 (PDT)
Received: from p3plsmtpa07-04.prod.phx3.secureserver.net (p3plsmtpa07-04.prod.phx3.secureserver.net [173.201.192.233]) (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 74AFF3A1D1A for <cose@ietf.org>; Thu, 5 Aug 2021 21:56:53 -0700 (PDT)
Received: from [192.168.0.100] ([71.92.144.145]) by :SMTPAUTH: with ESMTPSA id BrudmGb3480fFBruem2a4s; Thu, 05 Aug 2021 21:56:52 -0700
X-CMAE-Analysis: v=2.4 cv=VNQYI/DX c=1 sm=1 tr=0 ts=610cc114 a=E5cCtQzjhQJ5yJ7bKjC7Hg==:117 a=E5cCtQzjhQJ5yJ7bKjC7Hg==:17 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=K6EGIJCdAAAA:8 a=gKmFwSsBAAAA:8 a=I0CVDw5ZAAAA:8 a=48vgC7mUAAAA:8 a=ACn1CSgZ6R2NMaNGxb8A:9 a=QEXdDO2ut3YA:10 a=ESmtXmZkP9PrlDvsfFwA:9 a=Dl2epPFCTMPGuf6m:21 a=_W_S_7VecoQA:10 a=rMCfJy6NHDicN4J276Yl:22 a=L6pVIi0Kn1GYQfi8-iRI:22 a=nnPW6aIcBuj1ljLj_o6Q:22 a=YdXdGVBxRxTCRzIkH2Jn:22 a=w1C3t2QeGrPiZgrLijVG:22
X-SECURESERVER-ACCT: lgl@island-resort.com
From: Laurence Lundblade <lgl@island-resort.com>
Message-Id: <313B433A-ACCA-4D2E-AA20-53A6CAA4E92A@island-resort.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_5975ED46-7A31-4B20-AE8E-A0B580F50885"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\))
Date: Thu, 05 Aug 2021 21:56:51 -0700
In-Reply-To: <CAFWvErWfSkzHGwLaP0t7RsufgkMiryrHkp4zWoVsRGR718Dqow@mail.gmail.com>
Cc: cose@ietf.org, jodonogh@qti.qualcomm.com, Carsten Bormann <cabo@tzi.org>
To: AJITOMI Daisuke <ajitomi@gmail.com>
References: <CAFWvErVLfud5ffyzKdBJmzm7Wj+=osfZ0u7tKVpniicZDYqjxg@mail.gmail.com> <815DB7E9-555A-4A7D-B3DE-CC807DE3A222@tzi.org> <41E79CBD-04D1-4C0F-BEE3-4F63780D514E@island-resort.com> <CAFWvErWfSkzHGwLaP0t7RsufgkMiryrHkp4zWoVsRGR718Dqow@mail.gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.1)
X-CMAE-Envelope: MS4xfEReFWuB6RS2H+uPwyO/K6lPritTWaseMBI0/+qD1WQsNrA8BQ5OzwSV1ROzYdtSa9EQr1FfJ/zPg3FSfiki6W5/HVOJP27krf9JMerhNUn5sZ5AckFG VYL/7TyFcADRc6ouHH0KDVt0C2m7rm2szPRCsTc1caxGGKoL45nMCkPWLNRrp2Dv2+AXe52G4PPZTp/AzE6NF5meCrbSFi8UjBRfBT+QLDol1Btht2SbZ1XA mlgu9YRMZ4ncFoYUiFnT+vKEQx0H1xTE3vV/yFkLVb4=
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/-hIN8ok5zKjJQOxnEX_GoT3-heI>
Subject: Re: [COSE] tstr values for kty, alg, crv, etc.
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: Fri, 06 Aug 2021 04:56:59 -0000

I don’t think tstr can be removed from the standard. That would break backwards compatibility. Maybe a strong recommendation could be added with the comment that many implementations don’t support tstr.

There is a revision of 8152 in process right now called 8152bis. That seems like the place to do it.

LL


> On Aug 5, 2021, at 8:29 PM, AJITOMI Daisuke <ajitomi@gmail.com> wrote:
> 
> Hi folks,
> 
> > I prefer to see the option of `tstr` labels removed if possible.
> 
> I'm glad to see that there are several people who agree with me.
> 
> To remove the option of tstr labels from the spec, would a revised RFC be needed? Or would an errata enough for that?
> Anyway, I would like to hear from the key members in COSE whether this change is acceptable or not.
> 
> If it is acceptable, I would like to support moving this effort forward.
> 
> Best regards,
> Daisuke
> 
> 2021年8月5日(木) 19:48 Jeremy O'Donoghue <jodonogh@qti.qualcomm.com <mailto:jodonogh@qti.qualcomm.com>>:
> Hi list,
> 
>  
> 
> I agree with Laurence on this. I work on platform-related security standards at GlobalPlatform where we are using COSE quite extensively. A major use-case is highly constrained embedded targets where the benefits from eliminating string handling are considerable – many such platforms do not have a heap, and minimal code size is an important design goal.
> 
>  
> 
> I prefer to see the option of `tstr` labels removed if possible. We do have a 64bit integer space for algorithms which should suffice. If this is not possible (e.g. for backward compatibility with proprietary implementations), at least a note to registrants that integer values are greatly preferred in some implementations for reasons of code size would be helpful. Implementations could then decide whether to not implement tstr support.
> 
>  
> 
> Best regards
> 
> Jeremy
> 
> 
> 2021年7月29日(木) 5:50 Laurence Lundblade <lgl@island-resort.com <mailto:lgl@island-resort.com>>:
> Yes, I much prefer int labels for a small C implementation. Adding support for tstr labels would noticeably increase code size. I hope no one registers a tstr label.  It seems unlikely because algorithms are relatively hard to invent and vet.
> 
> LL
> 
> 
>> On Jul 28, 2021, at 5:47 AM, Carsten Bormann <cabo@tzi.org <mailto:cabo@tzi.org>> wrote:
>> 
>> Hi Daisuke,
>> 
>>> On 2021-07-28, at 13:45, AJITOMI Daisuke <ajitomi@gmail.com <mailto:ajitomi@gmail.com>> wrote:
>>> 
>>> In my opinion, the tstr type for 'kty', 'alg', 'crv' or 'key_ops' is not necessary because I think the major advantage of COSE is its compactness,but I would like to know what you are assuming as the value of tstr.
>> 
>> The registrant gets the choice between a text string and an integer.
>> 
>> https://www.iana.org/assignments/cose/cose.xhtml <https://www.iana.org/assignments/cose/cose.xhtml> lists the registration procedures for certain ranges, e.g.:
>> 
>> https://www.iana.org/assignments/cose/cose.xhtml#algorithms <https://www.iana.org/assignments/cose/cose.xhtml#algorithms>
>> 
>> Range <sort_none.gif>	Registration Procedures <sort_up.gif>
>> Strings of length 1	Standards Action With Expert Review
>> Integer values between -256 and 255	Standards Action With Expert Review
>> Strings of length 2	Specification Required
>> Integer values from 256 to 65535	Specification Required
>> Integer values from -65536 to -257	Specification Required
>> Strings of length greater than 2	Expert Review
>> Integer values greater than 65535	Expert Review
>> 
>> So labels the representations of which would be 1+0 and 1+1 bytes long require standards action, 1+2, specification required, and 1+>2, expert review.
>> 
>> It doesn’t look like anyone has felt a need to register a text string label for an algorithm ID yet; there are still quite a few 1+1 (and even a few 1+0!) values available for registration.
>> 
>> I would expect that, until we run out of codepoints, the registration of text labels will remain an occurrence for special circumstances (which means we might not be prepared for text labels when we finally actually need them).
>> 
>> 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>
>