Re: [Cbor] Segmented strings (Re: [Rats] [Last-Call] EAT profiles (was Re: Iotdir last call review of draft-ietf-rats-eat-13))

Laurence Lundblade <lgl@island-resort.com> Thu, 09 June 2022 19:17 UTC

Return-Path: <lgl@island-resort.com>
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 86B5FC157B37 for <cbor@ietfa.amsl.com>; Thu, 9 Jun 2022 12:17:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.908
X-Spam-Level:
X-Spam-Status: No, score=-1.908 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wm5wxq1OJ6Z0 for <cbor@ietfa.amsl.com>; Thu, 9 Jun 2022 12:17:27 -0700 (PDT)
Received: from p3plsmtpa07-02.prod.phx3.secureserver.net (p3plsmtpa07-02.prod.phx3.secureserver.net [173.201.192.231]) (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 CB1ADC15791D for <cbor@ietf.org>; Thu, 9 Jun 2022 12:17:27 -0700 (PDT)
Received: from [192.168.1.7] ([75.80.148.139]) by :SMTPAUTH: with ESMTPSA id zNenn5uJrdqvuzNennRyWY; Thu, 09 Jun 2022 12:17:25 -0700
X-CMAE-Analysis: v=2.4 cv=Vv3mv86n c=1 sm=1 tr=0 ts=62a24746 a=qS/Wyu6Nw1Yro6yF1S+Djg==:117 a=qS/Wyu6Nw1Yro6yF1S+Djg==:17 a=gKmFwSsBAAAA:8 a=K6EGIJCdAAAA:8 a=AIbroSdNeebSH3k0XDAA:9 a=QEXdDO2ut3YA:10 a=6IrpaRD00eGh13L1:21 a=_W_S_7VecoQA:10 a=nnPW6aIcBuj1ljLj_o6Q:22 a=L6pVIi0Kn1GYQfi8-iRI:22
X-SECURESERVER-ACCT: lgl@island-resort.com
From: Laurence Lundblade <lgl@island-resort.com>
Message-Id: <B7C27559-92B6-4426-821B-431A08341C72@island-resort.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_83FDAF7F-DE9E-475E-96E9-D104D1E685BD"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
Date: Thu, 09 Jun 2022 12:17:25 -0700
In-Reply-To: <8C044EB7-92CF-4306-9025-FD667E1B0F22@tzi.org>
Cc: Eliot Lear <lear@cisco.com>, iot-directorate@ietf.org, draft-ietf-rats-eat.all@ietf.org, last-call@ietf.org, rats@ietf.org, cbor@ietf.org
To: Carsten Bormann <cabo@tzi.org>
References: <165443386776.35361.12898474920348394274@ietfa.amsl.com> <E267AEDE-D1DB-415B-B28F-DD78A517D27A@island-resort.com> <A38F37B7-2E81-451F-86BA-0A041760EB7E@tzi.org> <9E4661C8-DFB7-4BC3-A7B5-150C774917F0@island-resort.com> <8C044EB7-92CF-4306-9025-FD667E1B0F22@tzi.org>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
X-CMAE-Envelope: MS4xfL7OcZXNqm/okCLTcfcUpESu45kctoiUu+D6Ws1DZbdhYJB5phXYdDPUNqAmdm134TcPcT8wrzrLoz4C8aKPUBrupmppfIptkuKrvDs8qX65ZERFsoJi hiqRea9YJXBy6HPlcAwHdaZNaQr2joZqYleTishRdDV8AtkNdJXFmyjwPLBzhqp6xZId8aTrAmKcwJCHJreuibngRbMJOBK0h671RF/a2XI6OoP/ZV/0Qk+O IEvJ68/Qb9rauX2+RN2UBLp/VL2bKs3VZrAApeW22alpGeGivdSBmFcuXvIwn0vubKcXCTTABne5F1VK5n48tStwclyvXfL63SpReCGZ3sosa1DOX1LQA1hF cu89y89q
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/BC3VatgYcsqUvz4uqyD97y0FoOI>
Subject: Re: [Cbor] Segmented strings (Re: [Rats] [Last-Call] EAT profiles (was Re: Iotdir last call review of draft-ietf-rats-eat-13))
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
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, 09 Jun 2022 19:17:29 -0000


> On Jun 9, 2022, at 12:51 AM, Carsten Bormann <cabo@tzi.org> wrote:
> 
> On 2022-06-08, at 21:26, Laurence Lundblade <lgl@island-resort.com> wrote:
>> 
>> The decoding of indefinite length strings requires a memory allocator or some strategy to coalesce string chunks. The COSE payload, which must be hashed, could be many independent string chunks. COSE header parameter values could be lots of string chunks. However you do the coalescing or processing, it is going to be more code and it is something people may not always implement. My t_cose implementation of COSE doesn’t support indefinite length strings yet.
> 
> OK, you are focusing on indefinite length encoded strings.
> (I couldn’t imagine why you would want to discuss indefinite length encoded arrays or maps.)
> Let’s simplify this term to “segmented strings”.
> 
> ….

Yes, all the background and rationale for segmented strings (and indefinite length maps and arrays) makes good sense to me.

> 
> As you notice, some applications of COSE could be in a space where “streaming” (segmented processing) is natural or even the only way to do things.  So it probably doesn’t make sense to disallow segmented strings for COSE in general.

Yes, COSE’s applicability is very broad, so it should not disallow segmented strings (or indefinite length maps and arrays). For example, segmented strings might even be useful in chunking blocks through AES so a large payload doesn’t have be in contiguous memory.

> 
> For EAT, you may want to make the decision that you don’t support segmented processing, alleviating the intrusion of segmentation into the decoder API.

Yes, we could do that in EAT, but should we?

My answer is no because:

1) EAT should stay aligned with COSE and CWT as much as possible.

2) Disallowing string chunks in EAT would remove one issue, but 15 more remain (section 7 has 16 subsections). It’s not enough of a gain to justify divergence from CWT.

I could be convinced on this particular one, but I can’t see ever getting the number of issue to zero without severely crippling EAT. For example, algorithm flexibility has to stay in IMO. Key identification and distribution is another that has to stay.


> That is indeed a valid decision you may want to make.  But note that this is less of an interoperability decision than a decision to simplify some parts of your systems as a tradeoff to decreased performance or capability in other parts of the system — which decrease you may want to consider insignificant.  It is a bit like deciding that floating point values cannot be used in an EAT, except that this decision is not visible at the data model level.

I still see it as an interoperability problem. One person legitimately implements sending EATS with  segmented strings  Another person legitimately implements without being able to decode  segmented strings. These two independent fully conforming implementations will fail to interoperate.

With EAT profiles, I think we’re kind of “in for a penny, in for a pound”. There are many reasons to have EAT profiles and there is strong support for them. They can’t be eliminated. So we might as well be upfront and through and cover all the potential interoperability issues.

LL