Re: [Cbor] Private tag numbers
Anders Rundgren <anders.rundgren.net@gmail.com> Mon, 24 April 2023 12:28 UTC
Return-Path: <anders.rundgren.net@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 36570C1524AA for <cbor@ietfa.amsl.com>; Mon, 24 Apr 2023 05:28:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.096
X-Spam-Level:
X-Spam-Status: No, score=-7.096 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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 B68vTDFA4xT9 for <cbor@ietfa.amsl.com>; Mon, 24 Apr 2023 05:28:21 -0700 (PDT)
Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 59D93C14F693 for <cbor@ietf.org>; Mon, 24 Apr 2023 05:28:21 -0700 (PDT)
Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f1763ee8f8so29104795e9.1 for <cbor@ietf.org>; Mon, 24 Apr 2023 05:28:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682339299; x=1684931299; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=9y/K/OcS3uSYpI78HOFcqn1IiJD2KyxsXtCP4G1FUnk=; b=G+e/v/c/Dxz0eb62ZychlrVpYEHB8mX2TfVFmf7z/mp61B2+BukNoxuazdt7OPG3WC SjlJWiOoO/5rGw6LjliMJLKMi1kkpFlmILan/b5CWBgTFWKX4dfrRwENbTZKkdU6aYdE 30zKiIBg4GUuT8bNbM3W2QEopGmyiYfqqMHJADOkCT2DhbK/hhvYeMbWR/yByN7eYlxn vMsUFrCg/Ou7rbR2sDG2RddZahjwAKQud5vIc8WTJNK7cBKKMm2RenCaOjPTTx8iZo4Q shppiYDWQDPqfHic57XBqAWCl5mUpx4rFc1TyK68MBTYs1r/SBbloYXI3Blv3aXqxVNI PTUA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682339299; x=1684931299; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9y/K/OcS3uSYpI78HOFcqn1IiJD2KyxsXtCP4G1FUnk=; b=cTwtALQv8bjAc5HD9dEMHQHhibmvgTRnYbFouIUON3eAHKXk9bhgvltLwCp2ByjKS0 WfXKHID0sRKFa8+iwiZub+HYf+JD2diQXVrLRKMlfS9LkGmnG0mFeCKkqFhv/f7xOd1W Ikjd290TaNk/5+fT43G+dRnmrAkiFP5nfxyaaPkA6xtWu2VhBYDtoZ2faVgdSFFhq0uU qmQ2c2pHOsfSLs9FxfCEJglcciV/7Rwv+0ZDJN+w5alNt0updTGXm+AS4uj1SU8lzEkz k2y8SNBG5mzGn3m/9GDP+iZpa3FXxPy0umrjtmWj7jbo8HybclHWgvnxOcugDf11Ye4P fGKQ==
X-Gm-Message-State: AAQBX9dgpc+x74iEz90uXypNuNQADJbfbTw34N3iuc6t9GEz/MOGhjnP EUdc6Ed6dT6u+CRsmiSXldp2b3dQ2vI=
X-Google-Smtp-Source: AKy350bMxdPzbgb/TTZ0+wJ7yimNqoiSTlabEN34Zxx6/Rqy3pF+jjeF6HvVXkpwFNXjAuexFb6hrw==
X-Received: by 2002:a1c:f202:0:b0:3f1:76d0:8bb0 with SMTP id s2-20020a1cf202000000b003f176d08bb0mr7858102wmc.36.1682339299060; Mon, 24 Apr 2023 05:28:19 -0700 (PDT)
Received: from ?IPV6:2a01:e34:ec4e:5670:95bd:b970:7d81:a7e4? ([2a01:e34:ec4e:5670:95bd:b970:7d81:a7e4]) by smtp.googlemail.com with ESMTPSA id m36-20020a05600c3b2400b003edc4788fa0sm15629267wms.2.2023.04.24.05.28.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Apr 2023 05:28:18 -0700 (PDT)
Message-ID: <85a1e019-e5f3-42de-63d5-f551aef3ee6c@gmail.com>
Date: Mon, 24 Apr 2023 14:28:17 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0
Content-Language: en-US
To: Tony Putman <Anthony.Putman@dyson.com>, "cbor@ietf.org" <cbor@ietf.org>
References: <AS2PR09MB6342AB1E5DFF19EDFB65F25F8C609@AS2PR09MB6342.eurprd09.prod.outlook.com> <f27e5b19-c263-7c1b-9627-b3f05d6a33ab@gmail.com> <AS2PR09MB6342F12AB6545FB90627BAA88C679@AS2PR09MB6342.eurprd09.prod.outlook.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
In-Reply-To: <AS2PR09MB6342F12AB6545FB90627BAA88C679@AS2PR09MB6342.eurprd09.prod.outlook.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/ZQNxhm0n7Vaez6RLP6AQ59kVeYM>
Subject: Re: [Cbor] Private tag numbers
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: Mon, 24 Apr 2023 12:28:25 -0000
On 2023-04-24 13:27, Tony Putman wrote: > Hi Anders, > > Thanks for the suggestion. I had somehow missed your COTX draft. It looks like a mixed approach is the way to go if the contents schema is changing often. I don't think this is the case for what I'm investigating right now, but we're trying to use CBOR in more areas, so it's good to keep this solution in mind. Hi Tony, If URLs are not for you, wouldn't the other solution I sketched up fill the bill? With a specification, you can get a 3-byte master tag (like COTX's 1010). Then you get an unlimited number of private tags at a low cost (in bytes). COTX on the other hand, builds on the same trust model as the millions of projects of all kinds depending on public repositories like GitHub and mavenCentral. De-referencing URL "tags" is pretty handy: https://fido-web-pay.github.io/ns/p1 Best regards, Anders > > Best regards, > Tony > > -----Original Message----- > From: Anders Rundgren <anders.rundgren.net@gmail.com> > Sent: 22 April 2023 10:07 > To: Tony Putman <Anthony.Putman@dyson.com>; cbor@ietf.org > Subject: [EXTERNAL EMAIL] Re: [Cbor] Private tag numbers > > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. > > On 2023-04-21 18:53, Tony Putman wrote: >> Hi all, >> >> I'm defining a data schema for purely internal use (no interoperability needed) and encoding it in CBOR. There are points where we may want to vary/extend the contents with new data, and I thought the natural way to do this would be to define different tags to hold the data. I expected to find a set of tag numbers defined in IANA for private use, but there don't appear to be any. >> >> - Is this a misuse of tags? And if so, what would be the more natural way to specify this? >> >> - Is this a general problem that people face and would it be worth defining a set of private tags which are known to be context-sensitive and not interoperable? >> > Hi Tony, > > Personally I find the tag system less useful if you have a large bunch of ever changing objects. Obviously reusing tag numbers for revised objects isn't a good idea. > > One way to address this issue would be to register a *single* master tag, and then use locally defined sub-tags to specify the actual object id: > > 78564([2, { > "hi": "there" > }]) > > Where 78564 would be your master (registered) tag, and 2 the locally defined id. The overhead in the sample is just two bytes compared to specifying a unique tag for each object. > > > If saving bytes is not your main concern, you may find a concept borrowed from the XML world useful: > https://www.ietf.org/archive/id/draft-rundgren-cotx-04.html > With public repositories like GitHub, anybody can enjoy a robust and project specific namespace. > > Example: https://fido-web-pay.github.io/specification/crypto.html#5 > > Anders > >> Thoughts/comments on this will be gratefully received. >> >> Tony >> >> >> _______________________________________________ >> CBOR mailing list >> CBOR@ietf.org >> https://www.ietf.org/mailman/listinfo/cbor >
- Re: [Cbor] [EXTERNAL EMAIL] Re: Private tag numbe… Tony Putman
- Re: [Cbor] Private tag numbers Carsten Bormann
- [Cbor] Private tag numbers Tony Putman
- Re: [Cbor] Private tag numbers Vadim Goncharov
- Re: [Cbor] Private tag numbers Anders Rundgren
- Re: [Cbor] Private tag numbers Carsten Bormann
- Re: [Cbor] Private tag numbers Anders Rundgren
- [Cbor] Re: Private tag numbers / 1010 Vadim Goncharov
- Re: [Cbor] [EXTERNAL EMAIL] Re: Private tag numbe… Tony Putman
- [Cbor] Re: Private tag numbers / 1010 Anders Rundgren
- [Cbor] Re: Private tag numbers / 1010 Carsten Bormann
- [Cbor] Re: Private tag numbers / 1010 Anders Rundgren
- [Cbor] Re: Private tag numbers / 1010 Carsten Bormann
- [Cbor] Re: Private tag numbers / 1010 Anders Rundgren
- Re: [Cbor] [EXTERNAL EMAIL] Re: Private tag numbe… Carsten Bormann
- [Cbor] Re: Private tag numbers / 1010 Vadim Goncharov
- [Cbor] Re: Private tag numbers / 1010 Carsten Bormann
- [Cbor] Re: Private tag numbers / 1010 Vadim Goncharov
- Re: [Cbor] Private tag numbers Anders Rundgren