Commit Graph

94 Commits

Author SHA1 Message Date
David Testé
8b460072d3 chore(ci): check more parameters set on lattice estimator 2024-12-09 16:19:50 +01:00
Mayeul@Zama
8680e1de0a refactor(strings): move fhe_strings from examples to strings module 2024-11-06 14:44:09 +01:00
Arthur Meyre
f497bf09a3 chore(ci): fix wasm bench parameter names 2024-10-25 16:52:22 +02:00
Mayeul@Zama
fdbe0404c1 refactor(fhe_strings): CharIter is a Vec, cleanups 2024-10-25 16:16:37 +02:00
Mayeul@Zama
1262106652 chore(fhe_strings): remove some par_bridge 2024-10-25 16:16:37 +02:00
Mayeul@Zama
d74372657e refactor(fhe_strings): add is_empty method to FheString 2024-10-25 16:16:37 +02:00
Mayeul@Zama
27e34a835c refactor(fhe_strings): add len function 2024-10-25 16:16:37 +02:00
Mayeul@Zama
aebc2619b2 refactor(fhe_strings): add padded param to from_uint 2024-10-25 16:16:37 +02:00
Mayeul@Zama
5056e06380 chore(fhe_strings): add encryption-decryption test 2024-10-25 16:16:37 +02:00
Mayeul@Zama
b90b20f31e chore(fhe_strings): remove EncryptOutput 2024-10-25 16:16:37 +02:00
Mayeul@Zama
2369d02025 chore(fhe_strings): remove TrivialEncryptOutput 2024-10-25 16:16:37 +02:00
Agnes Leroy
92523d236c chore(all): add TUniform params for GPU, make TUniform params default
- also remove some aliases for parameters
- stop using aliases for parameters in shortint and integer
- update test filtering
2024-10-25 14:54:16 +02:00
David Testé
9d511347f5 chore(bench): add packing keyswtich benchmarks 2024-10-24 18:10:58 +02:00
Mayeul@Zama
0dec4482b5 fix(fhe_strings): fix size error 2024-10-24 13:46:20 +02:00
Arthur Meyre
876cde1f6a chore(doc): add make command to print parameters used in doc benchmarks 2024-10-03 13:53:52 +02:00
David Testé
212af17538 style(global): fix typos 2024-10-03 11:47:00 +02:00
David Testé
2b25b20aeb chore(ci): fix wasm benchmark results parsing for object sizes 2024-10-03 09:17:55 +02:00
tmontaigu
45effa41d5 refactor!: gate wops behind "experimental" feature
This puts the WOPBS features of shortint and integer
modules behind the "experimental" feature.

Due to the versioning feature, the structs definitions
are not gated behind the "experimental" feature, however
they are only pub(crate) in that case.
2024-09-27 15:00:18 +02:00
David Testé
ea3ec8cbdd chore(ci): write gpu parameters to file
This is done so that lattice estimator can check security of these
ones.
2024-09-26 09:02:06 +02:00
Arthur Meyre
43d91f512f chore(ci): use python as webdriver for wasm test and benchmarks
Swtich from Jest and Puppeteer to Python with Selenium. It relies
on browser and webdriver binaries from browser fabricators.
For now the Python script only supports Chrome browser.
2024-09-25 09:11:13 +02:00
David Testé
488c942a3a refactor(shortint): move parameters set to their own directory
This is done to ease automatic parameters updates.
2024-09-11 13:54:23 +02:00
Mayeul@Zama
38b5759e88 chore(all): fix new lints 2024-09-09 11:57:45 +02:00
Mayeul@Zama
8748d1cc22 chore(hlapi): remove Wop 2024-07-26 12:03:13 +02:00
David Testé
42609987a1 chore(examples): measure more shortint key sizes 2024-07-19 13:41:29 +02:00
Arthur Meyre
9242b2a725 feat(high_level_api): add casting primitives for compact public key 2024-06-20 13:24:27 +02:00
David Testé
369d6df350 chore(ci): gather more parameters pk for curve security checks 2024-06-20 08:35:37 +02:00
David Testé
6be983db34 chore(bench): refactor core_crypto benchmarks to use TUniform 2024-06-19 10:51:03 +02:00
Arthur Meyre
75e2be2ca2 chore(bench): update zk wasm benchmarks
- add a parameter set for wasm to benchmark relevant ZK timings
- update benchmarking code to be more flexible
2024-06-19 10:51:03 +02:00
David Testé
f9307754ef chore(ci): reduce number of keys generated in keycache
The keys/ folder was containing lots of unused keys in tests and
thus was eating around 20GB of disk space.
2024-06-14 19:38:58 +02:00
tmontaigu
3f9c1b0ca6 refactor(tfhe): Allow CompactCiphertextList to store heterogeneous types
This refactors the integer's CompactCiphertextList to allow storing
unsigned, signed (without necessarily the same number of blocks) and
booleans in a single comapct list.

This is better as its more flexible and allows for better compression
by not forcing to use a list per data type. This is especially
interessing with zero-knowledge proofs as they are expensive to compute.

This also adds the ability to pack integer blocks by using the carry
space, but makes the expansion require a ServerKey to split blocks
via PBS.

BREAKING CHANGE: expand method from CompactCiphertextList returns a
                 CiphertextExpander
