Coder Social home page Coder Social logo

filip26 / iron-eddsa-rdfc-2022 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 135 KB

Data Integrity EdDSA RDFC 2022 Cryptosuite

Home Page: https://apicatalog.com

License: Apache License 2.0

Java 100.00%
eddsa verifiable-credentials credentials-issuer credentials-verification java

iron-eddsa-rdfc-2022's Introduction

Iron EdDSA RDFC 2022 Signature Suite

An implementation of the W3C EdDSA RDFC 2022 in Java.

Java 17 CI Android (Java 8) CI Codacy Badge Codacy Badge Maven Central License

Features

Installation

Maven

Java 17+

<dependency>
    <groupId>com.apicatalog</groupId>
    <artifactId>iron-eddsa-rdfc-2022</artifactId>
    <version>0.14.0</version>
</dependency>

<dependency>
    <groupId>com.apicatalog</groupId>
    <artifactId>iron-verifiable-credentials</artifactId>
    <version>0.14.0</version>
</dependency>

Gradle

Android 12+ (API Level >=31)

implementation("com.apicatalog:iron-eddsa-rdfc-2022-jre8:0.14.0")
implementation("com.apicatalog:iron-verifiable-credentials-jre8:0.14.0")

Usage

Verifier

// create a new verifier instance
static Verifier VERIFIER = Verifier.with(new EdDSASignature2022())
    // options
    .loader(...)
    .statusValidator(...)
    .subjectValidator(...);

try {
  // verify the given input proof(s)
  var verifiable = VERIFIER.verify(credential|presentation);
  
  // or with runtime parameters e.g. domain, challenge, etc.
  var verifiable = VERIFIER.verify(credential|presentation, parameters);
  
  // get verified details
  verifiable.subject()
  verifiable.id()
  verifiable.type()
  // ...
  
} catch (VerificationError | DocumentError e) {
  ...
}

Issuer

// create a signature suite static instance
static SignatureSuite SUITE = new EdDSASignature2022();

// create a new issuer instance
Issuer ISSUER = SUITE.createIssuer(keyPairProvider)
  // options
  .loader(...);
    
try {
  // create a new proof draft
  var proofDraft = SUITE.createDraft(verificationMethod, purpose);
  // set custom options
  proofDraft.created(...);
  proofDraft.domain(...);
  ...

  // issue a new verifiable, i.e. sign the input and add a new proof
  var verifiable = ISSUER.sign(credential|presentation, proofDraft).compacted();
  
} catch (SigningError | DocumentError e) {
  ...
}

Documentation

javadoc

Contributing

All PR's welcome!

Building

Fork and clone the project repository.

Java 17

> cd iron-eddsa-rdfc-2022
> mvn clean package

Java 8

> cd iron-eddsa-rdfc-2022
> mvn -f pom_jre8.xml clean package

Resources

Sponsors

Commercial Support

Commercial support is available at [email protected]

iron-eddsa-rdfc-2022's People

Contributors

dependabot[bot] avatar filip26 avatar

Watchers

 avatar  avatar

iron-eddsa-rdfc-2022's Issues

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.