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

Re: Note on JSON signing

From: Melvin Carvalho <melvincarvalho@gmail.com>
Date: Mon, 14 Mar 2016 21:27:56 +0100
Message-ID: <CAKaEYhKvvaaON+K6pJ0-gNDoWOXa9Q11wmArGPCqPfpOtf2NsQ@mail.gmail.com>
To: Stefan Thomas <stefan@ripple.com>
Cc: Dave Longley <dlongley@digitalbazaar.com>, Shane McCarron <shane@spec-ops.io>, Adrian Hope-Bailie <adrian@hopebailie.com>, Jehan Tremback <jehan.tremback@gmail.com>, Anders Rundgren <anders.rundgren.net@gmail.com>, Interledger Community Group <public-interledger@w3.org>
On 14 March 2016 at 21:01, Stefan Thomas <stefan@ripple.com> wrote:

> @Dave: Thanks for the link. Can you explain the relationship between
> Secure Messaging 1.0 [1] and Linked Data Signatures? That was one of the
> things I was confused about.
>
> @Melvin: I'm working on an email to provide more detail as to why I didn't
> think Secure Messaging would be a good solution. You say that you've used
> it, if you could link me to your implementation that would help. (I found
> an implementation for Linked Data Signatures [2], but not Secure Messaging.)
>

OK, sorry, didnt realize you had yet to reply.  I saw you reply to some
others, and thought my response didnt get thru.

Normalization is really easy, its in the json ld npm library:

// normalize a document using the RDF Dataset Normalization Algorithm
// (URDNA2015), see: http://json-ld.github.io/normalization/spec/
jsonld.normalize(doc, {
  algorithm: 'URDNA2015',
  format: 'application/nquads'
}, function(err, normalized) {
  // normalized is a string that is a canonical representation of the document
  // that can be used for hashing, comparison, etc.
});

https://www.npmjs.com/package/jsonld




>
> [1]
> https://web-payments.org/specs/source/secure-messaging/#message-signature-algorithm
> [2] https://github.com/digitalbazaar/jsonld-signatures
>
> On Mon, Mar 14, 2016 at 12:48 PM, Dave Longley <dlongley@digitalbazaar.com
> > wrote:
>
>> On 03/14/2016 02:47 PM, Shane McCarron wrote:
>>
>>> Hmm - Melvin, do you have a pointer to the normalize spec?  Sorry -
>>> there are a lot of specs flying around.
>>>
>>
>> This is RDF Dataset Normalization (Canonicalization):
>>
>> https://json-ld.github.io/normalization/spec/
>>
>> This is Linked Data Signatures, which uses it:
>>
>> https://web-payments.org/specs/source/ld-signatures/
>>
>>
>> --
>> Dave Longley
>> CTO
>> Digital Bazaar, Inc.
>> http://digitalbazaar.com
>>
>
>
Received on Monday, 14 March 2016 20:28:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 14 March 2016 20:28:26 UTC