769 Commits

Author SHA1 Message Date
Loris
03635afa8f toolchain changed 2024-05-16 11:36:40 +02:00
J-B Orfila
4c659b5c70 Artifacts CCS2024 2024-04-23 11:00:00 +02:00
Arthur Meyre
b80e09f9d2 chore(tfhe): bump version tfhe-rs-0.4.4 2024-02-29 09:28:28 +01:00
Arthur Meyre
aae5b45047 chore(tfhe): update toolchain to avoid SIMD breakage, fix lints 2024-02-29 09:28:28 +01:00
tmontaigu
c0240af4ca chore(integer): use Arc<ServerKey> for executor
The goal is to avoid holding the key twice in memory
when both the executor and the test case needs the key
tfhe-rs-0.4.3
2024-02-28 14:59:13 +01:00
Arthur Meyre
0578c2ab1d chore(ci): fix doctest by using parameters with enough precision 2024-02-28 14:59:13 +01:00
Arthur Meyre
d1abdc081d chore(ci): fix test runs by moving panic to its own test file
- investigate what goes wrong in the panic hook leading to multiple use of
the same object from the js side
2024-02-28 14:59:13 +01:00
Arthur Meyre
44ff195704 chore(tfhe): bump version to 0.4.3 2024-02-28 14:59:13 +01:00
Arthur Meyre
1fb65f1f6e fix(shortint): use proper noise value during compact list encryption 2024-02-28 14:59:13 +01:00
Arthur Meyre
e1f54981bf chore(tfhe): pin bytemuck to avoid nightly stdsimd breakage 2024-02-28 14:59:13 +01:00
Arthur Meyre
621cbcb14a chore(doc): correct some typos and wrong phrasing on data migration 2024-01-24 19:46:00 +01:00
Arthur Meyre
0898268733 chore(tfhe): bump version to 0.4.2 tfhe-rs-0.4.2 2024-01-23 19:48:36 +01:00
Arthur Meyre
6ec7f7e405 feat(forward_compatibility): add code to upgrade to TFHE-rs 0.5
- add tfhe-c-api-dynamic-buffer to be able to work with 0.5 buffers
- add a script to symlink the dependency lib to a fixed name
- the rust build system adds a fingerprint to the lib name which is not
practical when we are linking our C test executable
- link the most recent artifacts corresponding to the dependency we have
2024-01-23 19:48:36 +01:00
tmontaigu
16ad67ace3 chore(wasm): update dependencies of wasm tests 2024-01-23 19:48:36 +01:00
Arthur Meyre
c949256323 doc(data_migration): add documentation on how to migrate data for TFHE-rs
co-authored-by: jborfila
2024-01-22 13:43:10 +01:00
Arthur Meyre
7ae5f65909 feat(boolean): add raw parts methods to the ClientKey
- into_raw_parts allows to deconstruct a ClientKey
- new_from_raw_parts allows to construct a ClientKey
2024-01-08 17:17:27 +01:00
Arthur Meyre
4a2e9e5064 chore(c_api): add the c_api code from the docs as a test 2024-01-03 14:26:57 +01:00
Arthur Meyre
3ae27e79d0 doc(c_api): Add an output for the users compiling the C API example 2024-01-03 14:26:57 +01:00
tmontaigu
2332f89aa0 docs(capi): fix C API example 2024-01-03 14:26:57 +01:00
Arthur Meyre
3f9603a75c chore(ci): fix trivium clippy target 2023-11-28 19:23:29 +01:00
Arthur Meyre
848cc37300 chore(ci): update Makefile for semver trick 2023-11-28 19:23:29 +01:00
tmontaigu
2f4d00b13a chore(tfhe): bump version to 0.4.1 tfhe-rs-0.4.1 2023-10-23 15:00:39 +02:00
tmontaigu
2f295ea467 fix(integer): fix unsigned_overflowing_sub on trivials
unsigned_overflowing_sub does an independant subtraction
on each blocks with a correcting term being added to avoid
trashing the padding bit (lhs - rhs + correction).

The correction depended on rhs's degree.
e.g. if rhs's degree was in range 1..(msg_mod-1) -> correction =
     msg_mod

