3770 Commits

Author SHA1 Message Date
Arthur Meyre
e954247f1b chore(ci): CI at the speed of ligth
- use a 128 vcpu instance
- update script to have a no compromise test run
- update Makefile to be able to run the "no compromise" CI mode
2023-03-20 11:24:37 +01:00
dependabot[bot]
8d9ba2a1f9 chore(deps): bump actions/checkout from 3.3.0 to 3.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](ac59398561...24cb908017)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 10:16:16 +01:00
sarah el kazdadi
34fc96319d fix(tfhe): fix faulty comparison in avx512 code 2023-03-17 16:14:41 +01:00
Arthur Meyre
13ad7d5468 chore(ci): change ubuntu mirror urls as the original ones are too slow 2023-03-16 17:18:08 +01:00
Arthur Meyre
9151eb72b3 chore(ci): silence skipped M1 tests due to cla-bot label 2023-03-16 17:17:57 +01:00
Rui LOPES
8d8b8ab511 fix(build): remove -- flag from make targets that do not use wasm-pack 2023-03-16 17:09:15 +01:00
Rui LOPES
0c30e7525a fix(build): pass the --features arguments to the wasm-pack command in Makefile js targets 2023-03-16 17:09:15 +01:00
tmontaigu
385c907807 fix(shortint): remove wrong large_mod in cmp operations 2023-03-13 13:22:02 +01:00
Arthur Meyre
6266d18211 chore(tfhe): fix typos 2023-03-13 09:54:41 +01:00
tmontaigu
0a39f369d2 fix(integer): make radix encryption / decryption work on big endian 2023-03-10 14:09:13 +01:00
tmontaigu
bb6663cfe5 chore(integer): simplify radix decryption 2023-03-09 15:44:33 +01:00
tmontaigu
06713fa42d fix(integer): make radix encryption work on big endian 2023-03-09 15:44:33 +01:00
tmontaigu
b59afc7eee feat(integer): add PublicKey 2023-03-09 15:44:33 +01:00
tmontaigu
2ede9fb852 chore(integer): move u256 into its own mod 2023-03-09 15:44:33 +01:00
tmontaigu
ccf21c1716 feat(integer): add compressed ciphertexts 2023-03-09 15:44:33 +01:00
tmontaigu
f3dc9e52f6 feat(integer): add min,max and comparisons ops 2023-03-09 15:44:33 +01:00
tmontaigu
195efaf09c chore(integer): refactor benches 2023-03-09 15:44:32 +01:00
tmontaigu
3c9325f939 feat(tfhe): arbitrary sized integer encryption 2023-03-08 09:47:19 +01:00
aquint-zama
a542b64dea chore(docs): minor fixes 2023-03-07 15:53:00 +01:00
Arthur Meyre
e8a560b887 refactor(integer): rewrite extract_bits to avoid ciphertext copies 2023-03-07 10:08:53 +01:00
Arthur Meyre
14da0ca001 feat(integer): add concrete-integer as integer module 2023-03-07 10:08:53 +01:00
Arthur Meyre
5d8a138c69 chore(tfhe): update copyright year 2023-03-03 15:44:31 +01:00
David Testé
10b0ff7f8b chore(ci): split sync repo url into several secrets
Enforcing usage of fine-grained token means that a token always
have an expiration date. Thus it must be update fromp time to time.
The seldom SYNC_DEST_REPO secrets would have contained such fine
grained token. By spliting this seldom secret and using
CONCRETE_ACTIONS_TOKEN there is no need to update SYNC_DEST_REPO
each time the token is updated.
2023-03-03 10:08:13 +01:00
David Testé
2279da604b chore(ci): benchmark more operations in shortint
The following operations have been added:
 * unchecked_neg
 * unchecked_div
 * unchecked_greater
 * unchecked_less
 * unchecked_equal
 * unchecked_scalar_div
 * unchecked_scalar_mod
 * unchecked_scalar_left_shift
 * unchecked_scalar_right_shift
2023-03-02 14:41:00 +01:00
David Testé
f21fb9068c chore(ci): benchmark some operations with more crypto parameters 2023-03-01 14:21:24 +01:00
Arthur Meyre
87b9431881 chore(thfe): add integer workflow to make it availble for slab-ci 2023-03-01 08:58:24 +01:00
tmontaigu
c2c43a2313 refactor(shortint): reduce memory usage of buffers
Replace the BTreeMap of buffers with a Memory struct
that contains a Vec that is resized/sliced and converted
to views, akin to what already exists in boolean module.

