Git Product home page Git Product logo

phoenix-authentication's Introduction

Client Phoenix Authentication

Introduction

The client-facing implementation of Phoenix Authentication is a natural successor to legacy two-factor authentication solutions. Applications like Google Authenticator and Authy rely on access to shared secrets, secrets that are vulnerable to hacks and data breaches. With Client Phoenix Authentication, user's secrets never leave their device. And on the backend, we're using the blockchain to eliminate reliance on trusted third parties while ensuring that users will still be able to verify sign-in and other requests with the click of a button.

Technical Note

Unfortunately, message signing in Ethereum is implemented inconsistently across software packages. Our view is that only message hashes should be signed, not raw messages, and that the Ethereum signed message prefix can optionally be appended to the message hash before it's hashed again. Please see the table below for a summary:

Acceptable Message Encoding
"123456" keccak256("123456")
"123456" keccak256("\x19Ethereum Signed Message:\n32", keccak256("123456"))
"123456" keccak256("\x19Ethereum Signed Message:\n6123456")

Notes: Arguments to keccak256 are tightly packed. The output of the above encodings are:

Output
0xc888c9ce9e098d5864d3ded6ebcc140a12142263bace3a23a36f9905f12bd64a
0x5f7d8a4ff77887137c0e2f0b7f157f4b41bbc2950dbe9453b1342f6d28b820cd
0x2912723b3ed60c075b271f075d881d82fa5de112b6c25f7dfa4cab85de25045a

Testing With Truffle

  • This folder has a suite of tests created through Truffle
  • To run these tests:
    • Download the code
    • Navigate to the phoenixAuthentication-client folder in your terminal
    • Make sure you have Truffle and Ganache installed: npm install -g [email protected] ganache-cli
    • Install web3 and ethereumjs-util: npm install [email protected] ethereumjs-util
    • Spin up a development blockchain: ganache-cli --seed --port 8555
    • Run the test suite: truffle test --network ganache

Copyright & License

Copyright 2020 The Phoenix Technology Corporation under the GNU General Public License v3.0.

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.