@stenvault/pqc-wasm 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @stenvault/pqc-wasm
2
2
 
3
- Post-quantum cryptography WASM wrapper for StenVault — ML-KEM-768 (FIPS 203) and ML-DSA-65 (FIPS 204) compiled from RustCrypto crates to WebAssembly.
3
+ Post-quantum cryptography WASM wrapper for StenVault — ML-KEM-768 and ML-KEM-1024 (FIPS 203), ML-DSA-65 and ML-DSA-87 (FIPS 204), compiled from RustCrypto crates to WebAssembly.
4
4
 
5
5
  ## Why
6
6
 
@@ -25,8 +25,8 @@ wasm-pack build --target nodejs --release --out-dir pkg-nodejs
25
25
 
26
26
  ```bash
27
27
  cargo test # Rust unit tests (native target)
28
- npm test # interop, FIPS 203 input checks and Wycheproof vectors, against the pkg-nodejs build
29
- npm run test:fips203-scan # every single-byte change of one public key, checked against noble (~2.5 min)
28
+ npm test # interop, FIPS 203 input checks, Wycheproof vectors and memory wiping, against the pkg-nodejs build
29
+ npm run test:fips203-scan # every single-byte change of one public key per ML-KEM parameter set, checked against noble
30
30
  ```
31
31
 
32
32
  The FIPS 203 tests draw their samples from a seed that is printed in the output.
@@ -64,17 +64,41 @@ const signature = await sign(message, sigKp.secretKey)
64
64
  const valid = await verify(message, signature, sigKp.publicKey)
65
65
  ```
66
66
 
67
+ Every parameter set is also an object with the same methods, so moving to
68
+ another security level means passing another object. The top-level functions
69
+ above are ML-KEM-768 and ML-DSA-65.
70
+
71
+ ```typescript
72
+ import { mlKem768, mlKem1024, mlDsa65, mlDsa87, type Kem, type SignatureScheme } from '@stenvault/pqc-wasm'
73
+
74
+ const kem: Kem = mlKem1024
75
+ const kp = await kem.generateKeyPair()
76
+ const { ciphertext, sharedSecret } = await kem.encapsulate(kp.publicKey)
77
+ const decrypted = await kem.decapsulate(ciphertext, kp.secretKey)
78
+
79
+ const dsa: SignatureScheme = mlDsa87
80
+ const sigKp = await dsa.generateKeyPair()
81
+ const signature = await dsa.sign(message, sigKp.secretKey)
82
+ const valid = await dsa.verify(message, signature, sigKp.publicKey)
83
+ ```
84
+
85
+ A key belongs to one parameter set: an ML-KEM-768 key passed to `mlKem1024`
86
+ fails its length check, and the same holds for ML-DSA.
87
+
67
88
  ### ML-KEM input errors
68
89
 
69
- `encapsulate` and `decapsulate` reject (the promise throws) on malformed keys:
90
+ `encapsulate` and `decapsulate` reject (the promise throws) on malformed keys.
91
+ The lengths are those of the parameter set (see Key sizes); the messages below
92
+ are ML-KEM-768's.
70
93
 
71
94
  | Function | Message | Cause |
72
95
  |----------|---------|-------|
73
96
  | `encapsulate` | `invalid encapsulation key length: expected 1184 bytes` | wrong length |
74
- | `encapsulate` | `encapsulation key is not canonical` | a 12-bit coefficient of `publicKey[0..1152]` is ≥ 3329 (FIPS 203 §7.2) |
97
+ | `encapsulate` | `encapsulation key is not canonical` | a 12-bit coefficient of the public key, all but its last 32 bytes, is ≥ 3329 (FIPS 203 §7.2) |
75
98
  | `decapsulate` | `invalid decapsulation key length: expected 2400 bytes` | wrong length |
76
99
  | `decapsulate` | `invalid ciphertext length: expected 1088 bytes` | wrong length |
77
100
  | `decapsulate` | `decapsulation key hash check failed` | SHA3-256 of the public key inside `secretKey` differs from the hash stored after it (FIPS 203 §7.3) |
101
+ | `decapsulate` | `decapsulation key embeds a non-canonical encapsulation key` | the hash matches, but a 12-bit coefficient of the public key inside `secretKey` is ≥ 3329 (the §7.2 check, applied to that key); key generation never produces such a key |
78
102
 
79
103
  A corrupted ciphertext does not throw. `decapsulate` returns ML-KEM's
80
104
  implicit-rejection secret, which does not match the sender's.
@@ -90,7 +114,7 @@ core.ts ← free() in try/finally, param order norma
90
114
  ↓
91
115
  pkg-bundler/ or pkg-nodejs/ ← wasm-bindgen generated bindings
92
116
  ↓
93
- src/lib.rs ← 7 Rust functions, zeroize on Drop
117
+ src/lib.rs ← 12 exported Rust functions, memory wiped after each call
94
118
  ↓
95
119
  ml-kem + ml-dsa (RustCrypto) ← FIPS 203/204 implementations
96
120
  ```
