W3C home > Mailing lists > Public > public-interledger@w3.org > March 2016

Re: Note on JSON signing

From: Anders Rundgren <anders.rundgren.net@gmail.com>
Date: Mon, 14 Mar 2016 14:01:12 +0100
To: Adrian Hope-Bailie <adrian@hopebailie.com>, Jehan Tremback <jehan.tremback@gmail.com>
Cc: Melvin Carvalho <melvincarvalho@gmail.com>, Stefan Thomas <stefan@ripple.com>, Interledger Community Group <public-interledger@w3.org>
Message-ID: <56E6B618.2070505@gmail.com>
On 2016-03-14 12:27, Adrian Hope-Bailie wrote:
> To verify the signature on some data you need to be able to
 > reproduce the data that was originally signed exactly as it was at that time.
> JSON is problematic because it's not always passed around as a string.
 > Intermediary systems may interpret that string as a Javascript object
 > and then serialize it again as a string when it is sent onward. That process
 > has the potential to change the serialized form of the data (without changing
 > it's meaning) because it is not always serialized in exactly the same way (ordering of fields etc).
> So a valid signature may fail verification against JSON data that has been passed around a bit.


I'm of course aware of that but I also firmly believe that the concept which I call
"Predictive Serialization" is here to stay after its introduction (not the name) in
ES6 (the JavaScript that runs in most browsers).

That is, anybody using such a scheme, be it JCS or something else, should carefully
evaluate the JSON tools available for the intended platform(s).

I made it slightly easier for myself by writing everything from scratch.  This may
sound like a bad idea but since Java doesn't come with a JSON parser it was a no-brainer.
This was also (more or less) necessary for the rather intense development of JCS.

I'm personally trying to speed-up the "acceptance" process for the concept:


IETF's JWS is great for what it was designed for, but maybe not everything else:

Anders Rundgren
Received on Monday, 14 March 2016 13:02:22 UTC

This archive was generated by hypermail 2.3.1 : Monday, 14 March 2016 13:02:22 UTC