@enclave-e3/wasm 0.1.7 → 0.1.8

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.
@@ -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,28 @@ 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
+
85
106
  /**
86
107
  * Retrieves a BFV parameter set by name.
87
108
  *
88
109
  * # Parameters
89
- * * `name` - Parameter set identifier (e.g., "SET_8192_1000_4")
110
+ * * `name` - Parameter set identifier (e.g., "SECURE_THRESHOLD_BFV_8192")
90
111
  *
91
112
  * # Returns
92
113
  * A JavaScript object with the following structure:
@@ -103,12 +124,13 @@ export function bfv_verifiable_encrypt_vector(data: BigUint64Array, public_key:
103
124
  * Returns error if the parameter set name is invalid or serialization fails.
104
125
  */
105
126
  export function get_bfv_params(name: string): any;
127
+
106
128
  /**
107
129
  * Returns all available BFV parameter set identifiers.
108
130
  *
109
131
  * # Returns
110
132
  * Array of parameter set names that can be passed to `get_bfv_params()`.
111
- * Includes both production-ready sets (e.g., "SET_8192_1000_4") and
133
+ * Includes both production-ready sets (e.g., "SECURE_THRESHOLD_BFV_8192") and
112
134
  * insecure sets for testing (prefixed with "INSECURE_").
113
135
  */
114
136
  export function get_bfv_params_list(): string[];