@@ -102,19 +126,23 @@ The consumer never calls `free()`, never calls `init()`, and never imports from
102
126
  | Algorithm | Public Key | Secret Key | Ciphertext | Signature | Shared Secret |
103
127
  |-----------|-----------|-----------|-----------|----------|--------------|
104
128
  | ML-KEM-768 | 1,184 B | 2,400 B | 1,088 B | — | 32 B |
129
+ | ML-KEM-1024 | 1,568 B | 3,168 B | 1,568 B | — | 32 B |
105
130
  | ML-DSA-65 | 1,952 B | 32 B (seed) | — | 3,309 B | — |
131
+ | ML-DSA-87 | 2,592 B | 32 B (seed) | — | 4,627 B | — |
106
132
 
107
133
  ## Security
108
134
 
109
135
  - **Constant-time**: `subtle` crate in Rust, preserved through WASM compilation
110
- - **Memory zeroing**: `zeroize` crate with `#[derive(ZeroizeOnDrop)]` on all secret-holding structs
111
- - **FIPS 203 input checks**: `encapsulate` runs the §7.2 modulus check and `decapsulate` the §7.3 hash check before calling `ml-kem`. `ml-kem` 0.2.x skips both: it reduces out-of-range key coefficients mod q and trusts the stored hash.
136
+ - **Memory wiping**: every heap block is zeroed before it is freed, and each operation then overwrites the part of the stack it used, so no secret key, seed or shared secret is left in the module's memory after a call. `tests/memory.ts` scans the memory after every operation. The `Uint8Array`s returned to JavaScript are the caller's to overwrite.
137
+ - **FIPS 203 input checks**: `encapsulate` runs the §7.2 modulus check; `decapsulate` runs the §7.3 hash check, then the §7.2 check on the public key inside the secret key. `ml-kem` 0.3 runs the same checks; this package runs its own first, so the errors do not depend on the crate.
112
138
  - **No audit**: Neither RustCrypto nor this wrapper have been independently audited. RustCrypto is honest about this.
113
139
  - **CVE-2026-22705**: Timing side-channel in `ml-dsa` Decompose function, patched in `>= 0.1.0-rc.3` (Barrett reduction).
114
140
  - **CVE-2026-24850**: Signature malleability via duplicate hint indices in `ml-dsa`, patched in `>= 0.1.0-rc.4`.
115
141
  - **GHSA-h37v-hp6w-2pp8**: Off-by-two in `ml-dsa` `use_hint` when `r0 = 0` (FIPS 204 Alg. 40 deviation), patched in `>= 0.1.0-rc.5`.
116
142
  - **RUSTSEC-2026-0385**: Non-constant-time mask generation and `u128` comparisons in `ctutils`, which `ml-dsa` uses for constant-time selection, patched in `ctutils >= 0.4.4` (this package: 0.3.1).
117
- - Cargo.toml requires `ml-dsa >= 0.1.2`, the first release that pulls a patched `ctutils`. Signing uses ML-DSA's deterministic variant.
143
+ - Cargo.toml requires `ml-dsa >= 0.1.2`, the first release that pulls a patched `ctutils`.
144
+ - Cargo.toml requires `ml-kem >= 0.3.4`, which removed a secret-indexed table lookup from noise sampling and made the conditional subtraction mod q constant-time.
145
+ - **Hedged signing**: `sign` uses FIPS 204's default, hedged variant: each signature mixes in 32 fresh bytes from `crypto.getRandomValues`, so two signatures of the same message differ. That keeps a fault or a side channel from being lined up across repeated signings. With those bytes pinned to zero it gives the deterministic variant, which the tests use to compare against known-answer vectors. If no randomness is available, `sign` throws instead of signing.
118
146
  - **Supply chain**: `Cargo.lock` committed, CI runs `cargo audit` before every build.