This has the advantage of making the memory held by the engine smaller
when using multiple keys.
Now, the memory held will be the maximum of buffer size needed out of all the parameters used
instead of being the sum of the buffer size of all the parameters used.
2023-02-28 18:06:45 +01:00
tmontaigu
9db7a42f8b fix(shortint): use correct lwe dimension in key id
In the KeyId that we used as to identify buffers needed
for the bootstrap/keyswitch we were storing the lwe dimension
of the output of a lwe bootstrap.

However what is stored and used as a value of the BTreeMap is a buffer
meant to store the ouput of a lwe keyswitch.

The fix is to store the output lwe keyswitch dimension as part
of the KeyId instead as its the correct one.
2023-02-28 18:06:45 +01:00
David Testé
a47d8e3ee1 chore(ci): reduce pbs benchmark execution duration
When using a criterion sample size of 5000, the benchmark duration
for PBS using shortint can be very long (3620s for
MESSAGE_4_CARRY_4). Switching to a sample size of 2000 would cut
down all of the benchmarks duration by a factor of at least 2.
2023-02-24 15:47:00 +01:00
David Testé
b2407d530e chore(ci): provide hardware name for benchmarks with avx512
This also print a human friendly error from parser if the hardware
cannot be found in the product list.
2023-02-24 12:28:53 +01:00
David Testé
97830e934a chore(ci): compute throughput on boolean and shortint benchmarks 2023-02-24 11:41:20 +01:00
David Testé
91d04d97e9 chore(ci): add aws profile for pbs benchmarks using slab 2023-02-24 11:41:20 +01:00
David Testé
a228f24abc chore(ci): make cli argument --throughput optional 2023-02-24 11:41:20 +01:00
David Testé
8ee7b14abe chore(ci): benchmark pbs with cost per ms and per dollar spent
Here we benchmark a fixed number of PBS with boolean and shortint
flavors on AWS EC2 instance. Once measurements are done, we compute
the number of operations per millisecond and also operations per
dollar we can perform for a given set of cryptographic parameters
and EC2 instance type. Data are then set to Slab that in turn send
them to a database to be plotted in Grafana.
2023-02-23 18:31:23 +01:00
Arthur Meyre
85dc0f0164 fix(core_crypto): correct PFPKSK list serial generation
- add equivalence keygen test between serial and parallel as we now near
exclusively use the parallel version ourselves
2023-02-21 17:06:10 +01:00
aquint-zama
c6eb6da0a0 chore(doc): fix shortint params example 2023-02-21 16:48:57 +01:00
sarah el kazdadi
acfe8697b7 feat(core): speed up karatsuba multiplication 2023-02-14 10:24:22 +01:00
Arthur Meyre
8c4ecb805f chore(tfhe): bump criterion version to remove outdated dep from dep tree 2023-02-10 15:57:05 +01:00
Arthur Meyre
0ad2d8cef2 chore(tfhe): upgrade csprng version to avoid indirect deprecated aes dep 2023-02-09 17:12:58 +01:00
Arthur Meyre
1931315f73 chore(ci): change docker image mirrors for JS test for faster CI 2023-02-08 11:07:51 +01:00
Arthur Meyre
af865f8d75 refactor(polynomials): plug karatsuba algorithm for polynomial mul
- remove key cache as generating is faster and incurs less issues for cache
coherency and re-use
2023-02-08 11:07:51 +01:00
Arthur Meyre
f8f6323ad4 chore(ci): re-organize tests a bit for better parallelism usage 2023-02-08 11:07:51 +01:00
Arthur Meyre
b29008830c refactor(core): implement missing traits for u128/i128 to make them usable
- enables the use of u128 in ciphertexts
- add encryption test based on shortint 2_2 params
2023-02-06 11:08:04 +01:00
Arthur Meyre
a43dbebd1b chore(tfhe): TFHE-rs uses GATs, so needs rust >= 1.65 2023-02-02 17:34:37 +01:00
Arthur Meyre
d224821aaa chore(tfhe): update testing script to allow custom RUSTFLAGS 2023-02-02 17:34:08 +01:00
Arthur Meyre
d24896ed09 chore(doc): fix code example where useless mut were used 2023-02-02 17:33:53 +01:00
tmontaigu
106624048c refactor(all): only depend on bincode when needed 2023-02-01 10:03:41 +01:00
tmontaigu
5849cc9e7d refactor(all): derive serde::{Serialize, Deserialize}
This replaces our manual implementations of serde's
Serialize and Deserialize trait with 'derives'.

The manual implementetions were needed when using concrete-core
but as tfhe-rs does not use concrete-core's engines we can
simply derive the implementations.
2023-02-01 10:03:41 +01:00
Arthur Meyre
02e6d3c955 feat(c_api): expose create_trivial for shortint in C api 2023-01-31 11:22:06 +01:00
Arthur Meyre
3acaa2e242 chore(ci): make no_tfhe_typo mac friendly 2023-01-31 10:18:35 +01:00