OPAQUE (RFC 9807) client library for browser and Node.js environments.
npm install @structured-id/opaqueimport { OpaqueClient } from '@structured-id/opaque';
const client = new OpaqueClient({ serverId: 'auth.example.com' });
// Registration
const reg = await client.registrationStart(password);
// Send `reg.request` to server, receive `serverResponse`
const { record, exportKey } = await client.registrationFinish(password, serverResponse, reg.state);
// Login
const login = await client.loginStart(password);
// Send `login.request` to server, receive `serverResponse`
const { finalization, sessionKey, exportKey: loginExportKey } = await client.loginFinish(
password,
serverResponse,
login.state,
);- RFC 9807 OPAQUE — Standard password-authenticated key exchange (PAKE)
- Zero-Knowledge Password Policy (ZKPP) — Cryptographic proof that password meets policy constraints without revealing the password
- WASM support — Core cryptographic operations compiled to WASM binary for performance and security
- Fallback support — Systems without WASM support fall back to standard RFC 9807
Production-ready for RFC 9807. WASM-compiled core crypto operations require modern browsers with WebAssembly support.
Apache-2.0