119
147
 
120
148
  ## License
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stenvault/pqc-wasm",
3
- "version": "0.3.1",
4
- "description": "ML-KEM-768 + ML-DSA-65 WASM wrapper — RustCrypto compiled to WebAssembly",
3
+ "version": "0.4.0",
4
+ "description": "ML-KEM-768/1024 + ML-DSA-65/87 WASM wrapper — RustCrypto compiled to WebAssembly",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -39,8 +39,9 @@
39
39
  "postbuild:wasm": "rm -f pkg-bundler/.gitignore pkg-nodejs/.gitignore",
40
40
  "build:ts": "tsc",
41
41
  "build": "npm run build:wasm && npm run build:ts",
42
- "test": "npx tsx tests/interop.ts && npx tsx tests/fips203.ts && npx tsx tests/wycheproof.ts",
43
- "test:fips203-scan": "npx tsx tests/fips203.ts --full-scan"
42
+ "test": "npx tsx tests/interop.ts && npx tsx tests/fips203.ts && npx tsx tests/wycheproof.ts && npx tsx tests/memory.ts",
43
+ "test:fips203-scan": "npx tsx tests/fips203.ts --full-scan",
44
+ "test:timing": "npx tsx tests/timing.ts"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@noble/post-quantum": "^0.6.1",
@@ -1,6 +1,6 @@
1
1
  # @stenvault/pqc-wasm
2
2
 
3
- Post-quantum cryptography WASM wrapper for StenVault — ML-KEM-768 (FIPS 203) and ML-DSA-65 (FIPS 204) compiled from RustCrypto crates to WebAssembly.
3
+ Post-quantum cryptography WASM wrapper for StenVault — ML-KEM-768 and ML-KEM-1024 (FIPS 203), ML-DSA-65 and ML-DSA-87 (FIPS 204), compiled from RustCrypto crates to WebAssembly.
4
4
 
5
5
  ## Why
6
6
 
@@ -25,8 +25,8 @@ wasm-pack build --target nodejs --release --out-dir pkg-nodejs
25
25
 
26
26
  ```bash
27
27
  cargo test # Rust unit tests (native target)
28
- npm test # interop, FIPS 203 input checks and Wycheproof vectors, against the pkg-nodejs build
29
- npm run test:fips203-scan # every single-byte change of one public key, checked against noble (~2.5 min)
28
+ npm test # interop, FIPS 203 input checks, Wycheproof vectors and memory wiping, against the pkg-nodejs build
29
+ npm run test:fips203-scan # every single-byte change of one public key per ML-KEM parameter set, checked against noble
30
30
  ```
31
31
 
32
32
  The FIPS 203 tests draw their samples from a seed that is printed in the output.
@@ -64,17 +64,41 @@ const signature = await sign(message, sigKp.secretKey)
64
64
  const valid = await verify(message, signature, sigKp.publicKey)
