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

Carsten Bormann <cabo@tzi.org> Wed, 28 July 2021 12:47 UTC

Return-Path: <cabo@tzi.org>
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 401743A0DC1 for <cose@ietfa.amsl.com>; Wed, 28 Jul 2021 05:47:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 h8mXjaweoh6u for <cose@ietfa.amsl.com>; Wed, 28 Jul 2021 05:47:37 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5E5403A0DBF for <cose@ietf.org>; Wed, 28 Jul 2021 05:47:37 -0700 (PDT)
Received: from [192.168.217.118] (p548dcc89.dip0.t-ipconnect.de [84.141.204.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4GZYN5319bz31MY; Wed, 28 Jul 2021 14:47:33 +0200 (CEST)
Content-Type: multipart/alternative; boundary="Apple-Mail=_C36E9960-5508-46FF-B63C-773F24556CDB"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CAFWvErVLfud5ffyzKdBJmzm7Wj+=osfZ0u7tKVpniicZDYqjxg@mail.gmail.com>
Date: Wed, 28 Jul 2021 14:47:33 +0200
Cc: cose@ietf.org
X-Mao-Original-Outgoing-Id: 649169253.0615619-79b9546948341307f4142752fcb60e81
Message-Id: <815DB7E9-555A-4A7D-B3DE-CC807DE3A222@tzi.org>
References: <CAFWvErVLfud5ffyzKdBJmzm7Wj+=osfZ0u7tKVpniicZDYqjxg@mail.gmail.com>
To: AJITOMI Daisuke <ajitomi@gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/fWB-WDJv7aacql4xI8Q3fC7o9SY>
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: Wed, 28 Jul 2021 12:47:42 -0000

Hi Daisuke,

> On 2021-07-28, at 13:45, AJITOMI Daisuke <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 lists the registration procedures for certain ranges, e.g.:

https://www.iana.org/assignments/cose/cose.xhtml#algorithms

Range 	Registration Procedures 
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