[Cbor] Re: Bundle protocol RFC 9171 design problems
Vadim Goncharov <vadimnuclight@gmail.com> Sat, 11 July 2026 21:45 UTC
Return-Path: <vadimnuclight@gmail.com>
X-Original-To: cbor@mail2.ietf.org
Delivered-To: cbor@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 2FEBF115319D5 for <cbor@mail2.ietf.org>; Sat, 11 Jul 2026 14:45:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1783806300; bh=MGqGhjvCjwT/Jh2qTlt6Ya/+2+NLunygxMRQUmI9hmk=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=vLSx+YE8Pb+aZS7e8MNoGh4aoZrfWWYRV125qyoa7PXE/M1bT5NV7Qu2DhCm19CB5 h7iUFUqwqYqGtkHJxqFOnvOH3I+AA+Dh6uwVvh1UUQcwQ/kcMyCc80qUw7UY10B5hw Sx02xuiA+g6xzh5gMqSKv25GKt3Qm5Xb0aiUyuFI=
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.099
X-Spam-Level:
X-Spam-Status: No, score=-1.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nJpwtRb-Yr4B for <cbor@mail2.ietf.org>; Sat, 11 Jul 2026 14:44:59 -0700 (PDT)
Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id E0F89115319D2 for <cbor@ietf.org>; Sat, 11 Jul 2026 14:44:59 -0700 (PDT)
Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-39c9bb9d2fbso12672571fa.2 for <cbor@ietf.org>; Sat, 11 Jul 2026 14:44:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783806293; x=1784411093; darn=ietf.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=ssd9NYhSZsbpAg4Va0lNUsIO27W8sgdQcCz9haE8fUc=; b=r8ADw96MOrE87TA05kPvlPwuEE6OGBOZwCsEp0qyYBm9I/l/Zk6mZV7AGQLu2x+Odc 5CjinFg3CRaQZFb7NAr99QpamESvCut+UzkkrYI3HlqIWCNM7AXM3bL+3oRRGEwZLofg gYDxLCC5kidVAFwZSBsfSDD+lOztIdCC5CW5hoCkluP2U6tYKHLUy1z4cj9Nh2WP1S7C 0dA3J8knjXrfuDy405UgGYQN54M8xcj6r0bkGIoj6Aqow5LycEIqrILEmfQU5bK83BKW feoyfGF8Gq5Sy8ObZJehiMJ2sxJZkV+o/6POozAx1LGgi6KZFkMLc12Re9dwVNStPhs1 ltDg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783806293; x=1784411093; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ssd9NYhSZsbpAg4Va0lNUsIO27W8sgdQcCz9haE8fUc=; b=AMFGRqkrSX0h280gszuZNkKPLp+AeUn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d:4014:12bf with SMTP id 38308e7fff4ca-39d4014275fmr5599081fa.6.1783806292822; Sat, 11 Jul 2026 14:44:52 -0700 (PDT)
Received: from nuclight.lan (broadband-77-37-180-76.ip.moscow.rt.ru. [77.37.180.76]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b023b5931bsm851491e87.42.2026.07.11.14.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jul 2026 14:44:52 -0700 (PDT)
Date: Sun, 12 Jul 2026 00:44:49 +0300
From: Vadim Goncharov <vadimnuclight@gmail.com>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <20260712004449.4ac3d0ee@nuclight.lan>
In-Reply-To: <0648fe51-5edf-44f8-a208-966c28243907@gmail.com>
References: <572F183F-6B0B-415D-8850-9F8C090D4BC1@island-resort.com> <64E3E47C-5651-4D70-881C-308A6E67D3DA@island-resort.com> <0648fe51-5edf-44f8-a208-966c28243907@gmail.com>
X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; amd64-portbld-freebsd13.5)
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Message-ID-Hash: XPUBHDOIKZZSYY5NM6ECMDZOUEPWY3LR
X-Message-ID-Hash: XPUBHDOIKZZSYY5NM6ECMDZOUEPWY3LR
X-MailFrom: vadimnuclight@gmail.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cbor.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Laurence Lundblade <lgl@island-resort.com>, CBOR <cbor@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Cbor] Re: Bundle protocol RFC 9171 design problems
List-Id: "Concise Binary Object Representation (CBOR)" <cbor.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/MPkaIQG3TrP4MgU7dILzNdyXoGg>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Owner: <mailto:cbor-owner@ietf.org>
List-Post: <mailto:cbor@ietf.org>
List-Subscribe: <mailto:cbor-join@ietf.org>
List-Unsubscribe: <mailto:cbor-leave@ietf.org>
On Tue, 7 Jul 2026 09:29:40 +0200 Anders Rundgren <anders.rundgren.net@gmail.com> wrote: > On 2026-07-06 22:46, Laurence Lundblade wrote: > > (Sticking to serialization draft and bundle, not other tags that require > > library tweaks, EU payments,…) > > > > 1) I am planning some reframing in Appendix G to talk about CBOR libraries > > that support signing/hashing without byte string wrapping. It is something > > like this: > > > > Byte string wrapping has the advantage of needing no special features > > from the CBOR library. That said, some libraries do have an additional > > feature that gives access to the encoded bytes of sub-parts of a CBOR > > message. > > > > I didn’t check a lot of libraries carefully, but QCBOR and fxamacker both > > provide some access to encoded sub-parts. > > > > The idea is to say byte string wrapping works with any library so it is > > preferred, but direct hashing can be made to work with the right library. > > Apparently there is no incentive for describing possible *advantages* of > hashing/signing non-wrapped CBOR data. Here is my personal #1 feature: I've done it slightly from other side in a message about IP example... > In a messaging system using multiple objects, including objects that in turn > may embed other signed or non-signed objects, it is convenient to mark each > object with a type-specific identifier. Using CBOR that would be a Tag. > > This arrangement doesn't work particularly well for messaging schemes using > COSE since COSE has its own Tag. The RFC9596 workaround is not comparable. > Embedded signatures address this issue with minimal effort including signing > the [optional] object Tag itself. Probably you meant some other RFC? RFC9596 is short and do not even have word "tag". As for in general, CBOR allows an item to have several tags (and bstr-wrapped CBOR can also have tags, though it's different). [...] > >> If the blocks CRCed/hashed were byte-string wrapped — the input to the > >> CRC/hash was the byte string — then any CBOR library would work. > >> > >> If the determinism wasn’t broken, then the CRCed/hashed bytes could be > >> reconstructed and fed to the hash/CRC. > > Embedded signatures appear to suffer from the same issue. > > However, in a high-level, object-oriented CBOR implementation, the decoder > only needs to perform a handful of "standard" methods to cope with this: > > let object = CBOR.decode(cborBinary); // Decode CBOR object > let csf = object.get(CSF_CONTAINER_LBL); // Get embedded signature > container let alg = csf.get(CSF_ALG_LBL).getInt32(); // Get COSE > algorithm let sigVal = csf.remove(CSF_SIG_LBL).getBytes(); // Get and > REMOVE signature value let actualSig = hmac(alg, // > Calculate signature over SHARED_KEY, // the current > (modified) object object.encode()); // encode(): all but the > signature value > > Note: minimalist example showing the principle. This example uses re-encoding of object to get signature, which will be poor from performance-point of view. That's why Laurence talks about offsets etc. -- WBR, @nuclight
- [Cbor] Bundle protocol RFC 9171 design problems Laurence Lundblade
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Vadim Goncharov
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Anders Rundgren
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Vadim Goncharov
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Wolf McNally
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Laurence Lundblade
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Anders Rundgren
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Vadim Goncharov
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Anders Rundgren
- [Cbor] Hashing non-wrapped CBOR (was Re: Bundle p… Laurence Lundblade
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Vadim Goncharov
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Laurence Lundblade
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Vadim Goncharov
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Michael Richardson
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Laurence Lundblade
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Anders Rundgren
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Brian Sipos
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Anders Rundgren
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Laurence Lundblade
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Anders Rundgren
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Brian Sipos
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Laurence Lundblade
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Brian Sipos
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Vadim Goncharov
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Laurence Lundblade
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Vadim Goncharov
- [Cbor] Re: Hashing non-wrapped CBOR (was Re: Bund… Carsten Bormann
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Vadim Goncharov
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Brian Sipos
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Laurence Lundblade
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Brian Sipos
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Laurence Lundblade
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Vadim Goncharov
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Brian Sipos
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Vadim Goncharov
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Michael Richardson
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Vadim Goncharov
- [Cbor] Re: Bundle protocol RFC 9171 design proble… Vadim Goncharov