65
65
  ```
66
66
 
67
+ Every parameter set is also an object with the same methods, so moving to
68
+ another security level means passing another object. The top-level functions
69
+ above are ML-KEM-768 and ML-DSA-65.
70
+
71
+ ```typescript
72
+ import { mlKem768, mlKem1024, mlDsa65, mlDsa87, type Kem, type SignatureScheme } from '@stenvault/pqc-wasm'
73
+
74
+ const kem: Kem = mlKem1024
75
+ const kp = await kem.generateKeyPair()
76
+ const { ciphertext, sharedSecret } = await kem.encapsulate(kp.publicKey)
77
+ const decrypted = await kem.decapsulate(ciphertext, kp.secretKey)
78
+
79
+ const dsa: SignatureScheme = mlDsa87
80
+ const sigKp = await dsa.generateKeyPair()
81
+ const signature = await dsa.sign(message, sigKp.secretKey)
82
+ const valid = await dsa.verify(message, signature, sigKp.publicKey)
83
+ ```
84
+
85
+ A key belongs to one parameter set: an ML-KEM-768 key passed to `mlKem1024`
86
+ fails its length check, and the same holds for ML-DSA.
87
+
67
88
  ### ML-KEM input errors
68
89
 
69
- `encapsulate` and `decapsulate` reject (the promise throws) on malformed keys:
90
+ `encapsulate` and `decapsulate` reject (the promise throws) on malformed keys.
91
+ The lengths are those of the parameter set (see Key sizes); the messages below
92
+ are ML-KEM-768's.
70
93
 
71
94
  | Function | Message | Cause |
72
95
  |----------|---------|-------|
73
96
  | `encapsulate` | `invalid encapsulation key length: expected 1184 bytes` | wrong length |
74
- | `encapsulate` | `encapsulation key is not canonical` | a 12-bit coefficient of `publicKey[0..1152]` is ≥ 3329 (FIPS 203 §7.2) |
97
+ | `encapsulate` | `encapsulation key is not canonical` | a 12-bit coefficient of the public key, all but its last 32 bytes, is ≥ 3329 (FIPS 203 §7.2) |
75
98
  | `decapsulate` | `invalid decapsulation key length: expected 2400 bytes` | wrong length |
76
99
  | `decapsulate` | `invalid ciphertext length: expected 1088 bytes` | wrong length |
77
100
  | `decapsulate` | `decapsulation key hash check failed` | SHA3-256 of the public key inside `secretKey` differs from the hash stored after it (FIPS 203 §7.3) |
101
+ | `decapsulate` | `decapsulation key embeds a non-canonical encapsulation key` | the hash matches, but a 12-bit coefficient of the public key inside `secretKey` is ≥ 3329 (the §7.2 check, applied to that key); key generation never produces such a key |
78
102
 
79
103
  A corrupted ciphertext does not throw. `decapsulate` returns ML-KEM's
80
104
  implicit-rejection secret, which does not match the sender's.
@@ -90,7 +114,7 @@ core.ts ← free() in try/finally, param order norma
90
114
  ↓
91
115
  pkg-bundler/ or pkg-nodejs/ ← wasm-bindgen generated bindings
92
116
  ↓
93
- src/lib.rs ← 7 Rust functions, zeroize on Drop
117
+ src/lib.rs ← 12 exported Rust functions, memory wiped after each call
94
118
  ↓
95
119
  ml-kem + ml-dsa (RustCrypto) ← FIPS 203/204 implementations
96
120
  ```
@@ -102,19 +126,23 @@ The consumer never calls `free()`, never calls `init()`, and never imports from
102
126
  | Algorithm | Public Key | Secret Key | Ciphertext | Signature | Shared Secret |
103
127
  |-----------|-----------|-----------|-----------|----------|--------------|
104
128
  | ML-KEM-768 | 1,184 B | 2,400 B | 1,088 B | — | 32 B |
129
+ | ML-KEM-1024 | 1,568 B | 3,168 B | 1,568 B | — | 32 B |
105
130
  | ML-DSA-65 | 1,952 B | 32 B (seed) | — | 3,309 B | — |
131
+ | ML-DSA-87 | 2,592 B | 32 B (seed) | — | 4,627 B | — |
106
132
 
107
133
  ## Security
108
134
 
109
135
  - **Constant-time**: `subtle` crate in Rust, preserved through WASM compilation
110
- - **Memory zeroing**: `zeroize` crate with `#[derive(ZeroizeOnDrop)]` on all secret-holding structs
111
- - **FIPS 203 input checks**: `encapsulate` runs the §7.2 modulus check and `decapsulate` the §7.3 hash check before calling `ml-kem`. `ml-kem` 0.2.x skips both: it reduces out-of-range key coefficients mod q and trusts the stored hash.
136
+ - **Memory wiping**: every heap block is zeroed before it is freed, and each operation then overwrites the part of the stack it used, so no secret key, seed or shared secret is left in the module's memory after a call. `tests/memory.ts` scans the memory after every operation. The `Uint8Array`s returned to JavaScript are the caller's to overwrite.
137
+ - **FIPS 203 input checks**: `encapsulate` runs the §7.2 modulus check; `decapsulate` runs the §7.3 hash check, then the §7.2 check on the public key inside the secret key. `ml-kem` 0.3 runs the same checks; this package runs its own first, so the errors do not depend on the crate.
112
138
  - **No audit**: Neither RustCrypto nor this wrapper have been independently audited. RustCrypto is honest about this.
