Subject: [COSE] x5t with multiple hashAlg for interoperability

From: "Sipos, Brian J." <[email-masked]>
Date: Fri, 11 Feb 2022 19:03:14 +0000

All,

The current x5t definition [1] includes a review comment about
interoperation and the need for out-of-protocol algorithm agreement. Because
the "x5t" is a header parameter there can only be a single one present in
any COSE layer, which is slightly different than the JOSE "x5t" algorithm
uses (as separate parameters).

Would it be reasonable to modify the "x5t" definition from a two-tuple into
a map structure, where the map keys are algorithm identifiers and the values
are the hash byte strings? This would allow the single-algorithm case to be
encoded with the exact same size as today, but would allow for multiple
algorithms to be present within a single "x5t". One of the algorithms can be
required to be SHA-256 unless otherwise agreed by the network operators, so
it would have the same properties as the current definition.

A map would allow for transition periods where an "x5t" has two algorithms:
the old one being transitioned away from and the new one being transitioned
to. So the same "x5t" would be understandable by recipients each only
accepting a single algorithm. An assumption about this kind of transition is
that it's easier to change the COSE source than to change the recipients.
This would also allow lossless JOSE translation when it has multiple x5t
algorithm variations, if that's a desirable thing.

[1]
https://www.ietf.org/archive/id/draft-ietf-cose-x509-08.html#section-2-5.5