feat(core): W3C VC Data Integrity module#2797
Open
rmlearney-digicatapult wants to merge 22 commits into
Open
Conversation
|
78d9560 to
9645977
Compare
c20f3e9 to
0378d00
Compare
…ng primitives Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
…arrels Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
…et-foundation#2784) Signed-off-by: Fairuz Rahaman Chowdhury <frcshovon@gmail.com> Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
…ion#2599) Signed-off-by: andres vallecilla <andresfelipe083195@hotmail.com> Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
…penwallet-foundation#2798) Signed-off-by: andres vallecilla <andresfelipe083195@hotmail.com> Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
…#2801) Signed-off-by: andres vallecilla <andresfelipe083195@hotmail.com> Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
…2 updates Bumps the non-breaking-updates group with 1 update in the / directory: [cheqd/cheqd-node](https://github.com/cheqd/cheqd-node). Bumps the non-breaking-updates group with 1 update in the /.devcontainer directory: devcontainers/javascript-node. Updates `cheqd/cheqd-node` from 4.2.0 to 4.2.1 - [Release notes](https://github.com/cheqd/cheqd-node/releases) - [Commits](cheqd/cheqd-node@v4.2.0...v4.2.1) Updates `devcontainers/javascript-node` from 4-22-bookworm to 4-24-bookworm --- updated-dependencies: - dependency-name: cheqd/cheqd-node dependency-version: 4.2.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-breaking-updates - dependency-name: devcontainers/javascript-node dependency-version: 4-24-bookworm dependency-type: direct:production dependency-group: non-breaking-updates ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
33bf320 to
d9c27c5
Compare
…ation Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
Signed-off-by: rmlearney-digicatapult <robert.learney@digicatapult.org.uk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new Data Integrity module to core, including proof types, validation, proof processing utilities, cryptosuite registration, proof creation/verification services, and agent/module wiring.
The module provides a standards-aligned foundation for Data Integrity proofs and makes Data Integrity available by default in agent module configuration.
Why
We need a first-class Data Integrity implementation in core so internal (e.g. VC, webvh) and external consumers can:
What’s Included
dateTimeStampchecks including leap year, time zone as required by specThis module was built to be conformant with the https://www.w3.org/TR/vc-data-integrity/ specification while preserving separation of responsibilities between different potential callers. For example, @context validation does not occur within the module as this is the responsibility of the VC service during the post-proof flow.
The cryptosuite is fully conformant with the https://www.w3.org/TR/vc-di-eddsa/#eddsa-jcs-2022 standard and the code is fully enumerated with each specification paragraph and line item implemented and a full test suite.
Opinionated elements
I have implemented Javascript normalisation to drop fields containing
undefined- this is not within the spec but I do not believe that we should be signing overundefinedfieldsWhile power users could access the cryptosuite directly, most services will call via the
W3cDataIntegrityProofService. For this reason some of the strict shape-checks live in the calling service, not the cryptosuite.I have implemented 2 barrels for export -
index.tswhich will be hooked through@credo-ts/coreandinternal.tswhich will be used by internalcredo-tsconsumers by direct import. These contain different exports for protecting internal functionality and avoiding complex ecosystem migrations in future.I have installed
json-canonicalizefor strict JSON canonicalisation as required byeddsa-jcs-2022NB
At the moment this module is not wired externally, only instantiated on the base agent. I have local branches where
webvhis migrated to use this core data integrity module andW3CV2uses this module forDiVpandDiVcsupport. I built these to help shape the implementation and API surface and will push these after merge.