OPAQUE.js
JavaScript implementation of the OPAQUE asymmetric PAKE (aPAKE) protocol
Protocol
Implementation of this Internet Draft proposal.
Installation
You may also install this module from npm.
npm install apake
Calling the API
The process generally works as follows:
// Each party includes the 1-out-of-n module with IO:const OT = IO; // Login credentials never reaches the server in plaintextconst user_id = 'newuser';const password = 'correct horse battery staple'; // Sign upOPAQUE; // Log in for the first time and receive a session tokenOPAQUE; // Register a new userlet user = OPAQUE; // Handle a login attemptOPAQUE; // Result:'Registered: true''Login for newuser succeeded with: 4ccdf3b8cacf08273a085c952aaf3ee83633e6afcedf4f86c00497e862f43c78''Shared secret: 4ccdf3b8cacf08273a085c952aaf3ee83633e6afcedf4f86c00497e862f43c78'
Please read example.js for a more detailed example or run it with node test/test.js
.