uPort donates code to the Decentralized Identity Foundation

Pelle Braendgaard
Decentralized Identity Foundation
5 min readNov 4, 2019

TLDR; uPort has donated much of its core libraries to DIF (the Decentralized Identity Foundation). Our goal is to move the needle forward on interoperability in the Decentralized Identity space.

As co-founders of the Decentralized Identity Foundation (DIF), uPort always appreciated the pragmatic approach to healthy cooperation and coopetition found in this industry group.

When new, unproven technology is built, the overhead of standardization mustn’t be too rigid. We and other DIF members all needed to experiment and iterate on both technology and product-market fit.

At DIF, we have always been focused on pragmatic experimentation first and then working with traditional standards organizations with our learnings and experiences.

Today two core standards for Decentralized Identity are close to being complete in the W3C:

Over the last couple of years, we have seen thousands of developers all around the world build POC’s, MVPs, and production applications using our existing libraries.

Our first generation of libraries taught us a lot about use cases, developer usability, and also how to make all of this work. We have now donated most of these core libraries to DIF.

Why are we doing this? We believe passionately in the promise of Decentralized Identities. Donating this code, we hope will encourage more developers to build on top of these standards, and learn together as a community.

As the adoption of this technology is picking up (W3C acceptance of DIDs and VC as global standards), we believe we can help the space move even faster toward large scale adoption.

Verifiable Credentials

Now that the W3C Verifiable Credential spec is mostly complete, we have started moving our entire platform to use these. We wrote our existing libraries based on a simple pre-standard Verifiable Credential format.

Source code example of Creating Verifiable Credentials

Rather than force people to include support for our older format, we created an entirely new clean library did-jwt-vc for interacting with Verifiable Credentials from Javascript and TypeScript.

We wanted to make it easier for people to use this library outside of the context of uPort, so there are no longer any dependencies on any uPort specific did methods.

It has the following features:

  • Creation, signing, and verification of W3C Verifiable Credentials in JWT format
  • Creation, signing and verification W3C Verifiable Presentations in JWT format
  • Uses the javascript universal did-resolver allowing you to plug in any supported did method for validation
  • Supports Web, node, React Native and most other javascript-based environments
  • Currently supports the following signing algorithms (ES256K, ES256K-R, and Ed25519)

DID Resolution

The community has created a plethora of did methods, supporting a wide variety of different blockchains and resolution methods. The developer of the DID method must provide a library to allow 3rd party developers to consume DID’s created with it.

To achieve interoperability between DID methods, it is essential to have a standard interface that did method developers can develop on. At the moment, most method developers have just issued a spec and a library in a specific language.

DIF already has the universal-resolver, which supports server-based DID resolution. The primary use case for these appears to be within institutions, but they don’t help you out for resolving DIDs in mobile or modern web apps.

Last year we created a very simple universal did-resolver library, which allows you as a developer to configure the DID methods you want to resolve and resolve DID’s directly in your local codebase.

We encourage all DID method developers to support this. All you have to do is implement a straightforward resolving function and show developers how to configure it. Doing so allows automated interoperability on the Verifiable Credentials side.

  • Very lightweight typescript library (currently 458 Bytes compressed)
  • DID parser supports full DID spec
  • Optional caching functionality
  • Used by did-jwt-vc and did-jwt for automatic interoperability with Decentralized Identity standards

The most significant problem with an in-browser interface is trusting external code. We are currently planning on addressing this soon within DIF using Secure EcmaScript (SES)

DID Methods

The 2 main DID methods we use at uPort are:

We’ve donated the DID resolver compliant implementations of these to DIF as well.

General-purpose JWT signing and DID based and verification

Finally, JWTs using DIDs have many applications. You can use them in almost all applications where you would traditionally use JWTs. At uPort, we have used them for such things as:

  • Bearer authentication tokens for accessing server resources
  • Requesting Ethereum Transactions
  • Backing up encrypted events

The core library for this is did-jwt, which we have also donated to DIF.

  • Creation and signing of JSON Web Tokens (JWT)
  • Automatic verification of signatures based on public-key resolution of the DID in the iss claim of the JWT.
  • Uses the javascript universal did-resolver allowing you to plug in any supported did method for validation
  • Supports Web, node, React Native and most other javascript-based environments
  • Currently supports the following signing algorithms (ES256K, ES256K-R, and Ed25519)

We encourage any developers requiring other protocols to create Pull Requests.

It does not stop here

We are committed to donating code on an ongoing basis. Over the next months, we will donate several new frameworks and services we are actively developing.

Our goal is to make it easier for developers creating standards-based identity applications. We also hope to make it easy for other Identity method providers to build on the extensive knowledge we’ve built up over the last four years.

Please check out the libraries, develop with the code, join the Decentralized Identity Foundation and contribute Pull Requests.

If you are interested you can subscribe to DIF’s monthly newsletter. Please check out the libraries, develop with the code or you can also join the DIF and support the development of the technical architecture of the decentralized identity space.

Decentralized Identity Technology can be used to create complex ecosystems based on Verifiable Credentials and Self Sovereign Decentralized Identities. Our new EcoSystems Demo app was created to give you an idea of what this could look like.

To learn more about uPort please go here.

--

--

Pelle Braendgaard
Decentralized Identity Foundation

Engineering Lead for uPort. Opinionated about ethereum, bitcoin, payments and financial services.