113
139
  - **CVE-2026-22705**: Timing side-channel in `ml-dsa` Decompose function, patched in `>= 0.1.0-rc.3` (Barrett reduction).
114
140
  - **CVE-2026-24850**: Signature malleability via duplicate hint indices in `ml-dsa`, patched in `>= 0.1.0-rc.4`.
115
141
  - **GHSA-h37v-hp6w-2pp8**: Off-by-two in `ml-dsa` `use_hint` when `r0 = 0` (FIPS 204 Alg. 40 deviation), patched in `>= 0.1.0-rc.5`.
116
142
  - **RUSTSEC-2026-0385**: Non-constant-time mask generation and `u128` comparisons in `ctutils`, which `ml-dsa` uses for constant-time selection, patched in `ctutils >= 0.4.4` (this package: 0.3.1).
117
- - Cargo.toml requires `ml-dsa >= 0.1.2`, the first release that pulls a patched `ctutils`. Signing uses ML-DSA's deterministic variant.
143
+ - Cargo.toml requires `ml-dsa >= 0.1.2`, the first release that pulls a patched `ctutils`.
144
+ - Cargo.toml requires `ml-kem >= 0.3.4`, which removed a secret-indexed table lookup from noise sampling and made the conditional subtraction mod q constant-time.
145
+ - **Hedged signing**: `sign` uses FIPS 204's default, hedged variant: each signature mixes in 32 fresh bytes from `crypto.getRandomValues`, so two signatures of the same message differ. That keeps a fault or a side channel from being lined up across repeated signings. With those bytes pinned to zero it gives the deterministic variant, which the tests use to compare against known-answer vectors. If no randomness is available, `sign` throws instead of signing.
118
146
  - **Supply chain**: `Cargo.lock` committed, CI runs `cargo audit` before every build.
119
147
 
120
148
  ## License
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "stenvault-pqc",
3
3
  "type": "module",
4
- "description": "ML-KEM-768 + ML-DSA-65 WASM wrapper for StenVault",
5
- "version": "0.3.1",
4
+ "description": "ML-KEM-768/1024 + ML-DSA-65/87 WASM wrapper for StenVault",
5
+ "version": "0.4.0",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "stenvault_pqc_bg.wasm",
@@ -18,6 +18,70 @@ export class MlDsa65KeyPair {
18
18
  readonly verifying_key: Uint8Array;
19
19
  }
20
20
 
21
+ /**
22
+ * ML-DSA-87 key pair (verifying key + 32-byte signing seed).
23
+ */
24
+ export class MlDsa87KeyPair {
25
+ private constructor();
26
+ free(): void;
27
+ [Symbol.dispose](): void;
28
+ /**
29
+ * Signing key as a 32-byte seed; expanded on demand during signing.
30
+ */
31
+ readonly signing_key: Uint8Array;
32
+ /**
33
+ * Verifying (public) key, 2592 bytes.
34
+ */
35
+ readonly verifying_key: Uint8Array;
36
+ }
37
+
38
+ /**
39
+ * Output of ML-KEM-1024 decapsulation: the recovered shared secret.
40
+ */
41
+ export class MlKem1024DecapResult {
42
+ private constructor();
43
+ free(): void;
44
+ [Symbol.dispose](): void;
45
+ /**
46
+ * Shared secret recovered from the ciphertext, 32 bytes.
47
+ */
48
+ readonly shared_secret: Uint8Array;
49
+ }
50
+
51
+ /**
52
+ * Output of ML-KEM-1024 encapsulation: ciphertext + shared secret.
53
+ */
54
+ export class MlKem1024EncapResult {
55
+ private constructor();
56
+ free(): void;
57
+ [Symbol.dispose](): void;
58
+ /**
59
+ * Ciphertext to send to the decapsulator, 1568 bytes.
60
+ */
61
+ readonly ciphertext: Uint8Array;
62
+ /**
63
+ * Shared secret derived from encapsulation, 32 bytes.
64
+ */
65
+ readonly shared_secret: Uint8Array;
66
+ }
67
+
68
+ /**
69
+ * ML-KEM-1024 key pair (encapsulation + decapsulation key).
70
+ */
71
+ export class MlKem1024KeyPair {
72
+ private constructor();
73
+ free(): void;
74
+ [Symbol.dispose](): void;
75
+ /**
76
+ * Decapsulation (private) key, 3168 bytes.
77
+ */
78
+ readonly decapsulation_key: Uint8Array;
79
+ /**
80
+ * Encapsulation (public) key, 1568 bytes.
81
+ */
82
+ readonly encapsulation_key: Uint8Array;
83
+ }
84
+
21
85
  /**
22
86
  * Output of ML-KEM-768 decapsulation: the recovered shared secret.
23
87
  */
