Giter VIP home page Giter VIP logo

did-jwt's Introduction

Selective Disclosure of Virtual Credentials through Hash Functions

Study of the blockchain and JSON Web Token standard to represent W3C Verifiable Credential and to selectively disclose individual claims of the virtual credential.

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

About The Project

This project is based on the following components:

  • JSON Web Token: a standard for representing, decode, verify and generate claims securely between two parties.
  • W3C DIDs and Verifiable Credential: A globally unique persistent identifier that is controlled by users and a data model and representation format for cryptographically-verifiable digital credentials.

Getting Started

The signature algorithms supported by this project to sign and verify credential are:

  • ES256K: ECDSA with the secp256k1 as public key, sha256 as cryptographic hash function, and EcdsaSecp256k1VerificationKey2019 as verification method
  • ES256K-R: ECDSA over secp256k1 with encoded recovery bit and EcdsaSecp256k1RecoveryMethod2020 as verification method
  • EdDSA: EdDSA signature scheme using SHA-512, Curve25519, and Ed25519VerificationKey2018 as verification algorithm

Tha supported hash functions depends on available digest algorithms of the OpenSSL:

  openssl list -digest-algorithms

Prerequisites

This software is written in Javascript and in can be runned using node.js 17. DIDs used in this project belong to the did:ethr method and the can resolved using ethr-did-resolver and ethr-did-registry.

Installation

The steps below are necessary to install and setting up the experiments.

  1. Start a local instance of the blockchain (default: Ganache)
    ganache-cli -m "family dress industry stage bike shrimp replace design author amateur reopen script" -p 9545
  2. Deploy the smart contract registry for DID resolution
    truffle migrate
  3. Install NPM packages
    npm install

Usage

Configure the execution of the program using https://github.com/andreadesalve/DID-JWT/blob/main/src/config.json and run the scripts by using node

node /path/to/script

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Andrea De Salve - [email protected] - http://pages.di.unipi.it/desalve/

Project Link: PISA DISTRIBUTED LEDGER LAB

did-jwt's People

Contributors

andreadesalve avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.