OpenAttestationMerkleProofSignature2018

This specification defines the proof format used in OpenAttestation V3 Verifiable Credentials, which features a lossy progressive selective redaction scheme compatible with W3C Verifiable Credentials.

Introduction

Selective redaction is a desirable property of verifiable credentials. OpenAttestation implements a lossy progressive selective redaction scheme, which allows it to be used in applications where a verifiable credential is passed along a chain of multiple verifiers and where privacy and data minimization techniques are desired and/or required.

OpenAttestation

OpenAttestation is an open-source framework for implementing verifiable credentials. It has been used in production since 2018. OpenAttestation has been implemented:

Use Cases and Requirements

Terminology

Placeholder for any new terminology that needs to be introduced.

Raw Document

...

Document Store

...

Producing

Wrapping

To generate an OpenAttestationMerkleProof2018 signature, the raw document first goes through a process we call [= wrapping =]. In this process, salts are generated for every property of the credential object in order to prevent rainbow table attack. They are then flattened and encoded as a string and embedded in proof.salts (see example).

Once the [= rawDocument/raw document =] has been salted, each field will be hashed with the value and salt. The output hashes will then be sorted and stored in an array.

Finally, with the array of sorted hashes, the stringified array is hashed again and embedded in proof.targetHash and proof.merkleRoot (same if only 1 raw document is wrapped at a time).

Issuance

To issue an OpenAttestation Verifiable Credential, the proof.merkleRoot is signed with the Decentralised Identifier (DID) of the issuer and embedded in the proof.proofs property of the Verifiable Credential.

Cryptography Suites and Libraries

The OpenAttestation implementation of the algorithm described above uses the keccak256 hash to transform properties into the targetHash, and ECDSA with Secp256k1 to sign the targetHash. However, the algorithm is not permanently tied to these cryptography suites. In the event that they fall to new attacks and technology advances, this specification will be updated to upgrade the cryptography suites used.

Redacting

To obfuscate a property in the OpenAttestation Verifiable Credential, the key-value pair is hashed and the resulting hash is stored in the privacy.obfuscatedData property. The obfuscated object is removed. This method can be used to obfuscate multiple key-value pairs in the credential.

Obfuscation does not invalidate the proof property as the targetHash is computed over all hashed key-value pairs in the credential.

Verifying

To verify the integrity of the document, the verifier computes the targetHash via the same process in [= producing/Producing =], namely by hashing individual key-value pairs, appending and sorting the hashes of the individual key-value pairs with the hashes from privacy.obfuscatedData, and computing the targetHash from the array of sorted hashes. The verifier then checks that the computed hash matches the targetHash. Where the targetHash is signed with the issuer's DID, the verifier utilises the DID verification method to verify the signature.

Examples

Certificate of Origin

...