Commit Graph

74 Commits

Author SHA1 Message Date
David Testé
bf434be347 chore(ci): exclude unwanted files from coverage 2023-09-14 13:32:09 +02:00
David Testé
cd68a3bd1c chore(ci): execute clippy all-targets on benchmark code
The use of internal-keycache feature is mandatory to ensure clippy
is building against benchmark code.
2023-09-13 11:49:33 +02:00
David Testé
2a8ebb81d8 chore(ci): fix trivium test recipes 2023-09-13 09:09:39 +02:00
David Testé
0080caf95d chore(ci): add code coverage workflow
Coverage is performed and then data are sent to Codecov to handle
reports.
2023-09-13 09:09:03 +02:00
David Testé
c26238533b chore(ci): add key cache keys generation for coverage 2023-09-13 09:09:03 +02:00
David Testé
ca229e369b chore(ci): add make recipe for shortint test coverage
Tarpaulin is the cargo module used to test coverage.
2023-09-13 09:09:03 +02:00
Arthur Meyre
bc129ba0ed chore(csprng): add dieharder test suite 2023-09-11 13:05:33 +02:00
Arthur Meyre
462834a12e chore(tfhe): use concrete-csprng 0.4.0 allows to use stable for M1/M2 macs 2023-09-11 13:05:33 +02:00
Arthur Meyre
ebeee1d6f8 chore(ci): add concrete-csprng to the CI 2023-09-11 13:05:33 +02:00
David Testé
5a3652f398 chore(ci): add clippy target for trivium application 2023-09-08 16:49:27 +02:00
David Testé
65749cb39b chore(bench): benchmark shortint ops against multi-bit parameters 2023-08-30 13:31:46 +02:00
David Testé
304932a861 chore(tfhe): refactor keycache in its own crate
The general parts of shortint keycache has been moved to its own
crate. This enable boolean layer to get access to traits without
having to import shortint::keycache module.
2023-08-10 16:42:40 +02:00
David Testé
59181d4717 chore(ci): add workflow to check security of parameters sets
Cryptographic parameters sets security is checked automatically
with a lattice estimator. The first step is to collect all the
parameters that need to be checked in in a file with a format
understable by Sagemath. Second, a lattice estimator is run in
a Sage script. Each parameters set is run against two attacks and
then security level is estimated from that.
These steps have been put into a GitHub workflow to perform
automatic checks.

Co-authored-by: Ben <ben.curtis@zama.ai>
2023-08-10 16:42:40 +02:00
Arthur Meyre
6a56af0b07 chore(ci): add a command to just build docs to see how it looks like
- add a target to lint doc building to replace the previous doc target
- adapt the top lib configuration for broken links to go from deny to warn
2023-07-28 11:52:01 +02:00
David Testé
10b1305e66 chore(ci): fast integer benchmarks to run on each push in main 2023-07-27 12:52:31 +02:00
David Testé
f5fab4db99 chore(bench): run groups of benchmarks using env variable 2023-07-26 09:36:29 +02:00
Arthur Meyre
1455da273d chore(ci): remove auto retry for wasm tests
- the pipe was masking the potential error test
2023-07-17 14:16:00 +02:00
Arthur Meyre
228f85d843 chore(tfhe): remove dbg! macro calls and add a Makefile check for it 2023-07-13 19:45:15 +02:00
Arthur Meyre
3cfee104cb chore(ci): forward profile to shortint and integer test scripts 2023-07-10 09:34:10 +02:00
Arthur Meyre
59ef915095 chore(ci): fix C API build system to manage profiles other than release 2023-07-10 09:34:10 +02:00
David Testé
e52bc09db5 chore(ci): add integer benchmarks with multi-bit parameters 2023-06-29 15:30:19 +02:00
twiby
5f635e97fa feat(apps): add Trivium application of TFHE 2023-06-23 16:01:40 +02:00
Arthur Meyre
7ea13715ee chore(ci): run example tests 2023-06-22 11:57:27 +02:00
Petar Ivanov
1d817c45d5 chore(makefile): add experimental deterministic FFT target for the C API
`Duration` is only needed when `experimental-force_fft_algo_dif4` is
set. We add a cfg directive to avoid a compiler warning.
2023-06-15 16:14:11 +03:00
David Testé
c4a73f4f44 chore(ci): use correct relative path to wasm bench directory
Parsing program is using tfhe/ as working directory. Thus providing
a relative path starting with tfhe/ would result to an error while
trying to walk the directory.
2023-06-14 09:32:36 +02:00
David Testé
18ed2e29a1 chore(ci): create fast feedback unit test profile
This is done to get quick feedback to developpers in a Pull Request.
It tests shorint level with only three sets of parameters. Integer
level is tested with only the default operations with two sets of
parameters.
This profile will be automatically triggered on each push in a
pull request. Conversely the full suite of test will also be
triggered automatically but once the review is approved.
2023-06-12 15:19:56 +02:00
Arthur Meyre
9e307a8945 chore(hlapi): add example to measure CPK and CCTL sizes
This also includes key generation time in WASM web client side
2023-06-12 11:41:21 +02:00
Arthur Meyre
2b83a1fec0 chore(ci): add a parser to output csv files for integer benchmarks
- will simplify "just to see" benchmarks output parsing to share when
iterating on performance work
2023-06-09 14:27:49 +02:00
Arthur Meyre
3508019cd2 feat(core): Add Compact Public Key
- Based on "TFHE Public-Key Encryption Revisited "
  https://eprint.iacr.org/2023/603.pdf

