open-index/open-npm huggingface dataset:
npm package: @maatara/core-pqc-wasm
Description: Ma'atara PQC WASM bindings with elastic hash and frontier SSSP algorithms
Latest version: 0.5.0

# @maatara/core-pqc-wasm

WASM bindings for Ma'atara's Post-Quantum Cryptography toolkit. Exposes Kyber ML‑KEM‑768, Dilithium (ML‑DSA‑65), HKDF‑SHA256, AES‑256‑GCM, and base64url helpers.

- Targets: `web` (browsers) and `bundler` (modern bundlers)
- Typings: included via wasm-pack generated `.d.ts`
- Size: ~238 KB `.wasm` (0.1.0), under 500 KB budget

## Install

```bash
npm install @maatara/core-pqc-wasm
```

## Usage (direct)

Most projects should depend on the higher-level wrapper `@maatara/core-pqc`. If you need the raw WASM exports:

```js
import init, {
  kyber_keygen,
  kyber_encaps,
  kyber_decaps,
  hkdf_sha256,
  aes_gcm_wrap,
  aes_gcm_unwrap,
  dilithium_keygen,
  dilithium_sign,
  dilithium_verify,
} from '@maatara/core-pqc-wasm';

await init();
const { public_b64u, secret_b64u } = JSON.parse(kyber_keygen());
```

## Security notes

- Zero‑knowledge: intended for client‑side use; servers should only perform verification.
- Constant‑time: uses vetted crates (`subtle`, `aes-gcm`).
- RNG: `getrandom` with `js` feature uses Web Crypto / Node WebCrypto.
- Provenance: WASM uses pure‑Rust `ml-kem` and `ml-dsa` crates; native builds (not used here) rely on `pqcrypto` (PQClean).

## Build targets

- `wasm-pack build --target web`
- `wasm-pack build --target bundler`