Giter VIP home page Giter VIP logo

pyed25519signature2018's Introduction

PyEd25519Signature2018

A python script that generates an Ed25519Signature2018 JSON-LD proof used for assertions.

Prerequisites

This script assumes python3. Furthermore the following libraries are required:

pip3 install pynacl PyLD

Running

Simple run

python3 signer.py

pyed25519signature2018's People

Contributors

nikosft avatar

Watchers

James Cloos avatar  avatar

Forkers

olibrius

pyed25519signature2018's Issues

Example in singer.py (should this be signer.py? :) ) mixes proof purposes

While just an example (and perhaps not the focus of the example), I thought it was important to note that the proofPurpose used in your example is assertionMethod but the "verification relationship" used in the DID Document to express the verificationMethod is authentication. This is a mismatch that would cause a properly implemented verifier to reject the proof.

The way that "verification relationships" work is that they link a DID subject to a verification method that is authorized for a specific purpose. So, if a proof expresses that it was created for the purpose of "assertionMethod", then a verifier knows to look for the verificationMethod expressed in the proof under the "assertionMethod" property in the DID Document. If the verification method cannot be found under that property, then it is not considered authorized to verify the proof and the verifier must emit an error indicating this.

This mechanism allows verifiers to help provide additional security protections for users -- whereby, for example, if the user has signed a message by attaching a proof with a proofPurpose of assertionMethod, it cannot be misused by an attacker to try and authenticate as the user instead. There's a critical difference between signing a message to "merely make an assertion" and signing a message as a means to authenticate to a service to, for example, establish a session to perform actions you're authorized to do. Ideally, messages themselves help make this distinction, but it is not always the case -- and sometimes encodings can be abused to misrepresent different semantics for the same message payload.

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.