@stenvault/pqc-wasm 0.3.0 → 0.3.1
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 +2 -1
- package/package.json +1 -1
- package/pkg-bundler/README.md +2 -1
- package/pkg-bundler/package.json +1 -1
- package/pkg-bundler/stenvault_pqc_bg.js +19 -19
- package/pkg-bundler/stenvault_pqc_bg.wasm +0 -0
- package/pkg-bundler/stenvault_pqc_bg.wasm.d.ts +7 -7
- package/pkg-nodejs/README.md +2 -1
- package/pkg-nodejs/package.json +1 -1
- package/pkg-nodejs/stenvault_pqc.js +19 -19
- package/pkg-nodejs/stenvault_pqc_bg.wasm +0 -0
- package/pkg-nodejs/stenvault_pqc_bg.wasm.d.ts +7 -7
package/README.md
CHANGED
|
@@ -113,7 +113,8 @@ The consumer never calls `free()`, never calls `init()`, and never imports from
|
|
|
113
113
|
- **CVE-2026-22705**: Timing side-channel in `ml-dsa` Decompose function, patched in `>= 0.1.0-rc.3` (Barrett reduction).
|
|
114
114
|
- **CVE-2026-24850**: Signature malleability via duplicate hint indices in `ml-dsa`, patched in `>= 0.1.0-rc.4`.
|
|
115
115
|
- **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
|
-
-
|
|
116
|
+
- **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.
|
|
117
118
|
- **Supply chain**: `Cargo.lock` committed, CI runs `cargo audit` before every build.
|
|
118
119
|
|
|
119
120
|
## License
|
package/package.json
CHANGED
package/pkg-bundler/README.md
CHANGED
|
@@ -113,7 +113,8 @@ The consumer never calls `free()`, never calls `init()`, and never imports from
|
|
|
113
113
|
- **CVE-2026-22705**: Timing side-channel in `ml-dsa` Decompose function, patched in `>= 0.1.0-rc.3` (Barrett reduction).
|
|
114
114
|
- **CVE-2026-24850**: Signature malleability via duplicate hint indices in `ml-dsa`, patched in `>= 0.1.0-rc.4`.
|
|
115
115
|
- **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
|
-
-
|
|
116
|
+
- **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.
|
|
117
118
|
- **Supply chain**: `Cargo.lock` committed, CI runs `cargo audit` before every build.
|
|
118
119
|
|
|
119
120
|
## License
|
package/pkg-bundler/package.json
CHANGED
|
@@ -26,7 +26,7 @@ export class MlDsa65KeyPair {
|
|
|
26
26
|
get signing_key() {
|
|
27
27
|
const ret = wasm.mldsa65keypair_signing_key(this.__wbg_ptr);
|
|
28
28
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
29
|
-
wasm.
|
|
29
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
30
30
|
return v1;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -36,7 +36,7 @@ export class MlDsa65KeyPair {
|
|
|
36
36
|
get verifying_key() {
|
|
37
37
|
const ret = wasm.mldsa65keypair_verifying_key(this.__wbg_ptr);
|
|
38
38
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
39
|
-
wasm.
|
|
39
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
40
40
|
return v1;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -70,7 +70,7 @@ export class MlKem768DecapResult {
|
|
|
70
70
|
get shared_secret() {
|
|
71
71
|
const ret = wasm.mlkem768decapresult_shared_secret(this.__wbg_ptr);
|
|
72
72
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
73
|
-
wasm.
|
|
73
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
74
74
|
return v1;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -104,7 +104,7 @@ export class MlKem768EncapResult {
|
|
|
104
104
|
get ciphertext() {
|
|
105
105
|
const ret = wasm.mlkem768encapresult_ciphertext(this.__wbg_ptr);
|
|
106
106
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
107
|
-
wasm.
|
|
107
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
108
108
|
return v1;
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
@@ -114,7 +114,7 @@ export class MlKem768EncapResult {
|
|
|
114
114
|
get shared_secret() {
|
|
115
115
|
const ret = wasm.mlkem768encapresult_shared_secret(this.__wbg_ptr);
|
|
116
116
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
117
|
-
wasm.
|
|
117
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
118
118
|
return v1;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -148,7 +148,7 @@ export class MlKem768KeyPair {
|
|
|
148
148
|
get decapsulation_key() {
|
|
149
149
|
const ret = wasm.mlkem768keypair_decapsulation_key(this.__wbg_ptr);
|
|
150
150
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
151
|
-
wasm.
|
|
151
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
152
152
|
return v1;
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
@@ -158,7 +158,7 @@ export class MlKem768KeyPair {
|
|
|
158
158
|
get encapsulation_key() {
|
|
159
159
|
const ret = wasm.mlkem768keypair_encapsulation_key(this.__wbg_ptr);
|
|
160
160
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
161
|
-
wasm.
|
|
161
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
162
162
|
return v1;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -180,16 +180,16 @@ export function ml_dsa_65_generate() {
|
|
|
180
180
|
* @returns {Uint8Array}
|
|
181
181
|
*/
|
|
182
182
|
export function ml_dsa_65_sign(sk_bytes, message) {
|
|
183
|
-
const ptr0 = passArray8ToWasm0(sk_bytes, wasm.
|
|
183
|
+
const ptr0 = passArray8ToWasm0(sk_bytes, wasm.__wbindgen_export3);
|
|
184
184
|
const len0 = WASM_VECTOR_LEN;
|
|
185
|
-
const ptr1 = passArray8ToWasm0(message, wasm.
|
|
185
|
+
const ptr1 = passArray8ToWasm0(message, wasm.__wbindgen_export3);
|
|
186
186
|
const len1 = WASM_VECTOR_LEN;
|
|
187
187
|
const ret = wasm.ml_dsa_65_sign(ptr0, len0, ptr1, len1);
|
|
188
188
|
if (ret[3]) {
|
|
189
189
|
throw takeFromExternrefTable0(ret[2]);
|
|
190
190
|
}
|
|
191
191
|
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
192
|
-
wasm.
|
|
192
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
193
193
|
return v3;
|
|
194
194
|
}
|
|
195
195
|
|
|
@@ -201,11 +201,11 @@ export function ml_dsa_65_sign(sk_bytes, message) {
|
|
|
201
201
|
* @returns {boolean}
|
|
202
202
|
*/
|
|
203
203
|
export function ml_dsa_65_verify(vk_bytes, message, signature) {
|
|
204
|
-
const ptr0 = passArray8ToWasm0(vk_bytes, wasm.
|
|
204
|
+
const ptr0 = passArray8ToWasm0(vk_bytes, wasm.__wbindgen_export3);
|
|
205
205
|
const len0 = WASM_VECTOR_LEN;
|
|
206
|
-
const ptr1 = passArray8ToWasm0(message, wasm.
|
|
206
|
+
const ptr1 = passArray8ToWasm0(message, wasm.__wbindgen_export3);
|
|
207
207
|
const len1 = WASM_VECTOR_LEN;
|
|
208
|
-
const ptr2 = passArray8ToWasm0(signature, wasm.
|
|
208
|
+
const ptr2 = passArray8ToWasm0(signature, wasm.__wbindgen_export3);
|
|
209
209
|
const len2 = WASM_VECTOR_LEN;
|
|
210
210
|
const ret = wasm.ml_dsa_65_verify(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
211
211
|
if (ret[2]) {
|
|
@@ -221,9 +221,9 @@ export function ml_dsa_65_verify(vk_bytes, message, signature) {
|
|
|
221
221
|
* @returns {MlKem768DecapResult}
|
|
222
222
|
*/
|
|
223
223
|
export function ml_kem_768_decapsulate(dk_bytes, ct_bytes) {
|
|
224
|
-
const ptr0 = passArray8ToWasm0(dk_bytes, wasm.
|
|
224
|
+
const ptr0 = passArray8ToWasm0(dk_bytes, wasm.__wbindgen_export3);
|
|
225
225
|
const len0 = WASM_VECTOR_LEN;
|
|
226
|
-
const ptr1 = passArray8ToWasm0(ct_bytes, wasm.
|
|
226
|
+
const ptr1 = passArray8ToWasm0(ct_bytes, wasm.__wbindgen_export3);
|
|
227
227
|
const len1 = WASM_VECTOR_LEN;
|
|
228
228
|
const ret = wasm.ml_kem_768_decapsulate(ptr0, len0, ptr1, len1);
|
|
229
229
|
if (ret[2]) {
|
|
@@ -238,7 +238,7 @@ export function ml_kem_768_decapsulate(dk_bytes, ct_bytes) {
|
|
|
238
238
|
* @returns {MlKem768EncapResult}
|
|
239
239
|
*/
|
|
240
240
|
export function ml_kem_768_encapsulate(ek_bytes) {
|
|
241
|
-
const ptr0 = passArray8ToWasm0(ek_bytes, wasm.
|
|
241
|
+
const ptr0 = passArray8ToWasm0(ek_bytes, wasm.__wbindgen_export3);
|
|
242
242
|
const len0 = WASM_VECTOR_LEN;
|
|
243
243
|
const ret = wasm.ml_kem_768_encapsulate(ptr0, len0);
|
|
244
244
|
if (ret[2]) {
|
|
@@ -377,7 +377,7 @@ const MlKem768KeyPairFinalization = (typeof FinalizationRegistry === 'undefined'
|
|
|
377
377
|
: new FinalizationRegistry(ptr => wasm.__wbg_mlkem768keypair_free(ptr >>> 0, 1));
|
|
378
378
|
|
|
379
379
|
function addToExternrefTable0(obj) {
|
|
380
|
-
const idx = wasm.
|
|
380
|
+
const idx = wasm.__wbindgen_export2();
|
|
381
381
|
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
382
382
|
return idx;
|
|
383
383
|
}
|
|
@@ -405,7 +405,7 @@ function handleError(f, args) {
|
|
|
405
405
|
return f.apply(this, args);
|
|
406
406
|
} catch (e) {
|
|
407
407
|
const idx = addToExternrefTable0(e);
|
|
408
|
-
wasm.
|
|
408
|
+
wasm.__wbindgen_export(idx);
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
|
|
@@ -422,7 +422,7 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
422
422
|
|
|
423
423
|
function takeFromExternrefTable0(idx) {
|
|
424
424
|
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
425
|
-
wasm.
|
|
425
|
+
wasm.__wbindgen_export4(idx);
|
|
426
426
|
return value;
|
|
427
427
|
}
|
|
428
428
|
|
|
Binary file
|
|
@@ -12,16 +12,16 @@ export const ml_kem_768_generate: () => number;
|
|
|
12
12
|
export const mldsa65keypair_signing_key: (a: number) => [number, number];
|
|
13
13
|
export const mldsa65keypair_verifying_key: (a: number) => [number, number];
|
|
14
14
|
export const mlkem768decapresult_shared_secret: (a: number) => [number, number];
|
|
15
|
-
export const __wbg_mlkem768encapresult_free: (a: number, b: number) => void;
|
|
16
|
-
export const __wbg_mlkem768keypair_free: (a: number, b: number) => void;
|
|
17
15
|
export const mlkem768keypair_encapsulation_key: (a: number) => [number, number];
|
|
18
16
|
export const mlkem768keypair_decapsulation_key: (a: number) => [number, number];
|
|
17
|
+
export const __wbg_mlkem768keypair_free: (a: number, b: number) => void;
|
|
19
18
|
export const mlkem768encapresult_shared_secret: (a: number) => [number, number];
|
|
20
19
|
export const mlkem768encapresult_ciphertext: (a: number) => [number, number];
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
20
|
+
export const __wbg_mlkem768encapresult_free: (a: number, b: number) => void;
|
|
21
|
+
export const __wbindgen_export: (a: number) => void;
|
|
22
|
+
export const __wbindgen_export2: () => number;
|
|
23
23
|
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
24
|
+
export const __wbindgen_export3: (a: number, b: number) => number;
|
|
25
|
+
export const __wbindgen_export4: (a: number) => void;
|
|
26
|
+
export const __wbindgen_export5: (a: number, b: number, c: number) => void;
|
|
27
27
|
export const __wbindgen_start: () => void;
|
package/pkg-nodejs/README.md
CHANGED
|
@@ -113,7 +113,8 @@ The consumer never calls `free()`, never calls `init()`, and never imports from
|
|
|
113
113
|
- **CVE-2026-22705**: Timing side-channel in `ml-dsa` Decompose function, patched in `>= 0.1.0-rc.3` (Barrett reduction).
|
|
114
114
|
- **CVE-2026-24850**: Signature malleability via duplicate hint indices in `ml-dsa`, patched in `>= 0.1.0-rc.4`.
|
|
115
115
|
- **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
|
-
-
|
|
116
|
+
- **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.
|
|
117
118
|
- **Supply chain**: `Cargo.lock` committed, CI runs `cargo audit` before every build.
|
|
118
119
|
|
|
119
120
|
## License
|
package/pkg-nodejs/package.json
CHANGED
|
@@ -28,7 +28,7 @@ class MlDsa65KeyPair {
|
|
|
28
28
|
get signing_key() {
|
|
29
29
|
const ret = wasm.mldsa65keypair_signing_key(this.__wbg_ptr);
|
|
30
30
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
31
|
-
wasm.
|
|
31
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
32
32
|
return v1;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
@@ -38,7 +38,7 @@ class MlDsa65KeyPair {
|
|
|
38
38
|
get verifying_key() {
|
|
39
39
|
const ret = wasm.mldsa65keypair_verifying_key(this.__wbg_ptr);
|
|
40
40
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
41
|
-
wasm.
|
|
41
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
42
42
|
return v1;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -73,7 +73,7 @@ class MlKem768DecapResult {
|
|
|
73
73
|
get shared_secret() {
|
|
74
74
|
const ret = wasm.mlkem768decapresult_shared_secret(this.__wbg_ptr);
|
|
75
75
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
76
|
-
wasm.
|
|
76
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
77
77
|
return v1;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -108,7 +108,7 @@ class MlKem768EncapResult {
|
|
|
108
108
|
get ciphertext() {
|
|
109
109
|
const ret = wasm.mlkem768encapresult_ciphertext(this.__wbg_ptr);
|
|
110
110
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
111
|
-
wasm.
|
|
111
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
112
112
|
return v1;
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
@@ -118,7 +118,7 @@ class MlKem768EncapResult {
|
|
|
118
118
|
get shared_secret() {
|
|
119
119
|
const ret = wasm.mlkem768encapresult_shared_secret(this.__wbg_ptr);
|
|
120
120
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
121
|
-
wasm.
|
|
121
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
122
122
|
return v1;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -153,7 +153,7 @@ class MlKem768KeyPair {
|
|
|
153
153
|
get decapsulation_key() {
|
|
154
154
|
const ret = wasm.mlkem768keypair_decapsulation_key(this.__wbg_ptr);
|
|
155
155
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
156
|
-
wasm.
|
|
156
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
157
157
|
return v1;
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
@@ -163,7 +163,7 @@ class MlKem768KeyPair {
|
|
|
163
163
|
get encapsulation_key() {
|
|
164
164
|
const ret = wasm.mlkem768keypair_encapsulation_key(this.__wbg_ptr);
|
|
165
165
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
166
|
-
wasm.
|
|
166
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
167
167
|
return v1;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -187,16 +187,16 @@ exports.ml_dsa_65_generate = ml_dsa_65_generate;
|
|
|
187
187
|
* @returns {Uint8Array}
|
|
188
188
|
*/
|
|
189
189
|
function ml_dsa_65_sign(sk_bytes, message) {
|
|
190
|
-
const ptr0 = passArray8ToWasm0(sk_bytes, wasm.
|
|
190
|
+
const ptr0 = passArray8ToWasm0(sk_bytes, wasm.__wbindgen_export3);
|
|
191
191
|
const len0 = WASM_VECTOR_LEN;
|
|
192
|
-
const ptr1 = passArray8ToWasm0(message, wasm.
|
|
192
|
+
const ptr1 = passArray8ToWasm0(message, wasm.__wbindgen_export3);
|
|
193
193
|
const len1 = WASM_VECTOR_LEN;
|
|
194
194
|
const ret = wasm.ml_dsa_65_sign(ptr0, len0, ptr1, len1);
|
|
195
195
|
if (ret[3]) {
|
|
196
196
|
throw takeFromExternrefTable0(ret[2]);
|
|
197
197
|
}
|
|
198
198
|
var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
199
|
-
wasm.
|
|
199
|
+
wasm.__wbindgen_export5(ret[0], ret[1] * 1, 1);
|
|
200
200
|
return v3;
|
|
201
201
|
}
|
|
202
202
|
exports.ml_dsa_65_sign = ml_dsa_65_sign;
|
|
@@ -209,11 +209,11 @@ exports.ml_dsa_65_sign = ml_dsa_65_sign;
|
|
|
209
209
|
* @returns {boolean}
|
|
210
210
|
*/
|
|
211
211
|
function ml_dsa_65_verify(vk_bytes, message, signature) {
|
|
212
|
-
const ptr0 = passArray8ToWasm0(vk_bytes, wasm.
|
|
212
|
+
const ptr0 = passArray8ToWasm0(vk_bytes, wasm.__wbindgen_export3);
|
|
213
213
|
const len0 = WASM_VECTOR_LEN;
|
|
214
|
-
const ptr1 = passArray8ToWasm0(message, wasm.
|
|
214
|
+
const ptr1 = passArray8ToWasm0(message, wasm.__wbindgen_export3);
|
|
215
215
|
const len1 = WASM_VECTOR_LEN;
|
|
216
|
-
const ptr2 = passArray8ToWasm0(signature, wasm.
|
|
216
|
+
const ptr2 = passArray8ToWasm0(signature, wasm.__wbindgen_export3);
|
|
217
217
|
const len2 = WASM_VECTOR_LEN;
|
|
218
218
|
const ret = wasm.ml_dsa_65_verify(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
219
219
|
if (ret[2]) {
|
|
@@ -230,9 +230,9 @@ exports.ml_dsa_65_verify = ml_dsa_65_verify;
|
|
|
230
230
|
* @returns {MlKem768DecapResult}
|
|
231
231
|
*/
|
|
232
232
|
function ml_kem_768_decapsulate(dk_bytes, ct_bytes) {
|
|
233
|
-
const ptr0 = passArray8ToWasm0(dk_bytes, wasm.
|
|
233
|
+
const ptr0 = passArray8ToWasm0(dk_bytes, wasm.__wbindgen_export3);
|
|
234
234
|
const len0 = WASM_VECTOR_LEN;
|
|
235
|
-
const ptr1 = passArray8ToWasm0(ct_bytes, wasm.
|
|
235
|
+
const ptr1 = passArray8ToWasm0(ct_bytes, wasm.__wbindgen_export3);
|
|
236
236
|
const len1 = WASM_VECTOR_LEN;
|
|
237
237
|
const ret = wasm.ml_kem_768_decapsulate(ptr0, len0, ptr1, len1);
|
|
238
238
|
if (ret[2]) {
|
|
@@ -248,7 +248,7 @@ exports.ml_kem_768_decapsulate = ml_kem_768_decapsulate;
|
|
|
248
248
|
* @returns {MlKem768EncapResult}
|
|
249
249
|
*/
|
|
250
250
|
function ml_kem_768_encapsulate(ek_bytes) {
|
|
251
|
-
const ptr0 = passArray8ToWasm0(ek_bytes, wasm.
|
|
251
|
+
const ptr0 = passArray8ToWasm0(ek_bytes, wasm.__wbindgen_export3);
|
|
252
252
|
const len0 = WASM_VECTOR_LEN;
|
|
253
253
|
const ret = wasm.ml_kem_768_encapsulate(ptr0, len0);
|
|
254
254
|
if (ret[2]) {
|
|
@@ -400,7 +400,7 @@ const MlKem768KeyPairFinalization = (typeof FinalizationRegistry === 'undefined'
|
|
|
400
400
|
: new FinalizationRegistry(ptr => wasm.__wbg_mlkem768keypair_free(ptr >>> 0, 1));
|
|
401
401
|
|
|
402
402
|
function addToExternrefTable0(obj) {
|
|
403
|
-
const idx = wasm.
|
|
403
|
+
const idx = wasm.__wbindgen_export2();
|
|
404
404
|
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
405
405
|
return idx;
|
|
406
406
|
}
|
|
@@ -428,7 +428,7 @@ function handleError(f, args) {
|
|
|
428
428
|
return f.apply(this, args);
|
|
429
429
|
} catch (e) {
|
|
430
430
|
const idx = addToExternrefTable0(e);
|
|
431
|
-
wasm.
|
|
431
|
+
wasm.__wbindgen_export(idx);
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
|
|
@@ -445,7 +445,7 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
445
445
|
|
|
446
446
|
function takeFromExternrefTable0(idx) {
|
|
447
447
|
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
448
|
-
wasm.
|
|
448
|
+
wasm.__wbindgen_export4(idx);
|
|
449
449
|
return value;
|
|
450
450
|
}
|
|
451
451
|
|
|
Binary file
|
|
@@ -12,16 +12,16 @@ export const ml_kem_768_generate: () => number;
|
|
|
12
12
|
export const mldsa65keypair_signing_key: (a: number) => [number, number];
|
|
13
13
|
export const mldsa65keypair_verifying_key: (a: number) => [number, number];
|
|
14
14
|
export const mlkem768decapresult_shared_secret: (a: number) => [number, number];
|
|
15
|
-
export const __wbg_mlkem768encapresult_free: (a: number, b: number) => void;
|
|
16
|
-
export const __wbg_mlkem768keypair_free: (a: number, b: number) => void;
|
|
17
15
|
export const mlkem768keypair_encapsulation_key: (a: number) => [number, number];
|
|
18
16
|
export const mlkem768keypair_decapsulation_key: (a: number) => [number, number];
|
|
17
|
+
export const __wbg_mlkem768keypair_free: (a: number, b: number) => void;
|
|
19
18
|
export const mlkem768encapresult_shared_secret: (a: number) => [number, number];
|
|
20
19
|
export const mlkem768encapresult_ciphertext: (a: number) => [number, number];
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
20
|
+
export const __wbg_mlkem768encapresult_free: (a: number, b: number) => void;
|
|
21
|
+
export const __wbindgen_export: (a: number) => void;
|
|
22
|
+
export const __wbindgen_export2: () => number;
|
|
23
23
|
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
24
|
+
export const __wbindgen_export3: (a: number, b: number) => number;
|
|
25
|
+
export const __wbindgen_export4: (a: number) => void;
|
|
26
|
+
export const __wbindgen_export5: (a: number, b: number, c: number) => void;
|
|
27
27
|
export const __wbindgen_start: () => void;
|