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

AJITOMI Daisuke <ajitomi@gmail.com> Wed, 28 July 2021 20:07 UTC

Return-Path: <ajitomi@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 86D0F3A1E35 for <cose@ietfa.amsl.com>; Wed, 28 Jul 2021 13:07:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.096
X-Spam-Level:
X-Spam-Status: No, score=-2.096 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham 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 OL_dn-_VZhnC for <cose@ietfa.amsl.com>; Wed, 28 Jul 2021 13:07:03 -0700 (PDT)
Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (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 B401F3A1E32 for <cose@ietf.org>; Wed, 28 Jul 2021 13:07:02 -0700 (PDT)
Received: by mail-ej1-x634.google.com with SMTP id ga41so6494393ejc.10 for <cose@ietf.org>; Wed, 28 Jul 2021 13:07:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fs/HTdyLuLjNdHYkdbTDnbYT6GQfqIpCHDIFBs6XehU=; b=JxHDzJ/ytDfNxhFYDt9W5QGL36QTNQfQOna/y+HYCi9RiaxJPHsH+4XHWmuklR9NZ2 chIfMfui/JjEbax6TuLdlSNFc8c4rhtz3/TosFLj7iVEANqwr78bThJK/SpMVLbI7Ibp nqQprwwaNaom5sfZtf8yJlBpexnJ5NM6QYBu5LRn/VXN02XpO2a6Oc8RjGWsXCw5zKzK nUe4QYsrXRQKyTdDibbY1UPMCSPlIOjTvu6g4ZiMvyYW/x+5wNOfHymVz5pm7Bqm8CIR suEORCIjNmWSm+b7XCBj58cJMg3/i+RjUGSDs2o+iuGvDyeRhNH7lB9HBCZRYogeEZaQ NJQQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fs/HTdyLuLjNdHYkdbTDnbYT6GQfqIpCHDIFBs6XehU=; b=IkoJ8SrKtX4vz/minkgKBkuNETMvyQVEx7ZQZ2gzMHFOeXcmpo6nvxFaNaxhOiVVIt cAvrTUrs1cBhD7pHA/A2WibFF8FOPUQVyj+ojG0u5wOaloA6dWJB9iNn30gA8ecrw1Dz ahH8xigemtTUyx7+lSlZUeWXWxqdJu6604ymCvJ65ArAD77OoOkNullpAY1ys4QmlTgX SwE9D6+RselNClgY3IR1KP7ZDFd751mEOJcbBl7+S8DAvarjCPuokoW4fn37tIqsCfRo lq0uGwn9TCfNlPLDFuVmKf1HmiSeA7lvYNnMeXDQYmh6ppCRJ1++RWvrRL7nlr5DGBDM W6kg==
X-Gm-Message-State: AOAM533ZujN1vlQQCG6ly+sHj90/2sUjC8nLo8BrJ5S3yfHAg2VoUx42 vWRoNnWuhSsi+p1O/nnovpbzrP1hm4MxENLVhlc921jate1r
X-Google-Smtp-Source: ABdhPJxXwiCWQwaNyVnlZ6cATeJxYFSCR3ctDFKgX4jvGFh30oyhDBBiI9GtPY70s1sLeZw6NZ+UHCDBbHOhpwiKbEE=
X-Received: by 2002:a17:906:138d:: with SMTP id f13mr1188139ejc.34.1627502819500; Wed, 28 Jul 2021 13:06:59 -0700 (PDT)
MIME-Version: 1.0
References: <CAFWvErVLfud5ffyzKdBJmzm7Wj+=osfZ0u7tKVpniicZDYqjxg@mail.gmail.com> <815DB7E9-555A-4A7D-B3DE-CC807DE3A222@tzi.org>
In-Reply-To: <815DB7E9-555A-4A7D-B3DE-CC807DE3A222@tzi.org>
From: AJITOMI Daisuke <ajitomi@gmail.com>
Date: Thu, 29 Jul 2021 05:06:48 +0900
Message-ID: <CAFWvErU2tNA=BoMCMX3tGVmbT0TCf4FC3FA+2J_MZx9Z+DpVog@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: cose@ietf.org
Content-Type: multipart/related; boundary="0000000000006f0b9605c8348773"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/khhCLxaMdIc83pb1dFMvPwL-kd4>
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 20:07:09 -0000

Hi Carsten,

Thanks for your quick reply.

> Strings of length 1 Standards Action With Expert Review
> Strings of length 2 Specification Required
> Strings of length greater than 2 Expert Review

I overlooked the above part of the IANA registry.
As for alg, my question was solved and I understood that tstr type values
are not the aliases of int type values but I doubt the necessity to support
tstr type values for alg, etc.
For a specific length value, the number of tstr-type values is much smaller
than that of int type values and I think the merit of introducing the tstr
type is relatively small (compared to the demerit of that).

> (which means we might not be prepared for text labels when we finally
actually need them).

At least my implementation supports only 'int' type and I don't know the
implementations which support tstr type alg. Considering the
interoperability, we'd better update the spec from "tstr / int" to "int"...

By the way, are kty, crv and key_ops the same as alg? At least for kty and
crv, there is no mention about text string in the IANA registry like the
above alg.

2021年7月28日(水) 21:47 Carsten Bormann <cabo@tzi.org>:

> 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
>
>