Coder Social home page Coder Social logo

enigma_rubber_hose's Introduction

Nothing Hose

This product is a demo of secret smart contracts on Enigma.

Running

  • yarn install
  • yarn init --> downloads a 16 gb docker file fyi (use software option)
  • yarn compile (compiles rust smart contracts)
  • yarn start, runs enigma and ganache (must have already gotten docker image)
  • yarn deploy deploy smart contracts
  • navigate to client folder
  • yarn install
  • yarn start

Problem

The Rubber Hose Problem

Solution

  • Server side solution to the rubber house problem
  • Alice creates two data sets
  • The data is encrypted and hidden with Enigma
  • Alice has two passwords --> later implementation the passwords should be private keys and we should be able to access the information from. This was not implemented in Enigma yet
  • One password returns the fake data and one password returns the real data

Secret Smart contract

public functions

fn construct(real_password: String, fake_password: String);
  • Constructor, sets passwords
fn write_storage(password: String, message: String);
  • Writes to either fake or real storage based on which password is provided.
    fn read_storage(password: String) -> String;
  • Returns either the fake state or real state based on the password

private functions

fn get_all_secret_messages() -> Vec<SecretMessages>
fn get_all_dummy_messages() -> Vec<DummyMessages> 
fn store_dummy(message: String)
fn store_secret(message: String) 

enigma_rubber_hose's People

Contributors

jesseabram avatar alicj avatar

Watchers

James Cloos 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.