TokenScript icon indicating copy to clipboard operation
TokenScript copied to clipboard

Use an XML signing tool which supports Manifest

Open SmartLayer opened this issue 6 years ago • 0 comments

This solves the problems of:

  1. referring to external resources (e.g. big pictures/video) without having to embed base64.
  2. potentially make TokenScript compatible with IPFS.
  3. allowing HTML5 resources (currently only XHTML is allowed).

Background

There are two methods to include data in XMLDSIG. Examples can be found in a book.

Embedding

  1. Put the data in an <Object>, give it an ID.
  2. Create an <Reference> to the ID in the <SignedInfo> element with the URI attribute point to the ID.

Linking

  1. Create an <Manifest> inside an <Object>, with an ID.
  2. Create a <Reference> in the <Manifest> with its URI pointing to an external resource.
  3. Create an <Reference> to the ID in the <SignedInfo> element with the URI attribute point to the ID.

If the included data doesn't need to be signed (we don't have that scenario yet), the final step can be dropped out in both methods.

SmartLayer avatar Dec 13 '19 03:12 SmartLayer