Skip to content

Rust SSI library that helps developers handle Digital Identity, Verifiable Credentials and Verifiable Presentations.

License

Notifications You must be signed in to change notification settings

knox-networks/ssi

Repository files navigation

Self Sovereign Identity

This repository contains the set of libraries and tools for integrating digital identity (self sovereign identitiy) into services and applications.

There are three crates which are re-exported under the ssi crate:

  • ssi-core - Verifiable Credentials, DidDocuments, etc.
  • signature - Cryptographic Suites, Key Management, etc.
  • registry_resolver - Client implementation of knox DID Registry Resolver

Requirements

At the moment we make no promise to support anything but the latest version of Rust. Current minimum version of rust (MVR): 1.74

The following are the minimum requirements for building and running the ssi library and its test

  • Rust
  • Protofetch

You can install Rust by following the instructions at https://www.rust-lang.org/tools/install. After that has been installed and configured, you can install protofetch by running cargo install protofetch.

Once you have installed the above, you can run the following command to download the protos necessary to use register_resolver

(cd registry_resolver && protofetch fetch)

Once you have followed the instructions above, you can build the library from the workspace root by running cargo build.

Library Usage

You can utilize ssi by importing it via GitHub through the main branch. At the moment the crate is not published on crates.io

ssi = { git = "https://github.com/knox-networks/ssi", branch = "main" }

Tests

There are two kinds of tests in this repository used to assure correctness: unit and spec adherence tests.

Running Tests

The tests can be run without any previous pre-configuration or pre-installation through the standard cargo command.

Unit Tests

The tests can be run through the standard cargo command. The unit tests guarantee the correctness of the abstractions and logical structure of the library. However, they cannot verify the crypgraphic correctness of the library. For that, we have spec adherence tests.

cargo test

Spec Adherence

The spec adherance tests guarantee the correctness of the structure and context of the Verifiable Credentials and Presentations generated by the library. They also guarantee the cryptographic correctness of the cryptographic suites used by the library. This is done through the usage of the Verifiable Credentials Spec Test Suite & Data Integrity Test Vectors.

Running VC Data Model Test Suite

Look at .github/workflows/vc_model_spec_test.yaml for a complete reference on how to run the test suite.

Running Data Integrity Test Vectors

Look at .github/workflows/data_integrity_spec_test.yaml for a complete reference on how to run the test vectors.

FFI Tests

cargo make ffi-test

FFI

In order to build and run the FFI examples you will need to have the following installed:

cargo install --force cargo-make

We also need to add the appropriate targets to be run in various architectures and build artifacts accordingly.

rustup target add aarch64-apple-ios  (iOS devices)
rustup target add x86_64-apple-ios (iOS simulator for Swift unit tests)
rustup target add aarch64-apple-darwin (iOS simluator for Flutter unit tests)
cargo build --release --target aarch64-apple-ios --package ssi-ffi
cargo build --release --target x86_64-apple-ios --package ssi-ffi
cargo build --release --target aarch64-apple-darwin --package ssi-ffi

License

The Knox SSI library is licensed under the Apache License

About

Rust SSI library that helps developers handle Digital Identity, Verifiable Credentials and Verifiable Presentations.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published