ERC-1386 Attestation management contract

Stagnant · Signatures & auth · created 2018-09-08

An interface that lets an issuer contract verify and revoke off-chain signed attestations directly, with a bloom filter allowing multiple attestations to be revoked at once.

Why it is needed

Putting sensitive personal information such as age, residence, or driving eligibility directly on the blockchain breaks privacy, since anyone can view it. Even if a trusted institution issues a signed attestation off-chain, if every issuer uses a different attestation format and verification method, the shop contracts or wallets receiving them must write new verification code for each issuer. Also, when an issuer needs to rotate signing keys or revoke a particular attestation, without a standardized revocation method simply publishing a revocation list can reveal who received which attestation, violating privacy. Recipients of attestations likewise have no common way to confirm that a signer is actually an issuer with that capacity, or that the key has not expired or been revoked, making it impossible to establish trust.

What to implement

In depth

Attestation struct

struct Attestation consists of merklePath (bytes32[]), valid (bool), the signature elements v, r, s, attestor (address), recipient (address), salt (bytes32), key (bytes32), and val (bytes32). It carries a Merkle tree path, enabling leaf proofs that selectively disclose only a specific key-val pair (e.g. an age condition) out of the full attestation.

verify() is implemented individually by each issuer

The specification stipulates that each attestation issuer must provide its own verify() suited to the attestations it issues. There are two reasons: first, to leave room for new attestation schemes beyond the Merkle tree approach, and second, because the validity of an attestation may depend on context known only to the issuer (for example, a ticket attestation issued upon a successful American Express card payment).

Key registration, rotation, and revocation

addattestorKey(newAttestor, capacity, expiry) registers a new issuer key with a given capacity and expiry. replaceKey(attestorToReplace, capacity, expiry, newAttestor) is specified to first revoke the existing key and then replace it with the new one. removeKey(attestor) revokes only a single key.

Confirming capacity with validateKey

validateKey(attestor, capacity) returns true only if the key is registered with that capacity and has not been revoked or expired. This lets a contract receiving an attestation confirm that the signer was actually authorized to issue that kind of attestation.

Batch revocation using a bloom filter

revokeAttestations(Bloomfilter b) builds a bloom filter from the hashes of the attestations to be revoked, revoking multiple attestations at once. Rather than disclosing each attestation individually, replacing them with a bloom filter preserves privacy by avoiding identification of who received which attestation.

Related proposals

This document states that it is related to ERC #1387 and #1388, but the specific relationship is not explained in the body.

Draft status

This proposal is in Stagnant status, and the specification itself is marked as a 'Draft interface'. Since it was written in 2018 it has not progressed further, and its content may change or may never be adopted.

Original ERC · ← ERCs