France
@vexahub/opaque-server (0.0.1-alpha.1)
Published 2026-05-14 11:23:13 +02:00 by breakingbread
Installation
@vexahub:registry=https://dev.unebaguette.fr/api/packages/vexahub/npm/npm install @vexahub/[email protected]"@vexahub/opaque-server": "0.0.1-alpha.1"About this package
OPAQUE (RFC 9807) server (WASM)
@vexahub/opaque-server
OPAQUE (RFC 9807) server library for Node.js. Built in Rust, compiled to WASM.
Part of the @vexahub/opaque project.
Install
npm install @vexahub/opaque-server
Server Setup
Generate a one-time server setup string. Store it securely (e.g. environment variable), never commit to git.
import { createSetup } from '@vexahub/opaque-server';
const serverSetup = createSetup();
// Store in OPAQUE_SERVER_SETUP env var
Changing
serverSetupinvalidates all existing user accounts.
CLI
Generate a server setup or extract the public key directly from the command line:
npx @vexahub/opaque-server create-server-setup
npx @vexahub/opaque-server get-server-pubkey <SERVER_SETUP>
Usage
import {
createSetup,
getPublicKey,
createRegistrationResponse,
startLogin,
finishLogin,
} from '@vexahub/opaque-server';
// Registration
const { registrationResponse } = createRegistrationResponse({
serverSetup,
userIdentifier: '[email protected]',
registrationRequest, // from client
});
// Login
const { loginResponse, serverLoginState } = startLogin({
serverSetup,
userIdentifier: '[email protected]',
registrationRecord, // stored at registration
startLoginRequest, // from client
});
// ... send loginResponse to client, receive finishLoginRequest ...
const { sessionKey } = finishLogin({
serverLoginState,
finishLoginRequest,
});
Server Static Public Key
Extract the public key for client-side pinning:
const publicKey = getPublicKey(serverSetup);
// Hardcode this in your client builds
Related packages
| Package | Description |
|---|---|
@vexahub/opaque |
Client + server combined |
@vexahub/opaque-client |
Client only |
License
This package is dual-licensed under the MIT License or Apache-2.0 License.
Keywords
opaque
pake
authentication
wasm
Details
Assets (1)
Versions (5)
View all
0.0.1-alpha.4
2026-06-14
0.0.1-alpha.3
2026-06-14
0.0.1-alpha.2
2026-05-14
0.0.1-alpha.1
2026-05-14
0.0.1-alpha.0
2026-05-14