@enclave-e3/wasm 0.1.7 → 0.1.9
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/dist/node/e3_wasm.d.ts +29 -2
- package/dist/node/e3_wasm.js +380 -356
- package/dist/node/e3_wasm_bg.wasm +0 -0
- package/dist/node/e3_wasm_bg.wasm.d.ts +2 -0
- package/dist/web/e3_wasm.d.ts +62 -32
- package/dist/web/e3_wasm.js +391 -347
- package/dist/web/e3_wasm_base64.js +1 -1
- package/package.json +1 -1
package/dist/node/e3_wasm.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* A function to encrypt a u64 value using BFV and default params.
|
|
5
6
|
*
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
* Panics if the data cannot be encrypted
|
|
21
22
|
*/
|
|
22
23
|
export function bfv_encrypt_number(data: bigint, public_key: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): Uint8Array;
|
|
24
|
+
|
|
23
25
|
/**
|
|
24
26
|
* A function to encrypt a Vec<u64> value using BFV and default params.
|
|
25
27
|
*
|
|
@@ -40,6 +42,7 @@ export function bfv_encrypt_number(data: bigint, public_key: Uint8Array, degree:
|
|
|
40
42
|
* Panics if the data cannot be encrypted
|
|
41
43
|
*/
|
|
42
44
|
export function bfv_encrypt_vector(data: BigUint64Array, public_key: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): Uint8Array;
|
|
45
|
+
|
|
43
46
|
/**
|
|
44
47
|
* A function to encrypt a u64 value using BFV and default params and
|
|
45
48
|
* generate circuit inputs for Greco
|
|
@@ -61,6 +64,7 @@ export function bfv_encrypt_vector(data: BigUint64Array, public_key: Uint8Array,
|
|
|
61
64
|
* Panics if the data cannot be encrypted
|
|
62
65
|
*/
|
|
63
66
|
export function bfv_verifiable_encrypt_number(data: bigint, public_key: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): any[];
|
|
67
|
+
|
|
64
68
|
/**
|
|
65
69
|
* A function to encrypt a Vec<u64> value using BFV and default params and
|
|
66
70
|
* generate circuit inputs for Greco
|
|
@@ -82,11 +86,33 @@ export function bfv_verifiable_encrypt_number(data: bigint, public_key: Uint8Arr
|
|
|
82
86
|
* Panics if the data cannot be encrypted
|
|
83
87
|
*/
|
|
84
88
|
export function bfv_verifiable_encrypt_vector(data: BigUint64Array, public_key: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): any[];
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A function to compute the public key commitment for a given public key.
|
|
92
|
+
*
|
|
93
|
+
* # Arguments
|
|
94
|
+
*
|
|
95
|
+
* * `public_key` - The public key to compute the commitment for
|
|
96
|
+
*
|
|
97
|
+
* # Returns
|
|
98
|
+
* Returns a `Result<Vec<u8>, JsValue>` containing the commitment and any errors.
|
|
99
|
+
*
|
|
100
|
+
* # Panics
|
|
101
|
+
*
|
|
102
|
+
* Panics if the public key cannot be computed
|
|
103
|
+
*/
|
|
104
|
+
export function compute_pk_commitment(public_key: Uint8Array, degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): Uint8Array;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Generate a public key from JavaScript.
|
|
108
|
+
*/
|
|
109
|
+
export function generate_public_key(degree: number, plaintext_modulus: bigint, moduli: BigUint64Array): Uint8Array;
|
|
110
|
+
|
|
85
111
|
/**
|
|
86
112
|
* Retrieves a BFV parameter set by name.
|
|
87
113
|
*
|
|
88
114
|
* # Parameters
|
|
89
|
-
* * `name` - Parameter set identifier (e.g., "
|
|
115
|
+
* * `name` - Parameter set identifier (e.g., "SECURE_THRESHOLD_8192")
|
|
90
116
|
*
|
|
91
117
|
* # Returns
|
|
92
118
|
* A JavaScript object with the following structure:
|
|
@@ -103,12 +129,13 @@ export function bfv_verifiable_encrypt_vector(data: BigUint64Array, public_key:
|
|
|
103
129
|
* Returns error if the parameter set name is invalid or serialization fails.
|
|
104
130
|
*/
|
|
105
131
|
export function get_bfv_params(name: string): any;
|
|
132
|
+
|
|
106
133
|
/**
|
|
107
134
|
* Returns all available BFV parameter set identifiers.
|
|
108
135
|
*
|
|
109
136
|
* # Returns
|
|
110
137
|
* Array of parameter set names that can be passed to `get_bfv_params()`.
|
|
111
|
-
* Includes both production-ready sets (e.g., "
|
|
138
|
+
* Includes both production-ready sets (e.g., "SECURE_THRESHOLD_8192") and
|
|
112
139
|
* insecure sets for testing (prefixed with "INSECURE_").
|
|
113
140
|
*/
|
|
114
141
|
export function get_bfv_params_list(): string[];
|