Polygon Id

Abstract
Year2022
Link to the paperhttps://0xpolygonid.github.io/tutorials/
Relevance scoreVery relevant
Quality score5
LabelsManagement of credentialsPermissionlessPossible tool in larger solutionSmart Contracts instead of oracles

Polygon Id aims to build a service that allows Issuers to issue claims about Users (including themselves) in a way that Users can prove properties about these claims (in zero-knowledge) to a Verifier.

Disclaimer: Polygon Id aims to be a framework for projects that need to deal with Id functionalities. It does not aim to be a fully functioning Id ecosystem as other projects we have reviewed (Sismo, Interep, Keybase, etc.)

Concepts and Methods

Claim

A claim is a private tuple of the form

Claim = (User Id, Schema, Data, Metadata)\text{Claim = (User Id, Schema, Data, Metadata)}

Example: A university could issue a claim of the form (Student Id, Diploma, [Title of degree, transcript, etc], [Univeristy address, University contact info., etc.])\text{(Student Id, Diploma, [Title of degree, transcript, etc], [Univeristy address, University contact info., etc.])}

Claims are supposed to remain private: only the Issuer and the User receiving the claim should know its contents. Additionally, the Issuer should loose all control and traceability of the claim once issued.

Identity

Polygon Id is somewhat more abstract than other related projects from this survey. It uses the concept of Identity. An entity is either an Issuer or a Holder. These two types of entities are captured by the same abstract functionality.

An Identity stores and creates claims about itself or other Identities. Importantly, an Identity stores at least one claim involving its private key. Such a claim, which we call Key Claim has the form:

Key Claim = (Identity Id, Private key schema, actual private key)\text{Key Claim = (Identity Id, Private key schema, actual private key)}

In more detail: The User Id of the claim is the Identity’s Id. The schema of the claim is “Private key schema” (for simplicity, we think of this as just some type of context information that tells us that the claim is about the Identity’s private key), and the data field of the claim contains the Identity’s private key for Polygon Id’s system.

Identities have Identity states. The Identity state is the hash of the concatenation of the roots of three Merkle Trees (MT). These trees are: the Claims MT, the Revocation MT, and the Roots MT. Below is a depiction of an Identity state.

Source: Own fabrication.

The Claims MT is the Merkle Tree of all the identity’s claims. This tree is private. The Revocation MT allows for revocating claims. The whole tree is public. The Roots MT allows proving statements about claims that were valid at some point in the past. Again, this tree is public.

Polygon Id proposes storing the two public MT’s in an HTTPS address or an IPFS link.

Identity states are posted on the blockchain by the Identity, and become associated to a timestamp.

Every time there is a change in the Identity state, the Identity updates its state on the blockchain.

A smart contract in the blockchain verifies that Identity state transitions (i.e., the update of one Id state into a new one) are performed according to some rules. The verification is a Groth16 verification.

Some examples of possible rules are:

Next we present the most basic Issuing, Proving, and Verifying methods in Polygon Id. Later we will discuss some extensions.

Issuing claims (credentials)

Here we describe how an Issuer (which we call Id1) may issue a Claim for a Holder (called Id2).

Concretely, for Id1 (Issuer) to issue a Claim CC for Id2 (Holder), what Id1 does is to send Claim CC to Id2 together with the Merkle Proof that CC is in the Claims Merkle Tree of Id1. The latter, Id1, also sings Claim CC and sends the resulting signature SS to Id2, together with a proof that the signature has been generated using Id1’s private key (i.e. the key stored in Id1’s “Key Claim”).

To enable more advanced functionality, Id1 may send some extra data to Id2.

(Note, in principle, it is not necessary to send a proof of such signature since Id1 is supposed to update its Id State on the blockchain, and to do so it has to prove that it knows its private key (i.e. Id1’s private key), so Id1 is implicitly signing Claim CC at that point. However, it could happen that Id1 takes a long time to update the state —in this case, Id2 would still be able to prove statements about Claim CC in a trustworthy manner)

Proof and Verification

Now Id2 (Holder) can use a zk-SNARK to prove in zero-knowledge that:

The Verifier checks the validity of such proof.

Extra features

The Revocation Tree and the Roots Tree provide some convenient functionality:

Revocation of claims

Each claim contains a metadata piece of info, a “Revocation Nonce”.

When a Holder creates a proof of a statement about a Claim, it also proves that the Revocation Nonce is not in the Revocation Merkle Tree (Recall that the Revocation Tree is public), and sends such proof to the Verifier.

Temporal proofs

The leafs in the Roots Merkle Tree consist of all the roots of the Claims, Revocation, and Root Merkle Trees of the Identity.

This allows Holders to prove statements about Claims which were true in some past timestamp.

For example, Bob can prove that he got his diploma before a certain timestamp.

The procedure is as before, but now one uses the appropriate Merkle roots stored in the Roots Merkle Trees, which is a public tree, instead of the most current Id state of the Issuer Id1.

(For the Merkle proof, Id2 uses a subpath of the whole Merkle Proof it owns. This subpath ends in the root of the Claims MT at the appropriate time).

Upgradable claims. Claims can be modified. To enable this, claims have a version number in their metadata and a reference to its previous version. To modify a claim, a new claim is added to the Claims MT, with appropriate metadata. All previous versions of the Claim have to be revoked; hence, the Revocation Merkle Tree is updated accordingly.

High-level discussion

The good

The tricky

Polygon Id needs no trust except in the legitimacy of the Issuing Identities, and the way they make sure that their Claims adjust to reality.

For example, I can create an Identity to represent “University A” and start issuing diplomas to random Ethereum addresses (in this case, the Holder’s Id would be their Ethereum address). Note, however, that the credibility of “University A” would be damaged.

Notice that Issuers are forced to update their Identity State according to some state transition rules. Hence, even though it is true that some trust needs to be placed upon Issuers (as mentioned above), a malicious Issuer can damage the system in a limited way.

Note that Polygon Id is not aiming to solve the point above, rather, they expect either:

A possible issue

It can be relatively cheap for an Identity to share claims with another Identity, as long as it is willing to reveal its private key. To mitigate this, one must ensure that the Identity’s private keys are linked to some valuable account or secret.