Subject: [Ledger] feedback on draft-thomas-crypto-conditions-02

From: Jeremie Miller <[email-masked]>
Date: Mon, 22 May 2017 17:21:39 -0600

I would highly suggest that JOSE be evaluated for all crypto primitives,
and where/if binary packing is required for consistency then COSE should
also be strongly considered.

Jer

---

From: Adrian Hope-Bailie <[email-masked]>
Date: Tue, 23 May 2017 09:00:38 +0200

Hi Jeremie,

When I presented this draft to the SAAG in Seoul the feedback I got was to
stick with DER as this is the most widely used encoding and the best
tooled. We also have no need for a schema-free encoding format so defining
our data structures in ASN.1 seems appropriate.

Are you suggesting we consider using CBOR for the encoding and therefor
COSE as a way to encoded the signed/hashed data?

Adrian

---

From: Tony Arcieri <[email-masked]>
Date: Wed, 24 May 2017 12:49:09 -0400

> our data structures in ASN.1 seems appropriate.

I would definitely recommend sticking with DER for now. JOSE libraries are
almost notorious at this point for immaturity and a series of ongoing
vulnerabilities. This is from 2017 alone:

https://blogs.adobe.com/security/2017/03/critical-vulnerability-uncovered-in-json-encryption.html
https://pivotal.io/security/cve-2017-2773

There were many more last year. That's not to say ASN.1 hasn't been
implicated in its fair share of vulns, but BER generally remains the common
thread there.

---

From: Tony Arcieri <[email-masked]>
Date: Thu, 25 May 2017 17:16:49 +0000

On Thu, May 25, 2017 at 9:00 AM Jeremie Miller <[email-masked]>
wrote:

> I can only make a case for JOSE's adoption being the inevitable tide and
> that with more support from newer standards it will become as mature and
> even more widespread in time, similar to the movement from XML to JSON
> across the tech industry.
>

This sounds like what the SPKI people were saying about canonical
S-expressions 20 years ago (they continue to say it, it's just nobody takes
them seriously)

While I think JOSE isn't quite as doomed as SPKI and canonica S-expressions
(I still have a strong preference for the latter, given those choices), I
don't share your sense of inevitability. Where JSON had obvious, immediate
benefits over XMl, those benefits are not as clear versus ASN.1 DER. In
fact, it seems like something of a step backward, as the standard is both
less compact and can't represent the full range of types which ASN.1 can.

JOSE is reviled by practically every security peson I respect, for the
inclusion of junk crypto and numerous other design flaws.

CBOR is also growing with the IoT and is an excellent choice for modern
> constrained encoding.

CBOR is slightly more tolerable in that it is more conpact and can express
a wider range of types. That said, it is orthogonal to JOSE in that JOSE
cannot express the same range of types, nor can documents be transcoded
between the formats while retaining canonical content hashes.