Re: [Cbor] draft-ietf-cbor-packed - Have you considered infixes?

Jeffrey Yasskin <jyasskin@chromium.org> Mon, 08 March 2021 17:27 UTC

Return-Path: <jyasskin@google.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 881453A11AF for <cbor@ietfa.amsl.com>; Mon, 8 Mar 2021 09:27:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.496
X-Spam-Level:
X-Spam-Status: No, score=-9.496 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.248, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
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 N6RTY1rVGB5Y for <cbor@ietfa.amsl.com>; Mon, 8 Mar 2021 09:27:26 -0800 (PST)
Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (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 A730C3A11B4 for <cbor@ietf.org>; Mon, 8 Mar 2021 09:27:26 -0800 (PST)
Received: by mail-qt1-x832.google.com with SMTP id 2so8130629qtw.1 for <cbor@ietf.org>; Mon, 08 Mar 2021 09:27:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZPKmM3cKxM256n2++Xdsst/K25FWK/a+qg6wZ0828S0=; b=Q5FlpRWXSnWQRlDpgTlhada2BE1YY3nMHPzOLhoCRQkVQrULiefGctsJg///FrB06n QvfScAsT0aGO8HsQUkB7u0QTtGbOmAzs6NF2qFXi4n4yRIadvGNh0XdoJrCtQr2X60Lb 1U5R0LpOvrzOaWlkRpNb+TRoaNorUrXErjghQ=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZPKmM3cKxM256n2++Xdsst/K25FWK/a+qg6wZ0828S0=; b=ZaelvR59mj1VKSPoEMd6bnw6MKTrsGL1K8dLZyAOVkyAjQOT2cQQ3HgG6Fy2bRXGNn qA9fjK8UXCeCoiVBqWPSno2AfvLs1M9ZrzE7VzC4wl3C0AUdFCwDgtxyfh2Vt2RE6s2I KYMZHMyjj8i18eZiiA0U5ScHjJKQ6LY0zuo+PgT7wrkacHdwjFPicWRz0wr6FQQ+hCVr 9oMet/8j/HJ3C9HRi3OguRvPOey1Ts7XYNq55KaPzFJMywoam5xIPm4gmgvGxG7JlGx/ 5j+XyUfwPuO9/jnwiGtAJS1xgPfV8Q5zTD0py2YXS1wuUr9s/kk30p1YizLTYsctJYYC hyiQ==
X-Gm-Message-State: AOAM530Kp6ppExmCftuUmChcJnXRASZWKrZ3INx0XnqBgdxIMsxylm25 vznJ8LzLRcvB1xTrE8lN84fn8W486TbVrr+RWWa2NA==
X-Google-Smtp-Source: ABdhPJwztAqDrVwBcEAIIDVOf/c/6BO+W5ZvaP2gWXI7p4Ks6oftsAVAbJJVPTUxPBfM76SADff4hghRClpVrfWYtTU=
X-Received: by 2002:ac8:44cc:: with SMTP id b12mr15773361qto.382.1615224443866; Mon, 08 Mar 2021 09:27:23 -0800 (PST)
MIME-Version: 1.0
References: <76541F9A-947C-42FC-8427-89BAEEF5DB7F@ericsson.com>
In-Reply-To: <76541F9A-947C-42FC-8427-89BAEEF5DB7F@ericsson.com>
From: Jeffrey Yasskin <jyasskin@chromium.org>
Date: Mon, 08 Mar 2021 09:27:09 -0800
Message-ID: <CANh-dXnpsyGArMqSvQften-Qzs4hxX6azP02YaEnBzCo-HHRkQ@mail.gmail.com>
To: John Mattsson <john.mattsson=40ericsson.com@dmarc.ietf.org>
Cc: "cbor@ietf.org" <cbor@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000036e67805bd09bfde"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/NsYRH-3U0qW38Z0bUjdInSiBAj0>
Subject: Re: [Cbor] draft-ietf-cbor-packed - Have you considered infixes?
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: Mon, 08 Mar 2021 17:27:28 -0000

Aren't URLs great?

It could be worth having a URL-specific form that reverses the domain name
components before reusing a prefix. On the other hand, URL parsing is
complex <https://url.spec.whatwg.org/> and not very interoperable
<https://paper.seebug.org/papers/Security%20Conf/Blackhat/2017_us/us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-Languages.pdf>,
so this could be a bad idea.

Jeffrey

On Mon, Mar 8, 2021 at 8:10 AM John Mattsson <john.mattsson=
40ericsson.com@dmarc.ietf.org> wrote:
>
> Hi,
>
>
>
> There was a suggestion from Michael to use Packet CBOR for CBOR encoded
X.509 chains
>
> https://datatracker.ietf.org/doc/draft-mattsson-cose-cbor-cert-compress/
>
>
>
> I have not looked deeply into this and don’t know yet if it is a good
idea or not but a quick look at the CBOR encoded X.509 shows that shared
information between strings are not necessarily prefixes or suffixes, but
rather infixes.
>
>
>
> Have you considered adding infixes to draft-ietf-cbor-packed?
>
>
>
> [
>
> -4, "US",
>
> -6, "Arizona",
>
> -5, "Scottsdale",
>
> -8, "Starfield Technologies, Inc.",
>
> -9, "http://certs.starfieldtech.com/repository/",
>
> -1, "Starfield Secure Certificate Authority - G2"
>
> ],
>
> [
>
>   4, "http://crl.starfieldtech.com/sfig2s1-242.crl",
>
>   5, [ h'6086480186fd6e01071701', "
http://certificates.starfieldtech.com/repository/", 1 ],
>
>   8, [ 1, "http://ocsp.starfieldtech.com/", 2, "
http://certificates.starfieldtech.com/repository/sfig2.crt" ]
>
> ]
>
>
>
> Cheers,
>
> John
>
> _______________________________________________
> CBOR mailing list
> CBOR@ietf.org
> https://www.ietf.org/mailman/listinfo/cbor