this repo houses a JavaScript implementation of the OPAQUE password authentication key exchange (PAKE) protocol.
WARNING: this project has not been reviewed/audited for mistakes; it was created out of interest in the protocol.
see test/integration.test.js for how the Server and Client classes interact
the server and non-browser client implementations use sodium to do all the crypto functions. the interleaved key exchange is not HMQV or SIGMA as mentioned in the paper. the built-in key exchange functions from sodium are used and then "explicit authentication" is achieved by the user sending the derived session key to the server and the server constant-time comparing it to its own derived session key.
- server registration and authentication logic
- client registration and authentication logic
- basic unit tests for server/client
- basic integration test demonstrating how the client and server interplay
- apply iterative hash function to OPRF output to harden against offline dictionary attacks
- invalid parameter checking
- error catching/handling
- unit tests for invalid input
- browser JS client implementation using wasm-crypto
- basic integration test combining browser JS client with server side logic
- wrap server logic in http middleware in another package for easier plug n play
protocol papers:
- The OPAQUE Asymmetric PAKE Protocol (IETF)
- OPAQUE: An Asymmetric PAKE Protocol Secure Against Pre-Computation Attacks (IACR)
other implementations:
MIT