tfhe 0.4.2 → 0.4.4

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.
Files changed (4) hide show
  1. package/package.json +1 -1
  2. package/tfhe.d.ts +79 -79
  3. package/tfhe.js +487 -198
  4. package/tfhe_bg.wasm +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tfhe",
3
3
  "description": "TFHE-rs is a fully homomorphic encryption (FHE) library that implements Zama's variant of TFHE.",
4
- "version": "0.4.2",
4
+ "version": "0.4.4",
5
5
  "license": "BSD-3-Clause-Clear",
6
6
  "repository": {
7
7
  "type": "git",
package/tfhe.d.ts CHANGED
@@ -5,14 +5,6 @@
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
8
  export enum BooleanEncryptionKeyChoice {
17
9
  Big = 0,
18
10
  Small = 1,
@@ -164,6 +156,14 @@ export enum ShortintParametersName {
164
156
  }
165
157
  /**
166
158
  */
159
+ export enum BooleanParameterSet {
160
+ Default = 0,
161
+ TfheLib = 1,
162
+ DefaultKsPbs = 2,
163
+ TfheLibKsPbs = 3,
164
+ }
165
+ /**
166
+ */
167
167
  export class Boolean {
168
168
  free(): void;
169
169
  /**
@@ -2462,6 +2462,77 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
2462
2462
 
2463
2463
  export interface InitOutput {
2464
2464
  readonly memory: WebAssembly.Memory;
2465
+ readonly __wbg_tfheconfig_free: (a: number) => void;
2466
+ readonly tfheconfigbuilder_all_disabled: () => number;
2467
+ readonly tfheconfigbuilder_enable_default_integers: (a: number) => number;
2468
+ readonly tfheconfigbuilder_enable_default_integers_small: (a: number) => number;
2469
+ readonly tfheconfigbuilder_enable_custom_integers: (a: number, b: number) => number;
2470
+ readonly tfheconfigbuilder_build: (a: number) => number;
2471
+ readonly __wbg_tfheconfigbuilder_free: (a: number) => void;
2472
+ readonly __wbg_tfhe_free: (a: number) => void;
2473
+ readonly __wbg_shortintciphertext_free: (a: number) => void;
2474
+ readonly __wbg_shortintcompressedciphertext_free: (a: number) => void;
2475
+ readonly __wbg_shortintclientkey_free: (a: number) => void;
2476
+ readonly __wbg_shortintpublickey_free: (a: number) => void;
2477
+ readonly __wbg_shortintcompressedpublickey_free: (a: number) => void;
2478
+ readonly __wbg_shortintcompressedserverkey_free: (a: number) => void;
2479
+ readonly __wbg_shortintparameters_free: (a: number) => void;
2480
+ readonly shortintparameters_new: (a: number) => number;
2481
+ readonly shortint_get_parameters: (a: number, b: number, c: number) => void;
2482
+ readonly shortint_get_parameters_small: (a: number, b: number, c: number) => void;
2483
+ 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;
2484
+ readonly shortint_new_client_key_from_seed_and_parameters: (a: number, b: number, c: number, d: number) => void;
2485
+ readonly shortint_new_client_key: (a: number) => number;
2486
+ readonly shortint_new_public_key: (a: number) => number;
2487
+ readonly shortint_new_compressed_public_key: (a: number) => number;
2488
+ readonly shortint_new_compressed_server_key: (a: number) => number;
2489
+ readonly shortint_encrypt: (a: number, b: number) => number;
2490
+ readonly shortint_encrypt_compressed: (a: number, b: number) => number;
2491
+ readonly shortint_decompress_ciphertext: (a: number) => number;
2492
+ readonly shortint_encrypt_with_public_key: (a: number, b: number) => number;
2493
+ readonly shortint_encrypt_with_compressed_public_key: (a: number, b: number) => number;
2494
+ readonly shortint_decrypt: (a: number, b: number) => number;
2495
+ readonly shortint_serialize_ciphertext: (a: number, b: number) => void;
2496
+ readonly shortint_deserialize_ciphertext: (a: number, b: number, c: number) => void;
2497
+ readonly shortint_serialize_compressed_ciphertext: (a: number, b: number) => void;
2498
+ readonly shortint_deserialize_compressed_ciphertext: (a: number, b: number, c: number) => void;
2499
+ readonly shortint_serialize_client_key: (a: number, b: number) => void;
2500
+ readonly shortint_deserialize_client_key: (a: number, b: number, c: number) => void;
2501
+ readonly shortint_serialize_public_key: (a: number, b: number) => void;
2502
+ readonly shortint_deserialize_public_key: (a: number, b: number, c: number) => void;
2503
+ readonly shortint_serialize_compressed_public_key: (a: number, b: number) => void;
2504
+ readonly shortint_deserialize_compressed_public_key: (a: number, b: number, c: number) => void;
2505
+ readonly shortint_serialize_compressed_server_key: (a: number, b: number) => void;
2506
+ readonly shortint_deserialize_compressed_server_key: (a: number, b: number, c: number) => void;
2507
+ readonly init_panic_hook: () => void;
2508
+ readonly __wbg_tfheclientkey_free: (a: number) => void;
2509
+ readonly tfheclientkey_generate: (a: number, b: number) => void;
2510
+ readonly tfheclientkey_generate_with_seed: (a: number, b: number, c: number) => void;
2511
+ readonly tfheclientkey_serialize: (a: number, b: number) => void;
2512
+ readonly tfheclientkey_deserialize: (a: number, b: number, c: number) => void;
2513
+ readonly __wbg_tfhecompressedserverkey_free: (a: number) => void;
2514
+ readonly tfhecompressedserverkey_new: (a: number, b: number) => void;
2515
+ readonly tfhecompressedserverkey_serialize: (a: number, b: number) => void;
2516
+ readonly tfhecompressedserverkey_deserialize: (a: number, b: number, c: number) => void;
2517
+ readonly __wbg_tfhepublickey_free: (a: number) => void;
2518
+ readonly tfhepublickey_new: (a: number, b: number) => void;
2519
+ readonly tfhepublickey_serialize: (a: number, b: number) => void;
2520
+ readonly tfhepublickey_deserialize: (a: number, b: number, c: number) => void;
2521
+ readonly __wbg_tfhecompressedpublickey_free: (a: number) => void;
2522
+ readonly tfhecompressedpublickey_new: (a: number, b: number) => void;
2523
+ readonly tfhecompressedpublickey_decompress: (a: number, b: number) => void;
2524
+ readonly tfhecompressedpublickey_serialize: (a: number, b: number) => void;
2525
+ readonly tfhecompressedpublickey_deserialize: (a: number, b: number, c: number) => void;
2526
+ readonly __wbg_tfhecompactpublickey_free: (a: number) => void;
2527
+ readonly tfhecompactpublickey_new: (a: number, b: number) => void;
2528
+ readonly tfhecompactpublickey_serialize: (a: number, b: number) => void;
2529
+ readonly tfhecompactpublickey_deserialize: (a: number, b: number, c: number) => void;
2530
+ readonly __wbg_tfhecompressedcompactpublickey_free: (a: number) => void;
2531
+ readonly tfhecompressedcompactpublickey_new: (a: number, b: number) => void;
2532
+ readonly tfhecompressedcompactpublickey_serialize: (a: number, b: number) => void;
2533
+ readonly tfhecompressedcompactpublickey_deserialize: (a: number, b: number, c: number) => void;
2534
+ readonly tfhecompressedcompactpublickey_decompress: (a: number, b: number) => void;
2535
+ readonly __wbg_shortint_free: (a: number) => void;
2465
2536
  readonly __wbg_booleanciphertext_free: (a: number) => void;
2466
2537
  readonly __wbg_booleancompressedciphertext_free: (a: number) => void;
2467
2538
  readonly __wbg_booleanclientkey_free: (a: number) => void;
@@ -2839,77 +2910,6 @@ export interface InitOutput {
2839
2910
  readonly compressedfheint16_decompress: (a: number, b: number) => void;
2840
2911
  readonly compressedfheint32_decompress: (a: number, b: number) => void;
2841
2912
  readonly compressedfheint64_decompress: (a: number, b: number) => void;
2842
- readonly __wbg_tfheconfig_free: (a: number) => void;
2843
- readonly tfheconfigbuilder_all_disabled: () => number;
2844
- readonly tfheconfigbuilder_enable_default_integers: (a: number) => number;
2845
- readonly tfheconfigbuilder_enable_default_integers_small: (a: number) => number;
2846
- readonly tfheconfigbuilder_enable_custom_integers: (a: number, b: number) => number;
2847
- readonly tfheconfigbuilder_build: (a: number) => number;
2848
- readonly __wbg_tfheconfigbuilder_free: (a: number) => void;
2849
- readonly __wbg_shortintciphertext_free: (a: number) => void;
2850
- readonly __wbg_shortintcompressedciphertext_free: (a: number) => void;
2851
- readonly __wbg_shortintclientkey_free: (a: number) => void;
2852
- readonly __wbg_shortintpublickey_free: (a: number) => void;
2853
- readonly __wbg_shortintcompressedpublickey_free: (a: number) => void;
2854
- readonly __wbg_shortintcompressedserverkey_free: (a: number) => void;
2855
- readonly __wbg_shortintparameters_free: (a: number) => void;
2856
- readonly shortintparameters_new: (a: number) => number;
2857
- readonly shortint_get_parameters: (a: number, b: number, c: number) => void;
2858
- readonly shortint_get_parameters_small: (a: number, b: number, c: number) => void;
2859
- 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;
2860
- readonly shortint_new_client_key_from_seed_and_parameters: (a: number, b: number, c: number, d: number) => void;
2861
- readonly shortint_new_client_key: (a: number) => number;
2862
- readonly shortint_new_public_key: (a: number) => number;
2863
- readonly shortint_new_compressed_public_key: (a: number) => number;
2864
- readonly shortint_new_compressed_server_key: (a: number) => number;
2865
- readonly shortint_encrypt: (a: number, b: number) => number;
2866
- readonly shortint_encrypt_compressed: (a: number, b: number) => number;
2867
- readonly shortint_decompress_ciphertext: (a: number) => number;
2868
- readonly shortint_encrypt_with_public_key: (a: number, b: number) => number;
2869
- readonly shortint_encrypt_with_compressed_public_key: (a: number, b: number) => number;
2870
- readonly shortint_decrypt: (a: number, b: number) => number;
2871
- readonly shortint_serialize_ciphertext: (a: number, b: number) => void;
2872
- readonly shortint_deserialize_ciphertext: (a: number, b: number, c: number) => void;
2873
- readonly shortint_serialize_compressed_ciphertext: (a: number, b: number) => void;
2874
- readonly shortint_deserialize_compressed_ciphertext: (a: number, b: number, c: number) => void;
2875
- readonly shortint_serialize_client_key: (a: number, b: number) => void;
2876
- readonly shortint_deserialize_client_key: (a: number, b: number, c: number) => void;
2877
- readonly shortint_serialize_public_key: (a: number, b: number) => void;
2878
- readonly shortint_deserialize_public_key: (a: number, b: number, c: number) => void;
2879
- readonly shortint_serialize_compressed_public_key: (a: number, b: number) => void;
2880
- readonly shortint_deserialize_compressed_public_key: (a: number, b: number, c: number) => void;
2881
- readonly shortint_serialize_compressed_server_key: (a: number, b: number) => void;
2882
- readonly shortint_deserialize_compressed_server_key: (a: number, b: number, c: number) => void;
2883
- readonly init_panic_hook: () => void;
2884
- readonly __wbg_tfheclientkey_free: (a: number) => void;
2885
- readonly tfheclientkey_generate: (a: number, b: number) => void;
2886
- readonly tfheclientkey_generate_with_seed: (a: number, b: number, c: number) => void;
2887
- readonly tfheclientkey_serialize: (a: number, b: number) => void;
2888
- readonly tfheclientkey_deserialize: (a: number, b: number, c: number) => void;
2889
- readonly __wbg_tfhecompressedserverkey_free: (a: number) => void;
2890
- readonly tfhecompressedserverkey_new: (a: number, b: number) => void;
2891
- readonly tfhecompressedserverkey_serialize: (a: number, b: number) => void;
2892
- readonly tfhecompressedserverkey_deserialize: (a: number, b: number, c: number) => void;
2893
- readonly __wbg_tfhepublickey_free: (a: number) => void;
2894
- readonly tfhepublickey_new: (a: number, b: number) => void;
2895
- readonly tfhepublickey_serialize: (a: number, b: number) => void;
2896
- readonly tfhepublickey_deserialize: (a: number, b: number, c: number) => void;
2897
- readonly __wbg_tfhecompressedpublickey_free: (a: number) => void;
2898
- readonly tfhecompressedpublickey_new: (a: number, b: number) => void;
2899
- readonly tfhecompressedpublickey_decompress: (a: number, b: number) => void;
2900
- readonly tfhecompressedpublickey_serialize: (a: number, b: number) => void;
2901
- readonly tfhecompressedpublickey_deserialize: (a: number, b: number, c: number) => void;
2902
- readonly __wbg_tfhecompactpublickey_free: (a: number) => void;
2903
- readonly tfhecompactpublickey_new: (a: number, b: number) => void;
2904
- readonly tfhecompactpublickey_serialize: (a: number, b: number) => void;
2905
- readonly tfhecompactpublickey_deserialize: (a: number, b: number, c: number) => void;
2906
- readonly __wbg_tfhecompressedcompactpublickey_free: (a: number) => void;
2907
- readonly tfhecompressedcompactpublickey_new: (a: number, b: number) => void;
2908
- readonly tfhecompressedcompactpublickey_serialize: (a: number, b: number) => void;
2909
- readonly tfhecompressedcompactpublickey_deserialize: (a: number, b: number, c: number) => void;
2910
- readonly tfhecompressedcompactpublickey_decompress: (a: number, b: number) => void;
2911
- readonly __wbg_shortint_free: (a: number) => void;
2912
- readonly __wbg_tfhe_free: (a: number) => void;
2913
2913
  readonly __wbindgen_malloc: (a: number, b: number) => number;
2914
2914
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
2915
2915
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;