However if rhs's degree was zero (so rhs is a trivial 0), the correction
was also 0, however the borrow propagation rely on that correction to
always be added.
2023-10-23 15:00:39 +02:00
tmontaigu
fa54a02c01 chore(ci): set node version 2023-10-23 15:00:39 +02:00
tmontaigu
646b644728 chore(ci): tell nvm to use node version 20 in wasm parallel tests 2023-10-23 15:00:39 +02:00
J-B Orfila
4a00d25cb1 doc: updating doc for v0.4 tfhe-rs-0.4.0 2023-10-16 17:56:17 +02:00
tmontaigu
8c9ee64612 fix(integer): better estimate which algorithm to choose 2023-10-16 16:19:00 +02:00
tmontaigu
bfdfbfac0f chore(integer): add tests for default signed rotations/shifts 2023-10-16 16:16:07 +02:00
tmontaigu
dbe7bdcd5c feat(integer): map cmux to if_then_else 2023-10-16 16:15:49 +02:00
tmontaigu
6d77ff18ad chore(integer): add full_propagate test 2023-10-16 14:11:44 +02:00
tmontaigu
7d4d0e0b16 fix(integer): fix is_scalar_add_possible 2023-10-16 14:11:44 +02:00
Mayeul@Zama
b27762232c feat(wasm): add integers safe deserialization 2023-10-16 10:19:09 +02:00
Mayeul@Zama
f597d0f06f feat(c_api): add base and compress integers safe deserialization 2023-10-16 10:19:09 +02:00
dependabot[bot]
ee188448f3 chore(deps): bump tj-actions/changed-files from 39.2.1 to 39.2.2
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39.2.1 to 39.2.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](db153baf73...408093d9ff)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 09:51:26 +02:00
Mayeul@Zama
ee49f048c7 style(integer): rename num_blocks_per_integer 2023-10-13 14:18:44 +02:00
Mayeul@Zama
a9b09ecc45 feat(c_api): add compact integer safe deserialization 2023-10-13 14:18:44 +02:00
Mayeul@Zama
efc243edc9 feat(global): refactor ciphertext conformance 2023-10-13 14:18:44 +02:00
tmontaigu
bc34411d3f feat(integer): speed-up division by using overflowing_sub
using overflowing sub allows to remove the comparison used
in the algorithm, giving significant performance boost.

before
             8        16       32      40       64       128        256
hpc7a:    `981 ms` `2.53 s` `6.41 s` `9.04 s` `16.1 s` `39.3 s` `1.55 min`
m6i:      `1.10 s` `2.97 s` `7.17 s` `10.5 s` `19.7 s` `50.2 s` `2.11 min`

afer:
             8        16       32      40       64       128        256
hpc7a:   `604 ms` `1.6 s`  `3.8 s`  `5.14 s` `9.4 s`  `22.4 s`  `54.613 s`
m6i:     `659 ms` `1.77 s` `4.4 s`  `5.9 s`  `11.5 s` `29.8 s`  `87.95 s`
2023-10-12 14:35:36 +02:00
J-B Orfila
c7923ff3ed refactor(shortint): update compact parameters 2023-10-12 11:56:50 +02:00
Arthur Meyre
7534b68e5c test(core): use polynomial tests from NTT PR
- initial work done in https://github.com/zama-ai/tfhe-rs/pull/394
- useful reworks of the tests have been waiting in that PR, this is to
have those tests while NTT usage gets validated

co-authored-by: sarah-ek <sarah.elkazdadi@zama.ai>
csprng-0.4.0
2023-10-12 10:40:15 +02:00
tmontaigu
655f7e6214 chore(hlapi): improve scalar type convertion 2023-10-10 17:18:32 +02:00
tmontaigu
b8556ddbd4 feat(hlapi): add C API support for FheInt 2023-10-10 17:18:32 +02:00
tmontaigu
cab7439064 fix(integer): handle trivial ct in if_then_else
if_then_else uses two calls to zero_out_if.

In zero_out_if, if the condition block given has a degree of 0
then it would return 0, without calling the predicate function.

This is not correct, as its the predicate function that
gives whether the output should be 0 or the original ciphertext.

Which meant that if if_then_else received a condition with a
degree of 0, it would always return 0.
2023-10-10 17:18:12 +02:00
tmontaigu
f8a8780651 fix(integer): remove remove if_then_else assert
unchecked_if_then_else had an assert that required
that the condition value looked like it encrypts a boolean.
This check was made using the degree.

However, the only cases where a value looks like it encrypts a boolean
value is when they are the result of a comparison (lt, le, eq, etc).

But there are other cases were the value holds a boolean value but
due to how degree works, it's not possible to know thus limiting the
use of if_then_else.

So we remove that assert, and rely on the developper knowing
its condition is 0 or 1.
2023-10-09 18:35:26 +02:00
tmontaigu
bb3c8e7d5d feat(integer): add unsigned_overflowing_sub 2023-10-09 15:39:41 +02:00
Arthur Meyre
69536960c3 chore: fix typos 2023-10-09 14:49:13 +02:00
dependabot[bot]
52a7c52a49 chore(deps): bump tj-actions/changed-files from 39.2.0 to 39.2.1
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39.2.0 to 39.2.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](8238a41032...db153baf73)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 10:21:04 +02:00
tmontaigu
751c407ba5 feat(wasm): add FheInt support 2023-10-05 15:52:45 +02:00
Mayeul@Zama
492d348138 test(serialization): run tests in CI 2023-10-05 09:15:58 +02:00
Mayeul@Zama
e7df7eb5ef test(serialization): add serialization test 2023-10-05 09:15:58 +02:00