Skip to content

vself-project/vstudio-metabuild

Repository files navigation

Vself NinjaBlack

vStudio: zero-knowledge onboarding

Overview

This repo contains source code of the zero-knowledge proofs vSelf SDK. This serves for privacy preserving onboarding in communities and organizations. The package allows to generate zero-knowledge commitment, generate proof-of-membership without disclosing any personal data, and verify this proof.

Source code is available in /shared-utils

Functionality

  • Owner creates a private community.
  • User generates commitment from public key and random salt.
  • Commitment uses to join the given community.

image

  • Community member generates proof-of-membership & send this proof for a verifier.
  • Verifier checks proof-of-membership & processes the result of verification.

image

Deployment

Package is availible at npm registry.

npm install @vself_project/shared-utils
mimc_hash(bigint left, bigint right) => Commitment
prove_set_membership(Vec<Commitment> set, bigint secret, bigint salt) => MembershipProof
verify_set_membership(Vec<Commitment> set, MembershipProof p) => bool

Demo

The full demo of the private community & proof-of-membership is available in web app.

Smart contract is used for on-chain storage of the community data & manage membership deloyed at communities_v1.sergantche_dev.near

The contact source code is available in vseld-dao & frontend source code in vself-beta

Community management documentation is available here.

Tech stack

We've developed our Rust implementation of non-interactive zero-knowledge proof-of-membership and MiMC hash preimage, compiled it into WebAssembly and published the resulting package to NPM. Biggest thanks to original bulletproof impelemntation of dalek and for great source of R1CS gadget examples by lovesh.

The package source code is availible inside /shared-utils folder, and contains cryptographic building blocks we used for our solution along with automated tests.

Future plans

There are two major improvements we have in mind at the momement for cryptography R&D:

  • Implementing Verkle trie as replacement for commitments accumulator. It allows to scale size of community as proofs would have constant size independent of set size. Bulletproofs use Pedersen commitments as a part of a protocol which makes implementation pretty staightforward.

  • Implementing proof-of-ownership of a public key, which allows to improve the private onboarding usecase & develop new interesting use cases such as designated verifier proofs or consentual airdrops on NEAR as it uses particular curve (Ed25519).