[Cbor] Artart early review of draft-ietf-cbor-file-magic-02

Bernard Aboba via Datatracker <noreply@ietf.org> Tue, 03 August 2021 19:26 UTC

Return-Path: <noreply@ietf.org>
X-Original-To: cbor@ietf.org
Delivered-To: cbor@ietfa.amsl.com
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id E92A23A2E83; Tue, 3 Aug 2021 12:26:30 -0700 (PDT)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
From: Bernard Aboba via Datatracker <noreply@ietf.org>
To: <art@ietf.org>
Cc: cbor@ietf.org, draft-ietf-cbor-file-magic.all@ietf.org
X-Test-IDTracker: no
X-IETF-IDTracker: 7.35.0
Auto-Submitted: auto-generated
Precedence: bulk
Message-ID: <162801879089.20863.15297297905691186349@ietfa.amsl.com>
Reply-To: Bernard Aboba <bernard.aboba@gmail.com>
Date: Tue, 03 Aug 2021 12:26:30 -0700
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/5ZgOxVcITa6ACe8hAeMEH3gH2KY>
Subject: [Cbor] Artart early review of draft-ietf-cbor-file-magic-02
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 03 Aug 2021 19:26:31 -0000

Reviewer: Bernard Aboba
Review result: Ready with Issues

Review of draft-ietf-cbor-file-magic-02
Reviewer: Bernard Aboba
Result: Ready with Issues

An overall comment. This document seems to propose more than one option in
several cases.  I wonder whether the multiple options will turn out to be
used in practice.  This makes me wonder if a document status of Experimental
might be a better choice (so we could try it out and see what turns out to be
needed), rather than BCP.

Section 2.

   A magic number is ideally a unique fingerprint, present in the first
   4 or 8 bytes of the file, which does not change when the contents
   change, and does not depend upon the length of the file.

[BA] Why have two supported lengths? I realize that they can be distinguished,
but having two potential lengths is likely to lead to one of them being less
widely supported or tested.

Section 3.2

[BA] Why support both CBOR Tag Wrapped and CBOR Tag Sequence?
The logic is explained in Section 4, but I'm not sure I buy it:

   "The use of CBOR Tag Wrapped format is easier to retrofit to an
   existing format with existing and unchangeable on-disk format."

[BA] Overall, it seems more likely to me that CBOR will be used for new file
formats than being retrofitted to new ones (which would be complicated by
backward compatibility issues). Or are there specific cases where a retrofit
is being seriously considered?

NITs:

Section 3.3:

"
   3.  The three byte CBOR byte string containing 0x42_4F_52.  When
       encoded it shows up as "CBOR"

...

   The third part is a constant value 0x43_42_4f_52, "CBOR".  That is,
   the CBOR encoded data item for the three byte sequence 0x42_4f_52
   ("BOR").  This is the data item that is tagged.
"

[BA] The latter text is more clear than the former, since 0x42_4F_52
is indeed "BOR". I'd suggest deleting the second sentence in 3, "When
encoded..."