Giter VIP home page Giter VIP logo

zksalary's Introduction

Advisors: Nguyen Duy Hieu, Nguyen Anh Khoa

zkSalary: A Privacy-Preserving System for Salary Verification Using zk-SNARK

The zkSalary system provides a secure, transparent and privacy-enhancing solution for both employers and employees without revealing sensitive salary details during the verification process. The proofs can be generated within a few seconds and succint to transfer to the verifier via plaintext or QR code. You can read a detail report here.

System Architecture

System Architecture

The zkSalary system consists of three parties:

  • Employer's server: This is where to store the payrolls and generate zk-SNARK proofs. Each server should be owned by only one employer in order to keep its payroll's secrecy.
  • Employee's app: Employees use this app to create proof request and receive proof from employer's server. This application requires user authentication to verify the validity of the proof request (preventing unauthorized proof generation).
  • Verifier's app: This application is used by verifiers to verify the proof sent by an employee. It does not require user authentication from verifiers, since there is no harm if a proof is verified by someone inadvertently.

System Workflow

First, (1) the HR Manager of the employer pushs payrolls to Employer's Server. Then, (2) Employer's Server builds a Merkle Tree for this payrolls and publishes the Merkle root to public, allows any party to use this root for verification processes. Whenever an employee need a salary proof for verification, (3) she logs in to the Employee's App, then submits a proof request which is a form containing two values called $lowerbound$ and $upperbound$. (4) The proof request is then sent to Employer's Server. In Employer's Server, (5) it checks the validity of this request, then generates a zk-SNARK proof which is sent back to the Employee's App. At this step, (6) the proof is sent back to the employee via QR code for convenience. With the proof in hand, (7) she can come to any verifier and shows him the proof for verification. Then, (8) the verifier uses his own app to scan the QR code and verify the proof. After verifying the validity of the proof, (9) the app compares the Merkle root in the proof with the Merkle root of this employer which can be found in public. Finally, (10) the Verifier's App returns Accept or Reject status, together with some public data such as Employee's name, lowerbound, upperbound and the Merkle root.

Demo

Link video demo

Setup

Install all dependencies by npm install.

Start the front-end server (in port 3000):

npm start

Run the back-end server (in port 8000):

cd file-server
node index.js

The live server will be hosted at http://localhost:3000!

zksalary's People

Contributors

haopham23 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.