Skip to content

The goal of this POC is to implement an autonomous garden sharing organization with a Zero Knowledge Proof system

License

Notifications You must be signed in to change notification settings

AymericNoel/POC_OCTO_ZKP

Repository files navigation

Zero Knowledge Proof for garden rental

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

About The Project

This project aims to use Zero Knowledge Proof protocol to implement a Two Factor Authentication on blockchain.

How does it work?

Users of the site store the hash of their password onchain, then when they perform sensitive operations such as withdrawing ethers from the smart contract, they have to provide the ZKP proof that they know the pre-image of the hash and thus their password. This way, even if a dishonest person manages to steal a user's ethereum private key, the thief will not be able to perform sensitive operations.


A complete and detailed description of how the application works can be found here, thanks to rich sequence diagrams.


HomePage

websiteProof

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

You need to have node and npm installed on your computer.

  • Node
    You can download node from the official website.

  • Npm

    npm install npm@latest -g

Installation

  1. Clone the repo
    git clone https://github.com/AymericNoel/POC_OCTO_ZKP.git
  2. Install NPM packages
    npm install
  3. Setup Zero Knowledge Proof locally
    npm run setup:zkp
  4. Compile smart contracts locally
    npm run compile

Run locally

  1. Open a new terminal and launch ganache-cli
    npm run ganache
  2. Put your ethereum addresses as administrators in migration file in order to validate gardens
  3. Deploy the smart contracts locally on ganache on the first terminal
    npm run migrate:ganache
  4. Run website locally
    npm start

Run locally

  1. Create .env file at the root of the repo with your mnemonic and your infura api key :

    MNEMONIC = ""

    INFURAY_KEY = ""

  2. Put your ethereum addresses as administrators in migration file in order to validate gardens
  3. Deploy the smart contracts on Rinkeby
    npm run migrate:rinkeby
  4. Run website locally
    npm start

Tests

  1. Open a new terminal and launch ganache-cli
    npm run ganache
  2. Run tests of smart contracts on the first terminal
    npm run test:sol
  3. Run tests of website
    npm run test:js

Usage

Use this website to make decentralized garden rentals. A minimum number of administrators must however be defined when deploying smart contracts in order to verify the existence of the different gardens. Any owner can add his garden anonymously and any tenant can rent anonymously too.

A demo can be found here : https://zeroknowledgegarden.surge.sh

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Aymeric NOEL - [email protected]

Project Link : https://github.com/AymericNoel/POC_OCTO_ZKP

About

The goal of this POC is to implement an autonomous garden sharing organization with a Zero Knowledge Proof system

Resources

License

Stars

Watchers

Forks