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

Carsten Bormann <cabo@tzi.org> Thu, 01 August 2019 06:52 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7FD2E120075 for <cbor@ietfa.amsl.com>; Wed, 31 Jul 2019 23:52:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.197
X-Spam-Level:
X-Spam-Status: No, score=-4.197 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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 RCqyjeAvHjvi for <cbor@ietfa.amsl.com>; Wed, 31 Jul 2019 23:52:54 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 77635120058 for <cbor@ietf.org>; Wed, 31 Jul 2019 23:52:54 -0700 (PDT)
Received: from client-0111.vpn.uni-bremen.de (client-0111.vpn.uni-bremen.de [134.102.107.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 45zgwN4kWzz10cf; Thu, 1 Aug 2019 08:52:52 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <9592F4F7-2008-4770-8FB4-54BD39191EFE@island-resort.com>
Date: Thu, 01 Aug 2019 08:52:52 +0200
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 586335170.3400559-d1ec78a58c25f602ea12425540b6152c
Content-Transfer-Encoding: quoted-printable
Message-Id: <6CE31BD8-FA1C-4E5E-B55D-50EFFDCDDBE4@tzi.org>
References: <CF3F871E-7489-4770-B2FE-1746C392ACF0@island-resort.com> <39259861-43D9-4498-A2F5-E07DBC998CA6@tzi.org> <9592F4F7-2008-4770-8FB4-54BD39191EFE@island-resort.com>
To: Laurence Lundblade <lgl@island-resort.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/v8u4t_8G3t-0asngnM2q8mbEFvM>
Subject: Re: [Cbor] Simple values 24..31 (was Re: List of not-well-formed CBOR and test vectors)
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Aug 2019 06:52:57 -0000

On Aug 1, 2019, at 05:01, Laurence Lundblade <lgl@island-resort.com> 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