GithubHelp home page GithubHelp logo

isabella232 / torus-extension Goto Github PK

View Code? Open in Web Editor NEW

This project forked from torusresearch/torus-extension

0.0 0.0 0.0 69.8 MB

Threshold-bak implementation on metamask extension

License: MIT License

Shell 0.50% Awk 0.04% JavaScript 90.48% HTML 0.49% SCSS 8.49%

torus-extension's Introduction

Torus extension

This is a fork of Metamask that has tKey integrated.

Existing private key management solutions have come a long way in terms of user experience. However, many of these solutions make tradeoffs with reduced guarantees on custody and censorship-resistance. For example, password-manager key management solutions can restrict user access by refusing to return the encrypted key from their servers.

tKey uses Shamir Secret Sharing to achieve this without sacrificing user experience, while retaining end-user autonomy and control over the private key. tKey manages private keys using the user’s device, private input, and wallet service provider. As long as a user has access to 2 out of 3 (2/3) of these shares, they will be able to retrieve their private key.

The user starts by generating (client-side) a 2 out of 3 (2/3) Shamir secret sharing. This gives the user three shares: ShareA, ShareB, and ShareC.

ShareA is stored on the user’s device: Implementation is device and system specific. For example, on mobile devices, the share could be stored in device storage secured via biometrics. ShareB is managed by a service provider: This share is kept and managed by a wallet service provider via their own authentication flows. ShareC is a recovery share: This is based on user input (eg. password, security questions, hardware device etc.). Similar to existing 2FA systems, a user needs to prove ownership of at least 2 out of 3 (2/3) shares, in order to retrieve his private key.

This is extensible to any provider, and does not necessarily have to be used with Torus' SDKs.

Testing locally

Download zip here

  • Open Chrome.
  • Type in chrome://extensions/
  • Top right hand, enable developer mode.
  • Top left, click on load unpacked.
  • Select the downloaded torus-0.0.1 folder.
  • Test away!

Building locally

  • Install Node.js version 10
    • If you are using nvm (recommended) running nvm use will automatically choose the right node version for you.
  • Install Yarn
  • Install dependencies: yarn
  • Build the project to the ./dist/ folder with yarn dist.
  • Optionally, to start a development build (e.g. with logging and file watching) run yarn start instead.
    • To start the React DevTools and Redux DevTools Extension alongside the app, use yarn start:dev.
      • React DevTools will open in a separate window; no browser extension is required
      • Redux DevTools will need to be installed as a browser extension. Open the Redux Remote Devtools to access Redux state logs. This can be done by either right clicking within the web browser to bring up the context menu, expanding the Redux DevTools panel and clicking Open Remote DevTools OR clicking the Redux DevTools extension icon and clicking Open Remote DevTools.
        • You will also need to check the "Use custom (local) server" checkbox in the Remote DevTools Settings, using the default server configuration (host localhost, port 8000, secure connection checkbox unchecked)

Uncompressed builds can be found in /dist, compressed builds can be found in /builds once they're built.

Contributing

Running Tests

Run tests with yarn test.

You can also test with a continuously watching process, via yarn watch.

You can run the linter by itself with yarn lint.

Development

yarn
yarn start

Build for Publishing

yarn dist

torus-extension's People

Contributors

2-am-zzz avatar alextsg avatar bdresser avatar bitpshr avatar brad-decker avatar brunobar79 avatar chikeichan avatar danfinlay avatar danjm avatar dapperkangaroo avatar estebanmino avatar flyswatter avatar frankiebee avatar greenkeeper[bot] avatar gudahtt avatar jennypollack avatar kumavis avatar lionellbriones avatar matteopey avatar metallicalfa2 avatar metamaskbot avatar phyrextsai avatar rekmarks avatar rickycodes avatar ryanml avatar scsaba avatar sdtsui avatar tmashuang avatar trejgun avatar whymarrh 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.