@@ -80,6 +144,36 @@ export function ml_dsa_65_sign(sk_bytes: Uint8Array, message: Uint8Array): Uint8
80
144
  */
81
145
  export function ml_dsa_65_verify(vk_bytes: Uint8Array, message: Uint8Array, signature: Uint8Array): boolean;
82
146
 
147
+ /**
148
+ * Generate a fresh ML-DSA-87 key pair from 32 random seed bytes.
149
+ */
150
+ export function ml_dsa_87_generate(): MlDsa87KeyPair;
151
+
152
+ /**
153
+ * Sign `message` with a 32-byte ML-DSA-87 seed, returning a 4627-byte signature.
154
+ */
155
+ export function ml_dsa_87_sign(sk_bytes: Uint8Array, message: Uint8Array): Uint8Array;
156
+
157
+ /**
158
+ * Verify a 4627-byte ML-DSA-87 signature over `message` against a 2592-byte verifying key.
159
+ */
160
+ export function ml_dsa_87_verify(vk_bytes: Uint8Array, message: Uint8Array, signature: Uint8Array): boolean;
161
+
162
+ /**
163
+ * Decapsulate a 1568-byte ciphertext with a 3168-byte decapsulation key.
164
+ */
165
+ export function ml_kem_1024_decapsulate(dk_bytes: Uint8Array, ct_bytes: Uint8Array): MlKem1024DecapResult;
166
+
167
+ /**
168
+ * Encapsulate a fresh shared secret to a 1568-byte encapsulation key.
169
+ */
170
+ export function ml_kem_1024_encapsulate(ek_bytes: Uint8Array): MlKem1024EncapResult;
171
+
172
+ /**
173
+ * Generate a fresh ML-KEM-1024 key pair using OS randomness.
174
+ */
175
+ export function ml_kem_1024_generate(): MlKem1024KeyPair;
176
+
83
177
  /**
84
178
  * Decapsulate a 1088-byte ciphertext with a 2400-byte decapsulation key.
85
179
  */
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./stenvault_pqc_bg.js";
5
5
  __wbg_set_wasm(wasm);
6
6
  wasm.__wbindgen_start();
7
7
  export {
8
- MlDsa65KeyPair, MlKem768DecapResult, MlKem768EncapResult, MlKem768KeyPair, ml_dsa_65_generate, ml_dsa_65_sign, ml_dsa_65_verify, ml_kem_768_decapsulate, ml_kem_768_encapsulate, ml_kem_768_generate
8
+ MlDsa65KeyPair, MlDsa87KeyPair, MlKem1024DecapResult, MlKem1024EncapResult, MlKem1024KeyPair, MlKem768DecapResult, MlKem768EncapResult, MlKem768KeyPair, ml_dsa_65_generate, ml_dsa_65_sign, ml_dsa_65_verify, ml_dsa_87_generate, ml_dsa_87_sign, ml_dsa_87_verify, ml_kem_1024_decapsulate, ml_kem_1024_encapsulate, ml_kem_1024_generate, ml_kem_768_decapsulate, ml_kem_768_encapsulate, ml_kem_768_generate
9
9
  } from "./stenvault_pqc_bg.js";