Code Monkey home page Code Monkey logo

identity.rs's Introduction

banner

StackExchange Discord Discord Apache 2.0 license Dependencies Coverage Status

IntroductionBindingsDocumentation & ResourcesGetting StartedExampleRoadmapContributing


Introduction

IOTA Identity is a Rust implementation of decentralized digital identity, also known as Self-Sovereign Identity (SSI). It implements standards such as the W3C Decentralized Identifiers (DID) and Verifiable Credentials and the DIF DIDComm Messaging specifications alongside supporting methods. This framework can be used to create and authenticate digital identities, creating a trusted connection and sharing verifiable information, establishing trust in the digital world.

The individual libraries are developed to be agnostic about the utilized Distributed Ledger Technology (DLT), with the exception of the IOTA integration and higher level libraries. Written in stable Rust, it has strong guarantees of memory safety and process integrity while maintaining exceptional performance.

⚠️ WARNING #1 ⚠️

The Framework only works on the Chrysalis Phase 2 network, use v0.2 or older for pre-chrysalis phase 2 networks.

⚠️ WARNING #2 ⚠️

This library is currently in its alpha stage and under development and might undergo large changes! Until a formal third-party security audit has taken place, the IOTA Foundation makes no guarantees to the fitness of this library. As such, it is to be seen as experimental and not ready for real-world applications. Nevertheless, we are very interested in feedback about user experience, design and implementation, and encourage you to reach out with any concerns or suggestions you may have.

Bindings

Foreign Function Interface (FFI) Bindings of this Rust library to other programming languages are a work in progress (see Roadmap below). Currently available bindings are:

Documentation and Resources

Getting Started

If you want to include IOTA Identity in your project, simply add it as a dependency in your cargo.toml:

[dependencies]
identity = { git = "https://github.com/iotaledger/identity.rs", branch = "main"}

To try out the examples, you can also do this:

  1. Clone the repository, e.g. through git clone https://github.com/iotaledger/identity.rs
  2. Build the repository with cargo build
  3. Run your first example using cargo run --example getting_started

If you would like to build the API Reference yourself from source, you can do so using:

cargo doc --document-private-items --no-deps --open

Example: Creating an Identity

Cargo.toml

[package]
name = "iota_identity_example"
version = "1.0.0"
edition = "2018"

[dependencies]
identity = { git = "https://github.com/iotaledger/identity.rs", branch = "main"}
smol = { version = "0.1", features = ["tokio02"] }
smol-potat = { version = "0.3" }

main.rs

use identity::crypto::KeyPair;
use identity::iota::{Client, Document, Network, Result, TangleRef};

#[smol_potat::main] // Using this allows us to have an async main function.
async fn main() -> Result<()> {

  // Create a DID Document (an identity).
  let keypair: KeyPair = KeyPair::new_ed25519()?;
  let mut document: Document = Document::from_keypair(&keypair)?;

  // Sign the DID Document with the default authentication key.
  document.sign(keypair.secret())?;

  // Create a client to interact with the IOTA Tangle.
  let client: Client = Client::new()?;

  // Use the client to publish the DID Document to the IOTA Tangle.
  document.publish(&client).await?;

  // Print the DID Document IOTA transaction link.
  let network: Network = document.id().into();
  let explore: String = format!("{}/transaction/{}", network.explorer_url(), document.message_id());
  println!("DID Document Transaction > {}", explore);

  Ok(())
}

Example output

DID Document Transaction > https://explorer.iota.org/mainnet/transaction/YARETIQBJLER9BC9U9MOAXEBWVIHXYRMJAYFQSJDCPQXXWSEKQOFKGFMXYCNXPLTRAYQZTCLJJRXZ9999

The output link points towards the DID Document transaction, viewable through the IOTA Tangle Explorer, see here. You can see the full DID Document as transaction payload.

Roadmap and Milestones

For detailed development progress, see also the IOTA Identity development canban board.

IOTA Identity is in heavy development, and will naturally change as it matures and people use it. The chart below isn't meant to be exhaustive, but rather helps to give an idea for some of the areas of development and their relative completion:

Basic Framework

Feature Not started In Research In Development Done Notes
DID Document Manager ✔️ Finished implementation.
IOTA Integration ✔️ Finished implementation.
Resolver ✔️ Finished implementation.
Stronghold Integration 🔶 Basically done, mostly testing right now.
DID Comms 🔶 Partially done.
Verifiable Credentials ✔️ Finished implementation.
VC Comms 🔶
Schema Validation 🔶
C FFI Bindings 🔶
JavaScript FFI Bindings 🔶 Initial implementation done.
WASM Bindings 🔶
Code Examples 🔶 Working on more exhaustive examples.
API Reference 🔶
mdBook Documentation 🔶

Extended Features (2021+)

Feature Not started In Research In Development Done Notes
Mobile App Wrapper 🔶
VC Standardization 🔶 Needs quite a bit of research.
Identity Agent 🔶
Pairwise DID 🔶
Zero-Knowledge Proofs 🔶
Trust Fabric 🔶
eID Integrations 🔶
IoT Reputation System 🔶
Identity for Objects 🔶

Planned Milestones

At the current state, the framework is in alpha. As the framework matures we expect to support more and more types of applications. We recommend no use in real-world applications until the consumed libraries are audited, but experimentation and Proof-of-Concept projects are encouraged at the different stages.

Milestone Topic Completion Notes
1:heavy_check_mark: DID Q4 2020 As the DID standard is implemented and the IOTA ledger is integrated first experimentations are possible. DIDs can be created, updated and ownership can be proven. This allows simple experimentations where ownership of an identity is the main requirement.
2:heavy_check_mark: VCs Q4 2020 With the Verifiable Credentials standard implemented, not only ownership can be proven, but also other attributes. At this stage PoCs are possible similarly to Selv. However, the communications between actors are not yet implemented, identities are not easily recognized nor are credential layouts standardized. Real-world applications are possible at this stage (after audit), but require extra effort.
3:large_orange_diamond: DID Comms Q1 2021 Once the communications between DID actors have been implemented, any application using identity can communicate out-of-the-box in an interoperable manner. This makes applications easier to develop, yet as mentioned in Milestone 2, identities are still not easily recognized nor are the credential layouts standarized. Real-world applications are therefore easier to develop (after audit), but scaling the application outside of a consortium is difficult.
4+ TBD TBD TBD

Contributing

We would love to have you help us with the development of IOTA Identity. Each and every contribution is greatly valued!

To contribute directly to the repository, simply fork the project, push your changes to your fork and create a pull request to get them included!

The best place to get involved in discussions about this framework or to look for support at is the #identity-discussion channel on the IOTA Discord. You can also ask questions on our Stack Exchange.

identity.rs's People

Contributors

tensor-programming avatar l1h3r avatar huhn511 avatar thoralf-m avatar depplearning avatar rajivshah3 avatar aconitin avatar marcianos avatar nothingismagick 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.