https://github.com/basileioskal/canonizevulnerability
URDNA2015 Algorithm Vulnerability Examples
https://github.com/basileioskal/canonizevulnerability
Last synced: about 1 year ago
JSON representation
URDNA2015 Algorithm Vulnerability Examples
- Host: GitHub
- URL: https://github.com/basileioskal/canonizevulnerability
- Owner: BasileiosKal
- Created: 2021-07-22T11:11:19.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-04T16:01:00.000Z (almost 5 years ago)
- Last Synced: 2025-02-08T04:21:44.444Z (over 1 year ago)
- Language: JavaScript
- Size: 167 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **Canonicalization Vulnerability**
Three examples of using the canonical blank node labels, produced by the URDNA2015 algorithm,
to get information regarding the non-disclosed messages in a Verifiable Credential.
The examples use a slightly reformed version of the [URDNA2015 algorithm](https://github.com/digitalbazaar/rdf-canonize), that also returns the
reference sets of each blank node along with the final canonicalization result.
To sign, validate and derive a proof of knowledge for each credential, the
[jsonld-signatures-bbs](https://github.com/mattrglobal/jsonld-signatures-bbs)
library is used implemented by [Mattr](https://github.com/mattrglobal).
## Usage
You can run each example by either using the docker image, or by installing the
dependencies locally with yarn.
### **1. With Docker**
From inside each example folder, first, build the docker image by running,
`> docker build --tag example . `
To run the example use,
`> docker run example`
or
`> docker run --rm example`
to automatically remove the created container afterwards.
### **2. With Yarn**
Again from inside each example folder, install all dependencies with,
`> yarn install --frozen-lockfile`
(Note: during the installation, node-pre-gyp package may throw an error. It is optional
dependency, the code should run regardless)
To generate the derived credential (the one the Verifier will receive)
using selective disclosure, use,
`> yarn generate`
Then, to read that credential and search the hidden values, run,
`> yarn search`