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

From: John Mattsson <[email-masked]>
Date: Mon, 8 Mar 2021 16:10:24 +0000

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

---

From: Jeffrey Yasskin <[email-masked]>
Date: Mon, 8 Mar 2021 09:27:09 -0800

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=
[email-masked]> wrote:
> 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.
>   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
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cbor