Re: [Cbor] [COSE] New wireshark API and dissector

Brian Sipos <brian.sipos+ietf@gmail.com> Fri, 01 October 2021 12:40 UTC

Return-Path: <brian.sipos@gmail.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 9417D3A0B44; Fri, 1 Oct 2021 05:40:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.097
X-Spam-Level:
X-Spam-Status: No, score=-1.097 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, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 Tw4B3_7GPlIk; Fri, 1 Oct 2021 05:39:56 -0700 (PDT)
Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 533623A0B3E; Fri, 1 Oct 2021 05:39:56 -0700 (PDT)
Received: by mail-lf1-x12f.google.com with SMTP id e15so38304218lfr.10; Fri, 01 Oct 2021 05:39:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ebAya+exSF4+QcMsw3O1GyAVr/AZXmMChZyQ4x9Ra7k=; b=E1dMIF5oRwUi9d4s0F34XahWsyRq90gzoir4YU9mk899c4i8+0htTCM3Gl08PRa0z/ UoSLXMhqn158nqOJ15RcaM2sPgdWsK1LDgbZYLu18SAHB6elEPUVC35viKm0gKiLv9+c xl9uBleZQGeTPmADCUn3vIQNNmqnKASQoSjl/4wAS0zF9tuZVN6j5JVXEXwIVWWM55PV ksx3RWsJfummMPfxTTp4xzgUbNtiMXyGsViVWFzwyXXZy/YaH71TesLTKdeDK0ajiwqK jB8DkrxR/lDOToYWkREA7OVyQzsUTDXetVJvKi0kz89v2LAErBwZXqiqIQ1OIktLhdDm ojfA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ebAya+exSF4+QcMsw3O1GyAVr/AZXmMChZyQ4x9Ra7k=; b=bu4VCfJPt8N/QENUKOvQC766hl0m8O6hHSQvcgCEGzI7PZAFBmNcsSkNtrQy1jqoCG 0J+Bp++S6QMPbLEwO1SgZBjZRi09faB5WWU5RXSx/+YmACdBGXV4YOxFSfkbhMte6JPe AdqNr+9FfVnPryyj6wpHv0thuRNkRaRkat+eV1jPp9HKdhrFjWCEDXGAuQJVCtnYFPLz DdIGdAA7WgolLLffzMNUqckdoqe+DmuO0fCcknWKkfNYJC8aouko3yb1lp0oohRys/db AYhhl3CrnmehJvHnyPhXbX3jnCpu0anVhJO1LjuFD5giVwrtQsZ/HK657WFOeLOLAKhg zraQ==
X-Gm-Message-State: AOAM532AxelkKGSoCJCBtaSbetBLrEBbbiLYRTyb5t1vaZUolgS5YBkc 7/ZGRquIF0zSGXm9j06IbdeJwdbolH2Irr6yPOhX7p60Elo=
X-Google-Smtp-Source: ABdhPJwTcZ6gvncSPBtGn1Gjv7itftDsS5OvwStptbrrCYpUSplyPGmAKkoTQtCMXw9yFVNHsX8Tda9w9e1dtnDYBME=
X-Received: by 2002:a05:651c:1039:: with SMTP id w25mr11647074ljm.440.1633091994363; Fri, 01 Oct 2021 05:39:54 -0700 (PDT)
MIME-Version: 1.0
References: <CAM1+-gj279UQMDGVty_dGwinM1Awx1kboZwxOjjd_Ptgwy82qQ@mail.gmail.com> <919C21DB-39B4-4A0D-ACED-0075D01F05B1@tzi.org>
In-Reply-To: <919C21DB-39B4-4A0D-ACED-0075D01F05B1@tzi.org>
From: Brian Sipos <brian.sipos+ietf@gmail.com>
Date: Fri, 1 Oct 2021 08:39:38 -0400
Message-ID: <CAM1+-gjJ3HL8h+CAXJDfkLDYozwARwMib9xnuC_tCM5=TBJ9sA@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: cbor@ietf.org, cose@ietf.org
Content-Type: multipart/alternative; boundary="00000000000035a8a205cd49dc50"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/sryEAmmWD-2rBubPNQQ2je0r2aM>
Subject: Re: [Cbor] [COSE] New wireshark API and dissector
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: Fri, 01 Oct 2021 12:40:01 -0000

The name is an easy one: Wire Shark.
The API is quite tied in with the WS memory management and does bookkeeping
that a regular CBOR API wouldn't care about, like buffer offsets of various
parts of encoded items.

That does bring up that the current API does not handle indefinite
containers/strings in a way that the application is unaware. But the APIs
notion of a "chunk" as a contiguous piece of data, rather than a specific
CBOR item or header, allows for doing this in the future.

On Fri, Oct 1, 2021, 05:58 Carsten Bormann <cabo@tzi.org> wrote:

> Hi Brian,
>
> > On 2021-10-01, at 01:29, Brian Sipos <brian.sipos+ietf@gmail.com> wrote:
> >
> > All,
> > For anyone interested, a new COSE message dissector and a new CBOR
> decoding API has been recently merged to the main branch of Wireshark [1].
>
> This is most welcome news!
>
> > For new dissectors of protocols which use CBOR as their encoding, this
> "wscbor" API gives a higher-level of abstraction (e.g. "text =
> wscbor_require_tstr(...)") and robustness to both tags and errors in
> structure and well-formedness.
>
> (Of course, there now is the nagging question what the “WS” means here —
> probably not “Web Services” :-)
>
> > Hopefully this will be helpful to other dissectors, since there are
> quite a a few CBOR-based protocols in the works.
>
> Indeed!
>
> Grüße, Carsten
>
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor
>