tfhe 0.3.0 → 0.3.2
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 +44 -68
- package/package.json +1 -1
- package/tfhe.d.ts +116 -107
- package/tfhe.js +83 -79
- package/tfhe_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -31,7 +31,9 @@ implementation. The goal is to have a stable, simple, high-performance, and
|
|
|
31
31
|
production-ready library for all the advanced features of TFHE.
|
|
32
32
|
|
|
33
33
|
## Getting Started
|
|
34
|
+
The steps to run a first example are described below.
|
|
34
35
|
|
|
36
|
+
### Cargo.toml configuration
|
|
35
37
|
To use the latest version of `TFHE-rs` in your project, you first need to add it as a dependency in your `Cargo.toml`:
|
|
36
38
|
|
|
37
39
|
+ For x86_64-based machines running Unix-like OSes:
|
|
@@ -57,95 +59,69 @@ tfhe = { version = "*", features = ["boolean", "shortint", "integer", "x86_64"]
|
|
|
57
59
|
|
|
58
60
|
Note: aarch64-based machines are not yet supported for Windows as it's currently missing an entropy source to be able to seed the [CSPRNGs](https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator) used in TFHE-rs
|
|
59
61
|
|
|
60
|
-
Note that when running code that uses `tfhe-rs`, it is highly recommended
|
|
61
|
-
to run in release mode with cargo's `--release` flag to have the best performances possible,
|
|
62
|
-
eg: `cargo run --release`.
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
## A simple example
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
use tfhe::boolean::prelude::*;
|
|
65
|
+
Here is a full example:
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
``` rust
|
|
68
|
+
use tfhe::prelude::*;
|
|
69
|
+
use tfhe::{generate_keys, set_server_key, ConfigBuilder, FheUint32, FheUint8};
|
|
72
70
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
let
|
|
71
|
+
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
72
|
+
// Basic configuration to use homomorphic integers
|
|
73
|
+
let config = ConfigBuilder::all_disabled()
|
|
74
|
+
.enable_default_integers()
|
|
75
|
+
.build();
|
|
76
76
|
|
|
77
|
-
//
|
|
78
|
-
|
|
79
|
-
let ct_3 = server_key.not(&ct_2);
|
|
80
|
-
let ct_4 = server_key.and(&ct_1, &ct_2);
|
|
81
|
-
let ct_5 = server_key.nand(&ct_3, &ct_4);
|
|
82
|
-
let ct_6 = server_key.mux(&ct_5, &ct_3, &ct_4);
|
|
77
|
+
// Key generation
|
|
78
|
+
let (client_key, server_keys) = generate_keys(config);
|
|
83
79
|
|
|
84
|
-
|
|
85
|
-
let
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
```
|
|
80
|
+
let clear_a = 1344u32;
|
|
81
|
+
let clear_b = 5u32;
|
|
82
|
+
let clear_c = 7u8;
|
|
89
83
|
|
|
90
|
-
|
|
84
|
+
// Encrypting the input data using the (private) client_key
|
|
85
|
+
// FheUint32: Encrypted equivalent to u32
|
|
86
|
+
let mut encrypted_a = FheUint32::try_encrypt(clear_a, &client_key)?;
|
|
87
|
+
let encrypted_b = FheUint32::try_encrypt(clear_b, &client_key)?;
|
|
91
88
|
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
// FheUint8: Encrypted equivalent to u8
|
|
90
|
+
let encrypted_c = FheUint8::try_encrypt(clear_c, &client_key)?;
|
|
94
91
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
// with 2 bits of message and 2 bits of carry
|
|
98
|
-
let (client_key, server_key) = gen_keys(PARAM_MESSAGE_2_CARRY_2_KS_PBS);
|
|
92
|
+
// On the server side:
|
|
93
|
+
set_server_key(server_keys);
|
|
99
94
|
|
|
100
|
-
|
|
101
|
-
let
|
|
95
|
+
// Clear equivalent computations: 1344 * 8 = 10752
|
|
96
|
+
let encrypted_res_mul = &encrypted_a * &encrypted_b;
|
|
102
97
|
|
|
103
|
-
//
|
|
104
|
-
|
|
105
|
-
let ct_2 = client_key.encrypt(msg2);
|
|
98
|
+
// Clear equivalent computations: 1344 >> 8 = 42
|
|
99
|
+
encrypted_a = &encrypted_res_mul >> &encrypted_b;
|
|
106
100
|
|
|
107
|
-
//
|
|
108
|
-
let
|
|
101
|
+
// Clear equivalent computations: let casted_a = a as u8;
|
|
102
|
+
let casted_a: FheUint8 = encrypted_a.cast_into();
|
|
109
103
|
|
|
110
|
-
//
|
|
111
|
-
|
|
112
|
-
let f = |x:u64| x.count_ones() as u64;
|
|
104
|
+
// Clear equivalent computations: min(42, 7) = 7
|
|
105
|
+
let encrypted_res_min = &casted_a.min(&encrypted_c);
|
|
113
106
|
|
|
114
|
-
//
|
|
115
|
-
|
|
107
|
+
// Operation between clear and encrypted data:
|
|
108
|
+
// Clear equivalent computations: 7 & 1 = 1
|
|
109
|
+
let encrypted_res = encrypted_res_min & 1_u8;
|
|
116
110
|
|
|
117
|
-
//
|
|
118
|
-
let
|
|
111
|
+
// Decrypting on the client side:
|
|
112
|
+
let clear_res: u8 = encrypted_res.decrypt(&client_key);
|
|
113
|
+
assert_eq!(clear_res, 1_u8);
|
|
119
114
|
|
|
120
|
-
|
|
121
|
-
let output = client_key.decrypt(&ct_res);
|
|
122
|
-
assert_eq!(output, f(msg1 + msg2));
|
|
115
|
+
Ok(())
|
|
123
116
|
}
|
|
124
117
|
```
|
|
125
118
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
```rust
|
|
129
|
-
use tfhe::integer::gen_keys_radix;
|
|
130
|
-
use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2_KS_PBS;
|
|
131
|
-
|
|
132
|
-
fn main() {
|
|
133
|
-
// We create keys to create 16 bits integers
|
|
134
|
-
// using 8 blocks of 2 bits
|
|
135
|
-
let (cks, sks) = gen_keys_radix(PARAM_MESSAGE_2_CARRY_2_KS_PBS, 8);
|
|
119
|
+
To run this code, use the following command:
|
|
120
|
+
<p align="center"> <code> cargo run --release </code> </p>
|
|
136
121
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
let mut a = cks.encrypt(clear_a as u64);
|
|
141
|
-
let mut b = cks.encrypt(clear_b as u64);
|
|
142
|
-
|
|
143
|
-
let encrypted_max = sks.smart_max_parallelized(&mut a, &mut b);
|
|
144
|
-
let decrypted_max: u64 = cks.decrypt(&encrypted_max);
|
|
122
|
+
Note that when running code that uses `tfhe-rs`, it is highly recommended
|
|
123
|
+
to run in release mode with cargo's `--release` flag to have the best performances possible,
|
|
145
124
|
|
|
146
|
-
assert_eq!(decrypted_max as u16, clear_a.max(clear_b))
|
|
147
|
-
}
|
|
148
|
-
```
|
|
149
125
|
|
|
150
126
|
## Contributing
|
|
151
127
|
|
package/package.json
CHANGED
package/tfhe.d.ts
CHANGED
|
@@ -5,6 +5,20 @@
|
|
|
5
5
|
export function init_panic_hook(): void;
|
|
6
6
|
/**
|
|
7
7
|
*/
|
|
8
|
+
export enum BooleanParameterSet {
|
|
9
|
+
Default = 0,
|
|
10
|
+
TfheLib = 1,
|
|
11
|
+
DefaultKsPbs = 2,
|
|
12
|
+
TfheLibKsPbs = 3,
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
*/
|
|
16
|
+
export enum BooleanEncryptionKeyChoice {
|
|
17
|
+
Big = 0,
|
|
18
|
+
Small = 1,
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
*/
|
|
8
22
|
export enum ShortintEncryptionKeyChoice {
|
|
9
23
|
Big = 0,
|
|
10
24
|
Small = 1,
|
|
@@ -150,12 +164,6 @@ export enum ShortintParametersName {
|
|
|
150
164
|
}
|
|
151
165
|
/**
|
|
152
166
|
*/
|
|
153
|
-
export enum BooleanParameterSet {
|
|
154
|
-
Default = 0,
|
|
155
|
-
TfheLib = 1,
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
*/
|
|
159
167
|
export class Boolean {
|
|
160
168
|
free(): void;
|
|
161
169
|
/**
|
|
@@ -173,9 +181,10 @@ export class Boolean {
|
|
|
173
181
|
* @param {number} pbs_level
|
|
174
182
|
* @param {number} ks_base_log
|
|
175
183
|
* @param {number} ks_level
|
|
184
|
+
* @param {number} encryption_key_choice
|
|
176
185
|
* @returns {BooleanParameters}
|
|
177
186
|
*/
|
|
178
|
-
static new_parameters(lwe_dimension: number, glwe_dimension: number, polynomial_size: number, lwe_modular_std_dev: number, glwe_modular_std_dev: number, pbs_base_log: number, pbs_level: number, ks_base_log: number, ks_level: number): BooleanParameters;
|
|
187
|
+
static new_parameters(lwe_dimension: number, glwe_dimension: number, polynomial_size: number, lwe_modular_std_dev: number, glwe_modular_std_dev: number, pbs_base_log: number, pbs_level: number, ks_base_log: number, ks_level: number, encryption_key_choice: number): BooleanParameters;
|
|
179
188
|
/**
|
|
180
189
|
* @param {bigint} seed_high_bytes
|
|
181
190
|
* @param {bigint} seed_low_bytes
|
|
@@ -1367,6 +1376,77 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
1367
1376
|
|
|
1368
1377
|
export interface InitOutput {
|
|
1369
1378
|
readonly memory: WebAssembly.Memory;
|
|
1379
|
+
readonly __wbg_tfheconfig_free: (a: number) => void;
|
|
1380
|
+
readonly tfheconfigbuilder_all_disabled: () => number;
|
|
1381
|
+
readonly tfheconfigbuilder_enable_default_integers: (a: number) => number;
|
|
1382
|
+
readonly tfheconfigbuilder_enable_default_integers_small: (a: number) => number;
|
|
1383
|
+
readonly tfheconfigbuilder_enable_custom_integers: (a: number, b: number) => number;
|
|
1384
|
+
readonly tfheconfigbuilder_build: (a: number) => number;
|
|
1385
|
+
readonly __wbg_tfhe_free: (a: number) => void;
|
|
1386
|
+
readonly __wbg_tfheconfigbuilder_free: (a: number) => void;
|
|
1387
|
+
readonly __wbg_booleanciphertext_free: (a: number) => void;
|
|
1388
|
+
readonly __wbg_booleancompressedciphertext_free: (a: number) => void;
|
|
1389
|
+
readonly __wbg_booleanclientkey_free: (a: number) => void;
|
|
1390
|
+
readonly __wbg_booleanpublickey_free: (a: number) => void;
|
|
1391
|
+
readonly __wbg_booleancompressedserverkey_free: (a: number) => void;
|
|
1392
|
+
readonly __wbg_booleanparameters_free: (a: number) => void;
|
|
1393
|
+
readonly boolean_get_parameters: (a: number, b: number) => void;
|
|
1394
|
+
readonly boolean_new_parameters: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
|
|
1395
|
+
readonly boolean_new_client_key_from_seed_and_parameters: (a: number, b: number, c: number) => number;
|
|
1396
|
+
readonly boolean_new_client_key: (a: number) => number;
|
|
1397
|
+
readonly boolean_new_public_key: (a: number) => number;
|
|
1398
|
+
readonly boolean_new_compressed_server_key: (a: number) => number;
|
|
1399
|
+
readonly boolean_encrypt: (a: number, b: number) => number;
|
|
1400
|
+
readonly boolean_encrypt_compressed: (a: number, b: number) => number;
|
|
1401
|
+
readonly boolean_decompress_ciphertext: (a: number) => number;
|
|
1402
|
+
readonly boolean_encrypt_with_public_key: (a: number, b: number) => number;
|
|
1403
|
+
readonly boolean_trivial_encrypt: (a: number, b: number) => number;
|
|
1404
|
+
readonly boolean_decrypt: (a: number, b: number) => number;
|
|
1405
|
+
readonly boolean_serialize_ciphertext: (a: number, b: number) => void;
|
|
1406
|
+
readonly boolean_deserialize_ciphertext: (a: number, b: number, c: number) => void;
|
|
1407
|
+
readonly boolean_serialize_compressed_ciphertext: (a: number, b: number) => void;
|
|
1408
|
+
readonly boolean_deserialize_compressed_ciphertext: (a: number, b: number, c: number) => void;
|
|
1409
|
+
readonly boolean_serialize_client_key: (a: number, b: number) => void;
|
|
1410
|
+
readonly boolean_deserialize_client_key: (a: number, b: number, c: number) => void;
|
|
1411
|
+
readonly boolean_serialize_public_key: (a: number, b: number) => void;
|
|
1412
|
+
readonly boolean_deserialize_public_key: (a: number, b: number, c: number) => void;
|
|
1413
|
+
readonly boolean_serialize_compressed_server_key: (a: number, b: number) => void;
|
|
1414
|
+
readonly boolean_deserialize_compressed_server_key: (a: number, b: number, c: number) => void;
|
|
1415
|
+
readonly __wbg_boolean_free: (a: number) => void;
|
|
1416
|
+
readonly __wbg_shortintciphertext_free: (a: number) => void;
|
|
1417
|
+
readonly __wbg_shortintcompressedciphertext_free: (a: number) => void;
|
|
1418
|
+
readonly __wbg_shortintclientkey_free: (a: number) => void;
|
|
1419
|
+
readonly __wbg_shortintpublickey_free: (a: number) => void;
|
|
1420
|
+
readonly __wbg_shortintcompressedpublickey_free: (a: number) => void;
|
|
1421
|
+
readonly __wbg_shortintcompressedserverkey_free: (a: number) => void;
|
|
1422
|
+
readonly __wbg_shortintparameters_free: (a: number) => void;
|
|
1423
|
+
readonly shortintparameters_new: (a: number) => number;
|
|
1424
|
+
readonly shortint_get_parameters: (a: number, b: number, c: number) => void;
|
|
1425
|
+
readonly shortint_get_parameters_small: (a: number, b: number, c: number) => void;
|
|
1426
|
+
readonly shortint_new_parameters: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => number;
|
|
1427
|
+
readonly shortint_new_client_key_from_seed_and_parameters: (a: number, b: number, c: number, d: number) => void;
|
|
1428
|
+
readonly shortint_new_client_key: (a: number) => number;
|
|
1429
|
+
readonly shortint_new_public_key: (a: number) => number;
|
|
1430
|
+
readonly shortint_new_compressed_public_key: (a: number) => number;
|
|
1431
|
+
readonly shortint_new_compressed_server_key: (a: number) => number;
|
|
1432
|
+
readonly shortint_encrypt: (a: number, b: number) => number;
|
|
1433
|
+
readonly shortint_encrypt_compressed: (a: number, b: number) => number;
|
|
1434
|
+
readonly shortint_decompress_ciphertext: (a: number) => number;
|
|
1435
|
+
readonly shortint_encrypt_with_public_key: (a: number, b: number) => number;
|
|
1436
|
+
readonly shortint_encrypt_with_compressed_public_key: (a: number, b: number) => number;
|
|
1437
|
+
readonly shortint_decrypt: (a: number, b: number) => number;
|
|
1438
|
+
readonly shortint_serialize_ciphertext: (a: number, b: number) => void;
|
|
1439
|
+
readonly shortint_deserialize_ciphertext: (a: number, b: number, c: number) => void;
|
|
1440
|
+
readonly shortint_serialize_compressed_ciphertext: (a: number, b: number) => void;
|
|
1441
|
+
readonly shortint_deserialize_compressed_ciphertext: (a: number, b: number, c: number) => void;
|
|
1442
|
+
readonly shortint_serialize_client_key: (a: number, b: number) => void;
|
|
1443
|
+
readonly shortint_deserialize_client_key: (a: number, b: number, c: number) => void;
|
|
1444
|
+
readonly shortint_serialize_public_key: (a: number, b: number) => void;
|
|
1445
|
+
readonly shortint_deserialize_public_key: (a: number, b: number, c: number) => void;
|
|
1446
|
+
readonly shortint_serialize_compressed_public_key: (a: number, b: number) => void;
|
|
1447
|
+
readonly shortint_deserialize_compressed_public_key: (a: number, b: number, c: number) => void;
|
|
1448
|
+
readonly shortint_serialize_compressed_server_key: (a: number, b: number) => void;
|
|
1449
|
+
readonly shortint_deserialize_compressed_server_key: (a: number, b: number, c: number) => void;
|
|
1370
1450
|
readonly __wbg_fheuint128_free: (a: number) => void;
|
|
1371
1451
|
readonly fheuint128_encrypt_with_client_key: (a: number, b: number, c: number) => void;
|
|
1372
1452
|
readonly fheuint128_encrypt_with_public_key: (a: number, b: number, c: number) => void;
|
|
@@ -1479,32 +1559,6 @@ export interface InitOutput {
|
|
|
1479
1559
|
readonly compactfheuint64list_expand: (a: number, b: number) => void;
|
|
1480
1560
|
readonly compactfheuint64list_serialize: (a: number, b: number) => void;
|
|
1481
1561
|
readonly compactfheuint64list_deserialize: (a: number, b: number, c: number) => void;
|
|
1482
|
-
readonly __wbg_fheuint256_free: (a: number) => void;
|
|
1483
|
-
readonly __wbg_fheuint8_free: (a: number) => void;
|
|
1484
|
-
readonly __wbg_fheuint16_free: (a: number) => void;
|
|
1485
|
-
readonly __wbg_fheuint32_free: (a: number) => void;
|
|
1486
|
-
readonly __wbg_fheuint64_free: (a: number) => void;
|
|
1487
|
-
readonly __wbg_compactfheuint128list_free: (a: number) => void;
|
|
1488
|
-
readonly __wbg_compressedfheuint256_free: (a: number) => void;
|
|
1489
|
-
readonly __wbg_compactfheuint256_free: (a: number) => void;
|
|
1490
|
-
readonly __wbg_compactfheuint256list_free: (a: number) => void;
|
|
1491
|
-
readonly __wbg_compressedfheuint8_free: (a: number) => void;
|
|
1492
|
-
readonly __wbg_compactfheuint8_free: (a: number) => void;
|
|
1493
|
-
readonly __wbg_compactfheuint8list_free: (a: number) => void;
|
|
1494
|
-
readonly __wbg_compressedfheuint16_free: (a: number) => void;
|
|
1495
|
-
readonly __wbg_compactfheuint16_free: (a: number) => void;
|
|
1496
|
-
readonly __wbg_compactfheuint16list_free: (a: number) => void;
|
|
1497
|
-
readonly __wbg_compressedfheuint32_free: (a: number) => void;
|
|
1498
|
-
readonly __wbg_compactfheuint32_free: (a: number) => void;
|
|
1499
|
-
readonly __wbg_compactfheuint32list_free: (a: number) => void;
|
|
1500
|
-
readonly __wbg_compressedfheuint64_free: (a: number) => void;
|
|
1501
|
-
readonly __wbg_compactfheuint64_free: (a: number) => void;
|
|
1502
|
-
readonly __wbg_compactfheuint64list_free: (a: number) => void;
|
|
1503
|
-
readonly compressedfheuint256_decompress: (a: number, b: number) => void;
|
|
1504
|
-
readonly compressedfheuint8_decompress: (a: number, b: number) => void;
|
|
1505
|
-
readonly compressedfheuint16_decompress: (a: number, b: number) => void;
|
|
1506
|
-
readonly compressedfheuint32_decompress: (a: number, b: number) => void;
|
|
1507
|
-
readonly compressedfheuint64_decompress: (a: number, b: number) => void;
|
|
1508
1562
|
readonly init_panic_hook: () => void;
|
|
1509
1563
|
readonly __wbg_tfheclientkey_free: (a: number) => void;
|
|
1510
1564
|
readonly tfheclientkey_generate: (a: number, b: number) => void;
|
|
@@ -1533,82 +1587,37 @@ export interface InitOutput {
|
|
|
1533
1587
|
readonly tfhecompressedcompactpublickey_serialize: (a: number, b: number) => void;
|
|
1534
1588
|
readonly tfhecompressedcompactpublickey_deserialize: (a: number, b: number, c: number) => void;
|
|
1535
1589
|
readonly tfhecompressedcompactpublickey_decompress: (a: number, b: number) => void;
|
|
1536
|
-
readonly
|
|
1537
|
-
readonly
|
|
1538
|
-
readonly
|
|
1539
|
-
readonly
|
|
1540
|
-
readonly
|
|
1541
|
-
readonly
|
|
1542
|
-
readonly
|
|
1543
|
-
readonly
|
|
1544
|
-
readonly
|
|
1545
|
-
readonly
|
|
1546
|
-
readonly
|
|
1547
|
-
readonly
|
|
1548
|
-
readonly
|
|
1549
|
-
readonly
|
|
1550
|
-
readonly
|
|
1551
|
-
readonly
|
|
1552
|
-
readonly
|
|
1553
|
-
readonly
|
|
1554
|
-
readonly
|
|
1555
|
-
readonly
|
|
1556
|
-
readonly
|
|
1557
|
-
readonly
|
|
1558
|
-
readonly
|
|
1559
|
-
readonly
|
|
1560
|
-
readonly
|
|
1561
|
-
readonly
|
|
1562
|
-
readonly shortint_encrypt_with_public_key: (a: number, b: number) => number;
|
|
1563
|
-
readonly shortint_encrypt_with_compressed_public_key: (a: number, b: number) => number;
|
|
1564
|
-
readonly shortint_decrypt: (a: number, b: number) => number;
|
|
1565
|
-
readonly shortint_serialize_ciphertext: (a: number, b: number) => void;
|
|
1566
|
-
readonly shortint_deserialize_ciphertext: (a: number, b: number, c: number) => void;
|
|
1567
|
-
readonly shortint_serialize_compressed_ciphertext: (a: number, b: number) => void;
|
|
1568
|
-
readonly shortint_deserialize_compressed_ciphertext: (a: number, b: number, c: number) => void;
|
|
1569
|
-
readonly shortint_serialize_client_key: (a: number, b: number) => void;
|
|
1570
|
-
readonly shortint_deserialize_client_key: (a: number, b: number, c: number) => void;
|
|
1571
|
-
readonly shortint_serialize_public_key: (a: number, b: number) => void;
|
|
1572
|
-
readonly shortint_deserialize_public_key: (a: number, b: number, c: number) => void;
|
|
1573
|
-
readonly shortint_serialize_compressed_public_key: (a: number, b: number) => void;
|
|
1574
|
-
readonly shortint_deserialize_compressed_public_key: (a: number, b: number, c: number) => void;
|
|
1575
|
-
readonly shortint_serialize_compressed_server_key: (a: number, b: number) => void;
|
|
1576
|
-
readonly shortint_deserialize_compressed_server_key: (a: number, b: number, c: number) => void;
|
|
1590
|
+
readonly __wbg_compactfheuint128list_free: (a: number) => void;
|
|
1591
|
+
readonly __wbg_compressedfheuint256_free: (a: number) => void;
|
|
1592
|
+
readonly __wbg_compactfheuint256_free: (a: number) => void;
|
|
1593
|
+
readonly __wbg_compactfheuint256list_free: (a: number) => void;
|
|
1594
|
+
readonly __wbg_compressedfheuint8_free: (a: number) => void;
|
|
1595
|
+
readonly __wbg_compactfheuint8_free: (a: number) => void;
|
|
1596
|
+
readonly __wbg_compactfheuint8list_free: (a: number) => void;
|
|
1597
|
+
readonly __wbg_compressedfheuint16_free: (a: number) => void;
|
|
1598
|
+
readonly __wbg_compactfheuint16_free: (a: number) => void;
|
|
1599
|
+
readonly __wbg_compactfheuint16list_free: (a: number) => void;
|
|
1600
|
+
readonly __wbg_compressedfheuint32_free: (a: number) => void;
|
|
1601
|
+
readonly __wbg_compactfheuint32_free: (a: number) => void;
|
|
1602
|
+
readonly __wbg_compactfheuint32list_free: (a: number) => void;
|
|
1603
|
+
readonly __wbg_compressedfheuint64_free: (a: number) => void;
|
|
1604
|
+
readonly __wbg_compactfheuint64_free: (a: number) => void;
|
|
1605
|
+
readonly __wbg_compactfheuint64list_free: (a: number) => void;
|
|
1606
|
+
readonly __wbg_fheuint256_free: (a: number) => void;
|
|
1607
|
+
readonly __wbg_fheuint8_free: (a: number) => void;
|
|
1608
|
+
readonly __wbg_fheuint16_free: (a: number) => void;
|
|
1609
|
+
readonly __wbg_fheuint32_free: (a: number) => void;
|
|
1610
|
+
readonly __wbg_fheuint64_free: (a: number) => void;
|
|
1611
|
+
readonly compressedfheuint256_decompress: (a: number, b: number) => void;
|
|
1612
|
+
readonly compressedfheuint8_decompress: (a: number, b: number) => void;
|
|
1613
|
+
readonly compressedfheuint16_decompress: (a: number, b: number) => void;
|
|
1614
|
+
readonly compressedfheuint32_decompress: (a: number, b: number) => void;
|
|
1615
|
+
readonly compressedfheuint64_decompress: (a: number, b: number) => void;
|
|
1577
1616
|
readonly __wbg_shortint_free: (a: number) => void;
|
|
1578
|
-
readonly
|
|
1579
|
-
readonly
|
|
1580
|
-
readonly __wbg_booleanclientkey_free: (a: number) => void;
|
|
1581
|
-
readonly __wbg_booleanpublickey_free: (a: number) => void;
|
|
1582
|
-
readonly __wbg_booleancompressedserverkey_free: (a: number) => void;
|
|
1583
|
-
readonly __wbg_booleanparameters_free: (a: number) => void;
|
|
1584
|
-
readonly boolean_get_parameters: (a: number, b: number) => void;
|
|
1585
|
-
readonly boolean_new_parameters: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
1586
|
-
readonly boolean_new_client_key_from_seed_and_parameters: (a: number, b: number, c: number) => number;
|
|
1587
|
-
readonly boolean_new_client_key: (a: number) => number;
|
|
1588
|
-
readonly boolean_new_public_key: (a: number) => number;
|
|
1589
|
-
readonly boolean_new_compressed_server_key: (a: number) => number;
|
|
1590
|
-
readonly boolean_encrypt: (a: number, b: number) => number;
|
|
1591
|
-
readonly boolean_encrypt_compressed: (a: number, b: number) => number;
|
|
1592
|
-
readonly boolean_decompress_ciphertext: (a: number) => number;
|
|
1593
|
-
readonly boolean_encrypt_with_public_key: (a: number, b: number) => number;
|
|
1594
|
-
readonly boolean_trivial_encrypt: (a: number, b: number) => number;
|
|
1595
|
-
readonly boolean_decrypt: (a: number, b: number) => number;
|
|
1596
|
-
readonly boolean_serialize_ciphertext: (a: number, b: number) => void;
|
|
1597
|
-
readonly boolean_deserialize_ciphertext: (a: number, b: number, c: number) => void;
|
|
1598
|
-
readonly boolean_serialize_compressed_ciphertext: (a: number, b: number) => void;
|
|
1599
|
-
readonly boolean_deserialize_compressed_ciphertext: (a: number, b: number, c: number) => void;
|
|
1600
|
-
readonly boolean_serialize_client_key: (a: number, b: number) => void;
|
|
1601
|
-
readonly boolean_deserialize_client_key: (a: number, b: number, c: number) => void;
|
|
1602
|
-
readonly boolean_serialize_public_key: (a: number, b: number) => void;
|
|
1603
|
-
readonly boolean_deserialize_public_key: (a: number, b: number, c: number) => void;
|
|
1604
|
-
readonly boolean_serialize_compressed_server_key: (a: number, b: number) => void;
|
|
1605
|
-
readonly boolean_deserialize_compressed_server_key: (a: number, b: number, c: number) => void;
|
|
1606
|
-
readonly __wbg_boolean_free: (a: number) => void;
|
|
1607
|
-
readonly __wbg_tfhe_free: (a: number) => void;
|
|
1608
|
-
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1609
|
-
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1617
|
+
readonly __wbindgen_malloc: (a: number) => number;
|
|
1618
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
|
|
1610
1619
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
1611
|
-
readonly __wbindgen_free: (a: number, b: number
|
|
1620
|
+
readonly __wbindgen_free: (a: number, b: number) => void;
|
|
1612
1621
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
1613
1622
|
}
|
|
1614
1623
|
|
package/tfhe.js
CHANGED
|
@@ -15,6 +15,20 @@ function addHeapObject(obj) {
|
|
|
15
15
|
return idx;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
function getObject(idx) { return heap[idx]; }
|
|
19
|
+
|
|
20
|
+
function dropObject(idx) {
|
|
21
|
+
if (idx < 132) return;
|
|
22
|
+
heap[idx] = heap_next;
|
|
23
|
+
heap_next = idx;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function takeObject(idx) {
|
|
27
|
+
const ret = getObject(idx);
|
|
28
|
+
dropObject(idx);
|
|
29
|
+
return ret;
|
|
30
|
+
}
|
|
31
|
+
|
|
18
32
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
19
33
|
|
|
20
34
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
@@ -33,20 +47,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
33
47
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
34
48
|
}
|
|
35
49
|
|
|
36
|
-
function getObject(idx) { return heap[idx]; }
|
|
37
|
-
|
|
38
|
-
function dropObject(idx) {
|
|
39
|
-
if (idx < 132) return;
|
|
40
|
-
heap[idx] = heap_next;
|
|
41
|
-
heap_next = idx;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function takeObject(idx) {
|
|
45
|
-
const ret = getObject(idx);
|
|
46
|
-
dropObject(idx);
|
|
47
|
-
return ret;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
50
|
function isLikeNone(x) {
|
|
51
51
|
return x === undefined || x === null;
|
|
52
52
|
}
|
|
@@ -155,14 +155,14 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
155
155
|
|
|
156
156
|
if (realloc === undefined) {
|
|
157
157
|
const buf = cachedTextEncoder.encode(arg);
|
|
158
|
-
const ptr = malloc(buf.length
|
|
158
|
+
const ptr = malloc(buf.length) >>> 0;
|
|
159
159
|
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
160
160
|
WASM_VECTOR_LEN = buf.length;
|
|
161
161
|
return ptr;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
let len = arg.length;
|
|
165
|
-
let ptr = malloc(len
|
|
165
|
+
let ptr = malloc(len) >>> 0;
|
|
166
166
|
|
|
167
167
|
const mem = getUint8Memory0();
|
|
168
168
|
|
|
@@ -178,7 +178,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
178
178
|
if (offset !== 0) {
|
|
179
179
|
arg = arg.slice(offset);
|
|
180
180
|
}
|
|
181
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3
|
|
181
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
|
|
182
182
|
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
183
183
|
const ret = encodeString(arg, view);
|
|
184
184
|
|
|
@@ -202,7 +202,7 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
function passArray8ToWasm0(arg, malloc) {
|
|
205
|
-
const ptr = malloc(arg.length * 1
|
|
205
|
+
const ptr = malloc(arg.length * 1) >>> 0;
|
|
206
206
|
getUint8Memory0().set(arg, ptr / 1);
|
|
207
207
|
WASM_VECTOR_LEN = arg.length;
|
|
208
208
|
return ptr;
|
|
@@ -218,7 +218,7 @@ function getUint32Memory0() {
|
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
221
|
-
const ptr = malloc(array.length * 4
|
|
221
|
+
const ptr = malloc(array.length * 4) >>> 0;
|
|
222
222
|
const mem = getUint32Memory0();
|
|
223
223
|
for (let i = 0; i < array.length; i++) {
|
|
224
224
|
mem[ptr / 4 + i] = addHeapObject(array[i]);
|
|
@@ -248,14 +248,14 @@ function getUint16Memory0() {
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
function passArray16ToWasm0(arg, malloc) {
|
|
251
|
-
const ptr = malloc(arg.length * 2
|
|
251
|
+
const ptr = malloc(arg.length * 2) >>> 0;
|
|
252
252
|
getUint16Memory0().set(arg, ptr / 2);
|
|
253
253
|
WASM_VECTOR_LEN = arg.length;
|
|
254
254
|
return ptr;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
function passArray32ToWasm0(arg, malloc) {
|
|
258
|
-
const ptr = malloc(arg.length * 4
|
|
258
|
+
const ptr = malloc(arg.length * 4) >>> 0;
|
|
259
259
|
getUint32Memory0().set(arg, ptr / 4);
|
|
260
260
|
WASM_VECTOR_LEN = arg.length;
|
|
261
261
|
return ptr;
|
|
@@ -271,7 +271,7 @@ function getBigUint64Memory0() {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
function passArray64ToWasm0(arg, malloc) {
|
|
274
|
-
const ptr = malloc(arg.length * 8
|
|
274
|
+
const ptr = malloc(arg.length * 8) >>> 0;
|
|
275
275
|
getBigUint64Memory0().set(arg, ptr / 8);
|
|
276
276
|
WASM_VECTOR_LEN = arg.length;
|
|
277
277
|
return ptr;
|
|
@@ -291,13 +291,16 @@ function handleError(f, args) {
|
|
|
291
291
|
}
|
|
292
292
|
/**
|
|
293
293
|
*/
|
|
294
|
-
export const
|
|
294
|
+
export const BooleanParameterSet = Object.freeze({ Default:0,"0":"Default",TfheLib:1,"1":"TfheLib",DefaultKsPbs:2,"2":"DefaultKsPbs",TfheLibKsPbs:3,"3":"TfheLibKsPbs", });
|
|
295
295
|
/**
|
|
296
296
|
*/
|
|
297
|
-
export const ShortintParametersName = Object.freeze({ PARAM_MESSAGE_1_CARRY_0_KS_PBS:0,"0":"PARAM_MESSAGE_1_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_1_KS_PBS:1,"1":"PARAM_MESSAGE_1_CARRY_1_KS_PBS",PARAM_MESSAGE_2_CARRY_0_KS_PBS:2,"2":"PARAM_MESSAGE_2_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_2_KS_PBS:3,"3":"PARAM_MESSAGE_1_CARRY_2_KS_PBS",PARAM_MESSAGE_2_CARRY_1_KS_PBS:4,"4":"PARAM_MESSAGE_2_CARRY_1_KS_PBS",PARAM_MESSAGE_3_CARRY_0_KS_PBS:5,"5":"PARAM_MESSAGE_3_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_3_KS_PBS:6,"6":"PARAM_MESSAGE_1_CARRY_3_KS_PBS",PARAM_MESSAGE_2_CARRY_2_KS_PBS:7,"7":"PARAM_MESSAGE_2_CARRY_2_KS_PBS",PARAM_MESSAGE_3_CARRY_1_KS_PBS:8,"8":"PARAM_MESSAGE_3_CARRY_1_KS_PBS",PARAM_MESSAGE_4_CARRY_0_KS_PBS:9,"9":"PARAM_MESSAGE_4_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_4_KS_PBS:10,"10":"PARAM_MESSAGE_1_CARRY_4_KS_PBS",PARAM_MESSAGE_2_CARRY_3_KS_PBS:11,"11":"PARAM_MESSAGE_2_CARRY_3_KS_PBS",PARAM_MESSAGE_3_CARRY_2_KS_PBS:12,"12":"PARAM_MESSAGE_3_CARRY_2_KS_PBS",PARAM_MESSAGE_4_CARRY_1_KS_PBS:13,"13":"PARAM_MESSAGE_4_CARRY_1_KS_PBS",PARAM_MESSAGE_5_CARRY_0_KS_PBS:14,"14":"PARAM_MESSAGE_5_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_5_KS_PBS:15,"15":"PARAM_MESSAGE_1_CARRY_5_KS_PBS",PARAM_MESSAGE_2_CARRY_4_KS_PBS:16,"16":"PARAM_MESSAGE_2_CARRY_4_KS_PBS",PARAM_MESSAGE_3_CARRY_3_KS_PBS:17,"17":"PARAM_MESSAGE_3_CARRY_3_KS_PBS",PARAM_MESSAGE_4_CARRY_2_KS_PBS:18,"18":"PARAM_MESSAGE_4_CARRY_2_KS_PBS",PARAM_MESSAGE_5_CARRY_1_KS_PBS:19,"19":"PARAM_MESSAGE_5_CARRY_1_KS_PBS",PARAM_MESSAGE_6_CARRY_0_KS_PBS:20,"20":"PARAM_MESSAGE_6_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_6_KS_PBS:21,"21":"PARAM_MESSAGE_1_CARRY_6_KS_PBS",PARAM_MESSAGE_2_CARRY_5_KS_PBS:22,"22":"PARAM_MESSAGE_2_CARRY_5_KS_PBS",PARAM_MESSAGE_3_CARRY_4_KS_PBS:23,"23":"PARAM_MESSAGE_3_CARRY_4_KS_PBS",PARAM_MESSAGE_4_CARRY_3_KS_PBS:24,"24":"PARAM_MESSAGE_4_CARRY_3_KS_PBS",PARAM_MESSAGE_5_CARRY_2_KS_PBS:25,"25":"PARAM_MESSAGE_5_CARRY_2_KS_PBS",PARAM_MESSAGE_6_CARRY_1_KS_PBS:26,"26":"PARAM_MESSAGE_6_CARRY_1_KS_PBS",PARAM_MESSAGE_7_CARRY_0_KS_PBS:27,"27":"PARAM_MESSAGE_7_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_7_KS_PBS:28,"28":"PARAM_MESSAGE_1_CARRY_7_KS_PBS",PARAM_MESSAGE_2_CARRY_6_KS_PBS:29,"29":"PARAM_MESSAGE_2_CARRY_6_KS_PBS",PARAM_MESSAGE_3_CARRY_5_KS_PBS:30,"30":"PARAM_MESSAGE_3_CARRY_5_KS_PBS",PARAM_MESSAGE_4_CARRY_4_KS_PBS:31,"31":"PARAM_MESSAGE_4_CARRY_4_KS_PBS",PARAM_MESSAGE_5_CARRY_3_KS_PBS:32,"32":"PARAM_MESSAGE_5_CARRY_3_KS_PBS",PARAM_MESSAGE_6_CARRY_2_KS_PBS:33,"33":"PARAM_MESSAGE_6_CARRY_2_KS_PBS",PARAM_MESSAGE_7_CARRY_1_KS_PBS:34,"34":"PARAM_MESSAGE_7_CARRY_1_KS_PBS",PARAM_MESSAGE_8_CARRY_0_KS_PBS:35,"35":"PARAM_MESSAGE_8_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_1_PBS_KS:36,"36":"PARAM_MESSAGE_1_CARRY_1_PBS_KS",PARAM_MESSAGE_2_CARRY_2_PBS_KS:37,"37":"PARAM_MESSAGE_2_CARRY_2_PBS_KS",PARAM_MESSAGE_3_CARRY_3_PBS_KS:38,"38":"PARAM_MESSAGE_3_CARRY_3_PBS_KS",PARAM_MESSAGE_4_CARRY_4_PBS_KS:39,"39":"PARAM_MESSAGE_4_CARRY_4_PBS_KS",PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS:40,"40":"PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS:41,"41":"PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS:42,"42":"PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS:43,"43":"PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS:44,"44":"PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS:45,"45":"PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS:46,"46":"PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS:47,"47":"PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS:48,"48":"PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS:49,"49":"PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS:50,"50":"PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS:51,"51":"PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS",PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS:52,"52":"PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS:53,"53":"PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS:54,"54":"PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS",PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS:55,"55":"PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS",PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS:56,"56":"PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS",PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS:57,"57":"PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS:58,"58":"PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS:59,"59":"PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS",PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS:60,"60":"PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS",PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS:61,"61":"PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS:62,"62":"PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS:63,"63":"PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS",PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS:64,"64":"PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS:65,"65":"PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS:66,"66":"PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS:67,"67":"PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_PBS_KS:68,"68":"PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_PBS_KS:69,"69":"PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_PBS_KS:70,"70":"PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_PBS_KS:71,"71":"PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_PBS_KS:72,"72":"PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_PBS_KS:73,"73":"PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_PBS_KS:74,"74":"PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS:75,"75":"PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_PBS_KS:76,"76":"PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_PBS_KS:77,"77":"PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_PBS_KS:78,"78":"PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_PBS_KS:79,"79":"PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_PBS_KS",PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_PBS_KS:80,"80":"PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_PBS_KS:81,"81":"PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS:82,"82":"PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS",PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_PBS_KS:83,"83":"PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_PBS_KS",PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_PBS_KS:84,"84":"PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_PBS_KS",PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_PBS_KS:85,"85":"PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_PBS_KS:86,"86":"PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_PBS_KS:87,"87":"PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_PBS_KS",PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS:88,"88":"PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS",PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_PBS_KS:89,"89":"PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_PBS_KS:90,"90":"PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_PBS_KS:91,"91":"PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_PBS_KS",PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_PBS_KS:92,"92":"PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_PBS_KS:93,"93":"PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_PBS_KS:94,"94":"PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_0:95,"95":"PARAM_MESSAGE_1_CARRY_0",PARAM_MESSAGE_1_CARRY_1:96,"96":"PARAM_MESSAGE_1_CARRY_1",PARAM_MESSAGE_2_CARRY_0:97,"97":"PARAM_MESSAGE_2_CARRY_0",PARAM_MESSAGE_1_CARRY_2:98,"98":"PARAM_MESSAGE_1_CARRY_2",PARAM_MESSAGE_2_CARRY_1:99,"99":"PARAM_MESSAGE_2_CARRY_1",PARAM_MESSAGE_3_CARRY_0:100,"100":"PARAM_MESSAGE_3_CARRY_0",PARAM_MESSAGE_1_CARRY_3:101,"101":"PARAM_MESSAGE_1_CARRY_3",PARAM_MESSAGE_2_CARRY_2:102,"102":"PARAM_MESSAGE_2_CARRY_2",PARAM_MESSAGE_3_CARRY_1:103,"103":"PARAM_MESSAGE_3_CARRY_1",PARAM_MESSAGE_4_CARRY_0:104,"104":"PARAM_MESSAGE_4_CARRY_0",PARAM_MESSAGE_1_CARRY_4:105,"105":"PARAM_MESSAGE_1_CARRY_4",PARAM_MESSAGE_2_CARRY_3:106,"106":"PARAM_MESSAGE_2_CARRY_3",PARAM_MESSAGE_3_CARRY_2:107,"107":"PARAM_MESSAGE_3_CARRY_2",PARAM_MESSAGE_4_CARRY_1:108,"108":"PARAM_MESSAGE_4_CARRY_1",PARAM_MESSAGE_5_CARRY_0:109,"109":"PARAM_MESSAGE_5_CARRY_0",PARAM_MESSAGE_1_CARRY_5:110,"110":"PARAM_MESSAGE_1_CARRY_5",PARAM_MESSAGE_2_CARRY_4:111,"111":"PARAM_MESSAGE_2_CARRY_4",PARAM_MESSAGE_3_CARRY_3:112,"112":"PARAM_MESSAGE_3_CARRY_3",PARAM_MESSAGE_4_CARRY_2:113,"113":"PARAM_MESSAGE_4_CARRY_2",PARAM_MESSAGE_5_CARRY_1:114,"114":"PARAM_MESSAGE_5_CARRY_1",PARAM_MESSAGE_6_CARRY_0:115,"115":"PARAM_MESSAGE_6_CARRY_0",PARAM_MESSAGE_1_CARRY_6:116,"116":"PARAM_MESSAGE_1_CARRY_6",PARAM_MESSAGE_2_CARRY_5:117,"117":"PARAM_MESSAGE_2_CARRY_5",PARAM_MESSAGE_3_CARRY_4:118,"118":"PARAM_MESSAGE_3_CARRY_4",PARAM_MESSAGE_4_CARRY_3:119,"119":"PARAM_MESSAGE_4_CARRY_3",PARAM_MESSAGE_5_CARRY_2:120,"120":"PARAM_MESSAGE_5_CARRY_2",PARAM_MESSAGE_6_CARRY_1:121,"121":"PARAM_MESSAGE_6_CARRY_1",PARAM_MESSAGE_7_CARRY_0:122,"122":"PARAM_MESSAGE_7_CARRY_0",PARAM_MESSAGE_1_CARRY_7:123,"123":"PARAM_MESSAGE_1_CARRY_7",PARAM_MESSAGE_2_CARRY_6:124,"124":"PARAM_MESSAGE_2_CARRY_6",PARAM_MESSAGE_3_CARRY_5:125,"125":"PARAM_MESSAGE_3_CARRY_5",PARAM_MESSAGE_4_CARRY_4:126,"126":"PARAM_MESSAGE_4_CARRY_4",PARAM_MESSAGE_5_CARRY_3:127,"127":"PARAM_MESSAGE_5_CARRY_3",PARAM_MESSAGE_6_CARRY_2:128,"128":"PARAM_MESSAGE_6_CARRY_2",PARAM_MESSAGE_7_CARRY_1:129,"129":"PARAM_MESSAGE_7_CARRY_1",PARAM_MESSAGE_8_CARRY_0:130,"130":"PARAM_MESSAGE_8_CARRY_0",PARAM_SMALL_MESSAGE_1_CARRY_1:131,"131":"PARAM_SMALL_MESSAGE_1_CARRY_1",PARAM_SMALL_MESSAGE_2_CARRY_2:132,"132":"PARAM_SMALL_MESSAGE_2_CARRY_2",PARAM_SMALL_MESSAGE_3_CARRY_3:133,"133":"PARAM_SMALL_MESSAGE_3_CARRY_3",PARAM_SMALL_MESSAGE_4_CARRY_4:134,"134":"PARAM_SMALL_MESSAGE_4_CARRY_4", });
|
|
297
|
+
export const BooleanEncryptionKeyChoice = Object.freeze({ Big:0,"0":"Big",Small:1,"1":"Small", });
|
|
298
298
|
/**
|
|
299
299
|
*/
|
|
300
|
-
export const
|
|
300
|
+
export const ShortintEncryptionKeyChoice = Object.freeze({ Big:0,"0":"Big",Small:1,"1":"Small", });
|
|
301
|
+
/**
|
|
302
|
+
*/
|
|
303
|
+
export const ShortintParametersName = Object.freeze({ PARAM_MESSAGE_1_CARRY_0_KS_PBS:0,"0":"PARAM_MESSAGE_1_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_1_KS_PBS:1,"1":"PARAM_MESSAGE_1_CARRY_1_KS_PBS",PARAM_MESSAGE_2_CARRY_0_KS_PBS:2,"2":"PARAM_MESSAGE_2_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_2_KS_PBS:3,"3":"PARAM_MESSAGE_1_CARRY_2_KS_PBS",PARAM_MESSAGE_2_CARRY_1_KS_PBS:4,"4":"PARAM_MESSAGE_2_CARRY_1_KS_PBS",PARAM_MESSAGE_3_CARRY_0_KS_PBS:5,"5":"PARAM_MESSAGE_3_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_3_KS_PBS:6,"6":"PARAM_MESSAGE_1_CARRY_3_KS_PBS",PARAM_MESSAGE_2_CARRY_2_KS_PBS:7,"7":"PARAM_MESSAGE_2_CARRY_2_KS_PBS",PARAM_MESSAGE_3_CARRY_1_KS_PBS:8,"8":"PARAM_MESSAGE_3_CARRY_1_KS_PBS",PARAM_MESSAGE_4_CARRY_0_KS_PBS:9,"9":"PARAM_MESSAGE_4_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_4_KS_PBS:10,"10":"PARAM_MESSAGE_1_CARRY_4_KS_PBS",PARAM_MESSAGE_2_CARRY_3_KS_PBS:11,"11":"PARAM_MESSAGE_2_CARRY_3_KS_PBS",PARAM_MESSAGE_3_CARRY_2_KS_PBS:12,"12":"PARAM_MESSAGE_3_CARRY_2_KS_PBS",PARAM_MESSAGE_4_CARRY_1_KS_PBS:13,"13":"PARAM_MESSAGE_4_CARRY_1_KS_PBS",PARAM_MESSAGE_5_CARRY_0_KS_PBS:14,"14":"PARAM_MESSAGE_5_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_5_KS_PBS:15,"15":"PARAM_MESSAGE_1_CARRY_5_KS_PBS",PARAM_MESSAGE_2_CARRY_4_KS_PBS:16,"16":"PARAM_MESSAGE_2_CARRY_4_KS_PBS",PARAM_MESSAGE_3_CARRY_3_KS_PBS:17,"17":"PARAM_MESSAGE_3_CARRY_3_KS_PBS",PARAM_MESSAGE_4_CARRY_2_KS_PBS:18,"18":"PARAM_MESSAGE_4_CARRY_2_KS_PBS",PARAM_MESSAGE_5_CARRY_1_KS_PBS:19,"19":"PARAM_MESSAGE_5_CARRY_1_KS_PBS",PARAM_MESSAGE_6_CARRY_0_KS_PBS:20,"20":"PARAM_MESSAGE_6_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_6_KS_PBS:21,"21":"PARAM_MESSAGE_1_CARRY_6_KS_PBS",PARAM_MESSAGE_2_CARRY_5_KS_PBS:22,"22":"PARAM_MESSAGE_2_CARRY_5_KS_PBS",PARAM_MESSAGE_3_CARRY_4_KS_PBS:23,"23":"PARAM_MESSAGE_3_CARRY_4_KS_PBS",PARAM_MESSAGE_4_CARRY_3_KS_PBS:24,"24":"PARAM_MESSAGE_4_CARRY_3_KS_PBS",PARAM_MESSAGE_5_CARRY_2_KS_PBS:25,"25":"PARAM_MESSAGE_5_CARRY_2_KS_PBS",PARAM_MESSAGE_6_CARRY_1_KS_PBS:26,"26":"PARAM_MESSAGE_6_CARRY_1_KS_PBS",PARAM_MESSAGE_7_CARRY_0_KS_PBS:27,"27":"PARAM_MESSAGE_7_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_7_KS_PBS:28,"28":"PARAM_MESSAGE_1_CARRY_7_KS_PBS",PARAM_MESSAGE_2_CARRY_6_KS_PBS:29,"29":"PARAM_MESSAGE_2_CARRY_6_KS_PBS",PARAM_MESSAGE_3_CARRY_5_KS_PBS:30,"30":"PARAM_MESSAGE_3_CARRY_5_KS_PBS",PARAM_MESSAGE_4_CARRY_4_KS_PBS:31,"31":"PARAM_MESSAGE_4_CARRY_4_KS_PBS",PARAM_MESSAGE_5_CARRY_3_KS_PBS:32,"32":"PARAM_MESSAGE_5_CARRY_3_KS_PBS",PARAM_MESSAGE_6_CARRY_2_KS_PBS:33,"33":"PARAM_MESSAGE_6_CARRY_2_KS_PBS",PARAM_MESSAGE_7_CARRY_1_KS_PBS:34,"34":"PARAM_MESSAGE_7_CARRY_1_KS_PBS",PARAM_MESSAGE_8_CARRY_0_KS_PBS:35,"35":"PARAM_MESSAGE_8_CARRY_0_KS_PBS",PARAM_MESSAGE_1_CARRY_1_PBS_KS:36,"36":"PARAM_MESSAGE_1_CARRY_1_PBS_KS",PARAM_MESSAGE_2_CARRY_2_PBS_KS:37,"37":"PARAM_MESSAGE_2_CARRY_2_PBS_KS",PARAM_MESSAGE_3_CARRY_3_PBS_KS:38,"38":"PARAM_MESSAGE_3_CARRY_3_PBS_KS",PARAM_MESSAGE_4_CARRY_4_PBS_KS:39,"39":"PARAM_MESSAGE_4_CARRY_4_PBS_KS",PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS:40,"40":"PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS:41,"41":"PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS:42,"42":"PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS:43,"43":"PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS:44,"44":"PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS:45,"45":"PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS:46,"46":"PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS:47,"47":"PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS:48,"48":"PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS:49,"49":"PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS:50,"50":"PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS",PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS:51,"51":"PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS",PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS:52,"52":"PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS:53,"53":"PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS:54,"54":"PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS",PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS:55,"55":"PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS",PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS:56,"56":"PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS",PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS:57,"57":"PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS:58,"58":"PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS:59,"59":"PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS",PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS:60,"60":"PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS",PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS:61,"61":"PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS:62,"62":"PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS:63,"63":"PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS",PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS:64,"64":"PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS:65,"65":"PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS",PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS:66,"66":"PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS",PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS:67,"67":"PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_PBS_KS:68,"68":"PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_PBS_KS:69,"69":"PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_PBS_KS:70,"70":"PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_PBS_KS:71,"71":"PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_PBS_KS:72,"72":"PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_PBS_KS:73,"73":"PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_PBS_KS:74,"74":"PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS:75,"75":"PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_PBS_KS:76,"76":"PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_PBS_KS:77,"77":"PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_PBS_KS:78,"78":"PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_PBS_KS",PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_PBS_KS:79,"79":"PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_PBS_KS",PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_PBS_KS:80,"80":"PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_PBS_KS:81,"81":"PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS:82,"82":"PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS",PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_PBS_KS:83,"83":"PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_PBS_KS",PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_PBS_KS:84,"84":"PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_PBS_KS",PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_PBS_KS:85,"85":"PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_PBS_KS:86,"86":"PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_PBS_KS:87,"87":"PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_PBS_KS",PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS:88,"88":"PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS",PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_PBS_KS:89,"89":"PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_PBS_KS:90,"90":"PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_PBS_KS:91,"91":"PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_PBS_KS",PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_PBS_KS:92,"92":"PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_PBS_KS:93,"93":"PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_PBS_KS",PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_PBS_KS:94,"94":"PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_PBS_KS",PARAM_MESSAGE_1_CARRY_0:95,"95":"PARAM_MESSAGE_1_CARRY_0",PARAM_MESSAGE_1_CARRY_1:96,"96":"PARAM_MESSAGE_1_CARRY_1",PARAM_MESSAGE_2_CARRY_0:97,"97":"PARAM_MESSAGE_2_CARRY_0",PARAM_MESSAGE_1_CARRY_2:98,"98":"PARAM_MESSAGE_1_CARRY_2",PARAM_MESSAGE_2_CARRY_1:99,"99":"PARAM_MESSAGE_2_CARRY_1",PARAM_MESSAGE_3_CARRY_0:100,"100":"PARAM_MESSAGE_3_CARRY_0",PARAM_MESSAGE_1_CARRY_3:101,"101":"PARAM_MESSAGE_1_CARRY_3",PARAM_MESSAGE_2_CARRY_2:102,"102":"PARAM_MESSAGE_2_CARRY_2",PARAM_MESSAGE_3_CARRY_1:103,"103":"PARAM_MESSAGE_3_CARRY_1",PARAM_MESSAGE_4_CARRY_0:104,"104":"PARAM_MESSAGE_4_CARRY_0",PARAM_MESSAGE_1_CARRY_4:105,"105":"PARAM_MESSAGE_1_CARRY_4",PARAM_MESSAGE_2_CARRY_3:106,"106":"PARAM_MESSAGE_2_CARRY_3",PARAM_MESSAGE_3_CARRY_2:107,"107":"PARAM_MESSAGE_3_CARRY_2",PARAM_MESSAGE_4_CARRY_1:108,"108":"PARAM_MESSAGE_4_CARRY_1",PARAM_MESSAGE_5_CARRY_0:109,"109":"PARAM_MESSAGE_5_CARRY_0",PARAM_MESSAGE_1_CARRY_5:110,"110":"PARAM_MESSAGE_1_CARRY_5",PARAM_MESSAGE_2_CARRY_4:111,"111":"PARAM_MESSAGE_2_CARRY_4",PARAM_MESSAGE_3_CARRY_3:112,"112":"PARAM_MESSAGE_3_CARRY_3",PARAM_MESSAGE_4_CARRY_2:113,"113":"PARAM_MESSAGE_4_CARRY_2",PARAM_MESSAGE_5_CARRY_1:114,"114":"PARAM_MESSAGE_5_CARRY_1",PARAM_MESSAGE_6_CARRY_0:115,"115":"PARAM_MESSAGE_6_CARRY_0",PARAM_MESSAGE_1_CARRY_6:116,"116":"PARAM_MESSAGE_1_CARRY_6",PARAM_MESSAGE_2_CARRY_5:117,"117":"PARAM_MESSAGE_2_CARRY_5",PARAM_MESSAGE_3_CARRY_4:118,"118":"PARAM_MESSAGE_3_CARRY_4",PARAM_MESSAGE_4_CARRY_3:119,"119":"PARAM_MESSAGE_4_CARRY_3",PARAM_MESSAGE_5_CARRY_2:120,"120":"PARAM_MESSAGE_5_CARRY_2",PARAM_MESSAGE_6_CARRY_1:121,"121":"PARAM_MESSAGE_6_CARRY_1",PARAM_MESSAGE_7_CARRY_0:122,"122":"PARAM_MESSAGE_7_CARRY_0",PARAM_MESSAGE_1_CARRY_7:123,"123":"PARAM_MESSAGE_1_CARRY_7",PARAM_MESSAGE_2_CARRY_6:124,"124":"PARAM_MESSAGE_2_CARRY_6",PARAM_MESSAGE_3_CARRY_5:125,"125":"PARAM_MESSAGE_3_CARRY_5",PARAM_MESSAGE_4_CARRY_4:126,"126":"PARAM_MESSAGE_4_CARRY_4",PARAM_MESSAGE_5_CARRY_3:127,"127":"PARAM_MESSAGE_5_CARRY_3",PARAM_MESSAGE_6_CARRY_2:128,"128":"PARAM_MESSAGE_6_CARRY_2",PARAM_MESSAGE_7_CARRY_1:129,"129":"PARAM_MESSAGE_7_CARRY_1",PARAM_MESSAGE_8_CARRY_0:130,"130":"PARAM_MESSAGE_8_CARRY_0",PARAM_SMALL_MESSAGE_1_CARRY_1:131,"131":"PARAM_SMALL_MESSAGE_1_CARRY_1",PARAM_SMALL_MESSAGE_2_CARRY_2:132,"132":"PARAM_SMALL_MESSAGE_2_CARRY_2",PARAM_SMALL_MESSAGE_3_CARRY_3:133,"133":"PARAM_SMALL_MESSAGE_3_CARRY_3",PARAM_SMALL_MESSAGE_4_CARRY_4:134,"134":"PARAM_SMALL_MESSAGE_4_CARRY_4", });
|
|
301
304
|
/**
|
|
302
305
|
*/
|
|
303
306
|
export class Boolean {
|
|
@@ -342,10 +345,11 @@ export class Boolean {
|
|
|
342
345
|
* @param {number} pbs_level
|
|
343
346
|
* @param {number} ks_base_log
|
|
344
347
|
* @param {number} ks_level
|
|
348
|
+
* @param {number} encryption_key_choice
|
|
345
349
|
* @returns {BooleanParameters}
|
|
346
350
|
*/
|
|
347
|
-
static new_parameters(lwe_dimension, glwe_dimension, polynomial_size, lwe_modular_std_dev, glwe_modular_std_dev, pbs_base_log, pbs_level, ks_base_log, ks_level) {
|
|
348
|
-
const ret = wasm.boolean_new_parameters(lwe_dimension, glwe_dimension, polynomial_size, lwe_modular_std_dev, glwe_modular_std_dev, pbs_base_log, pbs_level, ks_base_log, ks_level);
|
|
351
|
+
static new_parameters(lwe_dimension, glwe_dimension, polynomial_size, lwe_modular_std_dev, glwe_modular_std_dev, pbs_base_log, pbs_level, ks_base_log, ks_level, encryption_key_choice) {
|
|
352
|
+
const ret = wasm.boolean_new_parameters(lwe_dimension, glwe_dimension, polynomial_size, lwe_modular_std_dev, glwe_modular_std_dev, pbs_base_log, pbs_level, ks_base_log, ks_level, encryption_key_choice);
|
|
349
353
|
return BooleanParameters.__wrap(ret);
|
|
350
354
|
}
|
|
351
355
|
/**
|
|
@@ -5096,14 +5100,6 @@ async function __wbg_load(module, imports) {
|
|
|
5096
5100
|
function __wbg_get_imports() {
|
|
5097
5101
|
const imports = {};
|
|
5098
5102
|
imports.wbg = {};
|
|
5099
|
-
imports.wbg.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
|
|
5100
|
-
const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
|
|
5101
|
-
return addHeapObject(ret);
|
|
5102
|
-
};
|
|
5103
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
5104
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
5105
|
-
return addHeapObject(ret);
|
|
5106
|
-
};
|
|
5107
5103
|
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
5108
5104
|
const ret = BigInt.asUintN(64, arg0);
|
|
5109
5105
|
return addHeapObject(ret);
|
|
@@ -5119,48 +5115,56 @@ function __wbg_get_imports() {
|
|
|
5119
5115
|
const ret = getObject(arg0) === getObject(arg1);
|
|
5120
5116
|
return ret;
|
|
5121
5117
|
};
|
|
5122
|
-
imports.wbg.
|
|
5123
|
-
const ret =
|
|
5118
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
5119
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
5124
5120
|
return addHeapObject(ret);
|
|
5125
5121
|
};
|
|
5126
|
-
imports.wbg.
|
|
5127
|
-
const ret = BigInt(
|
|
5122
|
+
imports.wbg.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
|
|
5123
|
+
const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
|
|
5128
5124
|
return addHeapObject(ret);
|
|
5129
5125
|
};
|
|
5130
|
-
imports.wbg.
|
|
5131
|
-
const ret =
|
|
5126
|
+
imports.wbg.__wbg_fheuint32_new = function(arg0) {
|
|
5127
|
+
const ret = FheUint32.__wrap(arg0);
|
|
5132
5128
|
return addHeapObject(ret);
|
|
5133
5129
|
};
|
|
5134
|
-
imports.wbg.
|
|
5135
|
-
const ret =
|
|
5130
|
+
imports.wbg.__wbg_fheuint16_new = function(arg0) {
|
|
5131
|
+
const ret = FheUint16.__wrap(arg0);
|
|
5136
5132
|
return addHeapObject(ret);
|
|
5137
5133
|
};
|
|
5138
|
-
imports.wbg.
|
|
5139
|
-
const ret =
|
|
5134
|
+
imports.wbg.__wbg_fheuint8_new = function(arg0) {
|
|
5135
|
+
const ret = FheUint8.__wrap(arg0);
|
|
5136
|
+
return addHeapObject(ret);
|
|
5137
|
+
};
|
|
5138
|
+
imports.wbg.__wbg_fheuint256_new = function(arg0) {
|
|
5139
|
+
const ret = FheUint256.__wrap(arg0);
|
|
5140
|
+
return addHeapObject(ret);
|
|
5141
|
+
};
|
|
5142
|
+
imports.wbg.__wbg_fheuint64_new = function(arg0) {
|
|
5143
|
+
const ret = FheUint64.__wrap(arg0);
|
|
5140
5144
|
return addHeapObject(ret);
|
|
5141
5145
|
};
|
|
5142
5146
|
imports.wbg.__wbg_fheuint128_new = function(arg0) {
|
|
5143
5147
|
const ret = FheUint128.__wrap(arg0);
|
|
5144
5148
|
return addHeapObject(ret);
|
|
5145
5149
|
};
|
|
5146
|
-
imports.wbg.
|
|
5147
|
-
const ret =
|
|
5150
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
5151
|
+
const ret = getObject(arg0);
|
|
5148
5152
|
return addHeapObject(ret);
|
|
5149
5153
|
};
|
|
5150
|
-
imports.wbg.
|
|
5151
|
-
const ret =
|
|
5154
|
+
imports.wbg.__wbindgen_bigint_from_str = function(arg0, arg1) {
|
|
5155
|
+
const ret = BigInt(getStringFromWasm0(arg0, arg1));
|
|
5152
5156
|
return addHeapObject(ret);
|
|
5153
5157
|
};
|
|
5154
|
-
imports.wbg.
|
|
5155
|
-
const ret =
|
|
5158
|
+
imports.wbg.__wbindgen_bit_and = function(arg0, arg1) {
|
|
5159
|
+
const ret = getObject(arg0) & getObject(arg1);
|
|
5156
5160
|
return addHeapObject(ret);
|
|
5157
5161
|
};
|
|
5158
|
-
imports.wbg.
|
|
5159
|
-
const ret =
|
|
5162
|
+
imports.wbg.__wbindgen_shl = function(arg0, arg1) {
|
|
5163
|
+
const ret = getObject(arg0) << getObject(arg1);
|
|
5160
5164
|
return addHeapObject(ret);
|
|
5161
5165
|
};
|
|
5162
|
-
imports.wbg.
|
|
5163
|
-
const ret =
|
|
5166
|
+
imports.wbg.__wbindgen_add = function(arg0, arg1) {
|
|
5167
|
+
const ret = getObject(arg0) + getObject(arg1);
|
|
5164
5168
|
return addHeapObject(ret);
|
|
5165
5169
|
};
|
|
5166
5170
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
@@ -5182,10 +5186,10 @@ function __wbg_get_imports() {
|
|
|
5182
5186
|
deferred0_1 = arg1;
|
|
5183
5187
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
5184
5188
|
} finally {
|
|
5185
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1
|
|
5189
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1);
|
|
5186
5190
|
}
|
|
5187
5191
|
};
|
|
5188
|
-
imports.wbg.
|
|
5192
|
+
imports.wbg.__wbg_crypto_d05b68a3572bb8ca = function(arg0) {
|
|
5189
5193
|
const ret = getObject(arg0).crypto;
|
|
5190
5194
|
return addHeapObject(ret);
|
|
5191
5195
|
};
|
|
@@ -5194,15 +5198,15 @@ function __wbg_get_imports() {
|
|
|
5194
5198
|
const ret = typeof(val) === 'object' && val !== null;
|
|
5195
5199
|
return ret;
|
|
5196
5200
|
};
|
|
5197
|
-
imports.wbg.
|
|
5201
|
+
imports.wbg.__wbg_process_b02b3570280d0366 = function(arg0) {
|
|
5198
5202
|
const ret = getObject(arg0).process;
|
|
5199
5203
|
return addHeapObject(ret);
|
|
5200
5204
|
};
|
|
5201
|
-
imports.wbg.
|
|
5205
|
+
imports.wbg.__wbg_versions_c1cb42213cedf0f5 = function(arg0) {
|
|
5202
5206
|
const ret = getObject(arg0).versions;
|
|
5203
5207
|
return addHeapObject(ret);
|
|
5204
5208
|
};
|
|
5205
|
-
imports.wbg.
|
|
5209
|
+
imports.wbg.__wbg_node_43b1089f407e4ec2 = function(arg0) {
|
|
5206
5210
|
const ret = getObject(arg0).node;
|
|
5207
5211
|
return addHeapObject(ret);
|
|
5208
5212
|
};
|
|
@@ -5210,11 +5214,11 @@ function __wbg_get_imports() {
|
|
|
5210
5214
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
5211
5215
|
return ret;
|
|
5212
5216
|
};
|
|
5213
|
-
imports.wbg.
|
|
5217
|
+
imports.wbg.__wbg_msCrypto_10fc94afee92bd76 = function(arg0) {
|
|
5214
5218
|
const ret = getObject(arg0).msCrypto;
|
|
5215
5219
|
return addHeapObject(ret);
|
|
5216
5220
|
};
|
|
5217
|
-
imports.wbg.
|
|
5221
|
+
imports.wbg.__wbg_require_9a7e0f667ead4995 = function() { return handleError(function () {
|
|
5218
5222
|
const ret = module.require;
|
|
5219
5223
|
return addHeapObject(ret);
|
|
5220
5224
|
}, arguments) };
|
|
@@ -5226,33 +5230,33 @@ function __wbg_get_imports() {
|
|
|
5226
5230
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
5227
5231
|
return addHeapObject(ret);
|
|
5228
5232
|
};
|
|
5229
|
-
imports.wbg.
|
|
5230
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
5231
|
-
}, arguments) };
|
|
5232
|
-
imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
|
|
5233
|
+
imports.wbg.__wbg_randomFillSync_b70ccbdf4926a99d = function() { return handleError(function (arg0, arg1) {
|
|
5233
5234
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
5234
5235
|
}, arguments) };
|
|
5235
|
-
imports.wbg.
|
|
5236
|
+
imports.wbg.__wbg_getRandomValues_7e42b4fb8779dc6d = function() { return handleError(function (arg0, arg1) {
|
|
5237
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
5238
|
+
}, arguments) };
|
|
5239
|
+
imports.wbg.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) {
|
|
5236
5240
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
5237
5241
|
return addHeapObject(ret);
|
|
5238
5242
|
};
|
|
5239
|
-
imports.wbg.
|
|
5243
|
+
imports.wbg.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) {
|
|
5240
5244
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
5241
5245
|
return addHeapObject(ret);
|
|
5242
5246
|
}, arguments) };
|
|
5243
|
-
imports.wbg.
|
|
5247
|
+
imports.wbg.__wbg_self_742dd6eab3e9211e = function() { return handleError(function () {
|
|
5244
5248
|
const ret = self.self;
|
|
5245
5249
|
return addHeapObject(ret);
|
|
5246
5250
|
}, arguments) };
|
|
5247
|
-
imports.wbg.
|
|
5251
|
+
imports.wbg.__wbg_window_c409e731db53a0e2 = function() { return handleError(function () {
|
|
5248
5252
|
const ret = window.window;
|
|
5249
5253
|
return addHeapObject(ret);
|
|
5250
5254
|
}, arguments) };
|
|
5251
|
-
imports.wbg.
|
|
5255
|
+
imports.wbg.__wbg_globalThis_b70c095388441f2d = function() { return handleError(function () {
|
|
5252
5256
|
const ret = globalThis.globalThis;
|
|
5253
5257
|
return addHeapObject(ret);
|
|
5254
5258
|
}, arguments) };
|
|
5255
|
-
imports.wbg.
|
|
5259
|
+
imports.wbg.__wbg_global_1c72617491ed7194 = function() { return handleError(function () {
|
|
5256
5260
|
const ret = global.global;
|
|
5257
5261
|
return addHeapObject(ret);
|
|
5258
5262
|
}, arguments) };
|
|
@@ -5260,30 +5264,30 @@ function __wbg_get_imports() {
|
|
|
5260
5264
|
const ret = getObject(arg0) === undefined;
|
|
5261
5265
|
return ret;
|
|
5262
5266
|
};
|
|
5263
|
-
imports.wbg.
|
|
5267
|
+
imports.wbg.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
5264
5268
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
5265
5269
|
return addHeapObject(ret);
|
|
5266
5270
|
}, arguments) };
|
|
5267
|
-
imports.wbg.
|
|
5271
|
+
imports.wbg.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) {
|
|
5268
5272
|
const ret = getObject(arg0).buffer;
|
|
5269
5273
|
return addHeapObject(ret);
|
|
5270
5274
|
};
|
|
5271
|
-
imports.wbg.
|
|
5275
|
+
imports.wbg.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function(arg0, arg1, arg2) {
|
|
5272
5276
|
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
5273
5277
|
return addHeapObject(ret);
|
|
5274
5278
|
};
|
|
5275
|
-
imports.wbg.
|
|
5279
|
+
imports.wbg.__wbg_new_09938a7d020f049b = function(arg0) {
|
|
5276
5280
|
const ret = new Uint8Array(getObject(arg0));
|
|
5277
5281
|
return addHeapObject(ret);
|
|
5278
5282
|
};
|
|
5279
|
-
imports.wbg.
|
|
5283
|
+
imports.wbg.__wbg_set_3698e3ca519b3c3c = function(arg0, arg1, arg2) {
|
|
5280
5284
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
5281
5285
|
};
|
|
5282
|
-
imports.wbg.
|
|
5286
|
+
imports.wbg.__wbg_newwithlength_89eeca401d8918c2 = function(arg0) {
|
|
5283
5287
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
5284
5288
|
return addHeapObject(ret);
|
|
5285
5289
|
};
|
|
5286
|
-
imports.wbg.
|
|
5290
|
+
imports.wbg.__wbg_subarray_d82be056deb4ad27 = function(arg0, arg1, arg2) {
|
|
5287
5291
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
5288
5292
|
return addHeapObject(ret);
|
|
5289
5293
|
};
|
package/tfhe_bg.wasm
CHANGED
|
Binary file
|