Co-authored-by: tmontaigu <thomas.montaigu@laposte.net>
2023-06-07 19:47:50 +02:00
Arthur Meyre
2f6c1cf0b5 chore(ci): add docs alias make target for doc 2023-06-07 14:18:49 +02:00
David Testé
08c264f193 chore(ci): put wasm tests in their own workflow
This is mostly done to avoid failure on AWS tests (core, boolean,
shortint, ...) workflow due to flaky tests in WASM.
2023-06-06 14:02:52 +02:00
Arthur Meyre
d1cb55ba24 chore(tfhe): add multi bit shortint and integer tests
- default tests do not run multi bit PBS as it's not yet deterministic
- only radix parallel currently use multi bit pbs in integer
- remove determinism checks for some unchecked ops
- 4_4 multi bit parameters are disabled for now as they seem to introduce
too much noise
2023-06-02 16:00:28 +02:00
tmontaigu
d4ff1f5595 feat(wasm): add parralellism in wasm API and add wasm for HLAPI
Co-authored-by: David Testé <david.teste@zama.ai>
2023-06-02 11:13:12 +02:00
David Testé
799291a1f0 docs(tfhe): format sha256_bool and add make recipes to run it 2023-05-25 00:22:01 +02:00
David Testé
ddb3451087 docs(tfhe): format dark market example add make recipe to run it 2023-05-24 23:30:26 +02:00
David Testé
d79b1d9b19 docs(tfhe): format regex_engine and add make recipes to run it 2023-05-24 22:11:53 +02:00
tmontaigu
1ec7e4762a feat(integer): make wopbs compile on wasm
The goal here is just to make the code compile
and not allow js api to generate wopbs key yet.
2023-05-15 22:06:36 +02:00
Arthur Meyre
64813bae18 chore(tfhe): as seen there are uses of ilog2 which come from rust 1.67 2023-04-28 11:01:06 +02:00
David Testé
25a2586eae chore(ci): publish tfhe release on-demand
This will perform on-demand release publication.
It will publish on the following channels:
 * crates.io
 * web and node package on npmjs
2023-04-21 14:39:36 +02:00
tmontaigu
d28880ac30 chore(makefile): allow passing cargo profile
This allows to invoke the Makefile with a cargo profile
eg:
- `make CARGO_PROFILE=devo build_integer`
- `make CARGO_PROFILE=dev build_integer`
- `make CARGO_PROFILE=release build_integer`

By default still use release profile.
2023-04-12 12:39:54 +02:00
Arthur Meyre
ca9cdc0e73 chore(tfhe): add fpcc target to have a fast pcc locally 2023-04-12 11:21:10 +02:00
David Testé
2b24eb304d chore(ci): record benchmarks parameters to be stored in database
This is done to comply with the new Zama benchmark standard.
Exhaustive parameters list is stored so once it's parsed and send
to database, one can easily filter results on such parameters in
visualization tool.
2023-04-11 21:35:56 +02:00
tmontaigu
190b483d23 chore(tfhe): rename typed_api to high_level_api
high_level_api makes it easier to understand
what this api brings (at least more than typed_api does)
and is term used in the documenation
2023-04-11 20:57:36 +02:00
Arthur Meyre
e799d240a7 chore(c_api): allow to build in a simple cargo command, requires nightly 2023-04-11 19:51:51 +02:00
tmontaigu
0f5e1f0141 feat(c_api): add a C API of the high level API
One notable change is that since this C API
relies a lot on macro_rules! to be generated
we have to activate cbindgen's `expand` option,
which will use cargo-expand to expand macros.

However this means we can't call bindgen from the build.rs
as it seems to lead to a infinite-loop
(build.rs calls bindgen which calls cargo-expand which calls build.rs...)

So we call the cbindgen binary via the makefile.
2023-04-11 13:41:18 +02:00
David Testé
c206aa89b8 chore(ci): test core_crypto with avx512 2023-04-04 09:03:27 +02:00
tmontaigu
d7a4e87efb feat(typed_api): plug choice of big/small ciphertext 2023-03-31 16:29:34 +02:00
David Testé
accd3cfb3f chore(ci): add windows as target build platform 2023-03-29 15:44:59 +02:00
tmontaigu
475b838943 chore(makefile): add --all-targets switch to build command
This adds the --all-targets to the cargo build commands
invoked by the makefile so that when running
`make build_boolean`, lib, tests, benches, examples are built.

See the `cargo help build`

```
--all-targets
    Build all targets. This is equivalent to specifying --lib --bins --tests --benches --examples.
```
2023-03-27 10:59:49 +02:00
Arthur Meyre
68fa6b78a4 feat(tfhe): introduce experimental feature approach for multi_bit_pbs 2023-03-20 16:47:33 +01:00