Re: [Cbor] Magic number

Carsten Bormann <cabo@tzi.org> Thu, 28 November 2019 16:56 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 D96DE120885 for <cbor@ietfa.amsl.com>; Thu, 28 Nov 2019 08:56:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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 rUu6LLSE1KFH for <cbor@ietfa.amsl.com>; Thu, 28 Nov 2019 08:56:39 -0800 (PST)
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 C8B3412085C for <cbor@ietf.org>; Thu, 28 Nov 2019 08:56:38 -0800 (PST)
Received: from client-0012.vpn.uni-bremen.de (client-0012.vpn.uni-bremen.de [134.102.107.12]) (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 47P3h50B2Fzym8; Thu, 28 Nov 2019 17:56:36 +0100 (CET)
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: <87k17k3qms.fsf@hobgoblin.ariadne.com>
Date: Thu, 28 Nov 2019 17:56:37 +0100
Cc: cbor@ietf.org
X-Mao-Original-Outgoing-Id: 596652932.0968421-6d1d80a021a6473b90c9ad17cdb41263
Content-Transfer-Encoding: quoted-printable
Message-Id: <953945BD-E435-4DDA-BC0A-EE7A8C4C36C6@tzi.org>
References: <87k17k3qms.fsf@hobgoblin.ariadne.com>
To: "Dale R. Worley" <worley@ariadne.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/R4RzZanzEDOH4_nwVy4WD5jZT-0>
Subject: Re: [Cbor] Magic number
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, 28 Nov 2019 16:56:41 -0000

Hi Dale,

On Nov 28, 2019, at 17:35, Dale R. Worley <worley@ariadne.com> wrote:
> 
> This is a small thing, and perhaps its been settled, but I couldn't find
> anything in the archives about it:  The media type registration for
> application/cbor in RFC 7049 says that there's no magic number for CBOR.
> But section 2.4.5 defines a CBOR tag that whose purpose is to implement
> a magic number, 0xd9_d9_f7.  And this is carried forward into
> 7049bis-09.  It seems to me that the registration should be corrected.

Good point.
However, not all CBOR carries this magic number.
With the tag, you can have that magic number if you like.
(Actually, you can register your own tag to have your own magic number, too; see for example the “RAINS” tag 15309736 which happens to pop up a 雨 [rain] character at the start of the data item.)

I don’t know if there is a way to say that “there is an optional magic number defined that can be used by applications that want to use it” in a media type registration.

So far, not a lot of applications have picked up using the 55799 magic number.

Grüße, Carsten