Re: Question regarding JSON-LD canonicalization

On 10/19/20 4:11 PM, Kyle Den Hartog wrote:
> From the looks of it the data normalization algorithm may need some work
> in that implementation as well. Take a look through this issue[1]
> because it looks like the implementation of the URDNA2015 algorithm and
> URGNA2012 algorithm weren't working last year and the changelog mentions
> nothing about patching it yet.
> 
> [1] https://github.com/jsonld-java/jsonld-java/issues/249

Some other breadcrumbs:

JSON-LD 1.1 Java implementation:

https://github.com/filip26/titanium-json-ld

Issue about canonicalization:

https://github.com/filip26/titanium-json-ld/issues/84

Which links to a Java implementation of URDNA2015:

https://github.com/simon-greatrix/rdf-urdna

It looks like the license hasn't been expressed yet. You may want to
ping someone on that issue about any updates.

> 
> On Tue, Oct 20, 2020 at 9:05 AM Charles E. Lehner
> <charles.lehner@spruceid.com <mailto:charles.lehner@spruceid.com>> wrote:
> 
>     Hi Andreas,
> 
>     The RDFDataSet must be serialized as a N-Quads document
>     (https://www.w3.org/TR/n-quads/).
> 
>     jsonld-java appears to have a method for that, RDFDatasetUtils.toNQuads:
>     https://github.com/jsonld-java/jsonld-java/blob/master/core/src/main/java/com/github/jsonldjava/core/RDFDatasetUtils.java
> 
>     Then you hash the results, as Orie referenced.
> 
>     Regards,
> 
>     Charles E. Lehner
> 
>     Spruce Systems, Inc.
> 
>     On Mon, 19 Oct 2020 14:33:06 -0500
>     Orie Steele <orie@transmute.industries> wrote:
> 
>     >
>     https://github.com/digitalbazaar/jsonld-signatures/blob/e3f7c1209f2adc0d3b9171083f98785d7a1d180d/lib/suites/LinkedDataSignature.js#L111
>     >
>     >
>     https://github.com/digitalbazaar/jsonld-signatures/blob/e3f7c1209f2adc0d3b9171083f98785d7a1d180d/lib/suites/LinkedDataSignature.js#L213
>     >
>     > See also the spec:
>     > https://w3c-ccg.github.io/ld-proofs/#create-verify-hash-algorithm
>     >
>     > Regards,
>     >
>     > OS
>     >
>     > On Mon, Oct 19, 2020 at 2:30 PM Andreas Kuehne
>     <kuehne@trustable.de <mailto:kuehne@trustable.de>>
>     > wrote:
>     >
>     > > Hi experts,
>     > >
>     > >
>     > >  I would like to canonicalize a JSON-LD as a preparation for a
>     > > signature creation.
>     > >
>     > > Using jsonld-java and applied normalize() using URDNA2015. But the
>     > > output is not a byte array (ready for hashing) but a RDFDataSet.
>     > > What's the next step to retrieve a hashable byte array?
>     > >
>     > >
>     > > Greetings,
>     > >
>     > >
>     > > Andreas
>     > >
>     > > --
>     > > Andreas Kühne
>     > >
>     > > Chair of OASIS DSS-X
>     > >
>     > > phone: +49 177 293 24 97
>     > > mailto: kuehne@trustable.de <mailto:kuehne@trustable.de>
>     > >
>     > >
>     > > Trustable solutions UG (haftungsbeschränkt), Gartenheimstr. 39C,
>     > > 30659 Hannover, Amtsgericht Hannover HRB 219338
>     > >
>     > > Trustable Ltd. Niederlassung Deutschland, Gartenheimstr. 39C, 30659
>     > > Hannover, Amtsgericht Hannover HRB 212612
>     > >
>     > > Company UK Company No: 5218868 Registered in England and Wales
>     > >
>     > >
>     > >
>     > > 
>     >
> 
> 
> This communication, including any attachments, is confidential. If you are not the intended recipient, you should not read it - please contact me immediately, destroy it, and do not copy or use any part of this communication or disclose anything about it. Thank you. Please note that this communication does not designate an information system for the purposes of the Electronic Transactions Act 2002.
> 


-- 
Dave Longley
CTO
Digital Bazaar, Inc.

Received on Monday, 19 October 2020 20:20:59 UTC