Re: [Cbor] Simple values 24..31 (was Re: List of not-well-formed CBOR and test vectors)

Laurence Lundblade <> Thu, 01 August 2019 17:18 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 8C50D1201D6 for <>; Thu, 1 Aug 2019 10:18:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id ynTkfHywr-Gs for <>; Thu, 1 Aug 2019 10:18:57 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 028ED1201ED for <>; Thu, 1 Aug 2019 10:18:51 -0700 (PDT)
Received: from [] ([]) by :SMTPAUTH: with ESMTPSA id tEj4hBxZSs9XUtEj5hJi6O; Thu, 01 Aug 2019 10:18:51 -0700
From: Laurence Lundblade <>
Message-Id: <>
Content-Type: multipart/alternative; boundary="Apple-Mail=_2973DA4F-81BE-4EFF-A55B-F8650A1D20C4"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Date: Thu, 1 Aug 2019 10:18:50 -0700
In-Reply-To: <>
To: Carsten Bormann <>
References: <> <> <> <>
X-Mailer: Apple Mail (2.3445.9.1)
X-CMAE-Envelope: MS4wfJ3F/CoTT7GLyFXJmTC4B/Z6v8GmPAcNiPGgyyT1mcC9javFs5buifJPRFy9KPDEqg3NmlnI1+bOHtTsHX3UKuWOhyy2ZJH1SBiYs0GpGUMEUnt/yPKe pCtDN9t8FFDP+cg07KrTd5Q39oxywr38uzOPwLal5hQUFzISZ9x+hE8JLu1TJAi1kLENL/1ZGeqv7g==
Archived-At: <>
Subject: Re: [Cbor] Simple values 24..31 (was Re: List of not-well-formed CBOR and test vectors)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 01 Aug 2019 17:19:00 -0000

> On Jul 31, 2019, at 11:52 PM, Carsten Bormann <>; wrote:
> On Aug 1, 2019, at 05:01, Laurence Lundblade <>; wrote:
>> Why wouldn’t 24 through 255 be considered unassigned and encoded 0xf8 0x18 through 0xf8 0xff?
> Because we considered those values confusing, and decided to give up on 8 potential values in exchange for reducing this confusion.  See Section 2.3 of RFC 7049 (parenthesis in first paragraph on page 13).
> Whether that was a particularly wise decision can be discussed.  Since we already have to check for too-low values in the second byte of 7.24, checking for 32 is not more onerous than checking for 24 (see pseudocode).  Giving up 8 values seems to be of limited concern given the number of allocations of Simple values so far.  Changing this now, however, would be a backward compatibility issue that we need to avoid.
> Grüße, Carsten

I see the logic, though I kind of think the opposite. Carving out a chunk of simple values as never-to-be-used is also confusing. Confused me :-). Another reason it is confusing is that it makes them (just slightly) different from low-value integers.

Probably a lot of decoders today cannot decode these simple values, so allowing them now would break backwards compatibility.

I think they should be labeled different than “reserved” because that implies they are going to be used at a later time or for some special purpose. That’s why I went looking at extension points and IANA. Here’s a few suggestions:
Never to be used

Agreed that implementation cost is insignificant for any choice here.