Skip to content

Reverse Hash Service

The Reverse Hash Service (RHS) is a specialised service designed to facilitate the construction of proofs of existence or non-existence of elements within sparse Merkle trees.

It enables users to perform reverse hash lookups and construct proofs of existence or non-existence of elements without revealing the specific element being proved.

The service helps to bolster privacy when constructing proofs and ensure that valid proofs are only able to be generated if the credential has not been revoked.

To learn more about RHS, please refer to RHS Overview by Iden3, Polygon and RHS Github repo.

graph LR;
    A[Issuer] -->|1. Add node to RHS| B[Reverse Hash Service];
    B -->|3. Get credential status|C[Holder];
    C -->|2. Get revocation status| B;
    C -->|4. Holder generates zkProof| D[Proof];

How RHS is used in Proof by Query

Credential Revocation Status Checks: The RHS is used by the Issuer to publish state related to credentials when issued to Holders The RHS is used by Holders to check the revocation status of their credential(s) Proof generation: The RHS is used by Holders when constructing proofs to help safeguard the privacy of the elements being proven.

Identity States in Proof by Query

In Proof by Query, identities consist of both private and public data (states). Public data should be accessible to everyone, while private data should only be available to the identity owner.


graph BT

    Claims_Tree_Root--> Identity_State;
    Revocation_Tree_Root-->Identity_State;
    Roots_Tree_Root-->Identity_State;
    Claim-->A[/Merkle_Tree\]-->Claims_Tree_Root
    Revocation_Nonce-->B[/Merkle_Tree\]-->Revocation_Tree_Root;
    Claim_Tree_Root-->C[/Merkle_Tree\]-->Roots_Tree_Root;



    style Identity_State fill:#3498db,stroke:#3498db
    style Claim fill:#f06f48,stroke:#f06f48
    style Revocation_Tree_Root fill:#65bf6e,stroke:#65bf6e
    style Claim_Tree_Root fill:#65bf6e,stroke:#65bf6e
    style Roots_Tree_Root fill:#65bf6e,stroke:#65bf6e
    style Claims_Tree_Root fill:#65bf6e,stroke:#65bf6e
    style Revocation_Nonce fill:#65bf6e,stroke:#65bf6e


    style A fill:#f06f48,stroke:#f06f48
    style B fill:#65bf6e,stroke:#65bf6e
    style C fill:#65bf6e,stroke:#65bf6e


graph BT
    subgraph Legend
    Blockchain
    Private
    Public
    end

    style Blockchain fill:#3498db,stroke:#3498db
    style Private fill:#f06f48,stroke:#f06f48
    style Public fill:#65bf6e,stroke:#65bf6e

The public data of an identity includes:

  • The identity state, which is stored on the blockchain.
  • Roots of the identity trees: Claims tree (ClT), Revocation tree (ReT), and Roots tree (RoT).
  • All the nodes of the Revocation tree and Roots tree.

The private data of an identity includes:

  • All the nodes of the Claims tree

The RHS stores the nodes of the sparse Merkle trees (in our case, the CIT/ReT/RoT and identity state).

Connect to the RHS

Use the following URL to connect to the RHS: