digitalbazaar / data-integrity

Data Integrity Proof library for use with jsonld-signatures.
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Add core data integrity functions for reuse in data integrity cryptosuites #10

Open dlongley opened 1 year ago

dlongley commented 1 year ago

Core functions should be extracted from jsonld-signatures and provided as exports in this package for use in cryptosuites. Then the jsonld-signatures package could potentially be deprecated, relying instead on a simpler compositional interface and reuse of core transformation functions instead of OOP classes / design for cryptosuites.

dlongley commented 11 months ago

There are some other issues for some basic APIs (#14, #15, #16), but we should also consider having any common transforms provided here for reuse by cryptosuites. If it turns out that those are best left to the cryptosuites, we can omit them.

dlongley commented 11 months ago

In order to reduce somewhat semi-circular dependencies / the need for peer dependencies on this library by cryptosuite libs, we could create a separate library for data integrity primitive functions that suites will call -- and have this library just provide the basic add proof / verify proof / derive proof, etc. higher order functions. Then the creation of a suite will be through the individual cryptosuites: createSuite() ... and the suite will be passed to this library's higher order functions.