BREAKING CHANGE: Removes 'typed' CompactList and Compact types from the hlapi
                 (e.g. CompactFheUintList/CompactFheUintX)
2024-06-06 17:26:13 +02:00
tmontaigu
bad827d4a5 feat(integer): add if_then_else on booleans
This adds if_then_else/cmux on BoleanBlock for integer API
and FheBool for HLAPI.

To have the same name for both default version of the API
in integer a trait was introduced.

Ideally we would have wanted to do the boolean cmux in one PBS by
packing data like this `(cond * 4) + (if * 2) + else` but this
would not respect the max norm2.

BREAKING CHANGE: integer::ServerKey::if_then_else_parallelized requires the
trait ServerKeyDefaultCMux to be in scope.
2024-05-21 14:15:17 +02:00
David Testé
d1fe49fa2f refactor(shortint): add several p-error for various parameters set 2024-04-09 13:27:19 +02:00
Arthur Meyre
691bff5970 chore(wop): remove outdated parameters and update other parameters 2024-04-09 07:57:54 +02:00
Mayeul@Zama
31e2949906 style(all): regroup uses 2024-03-21 13:58:02 +01:00
Mayeul@Zama
4798ee17c4 chore(tfhe): make macros scoped 2024-03-21 13:58:02 +01:00
tmontaigu
5a19114417 feat(integer): make bitnot a PBS-free operation
BREAKING CHANGE: bitnot_parallelized it not bitnot as the operation
does not require the use of multithreading anymore
2024-03-18 17:36:35 +01:00
Mayeul@Zama
53b89fdfae fix(doc): add syntax highlighting to rust doctests 2024-03-15 09:26:53 +01:00
David Testé
b40897adbe chore(bench): benchmark server keys with wasm
Benchmarks are run for 1_1 and 2_2 parameters set on compressed
server key.
2024-03-14 09:22:26 +01:00
Arthur Meyre
ccf879c9ae refactor(tfhe): plug NoiseDistribution in the various APIs 2024-03-07 10:24:15 +01:00
David Testé
93581f7ee1 chore(ci): add integer layer to code coverage
A special set of cryptographic parameters set have been created to
speed-up test execution in coverage mode. These parameters set are
*NOT* guaranteed to be secure nor to yield correct results.
2024-02-27 09:29:03 +01:00
sarah el kazdadi
7190dad1e3 chore(ci): update toolchain, fix clippy warnings 2024-02-15 19:01:15 +01:00
Arthur Meyre
52f3babde5 feat(shortint): add an atomic counter to keep track of the number of PBSes 2024-02-15 10:47:12 +01:00
Sexosexosexo
02265705fc docs(tfhe): add fhe_strings example 2024-01-31 17:07:11 +01:00
tmontaigu
17c110f536 feat(hlapi): add gpu support 2024-01-19 09:27:04 +01:00
Arthur Meyre
bb1a969c34 chore(ci): update nightly toolchain to have fixed LLVM as well
- fix lints linked to latest nightly
2023-12-01 12:34:26 +01:00
Arthur Meyre
b450375da1 chore(integer): restore assert after using 3_3 params for CRT doctests
- fix max degree for CRT keys which don't need to propagate carries

BREAKING CHANGE:
pub API removed from pub interface
2023-11-15 11:10:30 +01:00
tmontaigu
6e0a3b9ad7 feat(integer): add BooleanBlock wrapper type
The BooleanBlock wrapper type is meant to convey the fact that
the ciphertext encrypts a 0 or 1.

Since its meant to be a simple wrapper, the goal for is to be flexible
and not add more burden than usefulness.

Hopefully this implementation somehow achieves that

Breaking Changes:
 - This changes the return type of comparisons from a T to
   a BooleanBlock. Requiring existing code to explicitely convert
   using `.into_radix`.
 - This makes the cmux/if_then_else functions take a BooleanValue
   as the input type  Requiring existing code to wrap their condition
   ciphertext in a new BooleanValue
2023-11-08 19:40:21 +01:00
tmontaigu
ec27d3dc6f refactor(hlapi): remove wrapping of booleans
This commit removes the wrapping of the `tfhe::boolean`
that was done in the HLAPI, effectively making the HLAPI
only wrapping `tfhe::integer`.

FheBool is now reused to be a single shortint block
compatible with other type FheUint8,16,etc (previously they were not).

In the future, `tfhe::boolean` could be re-wrapped in hlapi, but
this time, to be used as a base for all integers and not just
FheBool.

BREAKING CHANGE:
- hlapi no longer wraps tfhe::boolean API.
- tfhe::ConfigBuilder::enable_bool/disable_bool/all_disabled/all_enabled
  removed. Now default configuration should be done using
  `tfhe::ConfigBuilder::default()`.
- `tfhe::ConfigBuilder::use_default_small_integer` removed
  use `tfhe::CondifBuilder::default_with_small_encryption()`
- Uninitialied{ClientKey, PublicKey, CompressedPublicKey} error types
  removed as these erros are no longer possible
2023-11-04 00:18:16 +01:00
David Testé
40d07c6bc3 chore(ci): speed-up boolean coverage
This is done by reducing the number of parameters set run in tests.
Using the keycache for the key switching key and public key tests also
help to reduce total run duration.
2023-09-26 08:58:36 +02:00
Mayeul@Zama
b553a68fa9 chore(docs): simplify improved formula in dark market 2023-09-18 09:58:13 +02:00