Re: [Cbor] [COSE] CBOR magic number, file format and tags

worley@ariadne.com Sat, 23 January 2021 03:14 UTC

Return-Path: <worley@alum.mit.edu>
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 93EB03A07C8 for <cbor@ietfa.amsl.com>; Fri, 22 Jan 2021 19:14:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.985
X-Spam-Level:
X-Spam-Status: No, score=-0.985 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.248, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=comcastmailservice.net
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 xKpvkhxi8A5I for <cbor@ietfa.amsl.com>; Fri, 22 Jan 2021 19:14:48 -0800 (PST)
Received: from resqmta-ch2-01v.sys.comcast.net (resqmta-ch2-01v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B68373A05D0 for <cbor@ietf.org>; Fri, 22 Jan 2021 19:14:48 -0800 (PST)
Received: from resomta-ch2-06v.sys.comcast.net ([69.252.207.102]) by resqmta-ch2-01v.sys.comcast.net with ESMTP id 39NXlSHbAfFsM39NvlfAcT; Sat, 23 Jan 2021 03:14:47 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20180828_2048; t=1611371687; bh=9TGNwoifJOlel7ne3KmpKA4wKTmz4FRHy4xd8kVZKPQ=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-ID; b=D8495QqmfJH4zFWHa32banxFSdLpktHkKeZYTaGzsw8bfvWSq9WHgQ5aKPGyHkHZF Af+COEtrDbtiyENZQZ/1ovAMXU0pRu/c4MDdnzyTuRwVEA+gRLUDdc1FaEoHBsFEfE QFr13bh7d/QzD1/5CtUaAotChttQb7w0Xa9u0gR7wDAycqK5NkWryxjJDLPXfunW6l B1cerW9Ps0a6bk39rmObxA6d4fYMQHcm4q9h66a3OF2Ayzgl9Iq/3CotWwXYlzwdrx 1sTYUAemdBbBhWk5ADZxK+sT9oegD7ZxMCqUk7ApOeaNYwtd2lJGfg1ti9t13Zb8N/ 1HqU5Vi7fwLlg==
Received: from hobgoblin.ariadne.com ([IPv6:2601:192:4a00:430:222:fbff:fe91:d396]) by resomta-ch2-06v.sys.comcast.net with ESMTPA id 39NtlqyAbYC6539NulbLzk; Sat, 23 Jan 2021 03:14:46 +0000
X-Xfinity-VMeta: sc=0.00;st=legit
Received: from hobgoblin.ariadne.com (hobgoblin.ariadne.com [127.0.0.1]) by hobgoblin.ariadne.com (8.14.7/8.14.7) with ESMTP id 10N3EiK5027188; Fri, 22 Jan 2021 22:14:45 -0500
Received: (from worley@localhost) by hobgoblin.ariadne.com (8.14.7/8.14.7/Submit) id 10N3EiS4027185; Fri, 22 Jan 2021 22:14:44 -0500
X-Authentication-Warning: hobgoblin.ariadne.com: worley set sender to worley@alum.mit.edu using -f
From: worley@ariadne.com
To: Michael Richardson <mcr@sandelman.ca>
Cc: cbor@ietf.org, doug@ewellic.org
In-Reply-To: <23723.1611332220@localhost> (mcr@sandelman.ca)
Sender: worley@ariadne.com
Date: Fri, 22 Jan 2021 22:14:44 -0500
Message-ID: <87wnw49wez.fsf@hobgoblin.ariadne.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/mQZHM7ViGhCBcWIlZoC0Pe8e8HM>
Subject: Re: [Cbor] [COSE] CBOR magic number, file format and tags
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: Sat, 23 Jan 2021 03:14:52 -0000

Here's an alternative.  It is aligned with the magic number tag of CBOR
itself (55799) and the CBOR way of doing things.  Specifically, reserve
a large range of tags (such as 55800 to 65000, or 100000 to 109999) for
use as magic numbers; the CBOR object has the appropriate magic number
tag applied to that, and optionally, the CBOR magic number tag 55799
applied to that.  That can leave the generic CBOR magic number visible
at the start of the file, immediately followed by the bytes of the
specific magic number for the object type.

Dale