This document outlines the design of integrating W3C VC data model compliant AnonCreds credentials into Aries Framework JavaScript and Bifold.
Opportunity: https://marketplace.digital.gov.bc.ca/opportunities/code-with-us/6f08d6d5-7e3d-489a-a98f-d7c607309dc9
The following lists all the planned changes and areas of complexities we see in Aries Framework JavaScript.
Overview: The first step will be to update AFJ to store all credentials in the new W3C format and not break current flows.
Next, we will focus on issuing credentials in the W3C format using the W3C Verifiable Credential Data Integrity Attachment format. The third step is to allow requesting and presenting presentations of verifiable credentials (anoncredsvc-2023
) in W3C format. After creating a release in AFJ containing the previously mentioned changes, during the last part, we will update Bifold's AFJ version and integrate the newly created functionality.
The implementation parts are driven by test vectors defined in this Github repo.
Issuance of W3C credentials with an AnonCreds signature are handled using the new W3C Verifiable Credential Data Integrity Attachment format.
The DataIntegrity attachment implementation will be part of AFJ's core. For simplicity reasons, we may keep the implementation in the anoncreds package for now. Otherwise, we need to create a way to dynamically register the link-secret binding method, which requires dependencies that are not a part of the core, or move the required dependencies to the core.
A credential using the new attachment format can be issued in AFJ like this:
Presentation of W3C credentials with an AnonCreds signature is handled using Aries RFC 0510: Presentation-Exchange Attachment format for requesting and presenting proofs
The base integration of PEX has already been completed an is merged into AFJ main on January 10th 2024. Updates are now being made to the implementation in AFJ, as well as the Sphereon PEX library to support the new DataIntegrityProof
and di_vc
proof formats as described here and in the test vectors.
Selective disclosure and predicates will are handled by the AnonCreds RS implementation.
A proof request is handled like this in AFJ:
The bifold work consists of integrating the added features from AFJ and adding support for rendering W3C and DIF PE models.
The implementation in AFJ is based on the defined test vectors in https://github.com/TimoGlastra/anoncreds-w3c-test-vectors