Beka Barbakadze
aa3f83d016
all tests are passing
2025-03-10 18:49:37 +04:00
Beka Barbakadze
320310a6b7
fix some bugs
2025-03-10 15:59:48 +04:00
Beka Barbakadze
f704a38814
fix fmt
2025-03-07 18:34:41 +04:00
Beka Barbakadze
1659c07c89
fix test
2025-03-07 18:31:07 +04:00
Beka Barbakadze
6cbe56283e
feat(gpu): add classic default 128 bit pbs
2025-03-07 17:37:13 +04:00
Beka Barbakadze
e90ec935a1
change parameters
2025-03-05 17:37:51 +04:00
Beka Barbakadze
7f3ac17cee
feat(gpu): Implement 128 bit classic pbs
2025-03-05 16:48:48 +04:00
Beka Barbakadze
c1d534efa4
refactor(gpu): refactor double2 operators to use cuda intrinsics
2025-03-03 17:29:39 +01:00
David Testé
47589ea9a7
chore(bench): run core_crypto benchmarks on all parameters p-fail
...
This also add KS-PBS benchmarks.
2025-03-03 16:01:17 +01:00
Agnes Leroy
ce327b7b27
chore(gpu): refactor mul/scalar mul to track noise/degree
2025-03-03 13:51:00 +01:00
Arthur Meyre
877d0234ac
fix: fix the atomic pattern used to cast in trivium and a test in shortint
...
- parameters are optimized for a clean ciphertext, the ciphertext being
keyswitched was noisy
2025-03-03 13:10:11 +01:00
dependabot[bot]
f457ac40e5
chore(deps): bump codecov/codecov-action from 5.3.1 to 5.4.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](13ce06bfc6...0565863a31 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-03-03 11:53:07 +01:00
dependabot[bot]
d9feb57b92
chore(deps): bump slsa-framework/slsa-github-generator
...
Bumps [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator ) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/slsa-framework/slsa-github-generator/releases )
- [Changelog](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md )
- [Commits](https://github.com/slsa-framework/slsa-github-generator/compare/v2.0.0...v2.1.0 )
---
updated-dependencies:
- dependency-name: slsa-framework/slsa-github-generator
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-03-03 11:52:56 +01:00
dependabot[bot]
fa41fb3ad4
chore(deps): bump actions/cache from 4.2.1 to 4.2.2
...
Bumps [actions/cache](https://github.com/actions/cache ) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/actions/cache/releases )
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md )
- [Commits](0c907a75c2...d4323d4df1 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-03-03 11:52:45 +01:00
dependabot[bot]
375a482d0b
chore(deps): bump actions/download-artifact from 4.1.8 to 4.1.9
...
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 4.1.8 to 4.1.9.
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](fa0a91b85d...cc20338598 )
---
updated-dependencies:
- dependency-name: actions/download-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-03-03 11:52:37 +01:00
Beka Barbakadze
7e941b29c1
refactor(gpu): use hexes to initialize twiddles for 64 bit fft
2025-03-03 14:44:12 +04:00
David Testé
3897137a3f
chore(ci): fallback on permanent h100 instance on shortage
...
When a shortage occurs on n3-H100x1 instances on Hyperstack, we'll
fall back on the permanent one registered on GitHub.
This can be done by using 'h100x1' as runner label to run a job on
it.
2025-03-03 11:38:32 +01:00
Beka Barbakadze
3988c85d6b
feat(gpu): Implement fft128 in cuda backend
2025-03-03 12:27:46 +04:00
Agnes Leroy
c1bf43eac1
feat(gpu): add a function to set a CudaLweList to 0
2025-02-28 16:46:17 +01:00
Agnes Leroy
95863e1e36
chore(gpu): plug in signed gpu tests in the hl api
2025-02-28 13:42:52 +01:00
Pedro Alves
a508f4cadc
fix(gpu): enforce tighter bounds on compression output
2025-02-28 07:12:36 -03:00
Agnes Leroy
dad278cdd3
chore(gpu): fix typo in doc
2025-02-28 11:12:17 +01:00
tmontaigu
699e24f735
docs: rename to README as its needed for link to work
2025-02-28 10:23:46 +01:00
Agnes Leroy
12ed899b34
chore(gpu): trigger long run tests every evening, edit workflow name
2025-02-27 17:22:02 +01:00
David Testé
8565b79a28
chore(ci): switch environment and add fallback for gpu profiles
...
Switch n3-H100-SXM5x8 to US-1 as CANADA is out of stock on this
instance.
Also L40 instances fallback on n3-RTX-A6000x1 to mitigate
resource shortages issues.
2025-02-27 16:59:04 +01:00
Agnes Leroy
1d7f9f1152
chore(gpu): refactor comparisons to track noise/degree
2025-02-27 16:57:24 +01:00
tmontaigu
3ecdd0d1bc
fix(c-api): add missing casts
...
cast_into FheUint{12, 512, 1024, 2048} were missing from the C API
2025-02-27 16:30:51 +01:00
J-B Orfila
14517ca111
docs: add link in the README
2025-02-27 15:09:41 +01:00
Agnes Leroy
a2eceabd82
fix(gpu): fix scalar comparisons with 1 block
2025-02-27 13:11:36 +01:00
Guillermo Oyarzun
968ab31f27
fix(cpu): fix corner case when estimating the num blocks required
2025-02-27 11:38:17 +01:00
Agnes Leroy
74d5a88f1b
chore(gpu): replace asserts with panic
2025-02-27 11:36:59 +01:00
Agnes Leroy
e18ce00f63
chore(gpu): increase 4090 test timeout
2025-02-27 11:27:55 +01:00
tmontaigu
7ec8f901da
docs(js): update JS example
...
The example was still using CompactFheUint32List
which as been removed in favor of the more generic CompactCiphertextList
2025-02-27 10:54:08 +01:00
Arthur Meyre
610406ac27
chore: link CONTRIBUTING.md in the documentation
2025-02-26 16:07:44 +01:00
J-B Orfila
4162ff5b64
docs: security disclaimer updated
2025-02-26 16:07:31 +01:00
J-B Orfila
efd06c5b43
docs: correcting parameter section
2025-02-26 16:07:31 +01:00
Nicolas Sarlin
bd2a488f13
chore(doc): add a doc page about parameters
2025-02-26 16:07:31 +01:00
David Testé
9f48db2a90
chore(ci): fix workflow concurrency condition
...
Referencing current branch using github.head_ref is a leftover
from handling pull_request_target event. This event being removed,
there is no need to be specific and we can instead use
'github.workflow_ref' which is more robust.
2025-02-26 14:11:42 +01:00
Pedro Alves
f962716fa5
feat(gpu): refactor the sample extract entry point so the user can pass how many LWEs should be extracted per GLWE
2025-02-26 11:58:47 +01:00
Arthur Meyre
ec3f3a1b52
chore(docs): use tilde requirements to minimize breakage on users' end
2025-02-25 17:59:23 +01:00
Arthur Meyre
ab36f36116
chore: update README
2025-02-25 17:59:23 +01:00
David Testé
06638c33d7
chore(ci): add contributing guidance
2025-02-25 17:21:42 +01:00
David Testé
e583212e6d
docs: refactor and update benchmarks pages
...
Benchmarks tables are rendered as descriptive SVG images.
Sort results by backend to have a clearer view in tree of content.
PBS benchmarks now display results for various p-fail and several
precisions.
2025-02-25 12:47:12 +01:00
David Testé
486ec9f053
chore(ci): update cpu aws ami and install git-lfs
...
Several network errors occurred while trying to install git-lfs
from within backward compatibility tests workflow. Having git-lfs
installed directly in the Amazon Machine Image fix this issue.
2025-02-25 12:45:47 +01:00
Arthur Meyre
0216e640bf
test: make the bound on the base variance check a bit looser
...
We have seen failures, we need proper confidence intervals on these tests
2025-02-24 17:47:30 +01:00
David Testé
d00224caa3
chore(ci): add should-run to tfhe-fft and tfhe-ntt tests
...
This is done to avoid testing tfhe-ftt/ntt crates if nothing
changes in their source files.
However, these tests would be run unconditionally on each push on
main branch.
2025-02-24 16:35:31 +01:00
dependabot[bot]
bd06971680
chore(deps): bump actions/cache from 4.2.0 to 4.2.1
...
Bumps [actions/cache](https://github.com/actions/cache ) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/actions/cache/releases )
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md )
- [Commits](1bd1e32a3b...0c907a75c2 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-02-24 11:46:53 +01:00
dependabot[bot]
58688cd401
chore(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](65c4c4a1dd...4cec3d8aa0 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-02-24 11:46:44 +01:00
Agnes Leroy
2757f7209a
chore(gpu): update backend readme
2025-02-24 11:22:14 +01:00
Mayeul@Zama
b38b119746
chore(docs): add HL strings documentation
2025-02-24 10:58:29 +01:00
Pedro Alves
219c755a77
fix(gpu): fix wrong number of blocks used in cast
2025-02-21 20:09:54 -03:00
Mayeul@Zama
fc4abd5fb1
chore: update toolchain
2025-02-21 15:03:23 +01:00
Guillermo Oyarzun
5de1445cbf
fix(gpu): fix wrong assert in division
2025-02-21 11:27:03 +01:00
Yuxi Zhao
6b21bff1e8
chore(docs): improve nagivation
2025-02-20 17:29:36 +01:00
Arthur Meyre
a1dc260fb2
chore(ci): make md doctest checker a bit more versatile on user errors
2025-02-20 17:29:36 +01:00
David Testé
5d9af12f6e
chore(ci): fix release workflow for tfhe-versionable
...
tfhe-versionable crate depends on tfhe-versionable-derive.
Workflow, now ensure that derive crate is published before
attempting to package tfhe-versionable.
Dry-run option is removed since it cannot be use correctly due
the reason aforementioned.
2025-02-20 11:44:58 +01:00
Guillermo Oyarzun
32c93876d7
feat(gpu): enable division in high level api
2025-02-20 10:33:07 +01:00
Guillermo Oyarzun
bede76be82
feat(gpu): enable if then else for boolean ciphertexts in hlapi
2025-02-19 12:50:38 +01:00
Guillermo Oyarzun
508713f926
fix(gpu): enable large integers for the classical pbs flavors
2025-02-19 06:52:49 -03:00
Guillermo Oyarzun
6d7b32dd0a
fix(gpu): enable large integers other multi bit pbs
2025-02-19 06:52:49 -03:00
Pedro Alves
15f7ba20aa
fix(gpu): Remove unnecessary and incorrect bound check for decompression
...
Removed unnecessary bounds check for the number of LWEs against polynomial size.
2025-02-19 06:17:11 -03:00
Arthur Meyre
4fa59cdd6d
chore(ci): fix web packages publish with provenance
...
- re-enabled required permissions, notably write id-token
2025-02-18 16:18:59 +01:00
Arthur Meyre
69d5b7206e
chore(ci): fix packaging job to also have exported env vars
2025-02-18 15:24:24 +01:00
Arthur Meyre
a9cb617fe8
chore(ci): fix cuda release workflow to have rust re-installed for cargo
2025-02-18 14:58:40 +01:00
Arthur Meyre
54962af887
chore: update copyright year to 2025
...
co-authored-by: wgyt <wgythe@gmail.com >
2025-02-18 13:19:28 +01:00
Arthur Meyre
cb7d77f59a
feat: add 2^-128 parameters
2025-02-18 13:19:28 +01:00
Arthur Meyre
0ecd5e1508
chore: bump tfhe to 1.0.0
2025-02-18 13:19:28 +01:00
Arthur Meyre
dc8b293895
chore: bump tfhe-cuda-backend to 0.8.0
2025-02-18 13:19:28 +01:00
Arthur Meyre
4ca4203c02
chore: bump tfhe-zk-pok to 0.5.0
2025-02-18 13:19:28 +01:00
Arthur Meyre
dfa6b2827a
chore: bump tfhe-fft to 0.8.0
2025-02-18 13:19:28 +01:00
Arthur Meyre
06ae56b389
chore: bump tfhe-ntt to 0.5.0
2025-02-18 13:19:28 +01:00
Arthur Meyre
f0238bab16
chore: bump tfhe-versionable to 0.5.0
2025-02-18 13:19:28 +01:00
Arthur Meyre
e4e03277b5
fix(shortint): fix CompressedModulusSwitchNoiseReductionKey generation
...
- was using the wrong seeded encryption API resulting in garbage values
when decompressing
2025-02-18 13:19:28 +01:00
Arthur Meyre
49566cd7cf
refactor(core): rename foot-gunny functions for seeded entities encryption
2025-02-18 13:19:28 +01:00
Guillermo Oyarzun
e0df5364f9
fix(gpu): enable large number of samples in pbs tbc
2025-02-18 07:26:28 -03:00
tmontaigu
4650a5e3e4
chore(hlapi): add FhetTypes::AsciiString
2025-02-18 10:22:00 +01:00
tmontaigu
c86d2616c1
refactor(hlapi)!: introduce HlCompactable trait
...
The purpose of this introducing this trait
is to purposefully create a breaking change
so that later we have more freedom on refactoring
some stuff with less risk of breaking
2025-02-18 10:22:00 +01:00
tmontaigu
a40501691a
feat(hlapi): allow strings in compact/compressed list
2025-02-18 10:22:00 +01:00
David Testé
c7b0fe37ec
chore(ci): enable throughput benchmarks for zk-pok
2025-02-18 09:56:49 +01:00
Guillermo Oyarzun
0f44ffdf30
fix(gpu): enable larger number of samples in the keyswitch
2025-02-17 19:34:26 -03:00
tmontaigu
380bc9b91a
fix: rotations of 1 blocks of 4_4
2025-02-17 17:27:43 +01:00
Nicolas Sarlin
0809eb942f
chore!: homogenize conformance parameters
...
BREAKING CHANGE: renamed some conformance parameters public types
2025-02-17 15:07:09 +01:00
dependabot[bot]
fb730d2953
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions
...
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions ) from 3.0.20 to 3.0.22.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases )
- [Commits](c3a2b64f69...25ed13d062 )
---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-02-17 14:13:41 +01:00
tmontaigu
1b7f7a5c8f
feat: add strings to integer's compressed list
2025-02-14 16:29:56 +01:00
Guillermo Oyarzun
0d3d23daec
chore(gpu): remove unused variables
2025-02-14 13:07:07 +01:00
Agnes Leroy
c5f44a6581
chore(gpu): refactor overflowing sub to track noise / degree
2025-02-14 12:03:20 +01:00
tmontaigu
cda43fd407
feat(strings): make strings compatible with compact list
2025-02-14 10:14:31 +01:00
Agnes Leroy
bfd3773322
chore(gpu): refactor arithmetic scalar shift
2025-02-13 20:58:12 +01:00
Agnes Leroy
a7c9357a02
fix(gpu): fix memory error in shift and rotate
2025-02-13 20:57:31 +01:00
Agnes Leroy
285fd2437e
chore(gpu): add some checks on radix sizes for carry propagation
2025-02-13 20:57:31 +01:00
David Testé
7ee49387fe
chore(ci): deduplicate parameters set to send to lattice estimator
...
From SageMath point of view some tfhe-rs parameters set are
equivalent. We deduplicate those by storing their name in the tag
field. Grouping them that way we decrease analysis time
dramatically.
2025-02-13 17:10:45 +01:00
Arthur Meyre
8756869fe3
fix: fix compression code for GPU which assumed a CPU data layout
...
- the CPU data layout is truncated to only store relevant bodies (i.e.
emtpy bodies are assumed to be 0) but the GPU CUDA code manages full GLWEs
only. To fix that we manage the data layout during conversions to have
consistent behavior when copying the list to/from CPU/GPU. Compression code
has been fixed on the CPU side to have the proper length for the output
expected by the CUDA code
2025-02-13 17:06:19 +01:00
Mayeul@Zama
9e4b585468
chore(core): use real modulus in test
2025-02-13 16:21:26 +01:00
tmontaigu
37934e42c1
fix(integer): rotations/shifts < 2 blocks
...
This commit fixes a few bugs
* The shift/rotate functions used when blocks encrypt a number of bits
that is a power of 2 was causing a panic when working on one block.
- Also, when the number of blocks was low (e.g 2 blocks with 2_2
params) a noise cleaning step was wrongly skipped
* The function used when blocks encrypt non power of 2 number of bits
also had a problem
The test have been updated to test with different block sizes and check
the noise level
Overall these bugs only affected low block counts (e.g FheUint2,
FheUint4) ciphertexts
2025-02-13 12:59:26 +01:00
Mayeul@Zama
53a1f35d3b
feat: update noise reduction to take input noise into account
2025-02-13 10:57:28 +01:00
Mayeul@Zama
4305f8d158
chore(core): refactor DispersionParameter
2025-02-13 10:57:28 +01:00
David Testé
eeb6c8a71f
chore(ci): remove pull_request_target for external contributions
...
We use large GitHub hosted runners to run CI pipeline for external
contributions. This avoids possible secret exposition due to usage
of pull_request_target event. It also removes a layer a complexity
to ensure such secrets are not exposed.
The flow would be improved since tfhe-rs maintainers won't have to
relaunch failed jobs individually, thanks to the "approve and run"
button in GitHub user interface.
2025-02-13 08:45:02 +01:00
tmontaigu
16d8af150c
fix(gpu): compressed list gpu <-> cpu
...
Some counts where to copied from the correct
source to correct destination.
And more importantly, the list on cuda side was stored
using a GlweCiphertextList but the data was compressed
(so the list was mostly empty). This use of a GlweList
instead of a specialized type lead to problems when converting
to Cpu
2025-02-12 15:17:23 +01:00
tmontaigu
d0b0fe8edb
fix(gpu): fix wrong degree after decompression
...
For Signed and Unsigned DataKind, the degree was
incorrectly set, leading to unneeded carry propagations
2025-02-12 15:17:23 +01:00
David Testé
3df08e9259
chore(ci): install github runner as ubuntu user for gpu workflows
2025-02-12 12:10:53 +01:00
Arthur Meyre
5bf5aff2ba
test(core): make check a little less stringent on improved var for ms
2025-02-12 08:25:22 +01:00
dependabot[bot]
5da6a8de87
chore(deps): bump tj-actions/changed-files from 45.0.6 to 45.0.7
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 45.0.6 to 45.0.7.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](d6e91a2266...dcc7a0cba8 )
---
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 >
2025-02-11 14:36:08 +01:00
Agnes Leroy
6544124792
chore(gpu): refactor scalar rotate to track noise/degree
2025-02-11 11:45:13 +01:00
Agnes Leroy
1243aea660
chore(gpu): refactor scalar shift to track noise/degree
2025-02-11 11:45:13 +01:00
Agnes Leroy
3616588ab7
chore(gpu): fix long run tests ranges
2025-02-11 10:48:12 +01:00
Agnes Leroy
af838e2c48
fix(gpu): fix gpu index initialization in doc strings
2025-02-11 08:46:22 +01:00
Agnes Leroy
00037f3b14
chore(gpu): track noise/degree through single carry propagation & prefix sum
2025-02-11 08:46:22 +01:00
Agnes Leroy
928c1e7215
fix(gpu): fix tuniform noise bound in 3_3 gpu multi-bit params
2025-02-10 17:58:25 +01:00
Mayeul@Zama
db968fb9d1
chore: fix ruff lint
2025-02-10 17:01:39 +01:00
Mayeul@Zama
c461273649
chore: use tfhe-backward-compat-data version from Cargo.toml
2025-02-10 17:01:39 +01:00
Agnes Leroy
2e1e743bcc
fix(gpu): fix degree after shift/rotate
2025-02-10 11:44:47 +01:00
David Testé
01aa7d105c
chore(ci): always run should-run step against base commit
...
Running against last remote commit would induce undesired behavior,
especially on pull-request approval.
For example a change in integer layer could occur in the
pull-request commits list but the changes aren't contained in the
last remote commit. Then, on approval, aws_tfhe_integer_tests.yml
workflow would be skipped although it should run regarding the
base commit.
2025-02-10 09:06:54 +01:00
Mayeul@Zama
73412a43bf
fix: fix compression of trivial ciphertext
2025-02-07 19:10:05 +01:00
Mayeul@Zama
afdb30aa77
chore: update backward compat version
2025-02-07 16:33:47 +01:00
Mayeul@Zama
1993f18bdb
chore(bench): add modulus switch noise reduction bench
2025-02-07 16:33:47 +01:00
Mayeul@Zama
6eb4b80713
feat(shortint): add modulus switch noise reduction in apply_programmable_bootstrap
2025-02-07 16:33:47 +01:00
Mayeul@Zama
ad2ec1b826
feat(shortint): update ShortintBootstrappingKey conformance
2025-02-07 16:33:47 +01:00
Mayeul@Zama
328ab8ad9e
feat(shortint): add modulus switch noise reduction keys to ShortintBootstrappingKey::Classic
2025-02-07 16:33:47 +01:00
Mayeul@Zama
6124018759
feat(shortint): add modulus switch noise reduction keys
2025-02-07 16:33:47 +01:00
Mayeul@Zama
191b0f764d
feat(shortint): add modulus switch noise reduction params to c-api
2025-02-07 16:33:47 +01:00
Mayeul@Zama
f26579ace3
feat(shortint): add modulus switch noise reduction params
2025-02-07 16:33:47 +01:00
Mayeul@Zama
d45bf6a6a5
feat(core): add modulus switch noise reduction
2025-02-07 16:33:47 +01:00
Mayeul@Zama
ef7652be9c
chore(shortint): cleanup
2025-02-07 16:33:47 +01:00
Mayeul@Zama
921d2e3a56
chore(core): add mean function
2025-02-07 16:33:47 +01:00
Mayeul@Zama
1ff9284ef8
style(c_api): use destructuring to avoid missing fields
2025-02-07 14:57:29 +01:00
Mayeul@Zama
1234202393
chore: fix features
2025-02-07 14:56:49 +01:00
Mayeul@Zama
f74f3903e0
chore: fix new clippy lints
2025-02-07 14:56:49 +01:00
Pedro Alves
225b5b2597
chore(gpu): refactor shift and rotate to keep track of degree and noise changes
2025-02-07 10:54:44 +01:00
Agnes Leroy
be719ee76f
chore(gpu): track noise/degree through scalar add
2025-02-06 20:48:03 +01:00
tmontaigu
60c37219ac
refactor!: Add invariant to GpuIndex
...
This commit does 2 things:
* It adds to GpuIndex the invariant that the index corresponds
to a valid GPU, to do so, the inner u32 is made private
and new/try_new method are now used to construct a GpuIndex
these methods checks that the index is valid
* It makes GpuIndex transparent, allowing to safely cast a *const
GpuIndex to *const u32, this is to save same copies made to transform
Vec<GpuIndex> to Vec<u32> that was used to get a *const u32
BREAKING CHANGES: GpuIndex(some_value) is no longer valid and
GpuIndex::new(some_value) / GpuIndex::try_new(some_value) has to be
used
2025-02-06 14:37:12 +01:00
Agnes Leroy
dda9ee759b
chore(gpu): encapsulate after_bitop functions for better readability
2025-02-06 09:40:24 +01:00
Agnes Leroy
f0d9f7c548
chore(gpu): track noise/degree in scalar bitops
2025-02-06 09:40:24 +01:00
Agnes Leroy
75b5b8def6
chore(gpu): track noise/degree in C++ for bitops
2025-02-06 09:40:24 +01:00
Agnes Leroy
96513f9ed5
chore(gpu): let cmux update noise/degree on the c++ side
2025-02-04 13:49:29 +01:00
Agnes Leroy
0ce7f87f0b
chore(gpu): track noise/degree in apply_many_lut
2025-02-04 13:49:29 +01:00
Agnes Leroy
1c97983c9b
chore(gpu): add noise/degree tracking in apply_bivariate_lut
2025-02-04 13:49:29 +01:00
tmontaigu
5f31c629c4
fix(hlapi): ciphertext list decompress after safe_deser
...
After a safe_serialize/safe_deserialize, the CompressedCiphertextList
was on Cpu. As the `get` method looked at the device of the data
and not the device of the server_key to know where computation
needs to happen, it meant that in this case decompressing using Gpu
was impossible, only Cpu was usable (as data was always onlu on Cpu)
The fix is twofold:
* First, when deserializing, the data will use the current serverkey
(if any) as a hint on where data should be placed
* the `get` method now uses the server_key to know where computations
needs to be done, which may incur a temporary copy/transfer on every
call to `get` if the device is not correct.
The API to move data has also been added
Note that this was not the case when using regular serialize/deserialize
as this would store the device, so that deserialize was able to restore
into the same device (hence why the test which use serialie/deserialize
did not fail). In hindsight, the ser/de impl should not save which
device the data originated from
2025-02-04 09:44:54 +01:00
Pedro Alves
6793abde77
chore(gpu): refactor small scalar mul to keep track of degree and noise changes
2025-02-03 19:35:05 -03:00
Pedro Alves
88ec12aa34
chore(gpu): refactor negate to keep track of degree and noise changes
2025-02-03 18:11:40 +01:00
Agnes Leroy
510876726a
fix(gpu): fix bug with noise level/degree tracking
2025-02-03 16:03:59 +01:00
Pedro Alves
99664d6ce0
fix(integer): fix a typo in a comment
2025-01-31 22:45:23 +01:00
Agnes Leroy
04fb07bd6f
chore(gpu): track noise level/degree in apply lut
2025-01-31 11:41:55 +01:00
Pedro Alves
3c88574a52
chore(gpu): encapsulate cudaSetDevice
2025-01-31 09:08:30 +01:00
Pedro Alves
c470b71b1d
fix(gpu): fix default multi-bit PBS for multi-device execution of integer ops
2025-01-31 09:08:30 +01:00
Pedro Alves
cc6edd0109
feat(gpu): add new tests to cover the multi-device execution of integer operations
...
- multiple operations are issued in parallel running independently on
different devices,
- tests will only run when more than 1 GPU is available,
- we only test ERC20-related operators: (overflow_) add/sub, cmp, and if_then_else.
2025-01-31 09:08:30 +01:00
Pedro Alves
64b8d1e3f6
fix(gpu): general fixes on indexes used in multi-gpu context.
...
- fix a bug in which the wrong GPU may be queried for the max shared memory
- If multiple streams are running split through multiple GPUs,
operations happening on a stream in GPU i should query GPU i about its
max shared memory,
- also fixes wrong indexing at rust side.
2025-01-31 09:08:30 +01:00
Mayeul@Zama
298640a33e
feat(integer): impl Named for compression keys
2025-01-29 18:06:50 +01:00
tmontaigu
57386a1c87
feat(hlapi): add gpu selection
2025-01-29 13:24:16 +01:00
Agnes Leroy
9ced1e7b1d
chore(gpu): shorten workflow names
2025-01-29 10:59:45 +01:00
Agnes Leroy
f47fe5235c
chore(gpu): add back async entry points
...
We need to have async entry points for asynchronous execution between
the CPU & GPU at the HL API level later. We can't remove it.
2025-01-28 18:21:10 +01:00
David Testé
db4592da60
chore(bench): add some v0_11 parameters into keycache
...
This fixes panics triggered in core_crypto benchmarks.
2025-01-28 11:09:24 +01:00
Agnes Leroy
88126f7c67
fix(gpu): fix scalar mul with 1 block
2025-01-27 20:20:18 +01:00
David Testé
ae0dff923e
chore(ci): fix boolean logic for bot permission checks
2025-01-27 15:52:08 +01:00
Agnes Leroy
d13336c231
chore(gpu): add degree information to cuda int_radix_lut
2025-01-27 14:24:50 +01:00
David Testé
0a75436c29
chore(ci): use complete bot names on permission checks
...
White-listed bots have '[bot]' as username suffix.
2025-01-27 14:14:07 +01:00
dependabot[bot]
e89b17dd0e
chore(deps): bump codecov/codecov-action from 5.1.2 to 5.3.1
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 5.1.2 to 5.3.1.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](1e68e06f1d...13ce06bfc6 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-01-27 13:38:11 +01:00
Mayeul@Zama
2cb99e811e
doc(gpu): use multi bit PBS with compression
2025-01-27 13:29:12 +01:00
Mayeul@Zama
be3d997bd4
chore(bench): use multi bit params for gpu compression bench
2025-01-27 13:29:12 +01:00
Mayeul@Zama
d87274757f
test: test multi_bit PBS with compression
2025-01-27 13:29:12 +01:00
Mayeul@Zama
958601feac
feat: add support for compression with multi bit
2025-01-27 13:29:12 +01:00
Mayeul@Zama
a4daadba5f
test: add tests for multibit modulus_switch_compression
2025-01-27 13:29:12 +01:00
Agnes Leroy
7a241aa40e
chore(gpu): start using a struct to pass data across rust/c++
2025-01-24 15:45:07 +01:00
Arthur Meyre
4284a2e4bb
refactor(integer): factorize expansion code
2025-01-24 10:47:02 +01:00
Arthur Meyre
075e1b7e02
refactor(integer): cover more cases for sanitization during expansion
2025-01-24 10:47:02 +01:00
David Testé
1a3b2d71f5
chore(ci): extend external contribution to all pr workflows
...
User permission checking is done after the should-run, when there
is such step, rather than before it. This way, only workflows that
should run would fail id triggering actor is not allowed to launch
it. Thus a repository maintainer would have to re-run only a
handful of jobs that would effectively run afterward
(i.e relevant code has changed and setup-instance would be called).
2025-01-23 14:32:09 +01:00
David Testé
dbde7ada2d
chore(ci): use limited access token to checkout repositories
...
This approach allows checkout public and private repository, like
Slab, without to worry too much about secret leakage under certain
circumstances (e.g. under pull request from forks).
The token has just read access on selected repositories.
2025-01-23 14:32:09 +01:00
dependabot[bot]
8f9b099f94
chore(deps): bump actions/upload-artifact from 4.3.6 to 4.6.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.3.6 to 4.6.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v4.3.6...65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-01-21 19:38:45 +01:00
dependabot[bot]
c09c3a8c78
chore(deps): bump actions/checkout from 4.1.7 to 4.2.2
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.7 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4.1.7...11bd71901bbe5b1630ceea73d27597364c9af683 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-01-21 19:38:37 +01:00
Nicolas Sarlin
f66805eeb1
fix(versionable): Handle generics in NotVersioned
2025-01-21 09:41:01 +01:00
tmontaigu
29bd9dbb01
feat: centralize encoding in shortint
...
The plaintext encoding in shortint was duplicated all over the code
This commit centralize the encoding used for shortint, so that if an
encoding fix is needed there should be one place to do it.
2025-01-20 17:51:42 +01:00
Arthur Meyre
0418b3adf3
chore: update bench file pbs 128 parameters
2025-01-20 17:03:11 +01:00
Nicolas Sarlin
cc85c441ea
chore(doc): add strings feature to doctests
2025-01-20 10:59:12 +01:00
Mayeul@Zama
1f254d6523
chore: feature gating js_high_level_api
2025-01-20 10:00:49 +01:00
Mayeul@Zama
909ce4ecbb
chore: update rust dependencies
2025-01-20 09:42:38 +01:00
Mayeul@Zama
67783f4683
chore: upgrade wasm-bindgen
2025-01-20 09:42:38 +01:00
tmontaigu
c62112a4a9
feat(c-hlapi): add abs
2025-01-17 17:04:18 +01:00
tmontaigu
9eb2eb9f0e
refactor(c-hlapi): have different macro for FheUint/FheInt
...
As FheUint and FheInt may have different set of functions,
we now have 2 different macros to define their C API.
2025-01-17 17:04:18 +01:00
Arthur Meyre
aa5b431aae
test(core): use 5 bits parameters tweaked to 4 bits to avoid high pfail
2025-01-17 16:06:27 +01:00
David Testé
2b914ae57a
chore(ci): use ubuntu 22.04 to run security checks
...
Sagemath is not available as a package on Ubuntu 24.04.
2025-01-17 11:31:40 +01:00
Nicolas Sarlin
f4a8991f67
fix(safe_ser): aliases in named for renamed types deserialization
2025-01-17 11:13:43 +01:00
David Testé
a882262691
chore(ci): fix recursive search for changes in docs files
2025-01-17 10:04:46 +01:00
aquint-zama
1976a9dce6
chore: update release workflow
2025-01-16 16:04:58 +01:00
aquint-zama
ec87c15cc2
chore: add slsa support for tfhe-ntt
2025-01-16 16:04:58 +01:00
aquint-zama
c273e973bb
chore: add slsa support for tfhe-fft
2025-01-16 16:04:58 +01:00
aquint-zama
07e3fb2779
chore: add slsa support for tfhe-cuda-backend
2025-01-16 16:04:58 +01:00
aquint-zama
c2d4e77eec
chore: add slsa support for tfhe-versionable
2025-01-16 16:04:58 +01:00
aquint-zama
cdf627f2d5
chore: add slsa support for tfhe-csprng
2025-01-16 16:04:58 +01:00
aquint-zama
2f79f646f7
chore: add slsa support for tfhe-zk-pok
2025-01-16 16:04:58 +01:00
Guillermo Oyarzun
a9e4724178
feat(gpu): implement fhe rand on gpu
2025-01-16 14:48:09 +01:00
David Testé
7a8efb1934
chore(ci): display head ref in slack notification message
...
Default 'Ref' displayed in message relies on github.ref value. On
pull_request_target, it's the base_ref, instead of head_ref, that
is set as value for github.ref.
We cannot change 'Ref' field directly. As a workaround, we hide
'Ref' in the message and display the head_ref directly in
SLACK_MESSAGE.
2025-01-16 14:25:05 +01:00
David Testé
bc1aeeb85e
chore(ci): skip aws fast tests if ci files changed
...
This would skip 'check-user-permission' job if the event
'pull_request_target' is emitted and CI files have changed.
It avoids overlapping of 'pull_request' and 'pull_request_target'
events. CI changes would only be tested on 'pull_request' for
Zama own pull requests.
2025-01-16 14:25:05 +01:00
Nicolas Sarlin
cbdba38147
fix(shortint): error message in packing keyswitch
2025-01-16 13:08:36 +01:00
Agnes Leroy
cea871fc6b
chore(gpu): update multi-bit parameters
2025-01-16 10:23:04 +01:00
Arthur Meyre
34a006a3ee
chore(ci): fix clippy on M1 for disabled multi bit noise
2025-01-16 09:44:21 +01:00
Pedro Alves
b3740e75f2
chore(docs): Remove mention to NVLink
...
NVLink is not needed anymore in the CUDA backend.
2025-01-16 09:35:15 +01:00
Andrei Stoian
b46affa45b
chore(gpu): add reference to gemm algorithm
2025-01-16 09:07:58 +01:00
Mayeul@Zama
72095144dc
chore: fix new lints
2025-01-15 15:16:15 +01:00
Arthur Meyre
a91e8618c9
chore(docs): fix various issues with the docs
2025-01-15 11:37:04 +01:00
Nicolas Sarlin
9a64c34989
chore(lint): use dylint as lint driver for tfhe-lint
2025-01-14 18:30:04 +01:00
Nicolas Sarlin
7103a83ce5
chore(zk)!: use builtin isqrt instead of the internal implementation
...
BREAKING CHANGE: bump MSRV
2025-01-14 18:29:29 +01:00
Nicolas Sarlin
1f41a6b85d
chore(zk): sqr fc takes u64 as parameter to avoid overflow
2025-01-14 18:29:29 +01:00
David Testé
ccc647a5ee
chore(ci): remove paths for pull_request_target event
...
A 'paths:' directive with only excluded paths won't trigger the event.
2025-01-14 17:37:48 +01:00
Arthur Meyre
ffd4f5a93e
chore(ci): remove unused Dockerfile for wasm tests
2025-01-14 17:31:18 +01:00
David Testé
594157ecaa
chore(ci): choose pull request event with path changes
...
To be able to run CI for external contribution, through forked
repository, and be able to test CI modification in a development
branch, we need to discriminate pull request events. For the
former 'pull_request_target' event is needed to have access to
GitHub secrets. 'pull_request' event is required for the latter
otherwise the workflow would be pulled from the HEAD of the base
branch and thus wouldn't contain changes from the developer.
2025-01-14 14:38:02 +01:00
dependabot[bot]
8ae871ec33
chore(deps): bump actions/upload-artifact from 4.5.0 to 4.6.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](6f51ac03b9...65c4c4a1dd )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-01-14 13:48:39 +01:00
dependabot[bot]
9535544409
chore(deps): bump actions-cool/check-user-permission from 2.2.1 to 2.3.0
...
Bumps [actions-cool/check-user-permission](https://github.com/actions-cool/check-user-permission ) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/actions-cool/check-user-permission/releases )
- [Changelog](https://github.com/actions-cool/check-user-permission/blob/main/CHANGELOG.md )
- [Commits](956b2e73cd...7b90a27f92 )
---
updated-dependencies:
- dependency-name: actions-cool/check-user-permission
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-01-14 13:48:31 +01:00
dependabot[bot]
4438042b7d
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions
...
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions ) from 3.0.19 to 3.0.20.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases )
- [Commits](6ae615f647...c3a2b64f69 )
---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-01-14 13:48:23 +01:00
Arthur Meyre
f7189edb20
chore(ci): temporarily disable the multi bit noise check on Apple M1
2025-01-14 10:56:36 +01:00
Nicolas Sarlin
7058b3611a
chore(backward): update data repo to 0.5
2025-01-14 09:35:32 +01:00
Pedro Alves
59b315993d
chore(gpu): update new_multi_gpu() description
2025-01-14 09:24:24 +01:00
Arthur Meyre
3d1998635a
docs: indicate PBS benchmarks have Gaussian parameters
2025-01-13 16:57:40 +01:00
Arthur Meyre
3fa72e62ae
chore(docs): replace tabs by spaces
2025-01-13 16:57:40 +01:00
Arthur Meyre
0d43912884
docs: add TUniform distribution and link in benchmarks
2025-01-13 16:57:40 +01:00
Agnes Leroy
9930550b69
chore(doc): update links to the benchmark tables
2025-01-13 16:57:40 +01:00
Nicolas Sarlin
bdc3539954
doc(zk): explain how to use zkv1
2025-01-13 13:40:16 +01:00
tmontaigu
979a1b36f8
chore(docs): add strings guides
2025-01-13 13:25:47 +01:00
Andrei Stoian
298fd66631
feat(gpu): optimize packing keyswitch on gpu
2025-01-13 09:18:53 -03:00
David Testé
0952dfa1ad
chore(ci): run teardown job only if setup is a success
2025-01-13 12:19:39 +01:00
Mayeul@Zama
e1e567a145
chore: remove unused cargo key
2025-01-13 12:03:06 +01:00
Nicolas Sarlin
ee1a534584
chore: formatting uniformization for c and js
2025-01-10 16:09:04 +01:00
Nicolas Sarlin
c9eef7d193
chore: enable space in editorconfig for more file types
2025-01-10 16:09:04 +01:00
Nicolas Sarlin
4c8d55f32b
chore(zk): add bench zk v1 vs v2
2025-01-10 15:47:25 +01:00
Nicolas Sarlin
cd5b3c61eb
chore(backward): move compat tests to avoid compiling them everytime
2025-01-10 09:43:04 +01:00
Arthur Meyre
baefb7d911
chore: enable strings for docs.rs generation
2025-01-09 19:48:43 +01:00
Guillermo Oyarzun
d2a3450ab9
fix(gpu): fix cornercase in match value function
2025-01-09 17:51:31 +01:00
David Testé
6fb13328ec
chore(ci): put back weekly core_crypto benchmarks
2025-01-09 17:45:14 +01:00
David Testé
f633eedc29
chore(ci): push tfhe-cuda-backend to crates.io unconditionally
2025-01-09 12:10:55 +01:00
Nicolas Sarlin
a9fb3e9fbf
chore(trivium): fix params, reverted back to gaussian
2025-01-09 09:19:04 +01:00
Arthur Meyre
9a4b584419
chore(ci): make cargo-builds-ntt unique to ntt
2025-01-08 17:05:42 +01:00
Arthur Meyre
cdcba5ca13
chore(ci): make test names unique for fft and ntt
2025-01-08 17:05:42 +01:00
Nicolas Sarlin
adf52acd90
chore: add js fmt to "make conformance"
...
and remove linelint autofix which has false positives
2025-01-08 13:23:14 +01:00
Nicolas Sarlin
9ac89fc6bf
fix(bench): use correct name for parameters in wasm benches
2025-01-08 13:23:14 +01:00
Agnes Leroy
a668112694
chore(test): modify cpu multi-bit parameters for noise test
2025-01-08 09:02:07 +01:00
David Testé
ba105cd1d0
chore(ci): relocate permission checking after should-run step
...
This induces a failure if the job has to run AND if the triggering actor isn't a member of the zama-ai organization. That would help tfhe-rs maintainers to re-run only workflows that are supposed to run.
The reference is selected based on the event emitted.
We also now use token with restricted permission to check out the repository.
2025-01-07 17:36:41 +01:00
David Testé
3690ad0b25
chore(ci): remove pull_request which duplicate pull_request_target
...
Previously pull_request and pull_request_target events were both
emitted thus leading one cancelling the other because of
concurrency group name format.
Since external contribution needs to be allowed we only need
pull_request_target event.
2025-01-07 17:36:41 +01:00
yuxizama
b9ddeebd29
chore(docs): update discord link
2025-01-07 17:27:46 +01:00
Nicolas Sarlin
bc742e989a
chore(zk-pok): bump to 0.4.0
2025-01-07 15:36:49 +01:00
Nicolas Sarlin
17c714f153
chore(versionable): bump to 0.4.0
2025-01-07 15:36:49 +01:00
Arthur Meyre
e0a264dfa0
chore: update docs version to be 0.11
2025-01-07 14:53:17 +01:00
tmontaigu
0551f4a1cc
feat(hlapi): add strings
2025-01-07 14:52:42 +01:00
Arthur Meyre
54c2f4d14d
chore: bump ntt to 0.4.0
2025-01-07 13:47:08 +01:00
Arthur Meyre
aa12c75312
chore: bump tfhe-fft to 0.7.0
2025-01-07 13:47:08 +01:00
Nicolas Sarlin
3c3e2d720f
chore(shortint): update compression parameters
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
a7bf1cdb43
chore(shortint): update keyswitch 1_1 to 2_2 parameters
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
f06b04fd83
chore(zk)!: store inside the pke params the supported zk scheme
...
BREAKING_CHANGE:
- Zk for compact PKE now requires dedicated encryption parameters
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
c19683a320
chore(shortint): move tuniform 0.10 parameters into their own folder
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
96ca0d4f7c
chore(shortint): re-export v0.10 params at top level
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
b6d1b5ffff
chore(shortint): update multibit gaussian parameters
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
8ee1bdd9a9
chore(shortint): update classic gaussian param
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
58801cf7a5
chore(shortint): update gaussian compact pk parameters
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
010fb790c2
chore(shortint): remove tuniform pbs_ks parameters
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
8a795c79ac
chore(shortint): rename wopbs params to LEGACY_
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
f4c956636f
chore(zk): add a test with zkv1 in integer compact list encryption
2025-01-07 12:02:09 +01:00
Nicolas Sarlin
cdca7be20b
chore(shortint): new parameters for tuniform
2025-01-07 12:02:09 +01:00
Agnes Leroy
b7f1318815
chore(gpu): bump backend version
2025-01-07 11:33:16 +01:00
Arthur Meyre
721cb3bcbf
chore(ci): fix workflow not triggering on pull request
2025-01-07 10:34:07 +01:00
Pedro Alves
53fed5eb21
fix(gpu): fix delta calculation when Torus is not a 64-bit type
2025-01-06 17:36:36 -03:00
Pedro Alves
e1b57fabe0
chore(gpu): port fix to compression encoding
...
- Modifies the generation of the LUT used in decompression so that the delta is calculated with a different precision, as in the CPU implementation
2025-01-06 17:36:36 -03:00
Agnes Leroy
33ca2c2fab
chore(gpu): update multi-bit params, add noise test for the classical & multi-bit PBS
2025-01-06 18:17:27 +01:00
Agnes Leroy
b22e369166
chore(ci): switch gpu tests on push to l40 and deactivate fast pks
2025-01-06 16:54:40 +01:00
dependabot[bot]
90edfdbbe7
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions
...
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions ) from 3.0.18 to 3.0.19.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases )
- [Commits](6441882669...6ae615f647 )
---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-01-06 13:09:43 +01:00
dependabot[bot]
f998f00580
chore(deps): bump tj-actions/changed-files from 45.0.5 to 45.0.6
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 45.0.5 to 45.0.6.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](bab30c2299...d6e91a2266 )
---
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 >
2025-01-06 13:09:30 +01:00
Mayeul@Zama
57a31d19a7
test(shortint): remove oprf test flakiness
2025-01-03 18:34:02 +01:00
David Testé
9c43c30e66
chore(ci): fix concurrency group format on pull request event
...
Since the addition of pull_request_target event, github.ref context
object return name of the base branch. So when a workflow was
triggered on the base branch during an execution in a pull request,
the latter would be cancelled.
Using github.head_ref, when available, fixes this behavior.
On any other event than pull_request or pull_request_target,
github.ref will still be used and work as before.
2025-01-03 17:18:41 +01:00
Arthur Meyre
a9d48c7e35
chore: force wasm-bindgen-rayon to 1.2.2
...
the new 1.3.0 version changes the way some files are bundled, I don't want
to discover during the release that nothing works properly anymore.
2025-01-02 14:50:58 +01:00
Nicolas Sarlin
863d51feaf
chore(hl): remove unused traits
2025-01-02 13:52:37 +01:00
Nicolas Sarlin
ae2aeb3b6b
chore(core_crypto): remove unused cfg(bench)
2025-01-02 13:52:37 +01:00
dependabot[bot]
5c44ffad27
chore(deps): bump codecov/codecov-action from 5.1.1 to 5.1.2
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](7f8b4b4bde...1e68e06f1d )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-01-02 13:12:35 +01:00
dependabot[bot]
e42d203fc5
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions
...
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions ) from 3.0.17 to 3.0.18.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases )
- [Commits](5d6ac37a4c...6441882669 )
---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-01-02 13:12:27 +01:00
dependabot[bot]
37f25c0ce5
chore(deps): bump actions/upload-artifact from 4.4.3 to 4.5.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.4.3 to 4.5.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](b4b15b8c7c...6f51ac03b9 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-01-02 13:12:20 +01:00
Guillermo Oyarzun
cd03b7eef7
feat(gpu): implement vector comparisons gpu
2024-12-23 17:06:55 +01:00
Andrei Stoian
2c8f0ce7de
feat(gpu): optimize packing keyswitch in ML special case
2024-12-23 10:32:23 -03:00
Agnes Leroy
e3a93c7d87
chore(ci): add randomized long run tests on CPU and GPU
2024-12-20 17:13:58 +01:00
Agnes Leroy
9b43a9459a
chore(gpu): add option to pre-release some buffers in scalar mul
2024-12-20 11:53:31 +01:00
David Testé
33d5091025
chore(deps): bump zama-ai/slab-github-runner
2024-12-20 10:56:22 +01:00
Guillermo Oyarzun
70ff0f726c
feat(gpu): implement subarray search
2024-12-20 08:54:35 +01:00
Agnes Leroy
13d55f31ac
chore(gpu): minor fix in core crypto comments
2024-12-19 15:54:40 +01:00
Agnes Leroy
7e871e54e1
chore(gpu): fix inconsistency in the use of AmortizedDegree
2024-12-19 15:54:40 +01:00
Agnes Leroy
012585204a
chore(gpu): add inputs to erc20 throughput bench with multiple GPUs
2024-12-19 15:03:11 +01:00
Agnes Leroy
d6e45858c1
chore(gpu): rework single carry proip to avoid using local streams
2024-12-19 10:02:14 +01:00
Mayeul@Zama
ae832c158f
chore(csprng): cleanup conditional imports
2024-12-19 09:59:04 +01:00
Mayeul@Zama
8504d79180
chore(core): remove unused file
2024-12-19 09:59:04 +01:00
David Testé
c306e63430
chore(ci): fix secret token naming to avoid collision
2024-12-18 19:56:36 +01:00
David Testé
9195753273
chore(ci): verify triggering actor on pull request from fork
...
If a contributor that open a Pull Request from a fork is not part
of the repository collaborators, then the workflow using
check_triggering_actor subworkflowwill exit with a failure.
It could be re-run later by a collaborator who has a write access.
This allows reviewers to read the code proposition before running
the CI, ensuring no secrets are leaked outside the repository.
2024-12-18 18:44:52 +01:00
David Testé
bda8ab028e
chore(ci): allow external contribution in fast aws tests workflow
2024-12-18 17:17:58 +01:00
Beka Barbakadze
9e8db2179e
fix(gpu): fix noise level calculation in full propagation
2024-12-18 14:26:56 +01:00
dependabot[bot]
950cece2a9
chore(deps): bump dtolnay/rust-toolchain
...
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) from 315e265cd78dad1e1dcf3a5074f6d6c47029d5aa to a54c7afa936fefeb4456b2dd8068152669aa8203.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](315e265cd7...a54c7afa93 )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-12-18 11:39:47 +01:00
Agnes Leroy
aee53d3fae
fix(gpu): fix lut size in are_all_comparison_blocks_true
2024-12-18 09:11:07 +01:00
Nicolas Sarlin
4e2db929da
chore(csprng): prepare release 0.5.0
2024-12-17 09:22:08 +01:00
Nicolas Sarlin
d2c13e4593
chore(doc): fix c_api setup command using removed make target
2024-12-17 09:22:08 +01:00
Nicolas Sarlin
c41b76f892
chore(csprng)!: moved the RandomGenerator detector into tfhe-csprng
2024-12-17 09:22:08 +01:00
Nicolas Sarlin
1ede004e9a
chore(tfhe)!: remove arch specific features
...
BREAKING_CHANGE:
- The x86_64, x86_64-unix, aarch64, aarch64-unix have been removed, the target
architecture and os family are now automatically detected. A `software_prng`
feature has been added to force the use of a software implementation on older
CPUs
2024-12-17 09:22:08 +01:00
Nicolas Sarlin
1df331d246
chore(csprng)!: remove generator_aarch64_aes feature
...
BREAKING_CHANGE:
- The `generator_aarch64_aes` feature is no longer supported for tfhe-csprng
2024-12-17 09:22:08 +01:00
Nicolas Sarlin
0f2451e3b7
chore(csprng)!: remove generator_x86_64_aesni feature
...
BREAKING_CHANGE:
- The `generator_x86_64_aesni` feature is no longer supported for tfhe-csprng
2024-12-17 09:22:08 +01:00
Nicolas Sarlin
3de23d14a2
chore(csprng)!: remove seeder_x86_64_rdseed feature
...
BREAKING_CHANGE:
- The `seeder_x86_64_rdseed` feature is no longer supported for tfhe-csprng
2024-12-17 09:22:08 +01:00
Nicolas Sarlin
e0ee8af1ac
chore(csprng)!: remove seeder_unix feature
...
BREAKING_CHANGE:
- The `seeder_unix` feature is no longer supported for tfhe-csprng
2024-12-17 09:22:08 +01:00
Agnes Leroy
072005d521
fix(gpu): fix memory leak
2024-12-17 08:58:16 +01:00
Agnes Leroy
241b73704c
fix(gpu): fix ct degree and noise level after some ops
2024-12-17 08:58:03 +01:00
Agnes Leroy
8687b69769
fix(gpu): fix single gpu on device other than 0
2024-12-17 08:57:40 +01:00
Nicolas Sarlin
cdb81dd262
doc(shortint): add some clarification about shortint size
2024-12-16 16:28:54 +01:00
Nicolas Sarlin
03956a9a24
chore(zk): check that k <= d for zk crs
2024-12-16 16:00:15 +01:00
Nicolas Sarlin
ef684649f9
chore(backward): move allow(dead_code) to dispatch variants
...
This allows to detect unused dispatch enums
2024-12-16 16:00:15 +01:00
Nicolas Sarlin
fc642c6f26
chore(zk)!: update parameters for zk v2
2024-12-16 16:00:15 +01:00
Nicolas Sarlin
c2a999d300
feat(zk)!: plug zk v2
...
BREAKING CHANGE:
- The object ZkVerificationOutCome has been renamed ZkVerificationOutcome.
- Conformance of proofs now checks the scheme version of the CRS. This is
breaking at the shortint and core_crypto levels, and for manually built integer
conformance params.
New CRS will be generated with the V2 Scheme by default, but V1 CRS and proofs
are still accepted, so this is not breaking. New methods have been added to
generate a V1 CRS.
2024-12-16 16:00:15 +01:00
Nicolas Sarlin
ae3e5f1a32
fix(zk-pok): missing Versionize for ComputeLoadProofFields
2024-12-16 16:00:15 +01:00
Nicolas Sarlin
3dcb982a0b
feat(versionable): "Version" macro now handles transparent attribute
2024-12-16 16:00:15 +01:00
Agnes Leroy
e9c901b3a9
chore(gpu): rework select to avoid using local streams
2024-12-16 15:26:14 +01:00
Mayeul@Zama
2d8907dfed
chore: fix clippy lints after toolchain update
2024-12-16 14:17:20 +01:00
Agnes Leroy
06f8fc8962
chore(gpu): make artifact name unique across different machines
2024-12-16 14:09:30 +01:00
Nicolas Sarlin
381aeb572f
chore(all): remove the dependency to lazy_static
2024-12-16 11:24:20 +01:00
Arthur Meyre
3a99ee9718
chore: remove aliases for gaussian parameters for compact PK
...
- we are TUniform by default so no more aliases for gaussian parameters
2024-12-16 09:50:12 +01:00
Agnes Leroy
86f07045fe
chore(gpu): run pbs in parallel in difference_check
2024-12-16 09:23:41 +01:00
Mayeul@Zama
b1ce34f8a7
chore(hlapi): stabilize FheTypes
2024-12-13 18:31:30 +01:00
Agnes Leroy
4388a3dc99
chore(gpu): add sxm5 vm target
2024-12-13 17:25:55 +01:00
Arthur Meyre
805436839d
fix(shortint): fix compression encoding change not being taken into account
...
- this maps better to what was optimized and will dramatically diminish the
pfail as we now have 2 more bits for the LUT redundancy
2024-12-13 16:41:13 +01:00
Arthur Meyre
bdbec55e84
chore: do not crash when ark-ff or wasm_bindgen macros have cfg issues
2024-12-13 16:31:25 +01:00
Arthur Meyre
33131c664a
chore(ci): toolchain update
2024-12-13 16:31:25 +01:00
Arthur Meyre
1151bb267e
chore: update dependencies
2024-12-13 16:31:25 +01:00
Agnes Leroy
ce9679f1ee
doc(gpu): add an example to use arrays on GPU
2024-12-13 10:46:28 +01:00
Agnes Leroy
23b43c33c7
fix(gpu): fix scalar ne
2024-12-12 11:26:51 +01:00
Agnes Leroy
6feaf49906
chore(gpu): remove stream sync in broadcast lut
2024-12-12 10:19:02 +01:00
Agnes Leroy
25f4e5f279
fix(gpu): fix equal
2024-12-12 09:21:44 +01:00
David Testé
c1f05cbf85
chore(ci): use composite action to setup hyperstack instance
2024-12-12 09:18:33 +01:00
Mayeul@Zama
382f44766c
chore(strings): remove string_ prefix on tests
2024-12-11 10:25:31 +01:00
Mayeul@Zama
c47b37c0e1
chore(strings): remove string_ prefix on methods
2024-12-11 10:25:31 +01:00
Mayeul@Zama
76d1f05e6a
refactor(strings): add server and client key wrappers
2024-12-11 10:25:31 +01:00
David Testé
8b460072d3
chore(ci): check more parameters set on lattice estimator
2024-12-09 16:19:50 +01:00
dependabot[bot]
7c2bcaee15
chore(deps): bump actions/cache from 4.1.2 to 4.2.0
...
Bumps [actions/cache](https://github.com/actions/cache ) from 4.1.2 to 4.2.0.
- [Release notes](https://github.com/actions/cache/releases )
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md )
- [Commits](6849a64899...1bd1e32a3b )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-12-09 11:01:18 +01:00
dependabot[bot]
ef86669069
chore(deps): bump tj-actions/changed-files from 45.0.4 to 45.0.5
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 45.0.4 to 45.0.5.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](4edd678ac3...bab30c2299 )
---
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 >
2024-12-09 11:01:08 +01:00
dependabot[bot]
76c23d9c1f
chore(deps): bump codecov/codecov-action from 5.0.7 to 5.1.1
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 5.0.7 to 5.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](015f24e681...7f8b4b4bde )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-12-09 11:00:58 +01:00
yuxizama
ca18eb3cb0
chore(docs): fix the bench table
2024-12-09 08:35:04 +01:00
Agnes Leroy
86505a1467
feat(gpu): add gpu array type in hl api
2024-12-06 17:40:49 +01:00
Nicolas Sarlin
e363b76f17
fix(tfhe-lints): linter was not run, missing compile time env var
2024-12-06 15:01:42 +01:00
Agnes Leroy
3dcf7f2492
chore(gpu): reduce throughput integer bench time
2024-12-05 11:25:11 +01:00
Arthur Meyre
f24fa62331
refactor!: use strong types for outputs of DispersionParameters trait fns
2024-12-05 11:19:10 +01:00
Mayeul@Zama
fd31694608
chore(strings): use FunctionExecutor in tests
2024-12-04 15:05:09 +01:00
Mayeul@Zama
b2fc479b32
chore(integer): cleanup CpuFunctionExecutor
2024-12-04 15:05:09 +01:00
Mayeul@Zama
430061d9dd
chore(strings): impl Clone for UIntArg
2024-12-04 15:05:09 +01:00
Mayeul@Zama
abdbd4b45c
chore(strings): fix Makefile
2024-12-04 15:05:09 +01:00
Arthur Meyre
c34cf6cdb1
chore: slightly simpler test code for distribution tests
2024-12-04 14:15:49 +01:00
Agnes Leroy
38a7e4feef
chore(gpu): reintroduce a GpuIndex type
2024-12-02 16:28:25 +01:00
Agnes Leroy
5465e0f79b
fix(gpu): fix vec with device other than 0
2024-12-02 16:28:25 +01:00
Agnes Leroy
3a7e186513
chore(gpu): test erc20 on 2xH100 using the second GPU only
2024-12-02 16:28:25 +01:00
tmontaigu
ef1a85b0c8
fix: clean noise of skipped block in full_propagate_parallelized
...
In full_propagate_parallelized we find the first block which has
a degree >= msg_mod, meaning it has a carry and start propagating from
there.
However, while the preceding blocks may have no carry, their noise level
may not be nominal, and so to leave the radix in a consistent state and
clean state, full_propagate now also clean the noise for blocks that
are not propagated
2024-12-02 13:42:33 +01:00
David Testé
ee3afe4935
chore(ci): run integer tests if workflow file changed
2024-12-02 12:29:51 +01:00
Arthur Meyre
8dd419fe3f
refactor(shortint): use view -> decompress to simplify key decompression
...
- the decompress_into primitives consume the input entity, but we can use
a view that won't consume the original owned key
2024-12-02 11:43:41 +01:00
dependabot[bot]
a0ad0c735c
chore(deps): bump codecov/codecov-action from 5.0.2 to 5.0.7
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 5.0.2 to 5.0.7.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](5c47607acb...015f24e681 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-12-02 11:12:20 +01:00
dependabot[bot]
f034ca8ddc
chore(deps): bump zama-ai/slab-github-runner from 1.2.0 to 1.3.0
...
Bumps [zama-ai/slab-github-runner](https://github.com/zama-ai/slab-github-runner ) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/zama-ai/slab-github-runner/releases )
- [Commits](https://github.com/zama-ai/slab-github-runner/compare/v1.2.0...98f0788261a7323d5d695a883e20df36591a92b7 )
---
updated-dependencies:
- dependency-name: zama-ai/slab-github-runner
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-12-02 11:12:12 +01:00
dependabot[bot]
d344e70ca9
chore(deps): bump tj-actions/changed-files from 45.0.3 to 45.0.4
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 45.0.3 to 45.0.4.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](https://github.com/tj-actions/changed-files/compare/v45.0.3...4edd678ac3f81e2dc578756871e4d00c19191daf )
---
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 >
2024-12-02 11:12:05 +01:00
dependabot[bot]
7d5d9dac0b
chore(deps): update dtolnay/rust-toolchain requirement to 315e265cd78dad1e1dcf3a5074f6d6c47029d5aa
...
Updates the requirements on [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) to permit the latest version.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](315e265cd7 )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-12-02 11:11:56 +01:00
dependabot[bot]
d6caecb9d8
chore(deps): bump actions/checkout from 3.3.0 to 4.2.2
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3.3.0 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3.3.0...11bd71901bbe5b1630ceea73d27597364c9af683 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-12-02 11:11:49 +01:00
Nicolas Sarlin
95772b58e4
chore(zk): add benches for zk v2 bounds ghl and cs
2024-12-02 09:57:56 +01:00
Nicolas Sarlin
9d5edfa8a1
fix(zk): fix some overflows and add tests with extreme params
2024-12-02 09:57:56 +01:00
Pedro Alves
45717275f6
chore(gpu): replace inneficient log2 implementation and use it everywhere
2024-11-29 14:57:37 -03:00
David Testé
2b17f37506
chore(ci): choice between latency and throughput for zk-pke bench
2024-11-29 16:45:42 +01:00
David Testé
89d24d992e
chore(ci): fix integer throughput benchmark parsing
...
The env variable BENCH_TYPE was always holding 'latency' value.
Thus lead to benchmark results parser not performing computation to return number of elem/second.
2024-11-29 16:45:42 +01:00
Nicolas Sarlin
564ef4aff6
chore(zk): add a test with a bad delta for encryption
2024-11-29 16:00:27 +01:00
David Testé
966f940c08
chore(ci): run fft/ntt bench on push only if certain files changed
2024-11-29 13:11:06 +01:00
tmontaigu
b669ba1976
docs(wasm): add information for web bundlers
...
This adds the steps that might be needed when using the web
wasm API with parallel support for rayon.
These are important to document, otherwise the user might not be able to
make his project work.
2024-11-28 18:40:47 +01:00
tmontaigu
04917d3b47
chore: fix c test on arm64
2024-11-28 11:38:45 +01:00
Arthur Meyre
6b5f1813c6
chore(ci): add debug mode to shortint test script for easier debug later
...
- only warn if no tests are run with the big parameters filter
2024-11-27 15:56:11 +01:00
Andrei Stoian
0898cdd05b
feat(gpu): add function to check if a cuda device is available
2024-11-27 10:35:41 +01:00
Mayeul@Zama
9584f57dca
fix(typo): rename parametrized parameterized
2024-11-26 15:54:09 +01:00
tmontaigu
ade9a663c5
chore!: use u64 for shortint metadata
...
This switches from usize to u64 for shortint's metdata:
* Degree
* MaxDegree
* CarryModulus
* MessageModulus
The reasoning is that usize should be preferred when the value is used
as some kind of index, memory access, etc, and not numbers like these
metadata are.
This is a breaking API change
This is also a somewhat breaking serialization change
depending on the serialization format (bincode should be ok as it
encodes usize as u64)
2024-11-26 14:57:42 +01:00
tmontaigu
0ff895861e
chore!: use u64 for NoiseLevel
...
Change from usize to u64 for MaxNoiseLevel and NoiseLevel
This is an API break as `new` and `get` handle/returns u64
instead of usize
This is also a potential serialization break depending on the
serializer used (bincode should be fine as it serializes usize as u64)
2024-11-26 14:57:42 +01:00
tmontaigu
1746811b74
feat: add noise level checks
...
This adds the noise-asserts feature, which will make
PBS functions do a noise level check.
This also adds an extra MaxNoiseLevel parameter
to Ciphertext::set_noise_level that is used when the noise-asserts
feature is on, to check that the given new-noise level does not
exceed the given MaxNoiseLevel. In case of problems, the code will panic
By default these checks will also be make in cfg(test)
2024-11-26 14:57:42 +01:00
Tuditi
7075f45084
fix: equality for empty blocks
2024-11-26 13:22:58 +01:00
Tuditi
a1f681e3ff
fix: correctly set degree
2024-11-26 13:13:23 +01:00
tmontaigu
24e859dd33
fix: parallel overflow flag on single block
...
Fix a bug in the overflow flag computation in the
parallel algorithm when input only had one block.
It was due to the first block not having a proper propagation
simulator
Add to the tests explicitly the parallel and sequential
versions of the signed_overflowing_sub to be sure they are
both tested regardless of cpu thread count and block count
2024-11-25 19:18:18 +01:00
Mayeul@Zama
8cfe540647
fix(ci): fix secret on CI checkout
2024-11-25 18:05:48 +01:00
Agnes Leroy
baf161e1f6
chore(gpu): panic if (k + 1)*l > 8 to avoid issue with tbc
2024-11-25 17:44:53 +01:00
Nicolas Sarlin
c07fb7cbb4
chore(zk): add tests of a proof/verify with different ct
2024-11-25 17:01:17 +01:00
Nicolas Sarlin
81f071c30e
chore(zk): small refactor of tests to use assert_prove_and_verify
2024-11-25 17:01:17 +01:00
Nicolas Sarlin
530b18063a
fix: zk-pok bench workflow using an invalid argument
2024-11-25 14:58:42 +01:00
Nicolas Sarlin
c5caacf56e
chore(zk): add a test for compute_crs_params
2024-11-25 14:34:08 +01:00
Nicolas Sarlin
68cfd1008a
chore(zk): add a test of a proof with invalid noise in zk
2024-11-25 14:34:08 +01:00
Nicolas Sarlin
87dbfdcd5e
fix(zk): recompute B according to k in proof and use squared bounds
...
This removes the need for sqrt operations
also fix a proof slack was too big in v2
2024-11-25 14:34:08 +01:00
Nicolas Sarlin
770ae22bb6
refactor(zk): place asserts in proof behind a condition
2024-11-25 14:34:08 +01:00
Nicolas Sarlin
1e19bae29a
refactor(zk): factorize r1/r2 computation between proofs
2024-11-25 14:34:08 +01:00
Nicolas Sarlin
811ae3c551
refactor(zk): factorize q decoding between proofs
2024-11-25 14:34:08 +01:00
Agnes Leroy
832703a46a
chore(ci): add erc20 tests
2024-11-25 13:23:48 +01:00
Guillermo Oyarzun
81e11a6d70
feat(gpu): improve full propagation in sum and sub
2024-11-25 13:23:37 +01:00
David Testé
100c3ae77a
chore(ci): fix gpu multi values ops flavor parsing
2024-11-25 13:18:11 +01:00
dependabot[bot]
db61b0bb9b
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions
...
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions ) from 3.0.16 to 3.0.17.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases )
- [Commits](38608ef4fb...5d6ac37a4c )
---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-25 11:06:28 +01:00
dependabot[bot]
dc8091ad0f
chore(deps): bump actions/upload-artifact from 3.1.2 to 4.4.3
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3.1.2 to 4.4.3.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v3.1.2...b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-25 11:06:19 +01:00
dependabot[bot]
3ccfb9616a
chore(deps): bump zama-ai/slab-github-runner from 1.2.0 to 1.3.0
...
Bumps [zama-ai/slab-github-runner](https://github.com/zama-ai/slab-github-runner ) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/zama-ai/slab-github-runner/releases )
- [Commits](https://github.com/zama-ai/slab-github-runner/compare/v1.2.0...98f0788261a7323d5d695a883e20df36591a92b7 )
---
updated-dependencies:
- dependency-name: zama-ai/slab-github-runner
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-25 11:06:12 +01:00
dependabot[bot]
83dc9b9453
chore(deps): bump dtolnay/rust-toolchain
...
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) from 7b1c307e0dcbda6122208f10795a713336a9b35a to 315e265cd78dad1e1dcf3a5074f6d6c47029d5aa.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](7b1c307e0d...315e265cd7 )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-25 11:06:04 +01:00
dependabot[bot]
4fe72a15c0
chore(deps): bump rtCamp/action-slack-notify from 2.2.1 to 2.3.2
...
Bumps [rtCamp/action-slack-notify](https://github.com/rtcamp/action-slack-notify ) from 2.2.1 to 2.3.2.
- [Release notes](https://github.com/rtcamp/action-slack-notify/releases )
- [Commits](https://github.com/rtcamp/action-slack-notify/compare/v2.2.1...c33737706dea87cd7784c687dadc9adf1be59990 )
---
updated-dependencies:
- dependency-name: rtCamp/action-slack-notify
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-25 11:05:56 +01:00
David Testé
2a18d6fa32
chore(ci): fix gpu integer benchmarks ops flavor parsing
2024-11-22 15:43:32 +01:00
David Testé
8c2358a9e1
chore(ci): refacto erc20 gpu bench workflows to reduce duplicates
...
Now there is only one entry point to trigger ERC20 benchmarks manually.
This entry point uses a sub-workflow responsible for provisioning and running the benchmarks.
A weekly workflow is also created with all the targets needed.
2024-11-22 15:43:32 +01:00
David Testé
c3def17ad8
chore(ci): fix gpu integer benchmark workflow
2024-11-22 11:25:18 +01:00
David Testé
9da58f68c7
chore(ci): refacto gpu bench workflows to reduce duplicates
...
Now there is only one entry point to trigger benchmarks manually.
This entry point uses a sub-workflow responsible for provisioning
and running the benchmarks.
A weekly workflow is also created with all the targets needed.
This also adds the possibility to run throughput benchmarks
on-demand.
2024-11-21 17:05:49 +01:00
David Testé
5c226e98ba
chore(bench): rename env var to handle multi-bit parameters set
2024-11-21 14:30:20 +01:00
Beka Barbakadze
27ccfbd939
feat(gpu): optimize integer mul when one of the ct holds boolean
2024-11-21 14:28:06 +01:00
Arthur Meyre
40dd2a6ecc
chore(fft): make bench naming easier to read
2024-11-21 10:47:48 +01:00
Arthur Meyre
2d9c13569f
chore: rename concrete-csprng to tfhe-csprng
2024-11-21 10:47:48 +01:00
Arthur Meyre
36deaec607
chore(ntt): bring concrete-ntt in the repo as tfhe-ntt
2024-11-21 10:47:48 +01:00
tmontaigu
fcc0378c98
fix(hlapi): rework CompressedCiphertextListBuilder
...
The hlapi builder target device was selected depending on
features (gpu enabled ? gpu : cpu), but if at `build`
time the thread_local key did not match the expected device,
an error would be returned.
This is a bit too limiting for users that might want to do some
processing on GPU and compression on CPU.
So the Builder is changed to delay, the selection of device used
to compress when `build` is called.
This new design is more flexible for end users, at the cost of a
bit more memory copies
* There should be no API breaking change
* There is no serialization breaking change as only the builder
(which is not serializable) has been changed
2024-11-21 10:46:18 +01:00
David Testé
b31fbf5f23
chore(bench): fix result parsing for object and key generation
2024-11-20 11:55:22 +01:00
David Testé
b5c614520a
chore(ci): fix recipe for integer benchmarks on gpu
2024-11-20 11:55:22 +01:00
Mayeul@Zama
46cf465637
refactor(strings): comparisons take a GenericPattern
2024-11-20 09:54:15 +01:00
Mayeul@Zama
11a0fe2b40
chore(strings): support multi bit params in test
2024-11-20 09:54:15 +01:00
Mayeul@Zama
7dcb5bd4a6
chore(strings): add GenericPatternRef
2024-11-20 09:54:15 +01:00
Mayeul@Zama
55a112cca5
chore(strings): update Makefile for strings
2024-11-20 09:54:15 +01:00
Mayeul@Zama
992c062db0
chore(strings): add strings tests to CI
2024-11-20 09:54:15 +01:00
Mayeul@Zama
58f5a2c593
chore(strings): add print_trivial
2024-11-20 09:54:15 +01:00
Mayeul@Zama
14c10c374e
test(strings): rename tests
2024-11-20 09:54:15 +01:00
Mayeul@Zama
0d202e6e03
test(strings): use trivial encryption in most tests
2024-11-20 09:54:15 +01:00
Mayeul@Zama
4aaa3b67d6
chore(strings): add trivial_encrypt
2024-11-20 09:54:15 +01:00
Mayeul@Zama
609e24bf7c
chore(shortint): add trivial encrypt to client key
2024-11-20 09:54:15 +01:00
Mayeul@Zama
5cd5fbe1f2
chore(strings): use keycache in tests
2024-11-20 09:54:15 +01:00
Mayeul@Zama
089efd7b17
chore(strings): split tests and increase coverage
2024-11-20 09:54:15 +01:00
Mayeul@Zama
a582aadd5d
test(strings): rename test module
2024-11-20 09:54:15 +01:00
Mayeul@Zama
19d0a3d8c3
fix(strings): fix empty strings conversion to uint
2024-11-20 09:54:15 +01:00
Mayeul@Zama
af49b99724
fix(integer): fix overflow
2024-11-20 09:54:15 +01:00
Mayeul@Zama
cf713821da
fix(strings): fix underflow
2024-11-20 09:54:15 +01:00
Mayeul@Zama
a5fb99ee36
fix(strings): fix padding issue
2024-11-20 09:54:15 +01:00
Beka Barbakadze
ac1284679e
feat(gpu): Implement signed division in cuda backend
2024-11-20 09:07:38 +01:00
David Testé
9059ddeacc
chore(bench): add throughput benchmarks to suite
...
All integer benchmarks make recipes can be run to ouput throughput
results.
Only CPU is supported for throughput benchmarks in GitHub CI.
2024-11-19 12:07:50 +01:00
Arthur Meyre
904ffa729b
chore(ci): do not run fft workflows on push to main
2024-11-19 10:43:54 +01:00
Arthur Meyre
c9b4ee84ae
chore(ci): fix fft bench parser
2024-11-19 10:43:23 +01:00
Arthur Meyre
d56e7e0b2a
chore(bench): fix fft bench again
2024-11-18 16:56:29 +01:00
Arthur Meyre
6d2206e5ac
chore(bench): fix fft bench
2024-11-18 15:37:53 +01:00
Mayeul@Zama
015b11d309
chore(test): lower p_value_limit to decrease test failure probability
2024-11-18 15:15:33 +01:00
dependabot[bot]
e390e8eb5a
chore(deps): bump codecov/codecov-action from 4.6.0 to 5.0.2
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.6.0 to 5.0.2.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](b9fd7d16f6...5c47607acb )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-18 13:27:43 +01:00
Arthur Meyre
6a161fef0a
chore: bring concrete-fft as tfhe-fft in the repo
2024-11-18 13:17:58 +01:00
Arthur Meyre
9fbd96f016
chore(ci): remove outdated forward compat feature
2024-11-18 13:17:58 +01:00
Nicolas Sarlin
a45b7b3974
chore(zk): add benches to tfhe-zk-pok
2024-11-18 13:17:28 +01:00
Nicolas Sarlin
e59a680407
fix(core): fix compact pke with single lwe
2024-11-15 17:08:22 +01:00
Mayeul@Zama
cf7968ac6c
chore(ci): fix bash script
2024-11-15 14:14:04 +01:00
Agnes Leroy
7aa454ee97
chore(gpu): update asserts on base log now that we don't cast to u32 in decomposition
2024-11-15 13:24:52 +01:00
Beka Barbakadze
0aee4c568e
feat(gpu): add abs operation on gpu backend
2024-11-15 13:24:13 +01:00
tmontaigu
f9e8df49d2
chore: add parameters getters for CompactPublicKey types
2024-11-14 19:08:39 +01:00
Mayeul@Zama
cf56e5853f
chore(ci): fix OOM when linking c_api tests
2024-11-14 15:56:56 +01:00
Mayeul@Zama
b2e8ef6010
chore(ci): use cpu_count.sh where possible
2024-11-14 15:56:56 +01:00
tmontaigu
bb327b09ae
feat(capi): add mechanism to get panic message as const char *
...
Previously, when an error occurred in the rust side, the panic message
would get printed to stderr, then the c function would return 1 to
indicate error.
This commit adds the ability to disable the automatic prints of panic
messages and adds functions to get the panic message as a const char *
to allow user better control on how to display error messages.
2024-11-14 15:24:29 +01:00
Pedro Alves
5a664aa30d
chore(gpu): simplifications to the zero_out_if method
2024-11-13 15:23:04 -03:00
Agnes Leroy
4264ba2e20
chore(gpu): remove 3_3 group 2 tests to gain time in the ci
2024-11-13 16:14:45 +01:00
Guillermo Oyarzun
b18aa0df54
fix(gpu): fix signed overflowing sub for one block case
2024-11-13 15:20:22 +01:00
Agnes Leroy
a501285206
chore(gpu): change target for multi-gpu tests
2024-11-13 15:06:46 +01:00
Arthur Meyre
d28040342c
chore(gpu): use same balanced decomposition code as in the CPU code
2024-11-13 14:26:13 +01:00
Pedro Alves
b041608d25
fix(gpu): general fixes and improvements to PBS
...
- update pbs test parameters to match tfhe-rs' integer tests
- refactor mul_ggsw_glwe to make it easier to read
- fix the way we accumulate the external product result on multi-bit PBS
2024-11-13 13:36:55 +01:00
Arthur Meyre
eac30027e9
chore(ci): run bench profile as ubuntu
2024-11-12 16:59:38 +01:00
dependabot[bot]
aaba7e5916
chore(deps): bump tj-actions/changed-files from 45.0.3 to 45.0.4
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 45.0.3 to 45.0.4.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](c3a1bb2c99...4edd678ac3 )
---
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 >
2024-11-12 14:16:30 +01:00
Agnes Leroy
d29ed6b60c
chore(gpu): trigger GPU tests if tests are modified
2024-11-12 09:12:25 +01:00
Arthur Meyre
9ee18dd2c7
test: add tag check for parameter keyswitch in HL API
2024-11-08 18:03:01 +01:00
Nicolas Sarlin
6ef22e8cb9
refactor(zk)!: directly use the CompactPkeCrs in all public APIs
...
BREAKING_CHANGE:
- All the zk API (build_with_proof, verify, verify_and_expand,...) now take a
`CompactPkeCrs` instead of a `CompactPkePublicParams`. Serialized
`CompactPkePublicParams` from previous versions can be converted into a
`CompactPkeCrs` using `params.into()`
2024-11-08 17:50:34 +01:00
Nicolas Sarlin
fa7a6281ad
chore(tfhe): prepare release 0.11.0
2024-11-08 17:50:34 +01:00
Agnes Leroy
5c189d6bf3
chore(ci): use function executor for abs and signed div tests
2024-11-07 17:17:00 +01:00
Nicolas Sarlin
f8bde7fbde
fix(zk): fix build with feature zk-pok without shortint
2024-11-07 16:06:26 +01:00
Nicolas Sarlin
f9c4627946
doc: update the doc with the new msrv
2024-11-07 14:58:37 +01:00
Nicolas Sarlin
5dd6d8d569
chore(ci): enable safe_serialization tests
2024-11-07 13:37:31 +01:00
Nicolas Sarlin
5e3b793fd7
feat(zk): add conformance for zk proof and crs
2024-11-07 09:33:16 +01:00
Nicolas Sarlin
295b6608ee
feat(zk): check that proof and crs points are valid
2024-11-07 09:33:16 +01:00
tmontaigu
5c42fc950e
chore: make more add/sub test use variable num_blocks
2024-11-06 16:43:01 +01:00
Mayeul@Zama
ff6e9cab63
refactor(string): use custom iterator to avoid allocation
2024-11-06 14:44:09 +01:00
Mayeul@Zama
e88222987a
chore(fhe_strings): limit max n to improve performance
2024-11-06 14:44:09 +01:00
Mayeul@Zama
bcae0f1beb
fix(strings): fix underflow
2024-11-06 14:44:09 +01:00
Mayeul@Zama
a6a5716e37
chore(strings): use is_empty function
2024-11-06 14:44:09 +01:00
Mayeul@Zama
829b00bb6d
chore(strings): cleanup function
2024-11-06 14:44:09 +01:00
Mayeul@Zama
de1cc0a863
feat(strings): add support for custom params
2024-11-06 14:44:09 +01:00
Mayeul@Zama
69b6c3a353
refactor(strings): move test_all function in separate module
2024-11-06 14:44:09 +01:00
Mayeul@Zama
2fcde61e98
refactor(strings): use integer keys
2024-11-06 14:44:09 +01:00
Mayeul@Zama
c22f6ff70e
fix(strings): fix clippy lints
2024-11-06 14:44:09 +01:00
Mayeul@Zama
fcf7e66d43
chore(strings): cleanup
2024-11-06 14:44:09 +01:00
Mayeul@Zama
fc28ea5a30
fix(strings): fixes after strings move
2024-11-06 14:44:09 +01:00
Mayeul@Zama
8680e1de0a
refactor(strings): move fhe_strings from examples to strings module
2024-11-06 14:44:09 +01:00
Nicolas Sarlin
daf57f5665
chore(zk): update arkworks to 0.5.0
2024-11-06 11:53:34 +01:00
Nicolas Sarlin
ccf0dc3ad8
fix(zk): fix zk wasm x86_64 tests
2024-11-06 11:17:06 +01:00
Agnes Leroy
ba5e717183
chore(gpu): add workflows for erc20 with 2 and 8 H100
2024-11-06 09:38:05 +01:00
Arthur Meyre
615ed3d5db
refactor(tfhe)!: update key level order for better performance
...
- use natural order for decomposition levels in bsk
co-authored-by: Agnes Leroy <agnes.leroy@zama.ai >
2024-11-05 17:23:57 +01:00
Arthur Meyre
dda93889da
chore: update data backward compatibility branch
2024-11-05 17:23:57 +01:00
Arthur Meyre
748b88e905
chore(tfhe): update version to 0.10.0
2024-11-05 17:23:57 +01:00
Arthur Meyre
612657260f
chore: bump CUDA backend version to 0.6.0
2024-11-05 17:23:57 +01:00
Nicolas Sarlin
6ee3eb17b9
chore(zk): add a proof compat test between x86_64 and wasm
2024-11-05 17:07:04 +01:00
Agnes Leroy
c1374a0e10
chore(gpu): increase sm for rtxa6000
2024-11-05 12:11:36 +01:00
Agnes Leroy
a9601fc47d
chore(gpu): remove decompressed ct comparison btw cpu and gpu
...
The results are not expected to match bitwise
2024-11-04 15:01:53 -03:00
Agnes Leroy
bd255cd958
chore(gpu): rework ci to adapt to the shortage of h100
2024-11-04 15:23:43 +01:00
Arthur Meyre
6fe36799fd
chore(ci): fix clippy issue for M1 build
2024-11-04 12:53:58 +01:00
dependabot[bot]
02419d6852
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions
...
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions ) from 3.0.15 to 3.0.16.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases )
- [Commits](ed00f72a3c...38608ef4fb )
---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-11-04 12:53:09 +01:00
David Testé
8d53fa124d
chore(ci): cache node build in workflows
...
Building Node is failing often due to network error.
Caching a successful build will allow more reliable workflows.
2024-11-04 09:19:46 +01:00
tmontaigu
e8a3da9bb3
chore(csprng): no longer check macOS version
...
We checked the macOS version to be sure that the
SecRandomCopyBytes was available.
Since rust 1.74 (which is older than our current msrv)
rust only supports macOS >= 10.12, thus we can expect
SecRandomCopyBytes to always be available and can remove the check
2024-10-31 18:29:01 +01:00
Agnes Leroy
8643b06857
fix(gpu): fix memory error in cg classical PBS
2024-10-31 15:19:45 +01:00
yuxizama
3611dece11
chore(docs): fix the survey format
2024-10-31 11:23:28 +01:00
Agnes Leroy
3bd7cf789c
chore(gpu): restrict bindings generation
2024-10-31 11:16:08 +01:00
Agnes Leroy
fc26f2abb7
chore(gpu): restrict should run
2024-10-31 11:14:03 +01:00
David Testé
083e973fb2
chore(ci): update version of selenium to 4.26.0
...
This reduces console verbosity.
2024-10-31 09:30:41 +01:00
Nicolas Sarlin
e91f3d3ba3
chore(zk): bump version to 0.3.1
2024-10-30 14:54:48 +01:00
Nicolas Sarlin
96360cfef9
fix(zk): proof compatiblity between 32/64b platforms
2024-10-30 14:54:48 +01:00
David Testé
93ddb6b084
chore(ci): verify commit on release
...
Enforce commit being associated to a tag.
The tag must be committed by a member of the release team.
In addition, the tag needs to be verified. Finally, triggering
actor must also be a member of the release team.
2024-10-30 14:40:04 +01:00
David Testé
4ce8b5e2d9
chore(bench): skip tuniform parameters for pbs with ntt
2024-10-29 15:19:41 +01:00
Mayeul@Zama
df9fd6cd19
chore(zk): regroup compute load proof optionals
2024-10-29 09:55:22 +01:00
dependabot[bot]
69482dec9b
chore(deps): bump actions/checkout from 4.2.1 to 4.2.2
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](eef61447b9...11bd71901b )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-28 15:01:14 +01:00
dependabot[bot]
2d341f8506
chore(deps): bump rtCamp/action-slack-notify from 2.3.1 to 2.3.2
...
Bumps [rtCamp/action-slack-notify](https://github.com/rtcamp/action-slack-notify ) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/rtcamp/action-slack-notify/releases )
- [Commits](65e6fc1ce6...c33737706d )
---
updated-dependencies:
- dependency-name: rtCamp/action-slack-notify
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-28 15:01:05 +01:00
Arthur Meyre
776c95c16e
chore(ci): update chrome version
2024-10-28 09:38:40 +01:00
Arthur Meyre
f497bf09a3
chore(ci): fix wasm bench parameter names
2024-10-25 16:52:22 +02:00
Arthur Meyre
a6fd9553b8
chore(ci): fix odd clippy import issue for ks bench
2024-10-25 16:52:22 +02:00
dependabot[bot]
6628717077
chore(deps): update zama-ai/slab-github-runner requirement to 801df0b8db5ea2b06128b7476c652f5ed5f193a8
...
Updates the requirements on [zama-ai/slab-github-runner](https://github.com/zama-ai/slab-github-runner ) to permit the latest version.
- [Release notes](https://github.com/zama-ai/slab-github-runner/releases )
- [Commits](801df0b8db )
---
updated-dependencies:
- dependency-name: zama-ai/slab-github-runner
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-25 16:31:23 +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
David Testé
e9af460d3e
feat(core): add batched programmable boostraping
2024-10-25 15:19:44 +02:00
Arthur Meyre
a88597b183
chore(wop): fix test for bivariate CRT
...
- insane degrees generated randomly required insane amounts of memory to
supposedly run the test, now just pretend we did an addition to have higher
degree and keep the spirit of the test
2024-10-25 14:54:16 +02:00
Arthur Meyre
1417925a6c
chore(ci): generate wopbs keys to avoid test crashes
2024-10-25 14:54:16 +02:00
Arthur Meyre
199cb6714a
chore(all): remove default big/small configurations
2024-10-25 14:54:16 +02:00
Arthur Meyre
33c21b97ad
chore(c_api): remove the get parameters function from shortint
...
- always use parameter names to get parameters
2024-10-25 14:54:16 +02:00
Arthur Meyre
b585ca226d
chore(js): remove functions to get shortint parameters, always use names
2024-10-25 14:54:16 +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
Arthur Meyre
c65047526a
fix(core): fix decomposition over 1 level to be balanced
...
- update test_split_pbs to have more iterations as the new decomposition
did not trigger a mismatch between both implementations in all cases only
running the test once, mismatch is now fixed
2024-10-25 09:44:02 +02:00
David Testé
9d511347f5
chore(bench): add packing keyswtich benchmarks
2024-10-24 18:10:58 +02:00
Mayeul@Zama
5db44d0294
fix(chore): use PBS scratch instead of Wop one
2024-10-24 16:38:00 +02:00
Mayeul@Zama
41d002e5d6
refactor(core): fix PBS API
2024-10-24 16:38:00 +02:00
Mayeul@Zama
751ec0ec1b
chore(all): remove AVX512_FEATURE
2024-10-24 16:38:00 +02:00
Arthur Meyre
d620c3cf3c
chore(core): remove the fmadd split accumulation
...
- this was degrading performance for some parameter sets
- gains were either anecdotal or non existent
2024-10-24 15:23:42 +02:00
Mayeul@Zama
0dec4482b5
fix(fhe_strings): fix size error
2024-10-24 13:46:20 +02:00
Nicolas Sarlin
64cc70d94c
chore(backward): use the Deprecated type from tfhe-versionable
2024-10-24 09:49:15 +02:00
Arthur Meyre
38f81a762d
chore(integer): add a test to check that a malicious list is sanitized
...
- if a boolean block is ill formed in a ProveCompactCiphertextList we now
have a test that checks that when proper keys are provided slots marked as
boolean are properly sanitized to contain only 0 or 1 values after expand
2024-10-23 11:22:09 +02:00
Nicolas Sarlin
7c295947dd
fix(wasm): fix size used for serialization in benches
2024-10-22 16:45:26 +02:00
Nicolas Sarlin
3b4f0d20f1
feat(wasm): export safe_deserialize for CompactPkePublicParams
2024-10-22 13:36:52 +02:00
Arthur Meyre
9fd9ece484
chore(docs): seen some diffs during a merge, uniformizing toml blocks
2024-10-22 12:10:15 +02:00
Nicolas Sarlin
466a996fdf
feat(versionable): support version deprecations in the dispatch enum
2024-10-22 11:37:41 +02:00
Nicolas Sarlin
075e87495d
doc(versionable): improve proc macro doc with an example
2024-10-22 11:37:41 +02:00
Arthur Meyre
1406924235
chore: fix typos
...
co-authored-by: nnsW3 <146735585+nnsW3@users.noreply.github.com >
2024-10-22 11:00:51 +02:00
Arthur Meyre
5a54cf678f
chore(data)!: breaking data changes for future compatibility
...
- invert the LweKeyswitchKey level order and propagate change
- remove dependency on unsupported wopbs keys for the HL keys
2024-10-22 10:23:21 +02:00
Arthur Meyre
d66f8fae8c
chore(cuda): bump version to 0.5.0
2024-10-22 10:23:21 +02:00
Arthur Meyre
88d4477531
chore(tfhe): bump version to 0.9.0
2024-10-22 10:23:21 +02:00
dependabot[bot]
894a9c2e0d
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions
...
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions ) from 3.0.14 to 3.0.15.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases )
- [Commits](40ba2d51b6...ed00f72a3c )
---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-21 15:40:49 +02:00
dependabot[bot]
9393e59e05
chore(deps): bump rtCamp/action-slack-notify from 2.3.0 to 2.3.1
...
Bumps [rtCamp/action-slack-notify](https://github.com/rtcamp/action-slack-notify ) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/rtcamp/action-slack-notify/releases )
- [Commits](4e5fb42d24...65e6fc1ce6 )
---
updated-dependencies:
- dependency-name: rtCamp/action-slack-notify
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-21 15:40:32 +02:00
Nicolas Sarlin
beb3f790c8
refactor(zk): factorize test params generation between proofs
2024-10-21 14:10:44 +02:00
Arthur Meyre
ad1c1852e4
chore(ci): make build script regenerate bindings at all times
...
- git diff shows no diff
2024-10-21 11:12:06 +02:00
Mayeul@Zama
03e38a79b6
refactor(shortint): remove noise level from CompactCt
2024-10-21 11:05:40 +02:00
Nicolas Sarlin
dba7f22a63
fix(serialization): safe_serialization with unlimited size
2024-10-21 09:58:43 +02:00
Nicolas Sarlin
4bd9325c6f
fix(serialization): serialized_size_limit includes the header
2024-10-21 09:58:43 +02:00
David Testé
f3a1b6b5b9
chore(ci): run aws workflows as ubuntu user
2024-10-18 14:05:36 +02:00
tmontaigu
400ec4e82f
chore: fix some overflow related panics
...
Some overflow panics were occurring when
overflow-check=true
Most of them were expected/accepted, so this commit only
makes changes so that its now explicit that overflow is accepted.
2024-10-17 18:08:05 +02:00
David Testé
1a5dfb3699
chore(ci): rename benchmark parsing option to object-sizes
...
Since not only key sizes are measured now, it makes more sense to
rename it to --object-sizes.
2024-10-16 16:28:11 +02:00
tmontaigu
d09492dea9
chore(integer): add extensive_trivial tests for sub
2024-10-16 13:08:04 +02:00
Nicolas Sarlin
f4e74b2754
chore(all): update MSRV to 1.81
2024-10-16 11:07:19 +02:00
David Testé
483a4fecf1
chore(ci): fix firefox wasm benchmarks with new aws ami
...
Some libs were missing to be able to run Firefox out of the box.
Besides, action runner is now installed as ubuntu user since
Firefox is not able to run as root.
2024-10-16 10:50:27 +02:00
tmontaigu
96571ba462
refactor(integer): sum by columns in overflowing_sum_parallelized
...
At some point, the sum was refactored to by written reasing
in columns not rows, and it simplified the code and helped gain
some performance.
The overflowing version was not reworked, until this commit
2024-10-16 10:11:38 +02:00
tmontaigu
4cd8a9c49f
chore: fix bound clippy complains about
2024-10-16 10:11:38 +02:00
Nicolas Sarlin
8490c009c2
feat(serialization): add safe_serialized_size
2024-10-16 09:43:54 +02:00
Guillermo Oyarzun
d780276ae6
fix(gpu): add template parameter to packing keyswitch calls
2024-10-16 09:30:38 +02:00
Agnes Leroy
d794f4dd0f
chore(gpu): print inputs to more determinism tests for debugging purposes
2024-10-15 11:54:54 +02:00
Arthur Meyre
f2651ed558
chore(ci): enforce commit signature for PRs
...
- uses 1Password actions
2024-10-15 11:45:57 +02:00
Guillermo Oyarzun
748ec049f6
fix(gpu): fix default pbs with many luts
2024-10-14 19:14:50 +02:00
David Testé
ff0609fba3
chore(ci): force refresh page on firefox browser
...
A simple driver.refresh() wouldn't refresh script cache for web
workers. Thus leading to page not fully charged and having all
test and benchmarks buttons in disabled state.
That triggering timeout while browsing with Selenium.
Console log print has also been curated for Chrome browser.
2024-10-14 17:58:21 +02:00
David Testé
41b3edf48b
chore(ci): pass --no-sandbox option only to chrome browser
2024-10-14 17:58:21 +02:00
tmontaigu
9a06f62422
fix(hlapi): CompressedCiphertextList::get_kind_of
...
Use `tfhe::FheTypes::from_data_kind` as this function
centralizes the mapping between integer::DataKind to FheTypes
making sure we don't miss some types.
2024-10-14 17:33:37 +02:00
Agnes Leroy
e698d18242
chore(gpu): automatically generate rust bindings for cuda functions, except device.cu
2024-10-14 17:07:57 +02:00
Agnes Leroy
416fb5a719
chore(gpu): make to_glwe_ciphertext_list pub
2024-10-14 10:28:28 -03:00
dependabot[bot]
d8ac12daa9
chore(deps): bump actions/checkout from 4.2.0 to 4.2.1
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](d632683dd7...eef61447b9 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-14 13:33:28 +02:00
dependabot[bot]
259033e297
chore(deps): bump actions/upload-artifact from 4.4.0 to 4.4.3
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.4.0 to 4.4.3.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](50769540e7...b4b15b8c7c )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-14 13:33:18 +02:00
dependabot[bot]
cd638526fc
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions
...
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions ) from 3.0.13 to 3.0.14.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases )
- [Commits](b8f9a25a51...40ba2d51b6 )
---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-14 13:33:11 +02:00
tmontaigu
ac7197393e
feat(integer): improve shift/rotate by encrypted amount
...
This commit does a few things:
* Changes the BitExtractor to use many_lut to reduce number of PBS
done
* Add blocks rotation/shift operation
* Implement a new algorithm for bit shift/rotation by encrypted amounts
* Add support bit shift/rotation for 1_1 parameters (as result of adding
block shift/rotation)
The gist of the new bit shift/rotation is to use the same idea as the scalar
version where we first shift blocks between adjacent blocks,
then use a rotation of blocks.
Doing this requires to do a division and modulo operation:
```rust
let (shift_within_blocks, block_rotations) =
(amount / bits_per_block, amount % bits_per_block)
```
When `amount` is clear this operation is simple, when `amount` is
encrypted then is harder (`bits_per_block` is always clear).
However, when bits_per_block is a power of 2 (e.g 1, 2, 4) `/` and `%`
can be made by shifting and bit-masking, which are simple operations.
This means the new algorithm is only compatible with 1_1, 2_2, 4_4 but
not 3_3.
The new algorithm improves the latency as well as the throughput as
it requires less PBS in total
2024-10-14 09:59:40 +02:00
Pedro Alves
e376049e0f
fix(compression): update compression parameters, fix compression on GPU and improve test
...
- the new compression parameters went through a noise check to verify constraints
- CPU and GPU compression tests are improved and the same
- implement Debug, Eq, PartialEq to CompressedCiphertextList
- fix gpu compression when a radix ciphertext is split through more than one compact GLWE
2024-10-10 16:02:08 +02:00
Arthur Meyre
c2aae980ae
chore(ci): the original build fix was not conservative enough
...
- this makes sure we honour the original requirement while making sure we
don't pull the broken dep in
2024-10-10 14:42:17 +02:00
Arthur Meyre
a54a84170b
chore(csprng): fix clippy warning on M1
2024-10-10 13:54:39 +02:00
David Testé
8db1848be8
chore(ci): add workflow for erc20 benchmarks on gpu
2024-10-10 13:46:35 +02:00
David Testé
0ec1a0d516
chore(ci): avoid running erc2O benchmarks on internal repository
2024-10-10 13:46:35 +02:00
Arthur Meyre
8d701b28e9
chore(ci): wasm-bindgen introduced a bug in 0.2.94 preventing our build
...
- 0.2.93 works properly, changing the requirement to allow wasm to build
2024-10-10 13:28:51 +02:00
Nicolas Sarlin
62100bd0b5
feat(core_crypto): impl Named for LweSecretKey and GlweSecretKey
2024-10-10 11:44:11 +02:00
Nicolas Sarlin
f244102cbc
doc: update serialization doc
2024-10-10 09:33:56 +02:00
Nicolas Sarlin
88f7ab529b
feat(hl): create server key conformance from config
2024-10-10 09:33:56 +02:00
Nicolas Sarlin
25fb1e53a2
chore(versionable): prepare release 0.3.2
2024-10-09 16:40:56 +02:00
Nicolas Sarlin
a8ea3f6827
refactor(all): remove some manual impl of versionize
2024-10-09 16:40:56 +02:00
Nicolas Sarlin
9cc0b9050e
feat(versionable): Handle ?Sized bounds in the proc macro
2024-10-09 16:40:56 +02:00
Nicolas Sarlin
51da8fe735
feat(versionable): add transparent mode for newtype structs
2024-10-09 16:40:56 +02:00
Agnes Leroy
543b39951b
chore(gpu): limit base log to 32 because of the monomial degree type
2024-10-09 15:57:35 +02:00
Mayeul@Zama
557fb7b8dc
fix(shortint): add assert on compression input noise
2024-10-09 15:35:30 +02:00
David Testé
43e697ce51
chore(ci): fix browser identification on wasm benchmarks
...
Rust script wasn't able to parse results if the browser name was
suffixed after parameters name.
2024-10-09 15:26:42 +02:00
Agnes Leroy
4518823393
chore(gpu): panic in single carry prop if message modulus is 2 (1_1 params)
2024-10-09 15:24:00 +02:00
Agnes Leroy
61fecd530b
fix(gpu): fix rtx 4090 tests
2024-10-09 15:23:49 +02:00
Guillermo Oyarzun
663eb82a46
fix(gpu): fix sample extract many lut use case
2024-10-09 14:12:36 +02:00
Mayeul@Zama
ca2a9e02ea
doc(core): add comment on PolynomialSize::log2
2024-10-09 13:32:31 +02:00
David Testé
8da31dbbed
chore(ci): run erc20 benchmarks in github
...
It also send results to zama's benchmark database.
2024-10-09 13:12:31 +02:00
tmontaigu
393e144a64
chore(hlapi): add ClientKey::parameters getter
2024-10-09 13:12:31 +02:00
tmontaigu
179f47d298
feat(hlapi): add erc20 bench
...
This adds benchmarks of both latency and throughput
of 4 variants of the erc20 transfer.
It also prints the PBS count of each versions.
- "whitepaper" is the variant written in the fhevm whitepaper
- "no_cmux" is similar to whitepaper, but uses a "boolean multiplication"
instead of a cmux
- "overflow" uses an overflowing_sub to remove the need for comparison
- "safe" use both overflowing_sub and overflowing_add to make sure both
then sender has enough money and the that the transfer won't overflow
the receiver's money
"overflow" has the lowest latency, and second best throughput
"no_cmux" has the second lowest latenc and the best throughput
2024-10-09 13:12:31 +02:00
David Testé
3b8afdcdd9
chore(ci): fix webdriver install in wasm benchmarks
2024-10-09 10:07:38 +02:00
Mayeul@Zama
79aba47f57
chore(hlapi): remove useless flags
2024-10-09 10:05:15 +02:00
Nicolas Sarlin
2b14b22820
fix(versionable): compatibility between "convert" and generics
2024-10-09 09:40:07 +02:00
Nicolas Sarlin
2af4676588
chore(versionable): add '#[versionize(dispatch = T)]' in macro
...
This allows to add new attributes without arguments to the proc-macro
2024-10-09 09:40:07 +02:00
Nicolas Sarlin
7d044b00a3
chore(versionable): remove unneeded bounds in examples
2024-10-09 09:40:07 +02:00
David Testé
cd36ac5092
chore(ci): add firefox support for wasm tests and benchmarks
2024-10-09 08:44:16 +02:00
Arthur Meyre
a307e1eaa1
feat(integer): construct proven ct list conformance from another source
...
- allows to use ZK parameters directly
2024-10-08 19:27:16 +02:00
Nicolas Sarlin
55f265bd3d
chore(ci): add dry run mode to tfhe-versionable releases
2024-10-08 14:05:27 +02:00
Arthur Meyre
b3de491f30
chore(ci): remove symlinking of the dynamic buffer API
2024-10-08 13:19:06 +02:00
Nicolas Sarlin
bc31e95e2c
chore(versionable): prepare release 0.3.1
2024-10-08 10:03:51 +02:00
Agnes Leroy
11730735dd
chore(gpu): force cargo profile to release to build cuda tests & benches
2024-10-08 09:07:28 +02:00
Mayeul@Zama
28c86b356c
chore(all): format
2024-10-07 16:10:00 +02:00
Mayeul@Zama
d16d871c97
chore(all): fix new lints
2024-10-07 16:10:00 +02:00
Mayeul@Zama
91e58524cf
chore(all): update toolchain
2024-10-07 16:10:00 +02:00
Arthur Meyre
55471dd24d
chore(bench): add a compression bench for 2 bits (also simulates 1 bit)
2024-10-07 13:23:56 +02:00
Pedro Alves
2e461f0c1d
feat(gpu): add a benchmark for packing keyswitch
2024-10-07 10:05:48 +02:00
dependabot[bot]
7c7e344682
chore(deps): bump codecov/codecov-action from 4.5.0 to 4.6.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](e28ff129e5...b9fd7d16f6 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-07 09:42:37 +02:00
dependabot[bot]
72475ca034
chore(deps): bump tj-actions/changed-files from 45.0.2 to 45.0.3
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 45.0.2 to 45.0.3.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](48d8f15b2a...c3a1bb2c99 )
---
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 >
2024-10-07 09:42:30 +02:00
dependabot[bot]
9d11ad07dc
chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions
...
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions ) from 3.0.12 to 3.0.13.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases )
- [Commits](0901cf7b71...b8f9a25a51 )
---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-07 09:42:16 +02:00
Agnes Leroy
256378f7b1
chore(gpu): increase max sm size again to gain performance on 3_3 params on H100
...
This reverts commit 1c0b6fbbd4 .
2024-10-03 16:24:11 -03:00
Pedro Alves
51cae3d3ac
fix(gpu): fix the indexes used in compression
...
- also general minor fixes to compression
2024-10-03 19:33:08 +02:00
Agnes Leroy
123c764d45
chore(gpu): do not unwrap in blocks_of, to have the same behavior as the CPU
2024-10-03 17:41:42 +02:00
Agnes Leroy
54a08afb46
chore(doc): add compression tutorial on GPU
2024-10-03 13:53:52 +02:00
Arthur Meyre
6c8591dc21
chore(doc): add a bit more substance to the array documentation
2024-10-03 13:53:52 +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
Arthur Meyre
ee938797c3
chore(docs): improve getting started page following feedback
...
- add more details to set-up a rust project from 0 and add TFHE-rs as a
dependency
2024-10-03 13:53:52 +02:00
Agnes Leroy
2311087a64
chore(hl): fix clippy error in test
2024-10-03 13:49:02 +02:00
Beka Barbakadze
7dfabdd4b5
feat(cuda): modify double to torus
2024-10-03 13:48:54 +02:00
David Testé
212af17538
style(global): fix typos
2024-10-03 11:47:00 +02:00
David Testé
c7f4de9a21
chore(ci): add makefile target for typos checker
...
This target would perform a typos check with some exceptions to ensure
correct spelling throughout the codebase
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
Agnes Leroy
4a930264f5
chore(gpu): reset all test thread values
2024-10-02 15:32:44 +02:00
Guillermo Oyarzun
2498087610
fix(gpu): remove extra single carry propagation from partial sum
2024-10-02 15:26:02 +02:00
tmontaigu
375481c66e
fix(hlapi): pub use HlCompressible,HlExpandable
...
Pub re-export the `HlCompressible` and `HlExpandable`
traits, as users may need them to write generic code
that manipulates CompressedCiphertextList/Builder
2024-10-02 10:47:45 +02:00
Agnes Leroy
cb9dac6eed
chore(gpu): add ks/pbs benchmarks in the documentation
2024-10-02 09:37:14 +02:00
Nicolas Sarlin
04c6f18d42
feat(versionable): impl Versionize for Vec<Vec<T>>
2024-10-01 13:32:41 +02:00
dependabot[bot]
75d2457a6f
chore(deps): bump actions/checkout from 4.1.7 to 4.2.0
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.7 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](692973e3d9...d632683dd7 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-10-01 11:48:35 +02:00
Arthur Meyre
dedb3e94e5
feat(integer): evaluate unpacking luts during casting to improve perf
...
- allows to avoid some LUT evaluations during expansions of the various
CompactCiphertextList
2024-09-30 21:03:09 +02:00
Arthur Meyre
766809afe4
chore(doc): fix slightly broken docstring which ended as a comment
2024-09-30 21:03:09 +02:00
Arthur Meyre
22728b9156
chore(ci): allow the redundant closure lint which brings no value
2024-09-30 21:03:09 +02:00
tmontaigu
59380fcacb
chore(js): add test for compact pk conformance
2024-09-30 20:15:25 +02:00
Nicolas Sarlin
b50029fcff
feat(js): add safe_serialize_conformant for public keys
2024-09-30 20:15:25 +02:00
tmontaigu
7f9ba6ed28
feat(js): add constructors for PublicKeyParams
2024-09-30 20:15:25 +02:00
Mayeul@Zama
9f6e7cd3fc
feat(all): add ProvenCompactCiphertextList conformance
2024-09-30 20:15:25 +02:00
Mayeul@Zama
b14db1e3fd
feat(all): add CompactPublicKey conformance
2024-09-30 20:15:25 +02:00
tmontaigu
3b4cb6b1fc
feat(hlapi): Add initial structure of NdArray types
2024-09-30 17:37:56 +02:00
Guillermo Oyarzun
81c16e7915
chore(gpu): add module loading info
2024-09-30 17:05:50 +02:00
Agnes Leroy
0fc24127a2
chore(gpu): refactor lwe_chunk_size
2024-09-30 17:04:47 +02:00
Nicolas Sarlin
e9d3e21b93
chore(all)!: use a builder pattern for safe serialization API
...
BREAKING CHANGES:
- `safe_serialize` and `safe_deserialize` are replaced by
`SerializationConfig::serialize_into` and
`DeserializationConfig::deserialize_from`.
- C API: the `XXX_safe_serialize_versioned` is deprecated, `XXX_safe_serialize`
is now versioned by default
- JS API: the `safe_serialize` method now versionize the data before
serialization.
This is *NOT* a serialization breaking change for data serialized in previous
versions with `safe_serialize_versioned`.
2024-09-30 15:58:25 +02:00
Nicolas Sarlin
53c4850d11
feat(zk): impl Named for zk pke proof and Params
2024-09-30 15:58:25 +02:00
Agnes Leroy
03154d5db8
fix(gpu): fix end index in gpu compression
2024-09-30 15:56:51 +02:00
yuxizama
576bc5782e
chore(docs): benchmark regrouping and visualization
2024-09-30 15:38:51 +02:00
Nicolas Sarlin
8256e76f74
refactor(zk): remove dependency to ark_serialize
2024-09-30 13:18:18 +02:00
Nicolas Sarlin
835cc6d9b0
refactor(zk): handle compression without canonical serialize
2024-09-30 13:18:18 +02:00
Nicolas Sarlin
c9be958d1a
chore(backward): adds a test for proven list versioning
2024-09-30 13:18:18 +02:00
Nicolas Sarlin
5183c1fb3e
fix(backward): fix backward data clone script with multiple branches
2024-09-30 13:18:18 +02:00
Nicolas Sarlin
0d49d19a13
refactor(hl)!: use a trait for common ciphertext lists methods
...
BREAKING CHANGE:
- The `CiphertextList` trait needs to be in scope to use the common methods of
the `CompressedCiphertextList` and `CompactCiphertextListExpander`
- The `.get` of the `CompactCiphertextListExpander` now returns a
`Result<Option>` instead of an `Option<Result>`
2024-09-30 13:18:18 +02:00
Nicolas Sarlin
e91d532a36
chore(zk): enable versionable lint for zk
2024-09-30 13:18:18 +02:00
Nicolas Sarlin
1c2a0e82f9
feat(zk): Versionize ProvenCompactCiphertextList and PkePublicParams
2024-09-30 13:18:18 +02:00
Nicolas Sarlin
e76503984a
refactor(zk): convert ark types to custom types before serialization
2024-09-30 13:18:18 +02:00
Nicolas Sarlin
5cfc57f51a
refactor(zk): explicitly state endianness in to_bytes functions
2024-09-30 13:18:18 +02:00
Agnes Leroy
840498977c
chore(gpu): fix l40 hardware name in bench workflow
2024-09-30 13:05:46 +02:00
David Testé
77a34a952e
chore: bump version for tfhe, tfhe-cuda-backend, tfhe-zk-pok
...
tfhe bumped to v0.8.0
tfhe-cuda-backend bumped to v0.4.0
tfhe-zk-pok bumped to v0.3.0
2024-09-30 13:00:46 +02:00
Agnes Leroy
d9e9a5bb3f
chore(gpu): add gpu compression in the hl api
2024-09-30 09:33:12 +02:00
Pedro Alves
03431e41a9
chore(gpu): change index array type in decompression
2024-09-27 15:36:50 -03:00
Nicolas Sarlin
5d522ffeaa
fix(zk): generate m mod t in padding test
2024-09-27 16:57:19 +02:00
Arthur Meyre
3956f96318
feat(tfhe): plug padding bit API from ZKs
2024-09-27 16:57:19 +02:00
Arthur Meyre
7192ecb695
feat(zk): add possibility to specify a number of MSB padding bits set to 0
...
- pke v1 and v2
2024-09-27 16:57:19 +02:00
Mayeul@Zama
40b097d819
feat(all): add server key conformance
2024-09-27 16:55:23 +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
Agnes Leroy
d2efa82daf
chore(gpu): add leading zeros/ones benchmarks
2024-09-27 13:38:08 +02:00
tmontaigu
bd66a6fd2b
feat(integer): improve scalar lt/le/gt/ge/min/max
2024-09-27 12:27:50 +02:00
tmontaigu
16feb46afc
refactor(integer): use same logic for signed cmps
...
This makes the logic for signed cmps more similar whether the parameters
are 1_1 or higher.
This will make possible to reuse this part of the code for
scalar comparisons
2024-09-27 12:27:50 +02:00
Arthur Meyre
81d82bc45c
chore(bench): bench 64 bits for ZKs
2024-09-26 20:16:22 +02:00
David Testé
7afe9b71d2
chore(shortint): update multi-bit gpu parameters set
...
Update with the latest improvements from the optimizer.
2024-09-26 18:15:33 +02:00
David Testé
41fae73e63
chore: bump tfhe to 0.8.0-alpha.10
2024-09-26 15:40:31 +02:00
David Testé
de7c7f209f
chore(ci): include snippets folder into tfhe npm package
2024-09-26 15:40:31 +02:00
Mayeul@Zama
84de0a7b23
feat(hlapi): add generate_oblivious_pseudo_random on FheBool
2024-09-26 14:27:18 +02:00
Pedro Alves
4bb115e1e7
chore(gpu): improve and fix compression tests
...
- the logic was wrong when the integer is split in multiple GLWEs
- now the test pseudo-randomly mix unsigned, signed, and booleans
2024-09-26 07:50:17 -03:00
Agnes Leroy
b365585c74
chore(gpu): add 2xH100 bench workflow
2024-09-26 12:42:05 +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
Bourgerie Quentin
8c51e22aa5
fix(gpu): fix cuda memcpy in plaintext add
2024-09-25 13:38:06 +02:00
tmontaigu
283a3c911b
feat(shortint): add try_from_lwe_encryption_key
2024-09-25 10:44:25 +02:00
Agnes Leroy
2bf483c596
chore(gpu): add bench workflow on L40
2024-09-25 09:13:22 +02:00
Beka Barbakadze
2e0736afc6
feat(cuda): implements fft with reduced shared memory read/write.
2024-09-25 09:13:09 +02:00
David Testé
400ce27beb
chore(tfhe): update boolean and shortint parameters
2024-09-25 09:12:28 +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
Nicolas Sarlin
5db5aba24a
chore: bump tfhe to 0.8.0-alpha.9
2024-09-24 17:42:25 +02:00
Nicolas Sarlin
361c9618a0
chore(versionable): run clippy on tfhe-versionable
2024-09-24 15:20:05 +02:00
Nicolas Sarlin
35dac0d85c
fix(versionable): use examples as tests
2024-09-24 15:20:05 +02:00
Agnes Leroy
1c0b6fbbd4
fix(gpu): remove all resettings of shared memory size
2024-09-24 08:56:06 +02:00
Agnes Leroy
8c6e916076
chore(gpu): rework async logic for ilog2
2024-09-24 08:53:34 +02:00
Agnes Leroy
49ab72bcec
chore(gpu): print info about inputs in determinism test asserts
2024-09-24 08:53:22 +02:00
Agnes Leroy
937b72c538
fix(gpu): add back cuda device synchronize in Drop
...
It was too unsafe to remove device_synchronize. A good
move would probably to remove all asynchronous entry
points on the Rust side if we want to be safe,
otherwise we need to keep this.
2024-09-24 08:53:14 +02:00
tmontaigu
0259886375
feat(integer): add count_ones/zeros
...
The non naive version made for 2_2 parameters
only bring slight (10-15%) for some small sizes like (64, 128, 256 bits)
but reduces number of PBS. The place where it brings the best
improvements it for very large numbers (e.g 6400 blocks 1.8s for naive,
1.1 sec for non-naive)
2024-09-23 22:21:34 +02:00
Arthur Meyre
97822db5fc
test(core): add noise formulas and variance tests for KS and PBS
2024-09-23 16:48:22 +02:00
Agnes Leroy
934b5f40a1
chore(gpu): add some scalar ops to dedup benchmarks
2024-09-23 14:53:13 +02:00
Nicolas Sarlin
3ff81c3c4b
test(versionable): test bounds visibility in the generated code
2024-09-23 13:28:54 +02:00
Nicolas Sarlin
bce5cd3552
chore(versionable): prepare release 0.3.0
2024-09-23 13:28:54 +02:00
Nicolas Sarlin
ec83165acc
chore(versionable): run tfhe-versionable tests in ci
2024-09-23 13:28:54 +02:00
Nicolas Sarlin
d63c2f7705
chore(versionable): update examples
...
Mostly test in the main that the derived code actually works
2024-09-23 13:28:54 +02:00
Nicolas Sarlin
5bcc34728a
doc(versionable): adds in the README that this crate uses serde
2024-09-23 13:28:54 +02:00
Nicolas Sarlin
b62228b429
feat(versionable): Versionize Vec of tuples
2024-09-23 13:28:54 +02:00
Nicolas Sarlin
b63347336b
fix(versionable)!: wrong derived bounds in the Versionize macro
...
Over-restrictive derived bounds were in some cases unsatisfiable, making the
`versionize` method uncallable.
BREAKING_CHANGE:
- The `#[versionize(bound = ...)]` attribute is not needed anymore, so it has
been removed.
2024-09-23 13:28:54 +02:00
Nicolas Sarlin
a631904bd1
feat(zk): add metadata to v2
2024-09-23 13:27:24 +02:00
Agnes Leroy
da850865ec
chore(gpu): add file to run full tests on H100 from workflow only
2024-09-23 13:02:17 +02:00
dependabot[bot]
8be769e282
chore(deps): bump tj-actions/changed-files from 45.0.1 to 45.0.2
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 45.0.1 to 45.0.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](e9772d1404...48d8f15b2a )
---
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 >
2024-09-23 11:00:51 +02:00
David Testé
47ea8bf45c
chore(deps): update slab-github-runner requirement to last version
2024-09-23 09:46:52 +02:00
Agnes Leroy
4823b8a1a0
chore(gpu): initialize some arrays to 0
2024-09-20 22:51:30 +02:00
Agnes Leroy
01f3a6d133
chore(gpu): disable slack notification for fast h100 test success
2024-09-20 17:39:52 +02:00
Nicolas Sarlin
bf613f36b3
feat(hl): impl Named for key types
2024-09-20 17:28:43 +02:00
Pedro Alves
faf200218b
chore(gpu): add checks to ensure limits for compression
2024-09-19 15:57:16 -03:00
Agnes Leroy
24088fd494
chore(gpu): add scalar div and signed scalar div to hl api
...
Also add overflowing sub to hl
2024-09-19 19:11:45 +02:00
Agnes Leroy
48315dca80
feat(gpu): signed scalar div
2024-09-19 19:11:45 +02:00
Agnes Leroy
52b148a728
chore(gpu): temporarily set test threads to 1 for the GPU
2024-09-19 19:11:28 +02:00
Agnes Leroy
d0624d6184
chore(gpu): fix multi-gpu div performance
2024-09-19 16:56:47 +02:00
Agnes Leroy
00fc2818a9
chore(gpu): remove useless syncs
2024-09-19 16:56:47 +02:00
Titouan Tanguy
b93c23e5f8
feat(integer): add raw parts API to integer CompressionPrivateKeys
2024-09-19 14:40:42 +02:00
Nicolas Sarlin
1c59c1c260
fix(gpu): use build profile for cuda release
2024-09-19 14:40:15 +02:00
David Testé
ca7b29163e
chore(ci): add token to checkout private repo tfhe-rs-internal
2024-09-19 14:00:34 +02:00
Agnes Leroy
f7a18ddb23
chore(gpu): remove unchecked benchmarks and add ilog2 to dedup ops
2024-09-19 13:16:17 +02:00
Arthur Meyre
7b9085d0e2
feat(integer): add raw parts API to integer (De)CompressionKey
2024-09-19 11:57:50 +02:00
Arthur Meyre
d52fa249a5
feat(shortint): derive PartialEq on Compression and Decompression keys
2024-09-19 11:57:50 +02:00
Arthur Meyre
35e7031751
feat: add raw parts API for CompressedCiphertextList in HL API
2024-09-19 11:57:50 +02:00
Arthur Meyre
d9662daea5
doc(shortint): add some information about expand and the casting_mode used
2024-09-19 10:29:05 +02:00
Arthur Meyre
32cdb0b5a0
fix: expand_with_key was not providing the safest set of modes
...
- it meant that lists needing unpacking could crash during expand
2024-09-19 10:29:05 +02:00
Agnes Leroy
a6aa95ce2d
fix(gpu): fix comparisons
2024-09-18 21:18:53 +02:00
Arthur Meyre
97d7ed9ec2
chore(ci): only notify for most things on failure
2024-09-18 17:41:24 +02:00
Nicolas Sarlin
07045f1137
chore: update tfhe to 0.8.0-alpha.8 / cuda-backend to 0.4.0-alpha.1
2024-09-18 15:50:00 +02:00
David Testé
3ab7f49436
chore(ci): remove support for slab calls with issue comments
...
Now all workflows use Slab GitHub Action and thus can be launched
directly with a workflow_dispatch event.
2024-09-18 13:42:17 +02:00
Pedro Alves
040e28d822
chore(gpu): downgrade compression conversion tests to become doc tests
2024-09-18 08:35:06 -03:00
Pedro Alves
a113674c82
feat(gpu): implement conversion from CompressedCiphertextList to CudaCompressedCiphertextList
2024-09-18 08:35:06 -03:00
Pedro Alves
1d06691dda
feat(gpu): implement conversion from CudaCompressedCiphertextList to CompressedCiphertextList
2024-09-18 08:35:06 -03:00
Guillermo Oyarzun
fc21804f3e
feat(gpu): generate and apply many luts
2024-09-18 11:58:22 +02:00
Arthur Meyre
c0878f1600
chore: bump version to 0.8.0-alpha.7
2024-09-17 13:59:32 +02:00
Arthur Meyre
97f1277e06
feat: allow to verify a proof without expanding it
2024-09-17 13:59:32 +02:00
aquint-zama
e1dd4ba4bf
chore: ensure actions are pinned by commit hash
2024-09-16 18:08:26 +02:00
David Testé
d96a368b37
chore(bench): fix display name for unchecked bitwise operations
2024-09-16 15:14:54 +02:00
Agnes Leroy
47c8d4cf64
chore(gpu): set test threads to 1 when BIG_INSTANCE is false to get a better view of failures in the ci
2024-09-16 13:19:48 +02:00
Agnes Leroy
9633b61298
fix(gpu): add missing synchronize in scalar add, refactor scalar add on cuda side
2024-09-16 09:05:16 +02:00
Agnes Leroy
8299e1cb9a
chore(gpu): change multi-gpu tests to run on rtx so it's cheaper
2024-09-16 09:04:56 +02:00
tmontaigu
72ad76b5e7
fix(integer): do sum by safe chunk sizes
...
Parameters are made with with assumptions on the number of leveled
add/sub/scalar_mul operations are made, so that the
noise level before doing a PBS has a correct level and everything is
safe, secure and correct.
So the lib implementation has to uphold these assumptions in order to
keep the error probability failure correct.
In the comparisons, at some point we had a vector of ciphertexts with a
degree == 1, so we greedily summed them (e.g with 2_2 params we summed
them by chunks of 15), while it is correct with regards to the carry and
message space it is however less correct with regards to the noise
level.
Noise wise, doing this huge sum is correct as long as the noise of each ciphertext
is independent from the others in the same chunk.
While it may generally be the case we are in, its not guaranteed, and
since we do not track that information we have to take the safer
approach of assuming the worst case: all noise are dependent.
So to fix the issue we compute the correct size of sum chunk by also
taking into account the max noise level.
2024-09-13 15:55:17 +02:00
Arthur Meyre
0e6423820f
feat(tfhe): add possibility to expand a ciphertext without verifying it
2024-09-13 14:59:21 +02:00
Arthur Meyre
c45ee6a236
chore(wasm): add missing (?) wasm_bindgen annotation
2024-09-13 14:59:21 +02:00
Arthur Meyre
cf7b21f1af
chore(integer): fix an error message string referring to shortint
2024-09-13 14:59:21 +02:00
Arthur Meyre
f9026f1563
feat(zk): recompute big d in zk v1 to be more efficient when k < k_max
2024-09-13 14:21:00 +02:00
Nicolas Sarlin
95ab73cbaa
chore(zk): add some comments to the zk pke v2 proof
2024-09-13 13:01:30 +02:00
Arthur Meyre
35faaef431
chore: bump version to 0.8.0-alpha.6
2024-09-13 10:25:03 +02:00
Arthur Meyre
a2ae1a4440
feat(zk): manage D as an upper bound as in the report
...
- allows to prove less slots than what the CRS can handle
2024-09-13 10:24:32 +02:00
David Testé
077d5727da
chore(bench): make compression benchmarks available for database
2024-09-13 10:04:51 +02:00
Agnes Leroy
8314e7d47c
chore(gpu): return if chunk_size is 0
2024-09-12 17:26:13 +02:00
Agnes Leroy
9dca245946
fix(gpu): return early in sum_ct if num radix is 2, pass different pointers to smart copy
2024-09-12 17:26:13 +02:00
Agnes Leroy
345f25c5c3
chore(gpu): fix partial sum ct with 0 or 1 inputs in the vec
...
Also refactor the interface for Hillis & Steele prefix sum
2024-09-12 17:26:13 +02:00
tmontaigu
c6756748f7
feat(integer): improve comparison algorithm
...
Use subtraction to do comparisons lt/le/gt/ge
2024-09-12 15:48:02 +02:00
Mayeul@Zama
bd21971c84
chore(all): fix new warnings in doctests
2024-09-12 14:20:38 +02:00
Mayeul@Zama
e96ad74006
chore(all): enable all warnings in doctests
2024-09-12 14:20:38 +02:00
Mayeul@Zama
abd87a0f0c
chore(integer): remove #![allow(dead_code)]
2024-09-12 14:20:38 +02:00
Arthur Meyre
3875c97574
chore(ci): remove the usage of allow attributes with "reason"
...
- this is a bandaid fix to be able to publish
2024-09-12 11:34:08 +02:00
Agnes Leroy
6fabe6bab0
chore(gpu): fix templates and refactor radix negation
2024-09-12 09:21:54 +02:00
Arthur Meyre
91171c738d
chore: bump version of tfhe to 0.8.0-alpha.5
2024-09-11 18:06:25 +02:00
Arthur Meyre
7bf0dc157d
chore: bump tfhe-zk-pok version to 0.3.0-alpha.1
2024-09-11 18:06:25 +02:00
Arthur Meyre
0612ef5be5
feat(integer): plug metadata into lower level ZK APIs
2024-09-11 18:06:25 +02:00
Arthur Meyre
aee4c1ed18
feat(shortint): plug metadata API in the lower level ZK APIs
2024-09-11 18:06:25 +02:00
Arthur Meyre
e2a3ef151a
feat(core): plug metadata into ZK APIs
2024-09-11 18:06:25 +02:00
Arthur Meyre
6f77bea5e0
feat(zk): add metadata management to v1
...
- proof function takes an additional u8 slice which is hashed in the proof
the verification cannot happen without the same metadata being provided
again
2024-09-11 18:06:25 +02:00
Arthur Meyre
e4f72dab30
chore(ci): make a check for wasm bindings with and without zk-pok
2024-09-11 18:06:25 +02:00
Arthur Meyre
7ed3fded4a
chore(ci): the detect handles option from jest is freezing the runner
...
- trying to find the cause is making the problem worse, reverting
2024-09-11 17:25:40 +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
c0d98394fa
refactor(integer): add compression key types
2024-09-11 13:53:04 +02:00
Mayeul@Zama
93ff6992e2
refactor(all): refactor oprf integer and hl APIs
2024-09-11 10:49:39 +02:00
Pedro Alves
2a4026c761
fix(gpu): fix some edge-cases (and booleans) on compression
2024-09-10 23:11:20 +02:00
Pedro Alves
39c424b14d
chore(gpu): add debug/release modes
2024-09-09 14:02:10 +02:00
Guillermo Oyarzun
46a7a3b43b
refactor(gpu): avoid synchronizations in the keybundle
2024-09-09 14:01:15 +02:00
Mayeul@Zama
38b5759e88
chore(all): fix new lints
2024-09-09 11:57:45 +02:00
Mayeul@Zama
d6f8e59394
chore(all): update toolchain
2024-09-09 11:57:45 +02:00
dependabot[bot]
a95db07003
chore(deps): bump tj-actions/changed-files from 45.0.0 to 45.0.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 45.0.0 to 45.0.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](40853de9f8...e9772d1404 )
---
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 >
2024-09-09 11:05:21 +02:00
David Testé
6544e6f6a3
chore(ci): use python script to send benchmark results
...
Using this script simplify writing of corresponding workflow step.
Moreover, now when an upload fails it translate into a workflow
failure.
2024-09-09 11:04:06 +02:00
Agnes Leroy
1d549dfd8a
chore(gpu): pass over all cuda bind
2024-09-06 17:47:59 +02:00
Arthur Meyre
019548daa5
chore(ci): add a flag to jest to indicate what might be stuck when running
2024-09-06 17:41:22 +02:00
Arthur Meyre
26b666955a
chore(ci): timeout wasm bench and test at the GitHub runner level
...
- avoids a stuck runner for 6 hours
- actions timeouts are slightly larger than the test runner timeout to
have a chance to get a log out
2024-09-06 17:41:22 +02:00
Arthur Meyre
ce9da12e65
feat(zk): implement faster pke proof
...
- original work by Sarah El kazdadi
co-authored-by: sarah el kazdadi <sarah.elkazdadi@zama.ai >
2024-09-06 14:25:57 +02:00
Arthur Meyre
32b45ac4bc
chore(js): increase timeout for ZK test as it can be surpassed
...
- this seemed to cause the test runner to hang forever
- also add a timeout in the GitHub workflow, to avoid having the test
runner wait forever (or in this case 6 hours because of default timeout)
2024-09-06 14:19:07 +02:00
Arthur Meyre
26055b236e
feat(tfhe): allow unpacking packed compact ciphertext lists in js/wasm
2024-09-06 14:19:07 +02:00
Agnes Leroy
ce9e355c15
chore(gpu): reduce the amount of weekly multi-gpu bench
2024-09-06 11:55:34 +02:00
tmontaigu
85cc638c62
chore(gpu): fix bad merge
2024-09-06 10:21:00 +02:00
Agnes Leroy
d454b5386b
chore(gpu): remove device synchronization in drop for CudaVec
2024-09-05 14:13:06 +02:00
tmontaigu
426f3bd192
feat(hlapi): add tag system
...
Tag
The `Tag` allows to store bytes alongside of entities (keys, and ciphertext)
the main purpose of this system is to `tag` / identify ciphertext with their keys.
* When encrypted, a ciphertext gets the tag of the key used to encrypt it.
* Ciphertexts resulting from operations (add, sub, etc.) get the tag from the ServerKey used
* PublicKey gets its tag from the ClientKey that was used to create it
* ServerKey gets its tag from the ClientKey that was used to create it
User can change the tag of any entities at any point.
BREAKING CHANGE: Many of the into_raw_parts and from_raw_parts changed
to accommodate the addition of the `tag``
2024-09-05 10:32:35 +02:00
tmontaigu
4c707e79d8
feat(hlapi): bind cuda's trailing/leading_ones/zeros, ilog2
2024-09-04 19:38:14 +02:00
Arthur Meyre
e1afb8126d
chore: bump version to 0.8.0-alpha.4
2024-09-04 17:30:43 +02:00
Agnes Leroy
0d1ef0af7e
chore(gpu): add ilog2 bench
2024-09-04 17:03:20 +02:00
Arthur Meyre
15e3474cda
feat(pbs): slightly improve f64 pbs perf
...
co-authored-by: sarah el kazdadi <sarah.elkazdadi@zama.ai >
2024-09-03 19:31:14 +02:00
Arthur Meyre
10be6f9423
chore(ci): update node project packages
2024-09-03 17:14:36 +02:00
David Testé
c521c2ca2e
chore(ci): avoid running integer tests on push to internal repo
2024-09-03 15:29:15 +02:00
David Testé
39c46056f6
chore(ci): rename benchmark workflows to ease file navigation
2024-09-03 10:34:14 +02:00
Pedro Alves
aa2b27460c
fix(gpu): update the internal benchmark tool for the TBC pbs
2024-09-02 13:16:18 +02:00
dependabot[bot]
c258d53625
chore(deps): bump actions/upload-artifact from 4.3.6 to 4.4.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.3.6 to 4.4.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](834a144ee9...50769540e7 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-09-02 09:34:34 +02:00
tmontaigu
8ddee20a57
feat(tfhe): add get_kind_of to CompactCiphertextList
...
This adds the ability to query the length and types
contained in a CompactCiphertextList and ProvenCompactCiphertextList
without having to expand or verify the proof(s)
2024-08-30 21:01:46 +02:00
tmontaigu
1d786b7202
feat(wasm): bind CompactListExpander::get_kind_of
...
And other things to allow wasm users to explore
what kind of data is stored in the compact list.
2024-08-30 21:01:46 +02:00
tmontaigu
7267d60e01
feat(integer): implement unsigned_overflowing_scalar_sub
2024-08-29 19:09:48 +02:00
Arthur Meyre
0148a6ffc8
chore(tfhe): update dependencies with breaking changes
...
- concrete-fft to 0.5 and concrete-ntt 0.2.0 due to rust AVX512 breaking
change (fix for bad args in function)
- dyn-stack to 0.10 due to concrete-fft update
2024-08-29 17:36:19 +02:00
tmontaigu
63571a07ae
feat(integer): add is_even/is_odd functions
...
These ones are pretty simple and so are also directly done for GPU
2024-08-29 14:24:40 +02:00
Arthur Meyre
6e2908ad4e
chore(bench): fix CRS size for integer ZK bench
2024-08-29 09:41:35 +02:00
sarah el kazdadi
d3d06c905f
feat(tfhe): replace asm with rust intrinsics
2024-08-29 09:41:20 +02:00
Arthur Meyre
051f33f166
chore(hl): remove second server key generation
...
- bad merge led to two server key generations in the HL API, fix that
2024-08-28 15:25:35 +02:00
Mayeul@Zama
11a8f97a1c
chore(all): use destructuring in conformance
2024-08-26 17:28:05 +02:00
tmontaigu
35a9c323a7
chore(integer): make remaining non-parallel test use defined test cases
...
This makes the remaining non-parallel ops implementation use the same
test cases that are used for parallel implementations.
There are still some test that do not share the test case but its either
because they do not have a parallel impl (not interesting to have) or
when its tests about encryption/decryption
Closes https://github.com/zama-ai/tfhe-rs-internal/issues/265
2024-08-26 10:13:11 +02:00
dependabot[bot]
641f47b775
chore(deps): bump tj-actions/changed-files from 44.5.7 to 45.0.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.5.7 to 45.0.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](c65cd88342...40853de9f8 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-08-26 09:52:06 +02:00
tmontaigu
456d0ced1b
chore(integer): addition test based on trivial inputs
...
This adds `overflowing_add` and `add` tests that
are on trivial inputs. As these are faster to run they
can be more extensive than on true encryptions
This also binds the advanced_add_assign functions tests
to include overflow computation
On a standard laptop with 1 test thread it takes ~7 minutes
to run these trivial tests
2024-08-23 16:28:40 +02:00
tmontaigu
358bcc9a22
feat(integer): implement sub_assign_with borrow
...
To get the same kind of speed ups for unsigned_overflow
as we got in previous commits that changed the carry propagation
algorithm
2024-08-21 09:56:40 +02:00
Pedro Alves
27a4564d83
fix(gpu): fix compression benchmarking
2024-08-20 17:46:20 -03:00
Arthur Meyre
296e419f6c
chore(ci): update tfhe-lints to more recent toolchain
2024-08-20 13:02:12 +02:00
Arthur Meyre
e1a25a10ac
chore(docs): fix README link to getting started
2024-08-19 15:35:52 +02:00
Arthur Meyre
d9349b3357
chore(ci): update nightly toolchain
2024-08-19 15:35:52 +02:00
Arthur Meyre
68e4ac4896
chore(ci): fix lints for new nightly toolchain
2024-08-19 15:35:52 +02:00
tmontaigu
3f318a2046
feat(wasm): add missing push_u{512,1024,2048}
...
This adds the missing push functions for some big
uint type that the fhEVM needs
2024-08-19 10:12:53 +02:00
tmontaigu
d1380794ed
chore(tfhe): bump version to 0.8.0-alpha.3
2024-08-19 10:12:53 +02:00
Pedro Alves
fe5641ef6d
feat(gpu): implement CUDA-based Radix Integer compression and public functional packing keyswitch
2024-08-16 15:44:34 -03:00
Arthur Meyre
3397aa81d2
chore(ci): update node to 22.6
2024-08-14 13:42:14 +02:00
Arthur Meyre
8f10f8f8db
chore(ci): reduce bench loops for WASM compressed server key
...
- excessive loops seemed to trigger a crash likely due to some memory
exhaustion/fragmentation
2024-08-14 13:42:14 +02:00
Arthur Meyre
92be95c6b8
chore(ci): fix parsing for integer benchmarks
2024-08-14 13:42:14 +02:00
Arthur Meyre
990c4d0380
chore(ci): do not run all steps on slow runners
2024-08-14 13:42:14 +02:00
Arthur Meyre
1d5abfd5ea
chore(ci): do not run tests nightly, on push only if relevant files changed
2024-08-14 13:42:14 +02:00
Arthur Meyre
dfd1beeb47
chore(ci): avoid concurrency lock for PKE ZK benchmarks
...
- sharing a concurrency group on merge to main means two sequential merges
will lock the second one while it waits for the first to complete
2024-08-14 13:42:14 +02:00
Arthur Meyre
43a007a2fa
chore(ci): make sure the newline linter runs
2024-08-14 13:42:14 +02:00
Arthur Meyre
54faf64ecd
chore(tfhe): bump tfhe-versionable version to 0.2.1
2024-08-14 13:17:21 +02:00
Arthur Meyre
8fe7f9c3cb
chore(ci): add workflow to publish tfhe-versionable
2024-08-14 13:17:21 +02:00
Arthur Meyre
9ed65db03d
chore(ci): csprng release workflow misc fixes
2024-08-14 13:17:21 +02:00
tmontaigu
9413d3e722
feat(integer): improve {overflowing_}scalar_add/sub
2024-08-14 12:30:53 +02:00
Ben
2000feb87e
chore(CI): update LE commit
2024-08-13 14:56:27 +01:00
tmontaigu
594a5cee25
fix(integer): remove double carry prop in sub
...
The subtraction is done via addition of the negation,
the negation is done via unchecked_neg, this will make the
first block have a carry.
Then we called add_assign_with_carry_parallelized which did
a carry propagation on the rhs which here is the negated value,
meaning the subtraction would do 2 carry propagation.
To fix that we directly call the lower function.
2024-08-13 14:45:57 +02:00
Nicolas Sarlin
401cfc5fd0
feat(hl): add scalar bitslice operation
2024-08-13 10:07:36 +02:00
Nicolas Sarlin
769c725c67
feat(integer): Adds bitslice operation
2024-08-13 10:07:36 +02:00
dependabot[bot]
07d143e032
chore(deps): bump tj-actions/changed-files from 44.5.6 to 44.5.7
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.5.6 to 44.5.7.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](6b2903bdce...c65cd88342 )
---
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 >
2024-08-12 18:16:17 +02:00
dependabot[bot]
d88bba761b
chore(deps): bump actions/upload-artifact from 4.3.4 to 4.3.6
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.3.4 to 4.3.6.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](0b2256b8c0...834a144ee9 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-08-12 15:06:40 +02:00
dependabot[bot]
eaa1d07f90
chore(deps): bump dtolnay/rust-toolchain
...
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) from 21dc36fb71dd22e3317045c0c31a3f4249868b17 to 7b1c307e0dcbda6122208f10795a713336a9b35a.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](21dc36fb71...7b1c307e0d )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-08-12 15:06:32 +02:00
Agnes Leroy
663322cfa5
chore(gpu): remove omp from div
2024-08-09 17:49:20 +02:00
Agnes Leroy
ddd6a6e136
chore(gpu): remove omp from signed overflow add_sub and scalar comparisons
2024-08-09 17:49:20 +02:00
Agnes Leroy
abc39f0a3e
chore(gpu): remove omp loop from scalar_shift
2024-08-09 17:49:20 +02:00
Agnes Leroy
8b7556667b
chore(gpu): remove omp in cmux
2024-08-09 17:49:20 +02:00
Guillermo Oyarzun
67b1607773
feat(gpu): implement ilog2, trailing and leading zeros and ones on GPU
2024-08-09 13:56:00 +02:00
Agnes Leroy
5340859003
chore(ci): transfer all GPU CI to hyperstack
2024-08-07 17:08:13 +02:00
Agnes Leroy
a26e68c3bc
chore(gpu): remove some host decoration and duplicated def
2024-08-06 21:01:24 +02:00
Agnes Leroy
0dd622ebb9
chore(gpu): refactor tree_add_chunks
2024-08-06 14:31:19 +02:00
Agnes Leroy
d69dd20079
chore(gpu): define higher values for the sm size based on compute capability
2024-08-06 14:06:38 +02:00
Nicolas Sarlin
80fe45f354
test(versionable): test Versionize with various rust types
2024-08-05 18:21:07 +02:00
Nicolas Sarlin
33114e3946
feat(versionable): impl Versionize for Wrapping<T>
2024-08-05 18:21:07 +02:00
Nicolas Sarlin
ede0745b7f
feat(versionable): Add support for statically sized arrays
2024-08-05 18:21:07 +02:00
Guillermo Oyarzun
bc4cd08e7a
refactor(gpu): Specify launch bounds on kernels
2024-08-05 17:56:42 +02:00
Nicolas Sarlin
b03921f1ae
chore(doc): ignore data repo in check_md_docs_are_tested
2024-08-05 16:01:39 +02:00
Agnes Leroy
70f7af06f5
refactor(gpu): configure GPU parameters automatically to multi-bit
2024-08-05 15:02:18 +02:00
Agnes Leroy
a9bb6eac5f
fix(gpu): fix argument in scratch mul
2024-08-02 16:58:48 +02:00
Agnes Leroy
4fa9b243e0
fix(gpu): fix multi-gpu error in division
2024-08-02 15:36:43 +02:00
Agnes Leroy
b88f561358
fix(gpu): fix full prop with 1 radix block
2024-08-02 13:06:12 +02:00
Mayeul@Zama
0e71ca6c1c
fix(hlapi): fix Client/Server Key versionning
2024-08-02 11:32:39 +02:00
Pedro Alves
3ba61c0694
refactor(gpu): fix sample extraction when nth > 0 and keep input unchanged
2024-08-02 11:10:04 +02:00
Nicolas Sarlin
781f78c442
feat(versionable): impl Versionize for Box<[T]> and ABox<[T]>
2024-08-02 10:53:39 +02:00
Nicolas Sarlin
ebfc1ea8ac
feat(versionable): impl Versionize for HashSet/HashMap
2024-08-02 10:53:39 +02:00
Agnes Leroy
7fa9f33776
refactor(gpu): remove lwe chunk size argument
2024-08-02 09:12:00 +02:00
Kelong Cong
5547d92c79
refactor(gpu): remove max_shared_memory from pbs arguments
...
Always use max shared memory from device 0 to configure the
kernels, to avoid bugs with multi-GPU configurations
2024-08-01 11:18:52 +02:00
Kelong Cong
351fc476b5
chore(versionable): add Send and Sync marker traits to Err type
2024-07-31 14:43:18 +02:00
Agnes Leroy
53cd3c8d0f
chore(gpu): do no reset shared memory size for tree_add_chunks
2024-07-31 14:38:38 +02:00
Agnes Leroy
0a2ad8ca72
chore(gpu): remove remaining par_iter over gpu_indexes
...
Rename some variables to try and make the code clearer
2024-07-31 08:50:16 +02:00
Agnes Leroy
eba4f6a89c
chore(gpu): use PCIe H100 for multi-gpu bench
2024-07-31 08:50:07 +02:00
Agnes Leroy
4b933cf421
chore(gpu): split hyperstack tests
2024-07-31 08:50:07 +02:00
Agnes Leroy
3303cd8568
chore(gpu): refactor template and clean arguments for the PBS
2024-07-31 08:49:39 +02:00
tmontaigu
f937524f64
feat(integer): improve carry propagation algorithm
2024-07-26 17:38:35 +02:00
Agnes Leroy
e7da96271c
fix(gpu): fix scalar rotate and add some checks
2024-07-26 17:03:15 +02:00
Agnes Leroy
0cc716544b
fix(gpu): fix scalar shifts
2024-07-26 17:03:15 +02:00
Arthur Meyre
f53087b5ed
test(integer): add a case which was previously crashing
2024-07-26 16:41:43 +02:00
Arthur Meyre
bcefe977c9
chore(shortint): add more granular 2_2 TUniform parameters
2024-07-26 16:41:43 +02:00
Arthur Meyre
73ea24fd51
refactor(shortint): refactor the shortint keyswitching code
...
- this manages better all the cases we encouter, we force a refresh PBS in
all cases for now which is less optimal in certain cases but allows to be
safe in cases where keyswitches might be chained
2024-07-26 16:41:43 +02:00
Agnes Leroy
6f1a9bdaa5
chore(gpu): simplify 4090 bench workflow
2024-07-26 14:17:40 +02:00
Agnes Leroy
7834f699d0
chore(gpu): add checks in hillis&steele to avoid wrong memory access
2024-07-26 13:56:32 +02:00
Beka Barbakadze
b81692b2df
chore(gpu): add comments inside host_integer_sum_ciphertexts_vec_kb function
2024-07-26 13:55:23 +02:00
Mayeul@Zama
8748d1cc22
chore(hlapi): remove Wop
2024-07-26 12:03:13 +02:00
Mayeul@Zama
dbb13aa35e
chore(trivium): remove Wop usage
2024-07-26 12:03:13 +02:00
Mayeul@Zama
53f4c9bfc7
feat(integer): add reverse_bits
2024-07-26 12:03:13 +02:00
Agnes Leroy
4021812248
fix(gpu): fix memory error in mul
2024-07-26 10:50:32 +02:00
Nicolas Sarlin
190c5e7bb7
fix(ci): auto merge job used wrong variable
2024-07-26 10:22:18 +02:00
Arthur Meyre
2004333d6e
chore(tfhe): bump version to 0.8.0.alpha.2
2024-07-25 18:47:15 +02:00
Arthur Meyre
e7c06ef956
feat(integer): add raw parts API for the KeySwitchingKeyMaterial
2024-07-25 18:47:15 +02:00
Arthur Meyre
7b14fe6fee
feat(shortint): add raw parts API for the KeySwitchingKeyMaterial
2024-07-25 18:47:15 +02:00
Arthur Meyre
55f4df97b4
chore(core): have the CiphertextModulusKind enum in the prelude
...
- makes working with CiphertextModulus and the kind method easier
2024-07-25 18:47:15 +02:00
Nicolas Sarlin
2144ec8107
chore(ci): automatically merge pr in the data repo
2024-07-25 16:49:05 +02:00
Nicolas Sarlin
fb862ddbbc
chore(ci): use specific workflow for data compatibility tests
2024-07-25 16:49:05 +02:00
Nicolas Sarlin
ab0b01f7e1
chore(hl): add data tests for heterogeneous lists
2024-07-25 16:49:05 +02:00
Arthur Meyre
6c4318b8bb
chore(ci): auto data branch
2024-07-25 16:49:05 +02:00
Agnes Leroy
d3f2ecd367
chore(gpu): add nvidia-smi call in all hyperstack workflows
2024-07-25 15:10:23 +02:00
Pedro Alves
19dc0f02f9
refactor(gpu): refactor sample extract and modulus switch to match CPU's version
2024-07-25 11:51:07 +02:00
Nicolas Sarlin
95d50368fa
doc(integer): fix typo in shl doc
2024-07-25 11:43:47 +02:00
Mayeul@Zama
c117798b10
chore(integer): add compression benches
2024-07-25 11:41:02 +02:00
Mayeul@Zama
da0934d4bc
refactor(integer): compression uses ClientKey instead of RadixClientKey
2024-07-25 11:41:02 +02:00
Agnes Leroy
b522de3273
fix(gpu): fix add with 1 block
2024-07-25 11:39:45 +02:00
Agnes Leroy
9205703454
chore(gpu): fix hardware name in multi-gpu workflows
2024-07-25 11:34:58 +02:00
Arthur Meyre
a1b92a6db8
chore(tfhe)!: remove dependency on the dynamic buffer lib
...
- this was required in a semver trick setting and is not needed anymore
BREAKING CHANGE:
the way to build the C API has changed and no longer requires the dynamic
buffer lib
2024-07-24 17:30:46 +02:00
Arthur Meyre
8d7c45bf17
chore(ci): remove semver-trick era version for TFHE_SPEC
2024-07-24 17:30:46 +02:00
Arthur Meyre
91f05b00b9
refactor(core): make GGSW encryption consistent
...
- functions take un-encoded values, reflect that by taking Cleartext
instead of Plaintext
2024-07-24 13:39:40 +02:00
Arthur Meyre
ebb11b15c4
chore(docs): add links to CompressedServerKey in several places
...
- a ServerKey can be fairly large, and users may want to send the key over
the network so give indications about the CompressedServerKey
2024-07-23 19:18:53 +02:00
Arthur Meyre
18270714d8
chore(bench): record the size of the proof as well
...
- this is not perfect as one size is serialized, so compression can happen
while the other is an in memory size
2024-07-23 15:59:06 +02:00
Arthur Meyre
6c6525b1ea
chore: add the ability to get the in memory size of a proof in proven lists
2024-07-23 15:59:06 +02:00
Arthur Meyre
79f8971712
chore(ci): properly manage all events for our benchmarks
2024-07-23 15:59:00 +02:00
Arthur Meyre
17db09bf2a
chore(ci): do not run schedule benchmarks not on our repo
2024-07-23 15:59:00 +02:00
Arthur Meyre
fc9bfcaf61
chore(ci): do not run CPU integer tests if not on our repo
2024-07-23 15:59:00 +02:00
Arthur Meyre
d93c412dc5
chore(ci): only run CUDA integer tests on schedule on our repo
2024-07-23 15:59:00 +02:00
Arthur Meyre
ea222007d8
chore(ci): run 4090 bench on schedule only on our repository
2024-07-23 15:59:00 +02:00
Titouan Tanguy
3470d6c2d8
chore: bump version to alpha.1
2024-07-23 10:00:03 +02:00
Titouan Tanguy
fffdc3862e
feat(hlapi): Get num_bits from FheUint* types
2024-07-23 10:00:03 +02:00
Agnes Leroy
d9eca01631
fix(gpu): dispatch/gather inputs and outputs to the ks and pbs on all GPUs
2024-07-23 08:48:48 +02:00
Beka Barbakadze
95ef13f6ce
feat(gpu): Add signed_overflowing_scalar_add and signed_overflowing_scalar_sub
2024-07-22 16:45:47 +02:00
Beka Barbakadze
230fa5a8f0
feat(gpu): implement signed_overflowing_sub
2024-07-22 09:31:54 +02:00
Agnes Leroy
b443855b8b
fix(gpu): add missing delete
2024-07-22 09:30:48 +02:00
dependabot[bot]
ba80c33328
chore(deps): bump actions/download-artifact from 4.1.7 to 4.1.8
...
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 4.1.7 to 4.1.8.
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](65a9edc588...fa0a91b85d )
---
updated-dependencies:
- dependency-name: actions/download-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-07-22 09:11:34 +02:00
dependabot[bot]
e5dc45c084
chore(deps): bump tj-actions/changed-files from 44.5.5 to 44.5.6
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.5.5 to 44.5.6.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](cc733854b1...6b2903bdce )
---
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 >
2024-07-22 09:11:22 +02:00
dependabot[bot]
b450f0eb30
chore(deps): bump actions/upload-artifact from 4.3.3 to 4.3.4
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v4.3.3...0b2256b8c012f0828dc542b3febcab082c67f72b )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-07-22 09:11:10 +02:00
Arthur Meyre
7479cc826b
chore(bench): increase wasm bench timeout
2024-07-19 14:00:20 +02:00
Arthur Meyre
b2beac2d2c
chore(ci): do not trigger notification if bench did not run
...
- only trigger on failure if benchmarks ran
2024-07-19 13:55:53 +02:00
Arthur Meyre
b700416597
chore(bench): measure proof size for zk benchmarks
...
Also clean key sizes measurements since they are now done in
shortint_key_sizes.rs
Co-authored-by: David Testé <david.teste@zama.ai >
2024-07-19 13:41:29 +02:00
David Testé
42609987a1
chore(examples): measure more shortint key sizes
2024-07-19 13:41:29 +02:00
David Testé
5b37a838ba
chore(shortint): add constructor for compressed key switching key
2024-07-19 13:41:29 +02:00
Guillermo Oyarzun
c1fcd95d72
refactor(gpu): add restrict keyword
2024-07-19 13:08:39 +02:00
Arthur Meyre
ffb8b4f930
chore(ci): fix nvm version usage for web parallel tests
2024-07-19 10:27:05 +02:00
Nicolas Sarlin
3b8dace975
chore(backward): allow custom data repo branch for tests
2024-07-19 09:42:03 +02:00
Agnes Leroy
44f326824f
chore(gpu): remove stream callbacks
2024-07-19 09:05:24 +02:00
Nicolas Sarlin
f41d133fc7
fix(hl): wrong Named impl for CompressedCiphertextList
2024-07-18 15:23:55 +02:00
David Testé
52d43961b8
chore(ci): add should-run capability for gpu workflows
2024-07-18 15:21:38 +02:00
Arthur Meyre
35b89704aa
chore(ci): do not block integer tests due to concurrency on push to main
2024-07-18 14:28:43 +02:00
Arthur Meyre
b578cf19c2
chore(ci): fix lockfile management
2024-07-18 13:03:53 +02:00
Arthur Meyre
dd68ce67ad
chore(ci): pin node version, 22.5 is affected by a bug
2024-07-18 11:23:04 +02:00
David Testé
f8d8cc90fe
chore(ci): adapt benchmarks workflows to use slab-github-runner
2024-07-18 10:18:34 +02:00
aquint-zama
eac37a7749
chore: add SLSA for tfhe crate
2024-07-17 18:15:41 +02:00
aquint-zama
4342efecc8
chore: add SLSA provenance for NPM artifacts
...
# Conflicts:
# .github/workflows/make_release.yml
2024-07-17 18:15:41 +02:00
Nicolas Sarlin
a3ec84729d
feat(hl): add serialize/versionize for hl KSK
2024-07-17 17:49:08 +02:00
Arthur Meyre
90d6b221d7
chore(tfhe): bump version to pre release
2024-07-17 16:52:52 +02:00
Arthur Meyre
b1491734b2
chore(cuda): bump version to pre-release
2024-07-17 16:52:52 +02:00
Arthur Meyre
436dd6a687
chore(zk): bump version to pre-release
2024-07-17 16:52:52 +02:00
Agnes Leroy
39534cb4c4
chore(gpu): avoid broadcasting lut twice for bitops
2024-07-17 16:34:52 +02:00
Agnes Leroy
723443589d
chore(gpu): fix some int_radix_luts numbers of blocks
2024-07-17 16:34:52 +02:00
David Testé
d58a1b68cb
chore(ci): update slab-github-runner action
2024-07-17 16:16:52 +02:00
Guillermo Oyarzun
b29c477462
feat(gpu): Add missing asserts
2024-07-17 15:26:06 +02:00
Agnes Leroy
bed3d88426
chore(gpu): remove unnecessary templates
2024-07-17 15:16:10 +02:00
Nicolas Sarlin
35201b06b6
chore(versionable): prepare release 0.2.0
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
c8ddc0f008
chore(versionable)!: Impl std::error::Error for UnversionizeError
...
BREAKING CHANGE: The `Upgrade` trait now requires to specify the Error type as
an associated type (similar to `TryFrom`)
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
4d934f512a
chore(backward): run custom tfhe-rs lints in the ci
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
52b0907c47
feat(all): versionize missing types
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
8ea647dc26
feat(versionable): impl Versionize for Arc
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
8f72677fa6
chore(backward): add exceptions to missing versioning lint
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
36a58cf16c
chore(backward): add custom lint to detect missing Versionize implem
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
de79f3a280
feat(versionable): support more tuples
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
e9051419cd
refactor(versionable)!: fix signature of versionize_owned
...
BREAKING CHANGE: `versionize_owned` now takes its argument by value.
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
ac37c3883d
chore(ci): allow '!' for breaking changes in commit messages
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
72fb770308
chore(versionable): add automatically_derived attribute
...
For the generated code
2024-07-17 13:44:30 +02:00
Nicolas Sarlin
34d07f5558
chore(backward): use shallow clone for backward compat tests
2024-07-17 13:44:30 +02:00
Agnes Leroy
4176b3dcb5
chore(gpu): clean overflowing sub memory
2024-07-17 13:35:22 +02:00
Agnes Leroy
abf9c3efb7
fix(gpu): add missing delete
2024-07-17 09:21:05 +02:00
David Testé
ebf1fd9e84
chore(ci): fix test filtering for gpu multi-bit parameters set
2024-07-16 18:06:42 +02:00
Arthur Meyre
cef055b7f3
chore(ci): fix the no internal test patch
...
- condition was not precise enough and we were still running tests on push
to internal main
2024-07-16 17:48:37 +02:00
Beka Barbakadze
d65a4d8690
feat(gpu): implement signed_overflowing_add
2024-07-15 15:29:40 +02:00
Arthur Meyre
928bc13ed2
chore(bench): create modules to avoid headaches with features in utils
2024-07-15 13:54:47 +02:00
Arthur Meyre
c81abae989
chore(ci): do not send notification if H100 tests are skipped
2024-07-15 13:54:27 +02:00
Arthur Meyre
aff50fcb85
chore(ci): do not run integer tests on push if not on our repo
2024-07-15 13:54:27 +02:00
Agnes Leroy
757606fdb4
chore(gpu): pin bsk host memory
2024-07-15 11:03:21 +02:00
Agnes Leroy
7542c89679
chore(gpu): create lut once for all layers in sum_ct_vec
2024-07-15 11:03:06 +02:00
Agnes Leroy
dd74063959
refactor(gpu): make it possible to reuse memory in sum_ct_vec
2024-07-15 11:03:06 +02:00
dependabot[bot]
f6845a988b
chore(deps): update zama-ai/slab-github-runner requirement to 9e939a10db25c698cddf0da0f4f015bd47bb6838
...
Updates the requirements on [zama-ai/slab-github-runner](https://github.com/zama-ai/slab-github-runner ) to permit the latest version.
- [Commits](9e939a10db )
---
updated-dependencies:
- dependency-name: zama-ai/slab-github-runner
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-07-15 10:54:05 +02:00
Agnes Leroy
6a3ff21de2
chore(gpu): fix unsigned integer tests
2024-07-15 09:58:33 +02:00
David Testé
74cafd0e9d
chore(bench): benchmark oprf function against all available precisions
2024-07-12 19:14:38 +02:00
David Testé
d8241942a6
chore(ci): run fast default ops for multi-bit gpu benchmarks
2024-07-12 18:03:13 +02:00
David Testé
46f0bf442a
chore(bench): add target with deduplicated default integer ops
...
Some operations share the same underlying implementations (e.g.
max/min, left_shift/right_shift). Benchmarking these operations
can be considered as duplicate for developpers looking for fast
feedback on their changes.
Scalar operations are not included in this subset.
2024-07-12 18:03:13 +02:00
David Testé
81c837c837
chore(ci): check for files changes to run fast aws tests
2024-07-12 16:53:03 +02:00
David Testé
7b96f55900
chore(ci): run only fast integer tests in pull-request
...
A nightly run has been added to run tests against message_3_carry_3* parameters set.
2024-07-12 12:21:26 +02:00
David Testé
f19e892053
chore(ci): add nightly integer tests filter
...
Nightly integer tests would run only on message_3_carry_3_* parameters set.
2024-07-12 12:21:26 +02:00
David Testé
2a989d64f9
chore(ci): run integer fast tests only on message_2_carry_2 parameters
2024-07-12 12:21:26 +02:00
David Testé
eeb4accf66
chore(ci): do not run multi-bit tests in fast aws test workflow
2024-07-12 12:21:26 +02:00
Agnes Leroy
0370bf6a3f
chore(gpu): reduce integer bench time
2024-07-11 17:37:35 +02:00
Arthur Meyre
a62c19b735
chore(tfhe): bump version to 0.8.0 and CUDA backend to 0.4.0
2024-07-11 13:00:27 +02:00
Arthur Meyre
721a5a57ba
refactor(integer): improve CompressedPublicKey encryption performance
2024-07-11 12:58:37 +02:00
Arthur Meyre
3f101d5e8b
refactor(tfhe): update native_crt encryption primitives to use new types
2024-07-11 12:58:37 +02:00
David Testé
e01f4abb65
chore(ci): update slab-github-runner to latest version
2024-07-11 12:16:07 +02:00
David Testé
a2ca189283
chore(ci): check labels to launch only on approval
...
Any other label added other than "approved" would trigger these
workflows which is not desired.
2024-07-11 08:48:08 +02:00
David Testé
e0e9668b0b
chore(ci): use large ubuntu runner to get more disk space
2024-07-10 16:44:42 +02:00
David Testé
bd23d18c9d
chore(ci): do not cancel integer tests on main branch
2024-07-10 09:29:26 +02:00
Agnes Leroy
491112ffc1
refactor(gpu): start releasing memory before cleanup in scalar mul
2024-07-10 08:54:57 +02:00
David Testé
83c3dadb5d
chore(ci): upgrade node packages to latest versions
2024-07-09 17:38:50 +02:00
David Testé
7692643ca4
chore(ci): upgrade node version to 22
2024-07-09 17:38:50 +02:00
David Testé
29cf2b83b8
chore(ci): lock version of wasm-pack to 0.13.0
...
It also fixes import in generated file otherwise usage of
wasm-pack would result in a broken build.
2024-07-09 17:38:50 +02:00
Arthur Meyre
1b47c74360
chore(doc): remove some leftover whitespace
2024-07-09 17:11:12 +02:00
David Testé
cd329729d7
chore(ci): force test-threads value on gpu integer tests
2024-07-09 17:08:15 +02:00
David Testé
8ec24d1bb7
chore(ci): optimize triggering of gpu workflows
2024-07-09 17:08:15 +02:00
Mayeul@Zama
13f61e4d67
chore(ci): add rustdoc clippy to clippy_all and clippy_fast target
...
- allows to run the rustdoc check in pcc
2024-07-09 14:08:34 +02:00
Mayeul@Zama
72475a385e
chore(all): add makefile command to clippy lint doctests
...
- The command exits with a warning on windows as it does not work at the
moment
2024-07-09 14:08:34 +02:00
Mayeul@Zama
cc8f2cb4dc
chore(all): fix doctests clippy lints
2024-07-09 14:08:34 +02:00
David Testé
a153ea98ae
chore(bench): fix filtering for unsigned integer cuda benchmarks
2024-07-09 10:10:51 +02:00
David Testé
60773497fe
chore(bench): add benchmarks for integer oprf
2024-07-09 09:48:50 +02:00
David Testé
d632c916c2
chore(ci): lock version of wasm-pack to fix tfhe-rs build
2024-07-08 18:25:08 +02:00
Arthur Meyre
6e4ea82db8
chore(cuda): disable build if cbindgen is running to side step build bug
...
- also improves performance, as long as the cuda bacend has no macro usage
we are good to keep this trick
2024-07-08 14:25:03 +02:00
Arthur Meyre
a7df399de3
chore(ci): update CMake version to 3.29.6 in CI
2024-07-08 14:25:03 +02:00
Arthur Meyre
90dc9a004e
chore(ci): use $(MAKE) in CMake to manage jobserver auth properly
2024-07-08 14:25:03 +02:00
Mayeul@Zama
a4508f8396
chore(core): fix __profiling flag
2024-07-08 14:25:03 +02:00
Mayeul@Zama
c8e1998167
chore(hlapi): fix clippy lints
2024-07-08 14:25:03 +02:00
Mayeul@Zama
85d3ba6238
fix(wasm): return error instead of unwrap
2024-07-08 14:25:03 +02:00
Mayeul@Zama
e9772953bf
chore(core): fix tarpaulin flag
2024-07-08 14:25:03 +02:00
Mayeul@Zama
c407f3d5a6
chore(all): fix clippy lints
2024-07-08 14:25:03 +02:00
Mayeul@Zama
5f0bff98dd
chore(all): fix clippy::doc_lazy_continuation
2024-07-08 14:25:03 +02:00
Mayeul@Zama
634b7ada32
chore(all): update nightly toolchain
2024-07-08 14:25:03 +02:00
David Testé
734edb3bdc
chore(ci): run slack notification on ubuntu for hyperstack tests
2024-07-08 13:46:03 +02:00
David Testé
ee181506c4
chore(bench): fix naming pattern for cuda overflowing scalar add
2024-07-08 13:46:03 +02:00
yuxizama
cf1576efbd
chore(doc): add the GPU video tutorial to doc
2024-07-08 09:47:49 +02:00
dependabot[bot]
d215359a75
chore(deps): bump actions/upload-artifact from 4.3.3 to 4.3.4
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](65462800fd...0b2256b8c0 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-07-08 09:28:54 +02:00
dependabot[bot]
1b5d5eeb94
chore(deps): bump actions/checkout from 4.1.6 to 4.1.7
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4.1.6...692973e3d937129bcbf40652eb9f2f61becf3332 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-07-08 09:28:42 +02:00
dependabot[bot]
bbaaa53656
chore(deps): update dtolnay/rust-toolchain requirement to 21dc36fb71dd22e3317045c0c31a3f4249868b17
...
Updates the requirements on [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) to permit the latest version.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](21dc36fb71 )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-07-08 09:28:35 +02:00
dependabot[bot]
88ad88e71c
chore(deps): bump tj-actions/changed-files from 44.5.3 to 44.5.5
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.5.3 to 44.5.5.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](eaf854ef0c...cc733854b1 )
---
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 >
2024-07-08 09:28:25 +02:00
David Testé
f338df0079
chore(ci): fix conditional expression for integer workflows
2024-06-28 17:57:32 +02:00
Mads Marquart
1e0ed88767
chore(concrete-csprng): bump version to 0.4.1
2024-06-28 17:43:20 +02:00
Mads Marquart
97ebccbb5b
fix(concrete-csprng): handle multi-valued target_family
2024-06-28 17:43:20 +02:00
sarah el kazdadi
2dc5c8a891
feat(perf): optimize some custom mod ops
2024-06-28 16:48:43 +02:00
David Testé
22e9505380
chore(ci): reduce ci duration by not running 4_4 parameters set
...
This only apply for CI triggered in pull-request. A nightly run is added that run 4bits message/4bits carry parameters set.
2024-06-28 14:59:08 +02:00
Agnes Leroy
7c80f295f7
fix(gpu): fix to_boolean_block doc test
2024-06-28 10:30:17 +02:00
David Testé
a34ddd7b54
chore(ci): split cuda-pcc and cuda-tests jobs to parallelize execution
2024-06-28 10:30:17 +02:00
Agnes Leroy
3deff5fbfd
chore(gpu): reduce core crypto and cuda backend test time
2024-06-28 10:30:17 +02:00
David Testé
05a0327874
chore(ci): split integer tests for gpu
...
This is done to parallelize integer tests on GPU backend and thus
reduce iteration duration.
2024-06-28 10:30:17 +02:00
David Testé
879699c072
chore(ci): filter integer and shortint tests using python script
...
Backend support for GPU has been added to integer tests.
2024-06-28 10:30:17 +02:00
Agnes Leroy
e8b3617926
chore(ci): fix benchmarks
2024-06-27 18:59:11 +02:00
tmontaigu
d9701d99d3
refactor(integer): move sum functions into their own module
2024-06-27 18:44:50 +02:00
tmontaigu
a339025b48
refactor(shortint): move scalar_div_mod to its own modulue
2024-06-27 18:44:17 +02:00
Arthur Meyre
0e1a2ea7f6
chore(doc): update compression example to use default 2_2 params
2024-06-27 17:08:57 +02:00
Arthur Meyre
a44be90a44
chore(shortint): add gaussian compression parameters
2024-06-27 17:08:57 +02:00
J-B Orfila
f026fa5076
doc: udpate pfail README
2024-06-27 17:08:39 +02:00
Agnes Leroy
b06beabfa2
chore(gpu): run only unsigned bench in multi-bit GPU workflows
2024-06-27 16:56:31 +02:00
Agnes Leroy
773adcc26f
chore(gpu): use wrapping byte add, update rust msrv
2024-06-27 15:20:33 +02:00
David Testé
ee1c90403c
chore(bench): fix naming pattern for zk-pok benchmarks
2024-06-27 14:21:43 +02:00
Arthur Meyre
b9cedfec7f
chore(ci): ignore some directories when checking if docs is tested
2024-06-27 11:23:29 +02:00
Arthur Meyre
3992aa7f15
chore(core): change creation metadata to struct with fields vs tuple struct
...
- prevent potential mistakes (like for the pseudo GGSW where there is an
input and output GLWE size)
2024-06-27 11:23:29 +02:00
David Testé
2b002f81ec
chore(ci): run full multi-bit gpu benchmarks on demand
2024-06-27 10:18:49 +02:00
Arthur Meyre
2b695a9563
chore(zk): bump version to 0.2.1 for perf patch release
2024-06-27 10:13:44 +02:00
Arthur Meyre
fd72858c4d
chore(bench): also bench the verification alone without the unpack/KS time
2024-06-27 10:13:10 +02:00
Agnes Leroy
3a2bb4470f
fix(gpu): fix gpu index in casts, scalar comparison, scalar mul, etc.
2024-06-27 10:08:11 +02:00
Beka Barbakadze
6120fab886
feat(gpu): Implement propagate_single_carry_get_input_carries
2024-06-26 17:34:28 +02:00
Agnes Leroy
53b68619b0
chore(gpu): call nvidia-smi before launching tests on hyperstack
2024-06-26 16:47:29 +02:00
Guillermo Oyarzun
e854823233
refactor(gpu): speedup twiddles reads
2024-06-26 11:30:05 +02:00
sarah el kazdadi
19e00c484b
feat(zk): zk perf improvements
2024-06-26 11:24:11 +02:00
David Testé
818e480dac
chore(ci): publish only one tag for npm packages
...
NPM doesn't accept tags that are similar to a semantic-version
compatible string (e.g 0.7.0 or v0.7). We only publish "latest"
tag on release manager discretion.
2024-06-26 09:06:26 +02:00
David Testé
a7fc8a90e1
chore(ci): run build workflow on large windows instance
2024-06-25 18:17:26 +02:00
David Testé
3fad6d194c
chore(ci): avoid cancel ongoing benchmarks on main branch
2024-06-25 17:46:24 +02:00
David Testé
23efcb8dd4
chore(bench): fix benchmark naming format for shortint
2024-06-25 17:46:07 +02:00
David Testé
33c69d9d1f
chore(ci): update slab-github-runner action
2024-06-25 12:00:12 +02:00
David Testé
960d287e92
chore(bench): fix display name for gpu unsigned integer operations
2024-06-25 11:59:08 +02:00
Nicolas Sarlin
662e5402a3
chore(doc): add missing doc for a data breaking change
2024-06-24 16:09:26 +02:00
dependabot[bot]
bb7bdee25a
chore(deps): bump actions/checkout from 4.1.6 to 4.1.7
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4.1.6...692973e3d937129bcbf40652eb9f2f61becf3332 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-24 11:18:24 +02:00
dependabot[bot]
3503d5b484
chore(deps): update dtolnay/rust-toolchain requirement to 21dc36fb71dd22e3317045c0c31a3f4249868b17
...
Updates the requirements on [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) to permit the latest version.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](21dc36fb71 )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-24 10:09:52 +02:00
dependabot[bot]
0390f1ce56
chore(deps): bump tj-actions/changed-files from 44.5.2 to 44.5.3
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.5.2 to 44.5.3.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](d6babd6899...eaf854ef0c )
---
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 >
2024-06-24 10:09:39 +02:00
tmontaigu
d290935de1
feat(hlapi): bind match_value/match_value_or
2024-06-24 10:08:49 +02:00
tmontaigu
39dffcf742
fix(integer): match_value returns radix with correct number of blocks
...
match_value should have been returning an output
radix that had a number of block based
on the maximum possible output value given
in the MatchValues, and not always return
the same number of blocks than the input
2024-06-24 10:08:49 +02:00
Arthur Meyre
89bb5756cc
chore(tfhe): update multi bit parameters
2024-06-24 10:08:12 +02:00
J-B Orfila
501907498f
doc: compression updates
2024-06-24 10:07:54 +02:00
Nicolas Sarlin
d712c0fcd0
doc(backward): document breaking changes
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
66bee500a1
doc(backward): add doc for versioning/backward compat
2024-06-24 10:07:14 +02:00
Arthur Meyre
0687d12459
feat(integer): add the ability to reinterpret the data of a compact list
...
- this can be useful to load old lists which did not have any type info
2024-06-24 10:07:14 +02:00
Arthur Meyre
ecfe6e9a09
chore(doc): fix zk doc links
2024-06-24 10:07:14 +02:00
Arthur Meyre
1366c33034
chore(ci): fix clippy lints
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
c2a57f15ab
chore(all): upgrades data types
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
cb679fbbcb
chore(hl): upgrade IntegerClientKey version
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
08ddabb3be
chore(hl): add backward compatibilty tests for Hl types
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
892a6ae276
feat(core): versionize missing types in core_crypto
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
c37bac2438
chore(hl): restore deprecated CompactList for backward compat
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
e42733fb67
feat(c_api): add versioning serialization functions in C
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
a45f3d7435
feat(all): add safe_serialize_versioned
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
95a08ef0c2
chore(hl): versionize CompactCiphertextList
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
1da159f0f0
test(hl): Add backward compat tests for HL ct and client key
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
7c76ce2cfb
feat(hl): versionize booleans
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
3f499c85b3
feat(hl): versionize the Config
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
d736aa170e
feat(hl): versionize the FheUint/FheInt and their subtypes
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
9aa4e0f0b5
feat(hl): versionize {Client,Server,Public}Key and their subtypes
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
7cf4f0219f
feat(versionable): impl Versionize for tuples
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
97c10df6c2
chore(versionable): ignore struct_field_names clippy lint
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
5b530152fe
feat(versionable): Add versionize support for aligned-vec types
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
49ffeba87c
feat(versionable): Add support for Vec of custom types
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
679d76e7a6
feat(versionable): Add support for additional bounds for Versionize
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
7613ef2ba9
feat(versionable): Add versionize support for Box<T>
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
6a9e959edf
feat(versionable): Add versionize support for num_complex::Complex
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
034da67ff2
chore(backward): moved backward_compat files inside tfhe-rs modules
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
aac136909a
chore(ci): uniformize ci Makefile targets names
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
54cf162db5
chore(ci): run backward compatibility tests in ci
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
ac211cf71f
test(tfhe): add tests for types backward compatibility
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
a02896b9bc
feat(shortint): versionize the shortint client key and its subtypes
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
4a4ad23cee
feat(shortint): add versioning to ciphertext
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
fbf38a82ad
refactor(core): add conversion between modulus and serializable modulus
2024-06-24 10:07:14 +02:00
Nicolas Sarlin
444ebbde57
feat(vers): add crate for types versioning/backward compatibility
2024-06-24 10:07:14 +02:00
Arthur Meyre
c227bf4a49
chore(doc): add doc for dedicated CPK parameters and Cast for faster ZK
2024-06-21 21:13:04 +02:00
Arthur Meyre
c1916b82ca
fix(shortint): fix performance bug for compact list expand
...
- casting was done sequentially while it could be done in parallel
2024-06-21 21:13:04 +02:00
Agnes Leroy
4b8a3a15e8
doc(gpu): add multi-gpu doc
2024-06-21 17:49:51 +02:00
Mayeul@Zama
cd33712b43
chore(all): reword "in little memory"
2024-06-21 16:32:12 +02:00
Mayeul@Zama
e20114e8e2
doc(hlapi): add compression documentation
...
Co-authored-by: yuxizama <157474013+yuxizama@users.noreply.github.com >
2024-06-21 16:32:12 +02:00
Mayeul@Zama
1f7ef064fb
feat(hlapi): add C-API for CompressedCiphertextList
2024-06-21 16:32:12 +02:00
Mayeul@Zama
f16458147b
feat(hlapi): add CompressedCiphertextList
2024-06-21 16:32:12 +02:00
Mayeul@Zama
82b4b63d0e
feat(hlapi): add compression keys to IntegerKeys
2024-06-21 16:32:12 +02:00
Mayeul@Zama
34616ae4f7
feat(integer): add CompressedCiphertextList
2024-06-21 16:32:12 +02:00
Mayeul@Zama
26aa4e3a61
refactor(integer): Expandable::from_expanded_blocks takes ownership to avoid clone
2024-06-21 16:32:12 +02:00
Mayeul@Zama
872d51f5f0
refactor(integer): move Expandable to utils module
2024-06-21 16:32:12 +02:00
Mayeul@Zama
69fb7aa7ae
chore(shortint): add glwe packing benches
2024-06-21 16:32:12 +02:00
Mayeul@Zama
ea73ec0832
feat(shortint): add glwe_packing
2024-06-21 16:32:12 +02:00
Mayeul@Zama
d62e365bdc
feat(core): add compressed_modulus_switched_glwe_ciphertext
2024-06-21 16:32:12 +02:00
Mayeul@Zama
1579fb249a
feat(core): add glwe conformance
2024-06-21 16:32:12 +02:00
Mayeul@Zama
0624a5c5e2
refactor(shortint): apply_programmable_bootstrap takes a &GlweCt
2024-06-21 16:32:12 +02:00
Mayeul@Zama
ec4350edb4
refactor(shortint): isolate functions
2024-06-21 16:32:12 +02:00
Arthur Meyre
904cd00076
chore(tfhe): mark zk-pok as non experimental
2024-06-21 09:19:42 +02:00
sarah el kazdadi
44c64210ca
feat(zk): add randomness to hash functions
2024-06-21 07:11:16 +02:00
Agnes Leroy
9cd7aeccf5
chore(gpu): bump cuda backend version
2024-06-20 16:20:27 +02:00
Arthur Meyre
987d68942d
chore(ci): update npm packages
2024-06-20 15:35:56 +02:00
David Testé
2ff3b75ef7
chore(ci): update gpu ec2 ami with rustup snap package removed
...
Rustup was installed using snap and could clash in the workflow
notably on cargo-clippy calls.
2024-06-20 14:42:02 +02:00
Arthur Meyre
9242b2a725
feat(high_level_api): add casting primitives for compact public key
2024-06-20 13:24:27 +02:00
Arthur Meyre
bd674fe5bc
feat(tfhe): add CPK casting abilities in shortint and integer
2024-06-20 13:24:27 +02:00
Guillermo Oyarzun
4e5b9986b6
chore(gpu): Add bitnot operation without using pbs
2024-06-20 10:52:58 +02:00
tmontaigu
1e535c83a6
fix(shortint): count PBS in trivial_many_lut
...
We forgot increase the number of PBSes when doing
a many_lut PBS on a trivial input.
This fixes that, and changes the many_lut test to
test the result on trivial ciphertext and also test
that the PBS count is correct.
2024-06-20 10:44:57 +02:00
Ben
915eafac15
chore(ci): fix non-float print
2024-06-20 08:35:37 +02:00
David Testé
1c760a31e2
chore(ci): change threat model in lattice estimator
...
Set the hard threshold to 128 bits of security and add a soft
threshold of 132 bits. This new threshold matches the security
level advertised for current cryptographic parameters in shortint.
2024-06-20 08:35:37 +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é
bbd12b8a30
chore(tfhe): update tuniform parameters and remove unused ones
2024-06-20 08:35:37 +02:00
sarah el kazdadi
deebe09a8c
feat(zk): improve performance of zk pke proofs
2024-06-19 16:49:50 +02:00
David Testé
dcd8224a7e
chore(doc): remove old cpu benchmarks arrays
2024-06-19 14:00:27 +02:00
Arthur Meyre
2f7ad4cdcd
chore(ci): add server.PID from WASM tests to .gitignore
2024-06-19 10:51:03 +02:00
David Testé
4c8d791a2d
chore(bench): measure object sizes in zk_pke benchmarks
2024-06-19 10:51:03 +02:00
David Testé
c60cb88367
chore(ci): add workflow for pke-zk benchmarks
2024-06-19 10:51:03 +02:00
David Testé
f53c0df449
chore(bench): write zk_pke benchmarks results to json file
2024-06-19 10:51:03 +02:00
David Testé
6be983db34
chore(bench): refactor core_crypto benchmarks to use TUniform
2024-06-19 10:51:03 +02:00
Arthur Meyre
8caa0f780e
chore(bench): add ZK bench for integer
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
Arthur Meyre
cd40176a56
feat(zk): speed up CRS gen by parallelizing exponentiations
2024-06-19 10:51:03 +02:00
Arthur Meyre
65737e83db
refactor(HL): disallow unpacked ZK proofs in the HL API and WASM API
...
- ZK timings being bad, we make the decision to always pack for ZKs
2024-06-19 10:51:03 +02:00
David Testé
e4643c7919
chore(doc): update benchmarks timings
2024-06-19 09:06:40 +02:00
tmontaigu
baa3075f19
feat(tfhe): add FheUint512, FheUint1024, FheUint2048
2024-06-18 10:06:28 +02:00
tmontaigu
9cc97f9ab5
feat(zk): impl CanonicalSerialize/Deserialize
...
This is to allow specifying whether data should be compressed
as compression and validation adds a very signigicant overhead
especially in wasm where deserialization goes from 6 min to 450ms
2024-06-18 09:11:58 +02:00
David Testé
2bd9f7aab4
chore(shortint): remove compact pk t-uniform parameters set
...
Add new TUniform under classic/ that is not compact public key.
2024-06-17 16:33:32 +02:00
David Testé
833d52c1f1
chore(boolean): update parameters to security level of 132 bits
2024-06-17 16:33:32 +02:00
Agnes Leroy
4f2de51012
chore(gpu): add missing scalar rotate bench and update div bench
2024-06-17 15:50:14 +02:00
Agnes Leroy
134bec8f78
chore(gpu): fix multi-gpu bench workflow
2024-06-17 15:50:14 +02:00
Agnes Leroy
f2713a12c7
chore(gpu): fix if_then_else benchmark name, add bitnot benchmark
2024-06-17 15:50:14 +02:00
Mayeul@Zama
503fad69d2
chore(all): update SERIALIZATION_VERSION
2024-06-17 15:36:39 +02:00
Arthur Meyre
30ccb34ef9
chore(ci): manage the memory issues we are seeing
...
- shortint reduce test threads because of large keys
- integer clear in memory cache to avoid keeping two copies of keys per
process
2024-06-17 13:00:22 +02:00
Agnes Leroy
2ff64ccba0
chore(gpu): add apply bivariate lut as entry point on the rust side
2024-06-17 11:30:44 +02:00
dependabot[bot]
aeed5b70f3
chore(deps): bump dtolnay/rust-toolchain
...
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) from d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a to 21dc36fb71dd22e3317045c0c31a3f4249868b17.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](d8352f6b1d...21dc36fb71 )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-17 09:18:06 +02:00
dependabot[bot]
8f707611a0
chore(deps): bump codecov/codecov-action from 4.4.1 to 4.5.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.4.1 to 4.5.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](125fc84a9a...e28ff129e5 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-17 09:17:51 +02:00
dependabot[bot]
2d0671cdd8
chore(deps): bump actions/checkout from 4.1.5 to 4.1.7
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.5 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4.1.5...692973e3d937129bcbf40652eb9f2f61becf3332 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-17 09:17:33 +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
Beka Barbakadze
3af990b044
feat(gpu): Implement unsigned_overflowing_scalar_add for cuda backend
2024-06-14 15:41:24 +02:00
Arthur Meyre
0d8b1c6509
chore(zk): bump version to 0.2.0
2024-06-14 14:19:30 +02:00
Guillermo Oyarzun
c35cb4998d
chore(gpu): update gpu parameters
2024-06-14 11:27:47 +02:00
Agnes Leroy
e825277219
chore(ci): reduce the number of cpu threads used in tests on big instances
2024-06-13 21:22:29 +02:00
Agnes Leroy
71112231b9
feat(gpu): unsigned scalar div
2024-06-13 21:22:29 +02:00
Agnes Leroy
b78c719816
chore(gpu): add benchmark workflow for multi-bit multi-GPU
2024-06-13 17:38:46 +02:00
David Testé
7152f9c5c9
chore(ci): update slab-github-runner action in recent workflows
2024-06-13 17:38:46 +02:00
Agnes Leroy
d3a6b4a7d8
chore(gpu): add p3.8xlarge hourly cost
2024-06-13 13:01:59 +02:00
Pedro Alves
f49684bdac
feat(gpu): replicate luts and lut indexes to all available GPUs
2024-06-13 13:01:59 +02:00
Arthur Meyre
cf5fd87efb
feat(core): add variable Scalar type to PBS for input and output
2024-06-13 09:08:35 +02:00
David Testé
179fbfc9bb
chore(shortint): update default parameters
...
The default parameters are now offering a security level of 132
bits and uses a p-fail of 2**-64.
2024-06-12 17:22:24 +02:00
Arthur Meyre
ddf236ecbb
chore(shortint): remove MaxNoiseLevel check in from_raw_parts
...
- MaxNoiseLevel could have been optimized in a particular way, not the one
coded by the from function here
2024-06-12 08:59:03 +02:00
Arthur Meyre
e3fdb961b6
chore(core): remove a lost TODO
2024-06-12 08:59:03 +02:00
Agnes Leroy
2185bcf80e
chore(gpu): refactor signed overflow sub test to use FnExecutor
2024-06-12 08:44:48 +02:00
Agnes Leroy
418409231b
chore(gpu): refactor signed overflowing add tests to use a FnExecutor
2024-06-12 08:44:48 +02:00
Arthur Meyre
ce27c7c44a
refactor(tfhe): create associated CompactPrivateKey and prepare casting
...
- for casting from the CompactPublicKey parameter we need to add the
notion of a kind on the CompactCiphertextList, where one kind will need to
be cast thanks to an auxiliary keyswitching key and the other kind can just
be expanded as before
- to avoid weird situations/corner cases we remove the ability to encrypt a
"normal" ciphertext from a CompactPublicKey (which consisted in expanding
right after encryption)
2024-06-11 19:23:44 +02:00
dependabot[bot]
ccb6f98b09
chore(deps-dev): bump braces in /tfhe/web_wasm_parallel_tests
...
Bumps [braces](https://github.com/micromatch/braces ) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md )
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3 )
---
updated-dependencies:
- dependency-name: braces
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-11 18:11:02 +02:00
Arthur Meyre
6014968655
chore(continuous-integration): change commit regex to allow hyphen in scope
2024-06-11 14:43:04 +02:00
Arthur Meyre
6687695d19
chore(gpu): removed unused dependency
2024-06-11 12:09:46 +02:00
Agnes Leroy
c7a0493715
chore(gpu): fix warnings in pcc_gpu
2024-06-11 11:22:33 +02:00
Arthur Meyre
24aeac7843
feat(core): add keyswitch that changes the scalar type from input to ouptut
2024-06-10 18:19:38 +02:00
Arthur Meyre
21a749541a
fix(integer): fix ZK packing chunk not being full
2024-06-10 18:19:11 +02:00
Arthur Meyre
b3b8f3273a
fix(test): there was a typo in a feature name not picked up by clippy
...
- fixed the test according to the code that was merged
2024-06-10 18:19:11 +02:00
Agnes Leroy
f2b4ebb863
chore(gpu): use different streams in if_then_else
2024-06-10 17:33:35 +02:00
Agnes Leroy
919a40077c
fix(gpu): use all gpus in omp loops
2024-06-10 16:05:36 +02:00
David Testé
ac6c90d13f
chore(bench): fix naming pattern on if_then_else cuda benchmark
2024-06-10 15:36:04 +02:00
Agnes Leroy
b8991229ec
feat(gpu): make PBS and ks execution parallel over available GPUs
...
Only GPUs with peer access to GPU 0 can be used for this at the moment.
Peer to peer copy is used if different GPUs are passed to memcpy_gpu_to_gpu
A gpu offset is passed as new parameter to pbs and keyswitch to adjust the input/output index user per gpu.
bsk and ksk are copied to all GPUs.
The CI now tests & runs benchmarks on p3.8xlarge aws instances
2024-06-10 15:05:42 +02:00
David Testé
5f0ca54150
chore(bench): add benchmarks for pbs-ntt64
2024-06-10 09:35:36 +02:00
dependabot[bot]
dddf85fb2c
chore(deps): bump tj-actions/changed-files from 44.5.1 to 44.5.2
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.5.1 to 44.5.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](https://github.com/tj-actions/changed-files/compare/v44.5.1...d6babd6899969df1a11d14c368283ea4436bca78 )
---
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 >
2024-06-10 08:58:43 +02:00
dependabot[bot]
d000f8ddf7
chore(deps): bump actions/checkout from 4.1.4 to 4.1.6
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.4 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4.1.4...a5ac7e51b41094c92402da3b24376905380afc29 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-10 08:58:33 +02:00
Agnes Leroy
70b643a1db
fix(gpu): fix cuda bench warnings
2024-06-07 13:33:37 +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
David Testé
301537a81b
chore(bench): add pbs128 to benchmarks suite
2024-06-06 10:23:25 +02:00
Beka Barbakadze
76338de99f
feat(gpu): add overflowing_add in cuda_backend
2024-06-05 15:45:16 +04:00
Guillermo Oyarzun
019efb7fef
chore(gpu): parallelize keyswitch further
2024-06-05 11:23:53 +02:00
David Testé
772a70d838
chore(ci): remove need for docker on hyperstack instance
...
By using a GitHub hosted runner to use Slack notification action,
we remove the need to install Docker on test instance.
2024-06-05 09:27:06 +02:00
David Testé
f024e8abae
chore(ci): improve action skipping for internal repository
2024-06-05 09:27:06 +02:00
David Testé
31685387ea
chore(ci): remove unused slab commands
...
All the deleted commands have now their workflow using slab action
to spawn/teardown instances.
2024-06-04 09:38:56 +02:00
David Testé
4db77e236f
chore(ci): refactor code coverage workflow to use slab action
2024-06-04 09:38:56 +02:00
David Testé
bc02216470
chore(ci): refactor wasm benchmarks workflow to use slab action
2024-06-04 09:38:56 +02:00
Agnes Leroy
228afe80e7
chore(gpu): change the number of threads in blocks_rotate, smart copy and pack blocks
2024-06-03 18:13:41 +02:00
yuxizama
e4a21db7ee
chore(docs): update license FAQ
2024-06-03 17:12:18 +02:00
Beka Barbakadze
3e37759f5f
fix(gpu): ensure single carry propagation returns carry
2024-06-03 15:55:25 +02:00
Arthur Meyre
dc0d72436d
refactor(core): factorize multiplicative factor code for GGSW encryption
...
- some code was repeated several times, factorize it out in a function
2024-06-03 14:50:08 +02:00
Arthur Meyre
8a31abfca4
feat(core): add non mem optimized NTT64 primitives
...
- also add docstrings to ntt primitives
- export a now useful functions for decryption on non native moduli
2024-06-03 14:50:08 +02:00
Arthur Meyre
154c2e61b8
feat(core): add NTT PBS and NTT conversion algorithms
...
Co-authored-by: sarah el kazdadi <sarah.elkazdadi@zama.ai >
2024-06-03 14:50:08 +02:00
Arthur Meyre
b3e6f8522f
refactor(core): split LWE PBS algorithms depending on the polymul backend
2024-06-03 14:50:08 +02:00
Arthur Meyre
3d2e3b389a
feat(core): add NTT entities
...
Co-authored-by: sarah el kazdadi <sarah.elkazdadi@zama.ai >
2024-06-03 14:50:08 +02:00
Arthur Meyre
f6f07714cb
feat(tfhe): add support for non native moduli to some GLWE and GGSW algos
...
- update GLWE and GGSW encryption algorithms
2024-06-03 14:50:08 +02:00
Arthur Meyre
57bc1f5abe
chore(core): remove some commas just laying there in macros + use div_ceil
...
- use div_ceil instead of doing it manually in parallel FFT conversion
2024-06-03 14:50:08 +02:00
Arthur Meyre
fd88c3ead2
feat(tfhe): plug NTT primitives as designed by Sarah originally
...
Co-authored-by: sarah el kazdadi <sarah.elkazdadi@zama.ai >
2024-06-03 14:50:08 +02:00
Arthur Meyre
4bbb3570d1
refactor(core): remove row_count from ggsw row-like structures
...
- use size primitives in places where it makes sense
2024-06-03 14:50:08 +02:00
dependabot[bot]
e2413ff69e
chore(deps): bump actions/checkout from 4.1.4 to 4.1.6
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.4 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4.1.4...a5ac7e51b41094c92402da3b24376905380afc29 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-06-03 14:49:24 +02:00
dependabot[bot]
82043fb7e2
chore(deps): bump tj-actions/changed-files from 44.5.1 to 44.5.2
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.5.1 to 44.5.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](03334d095e...d6babd6899 )
---
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 >
2024-06-03 14:47:46 +02:00
tmontaigu
3097c964e3
chore(tfhe): alias if_then_else to select
2024-05-31 22:56:56 +02:00
Arthur Meyre
e5d6f60a1b
chore(tfhe): make sha3 an optional dependency enabled with shortint
...
- it is used as a Random Oracle for the PRF at the shortint level
2024-05-31 19:07:55 +02:00
David Testé
05105c9d9e
chore(ci): update slab-github-runner to latest version
2024-05-31 18:05:50 +02:00
David Testé
a798e1fb52
chore(ci): build parallel wasm client upon npm release
2024-05-31 16:26:38 +02:00
David Testé
9cf4be09fb
chore(ci): push tfhe-rs version as npm by default
...
NPM tag "latest" will be pushed only on demand.
2024-05-31 16:26:38 +02:00
Agnes Leroy
484bddfebd
chore(gpu): rebuild cuda backend if files changed
2024-05-31 15:07:06 +02:00
David Testé
57c5ef6b52
chore(ci): use only pull_request event in workflow
...
Using pull_request_target event to handle PR from forks was
clashing with pull_request event. It would launch double amount of
actions and moreover leads to cancellation in jobs due to the
concurrency directive.
2024-05-30 15:29:28 +02:00
Pedro Alves
a7e84dd9cf
fix(gpu): fix indexing on DSM mode
2024-05-30 11:16:18 +02:00
Agnes Leroy
a0346f8fea
chore(gpu): add h100 workflow for tests
2024-05-30 11:16:18 +02:00
David Testé
4ffadfd517
chore(ci): new workflow target to handle ci execution from forks
2024-05-30 09:24:25 +02:00
Mayeul@Zama
b32eafdf74
feat(shortint): use sha3 for oprf seeding
2024-05-29 18:59:49 +02:00
Mayeul@Zama
fa6b1e7966
feat(shortint): remove ks from oprf
2024-05-29 18:59:49 +02:00
Arthur Meyre
d35acae047
chore(tfhe): add the ability to get raw parts from an FheBool
2024-05-29 17:09:20 +02:00
Pedro Alves
71a10464e3
fix(gpu): disable non-portable cluster sizes on TBC PBSs
2024-05-29 11:48:13 +02:00
Arthur Meyre
0112521008
chore(ci): fix dependabot alert by using latest changed files
2024-05-29 10:28:28 +02:00
Daniel Demmler
f8545a72a4
fix: comment fmt
2024-05-28 17:04:27 +02:00
Daniel Demmler
e62a5232e3
doc: use from_config in zk-pok example, add brief comment to from_config
2024-05-28 17:04:27 +02:00
Daniel Demmler
cb67eeba3c
fix: correct max_num_message value and add details for building
2024-05-28 17:04:27 +02:00
David Testé
3481054f49
chore(bench): set fast bench precision to 64 bits for all backends
2024-05-28 16:57:03 +02:00
David Testé
201e38506d
chore(ci): run aws cpu tests based on file changes
...
This is done to imporve iteration time and feedback for devs.
There is no point to run the full test suite each time. A given
development could impact only tfhe-zk-pok for example. In this
case only tfhe-zk-pok test would run and thus cutting workflow
duration from around 3 hours down to a few minutes.
2024-05-28 09:07:11 +02:00
David Testé
97260a3330
chore(ci): create release workflow for tfhe-zk-pok
2024-05-27 17:48:05 +02:00
Agnes Leroy
3da2678584
chore(gpu): remove broken ks benchmark
2024-05-27 14:42:53 +02:00
dependabot[bot]
80aaf8a8cb
chore(deps): bump tj-actions/changed-files from 44.4.0 to 44.5.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.4.0 to 44.5.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](a29e8b5656...03334d095e )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-27 10:49:10 +02:00
dependabot[bot]
e91f403f57
chore(deps): bump codecov/codecov-action from 4.4.0 to 4.4.1
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](6d798873df...125fc84a9a )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-27 10:48:57 +02:00
Agnes Leroy
fedd1ca7b2
chore(gpu): change the number of threads used in the keyswitch
2024-05-24 12:03:53 +02:00
David Testé
fadb48a86d
chore(ci): run gpu benchmarks on push only in public repository
2024-05-23 10:47:12 +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
tmontaigu
4a4a53adc3
feat(integer): add prelude
...
This adds a prelude to integer.
To access blocks from an integer ciphertext, some traits needs to be in scope.
The common way to make it easy for end
users it via a prelude.
```rust
use tfhe::integer::prelude::*;
```
2024-05-21 14:15:17 +02:00
Arthur Meyre
ba818117e5
refactor(tfhe): provide functions to select some encryption parameters
...
- some parameter selection (like noise distributions) were made manually
and were error prone in the past
- factorize those to have fewer places to check and update
2024-05-21 11:18:06 +02:00
David Testé
520010e208
chore(tfhe): bump version to 0.7.0
2024-05-21 11:17:20 +02:00
dependabot[bot]
2602ed236b
chore(deps): bump tj-actions/changed-files from 44.3.0 to 44.4.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.3.0 to 44.4.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](0874344d6e...a29e8b5656 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-21 10:00:35 +02:00
dependabot[bot]
f605e7c2ee
chore(deps): bump actions/checkout from 4.1.5 to 4.1.6
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.5 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](44c2b7a8a4...a5ac7e51b4 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-21 10:00:15 +02:00
dependabot[bot]
c7e6d76346
chore(deps): bump codecov/codecov-action from 4.3.1 to 4.4.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.3.1 to 4.4.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](5ecb98a3c6...6d798873df )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-21 10:00:00 +02:00
Arthur Meyre
ce430bb3cb
refactor(core): use the forking config pattern
...
- instead of hardcoding all fork behavior have it programmable
- have entities return their fork configurations
- allows to manage fallible RNG for all encryption random generation
BREAKING CHANGE:
behavior of random generation has changed meaning seeding a generator and
encrypting entities won't behave the same
2024-05-17 15:05:08 +02:00
Arthur Meyre
e2ee5fef5d
refactor(core): add information about sampling success probability
...
- some sampling method perform rejections and are therefore fallible, add
a primitive on the RandomGenerable trait to be able to tell the probability
to successfully generate a sample, which will be used to provision enough
bytes when using forking primitives which effectively create a restricted
amount of bytes available for generation, which has been caught failing in
our tests as the generator runs out of bytes due to samples being rejected
2024-05-17 15:05:08 +02:00
Mayeul@Zama
73b3bf6b5b
feat(integer): improve compression
2024-05-16 15:19:02 +02:00
tmontaigu
68439c7037
feat(c_api): quick 'n' dirty C API for some array fn
2024-05-16 10:18:47 +02:00
Beka Barbakadze
636cf0f766
feat(gpu): modify integer_radix_apply_bivariate_lookup_table_kb to accept shift param
2024-05-15 15:37:07 +02:00
Arthur Meyre
dd917901a0
chore(core): make the mulit bit mod switch public
...
- was useful for the sampling tool
2024-05-15 15:27:17 +02:00
Leonardo Neumann
3b4dbb3cbb
feat(core): implement (G)lweCiphertextList::from_fn
2024-05-15 14:14:57 +02:00
Beka Barbakadze
bc44940081
feat(gpu): implement host functions for radix_blocks_rotates
2024-05-15 11:36:31 +02:00
Beka Barbakadze
ebc22bb995
feat(gpu): implement update_info for div_rem
...
noise level
2024-05-15 09:15:19 +02:00
David Testé
5b4833a1c2
chore(ci): fix slack notification in gpu benchmarks
...
Slack notification GitHub action need Docker to be installed on
the system before the action is effectively used. To mitigate this
issue, we set the step it's in own job. The previous job takes
care of installing Docker along with other dependencies needed to
run the benchmarks.
2024-05-15 08:25:54 +02:00
tmontaigu
310047a848
feat(integer): add contains_sub_slice
...
This method returns a Boolean block that tells whether a
slice of radix contains a sub slice.
2024-05-14 14:15:50 +02:00
Arthur Meyre
4166dd1c8a
feat(core): non power of 2 support for the LWE keyswitch
2024-05-14 11:26:21 +02:00
Arthur Meyre
5a1c8a49e4
refactor(core): use new formulas for non native decomposer
2024-05-14 11:26:21 +02:00
Arthur Meyre
6cb68a8464
chore(core): remove div_ceil unit test as it's now a rust primitive
2024-05-14 11:26:21 +02:00
Arthur Meyre
2912e4c00c
chore(tfhe): use the dep: notation for the cuda backend in the gpu feature
2024-05-14 11:26:21 +02:00
David Testé
1b9c61c2d1
chore(ci): run gpu benchmarks on hyperstack platform
2024-05-14 09:24:17 +02:00
Pedro Alves
d167e9b38d
chore(gpu): add a compilation conditional to assert we won't be checking for cudaDevAttrClusterLaunch on archs < 9.0
2024-05-14 08:55:18 +02:00
dependabot[bot]
80fda99068
chore(deps): bump actions/checkout from 4.1.4 to 4.1.5
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.4 to 4.1.5.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](0ad4b8fada...44c2b7a8a4 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-13 13:46:25 +02:00
David Testé
e09ea6c484
chore(ci): update usage of slab-github-runner to last version
2024-05-10 14:14:31 +02:00
Arthur Meyre
f214cfc474
chore(ci): we do not need to archive the repo during a sync on push to main
2024-05-07 16:45:36 +02:00
Nicolas Sarlin
c0733f535f
chore(ci): check broken intra docs links in ci
2024-05-07 11:46:32 +02:00
yuxizama
08e4e4f993
chore(docs): proofreading and design update
2024-05-07 11:46:32 +02:00
tmontaigu
b55bae1e0f
feat(integer): add an eq_slice function
...
This adds eq_slices functions.
This function, compares to slices of radix ciphertexts
and returns true if all pairs of element are equal.
2024-05-07 11:15:32 +02:00
Leonardo Neumann
c29ae73710
chore(ci): fix GPU shell script shebangs
2024-05-07 10:24:16 +02:00
Mayeul@Zama
cc1712c67a
style(chore): keep a single version of generate_programmable_bootstrap_glwe_lut
2024-05-06 15:26:08 +02:00
dependabot[bot]
246f4c299e
chore(deps): bump dtolnay/rust-toolchain
...
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) from bb45937a053e097f8591208d8e74c90db1873d07 to d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](bb45937a05...d8352f6b1d )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-06 10:41:45 +02:00
dependabot[bot]
29b0786fd8
chore(deps): bump codecov/codecov-action from 4.3.0 to 4.3.1
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](84508663e9...5ecb98a3c6 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-06 10:41:38 +02:00
dependabot[bot]
89f7df0e12
chore(deps): bump actions/checkout from 4.1.3 to 4.1.4
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.3 to 4.1.4.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4.1.3...0ad4b8fadaa221de15dcec353f45205ec38ea70b )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-06 10:41:28 +02:00
Agnes Leroy
51d5e27ab3
chore(gpu): add back a CudaPtr structure
...
Improve multi-gpu gpu_index checks
2024-05-06 09:41:54 +02:00
Agnes Leroy
4f29db404c
feat(gpu): prepare code base for multi-gpu support
2024-05-06 09:41:54 +02:00
Mayeul@Zama
f20176b6f0
feat(core): pack diffs for multi bit modulus switch compression
2024-05-03 09:53:06 +02:00
Mayeul@Zama
575ce1b2fb
feat(shortint): add ms compression multi bit
2024-05-03 09:53:06 +02:00
Mayeul@Zama
53a4d54a54
feat(core): add ms compression multi bit
2024-05-03 09:53:06 +02:00
Mayeul@Zama
cf051dd65f
refactor(core): separate multi_bit modulus_switch and blind_rotate
2024-05-03 09:53:06 +02:00
Mayeul@Zama
0f331f0b88
feat(core): replace Mutex by AtomicUsize indexing
2024-05-03 09:53:06 +02:00
Mayeul@Zama
b8bf1c286f
fix(core): add modulus switched field decompression method to conformance
2024-05-03 09:53:06 +02:00
Mayeul@Zama
051e993503
refactor(core): separate packing from ms compression
2024-05-03 09:53:06 +02:00
Mayeul@Zama
9420c408dd
feat(core): add method to covert poly_size to modulus_log
2024-05-03 09:53:06 +02:00
Mayeul@Zama
1fe1a349b7
feat(core): remove type constraint
2024-05-03 09:53:06 +02:00
Nicolas Sarlin
08fd31f8fc
feat(gpu): add compatibility with cuda from package managers
2024-05-02 10:14:22 +02:00
Nicolas Sarlin
ba18519946
chore(ci): update toolchain to latest nightly
2024-04-30 16:50:18 +02:00
Beka Barbakadze
ab8a51bc0d
feat(gpu): implement div_rem for cuda GPU
2024-04-30 15:53:02 +02:00
Arthur Meyre
9ecb9f416e
chore(doc): fix broken reference
2024-04-30 11:25:06 +02:00
David Testé
0618b9422c
chore(ci): separate pcc and tests for gpu to allow faster merge
2024-04-30 08:51:46 +02:00
David Testé
5bb3af30b6
chore(bench): fix naming format for signed scalar operations
2024-04-30 08:51:29 +02:00
aquint-zama
ef1607db51
chore(doc): fix broken link
2024-04-29 14:35:18 +02:00
Arthur Meyre
d2daf449b7
chore(core): fix the stair KS test for more generic stair KS parameters
...
- the actual large LWE dimension to consider is the partial fill as those
are the non zero coefficients on which the shared coefficients are then
computed/based on
- the 4 bits parameters don't exhibit the bug as they are not on the GLWE
noise plateau
2024-04-29 13:23:46 +02:00
dependabot[bot]
826c80ea6d
chore(deps): bump actions/upload-artifact from 4.3.2 to 4.3.3
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.3.2 to 4.3.3.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](1746f4ab65...65462800fd )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-29 13:23:12 +02:00
dependabot[bot]
bc991e1946
chore(deps): bump actions/checkout from 4.1.3 to 4.1.4
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.3 to 4.1.4.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](1d96c772d1...0ad4b8fada )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-29 13:23:06 +02:00
Pedro Alves
f88e309503
feat(gpu): Implements a classical PBS variant that uses thread block cluster and distributed shared memory
2024-04-29 09:42:58 +02:00
Pedro Alves
cbc23c08a2
feat(gpu): Implements a multi-bit PBS variant that uses thread block
...
cluster and distributed shared memory
2024-04-29 09:42:58 +02:00
Pedro Alves
e9ee813911
fix(gpu): fix out-of-memory error in the custom benchmark tool
2024-04-29 09:42:58 +02:00
Pedro Alves
3ebc114c85
fix(gpu): implements a NOSM mode to tree_add_chunks()
2024-04-29 09:42:58 +02:00
Pedro Alves
effe6a9ec8
chore(gpu): remove message_3_carry_3 parameters from scalar/encrypted comparison tests
2024-04-29 09:42:58 +02:00
Pedro Alves
a8fe4d9f38
fix(gpu): fix multi-bit PBS when pbs_level > 1
2024-04-29 09:42:58 +02:00
Pedro Alves
af7c1e14a4
fix(gpu): refactor PBS' host functions to run using the same variant as the scratch function
2024-04-29 09:42:58 +02:00
Agnes Leroy
85fbca62a2
chore(gpu): extend integer multiplication to N other than 2048
2024-04-29 09:42:58 +02:00
Agnes Leroy
9c36ee477b
chore(gpu): fix params in GPU integer benchmarks
2024-04-26 13:00:01 -03:00
Pedro Alves
9d70e695b5
chore(gpu): automatically compute the best lwe_chunk_size
2024-04-26 11:58:19 -03:00
Pedro Alves
33e7cfea2d
chore(gpu): move luts_message_carry allocation to host_integer_sum_ciphertexts_vec_kb to reduce memory consumption
2024-04-26 09:20:39 -03:00
Daniel Demmler
ce0aea171b
fix(zk): correct byte indices for uncompressed serializtion
2024-04-25 18:06:54 +02:00
Kelong Cong
083c068144
fix(zk): expose compute_crs_params since we need big_d and b_r too
...
Knowing these two values in addition would allow us to use
PublicParams::from_vec.
2024-04-25 16:45:11 +02:00
Kelong Cong
8912e887e3
feat(zk): open up the API to output the CRS witness dimension
...
The motivation of this PR is that sometimes the CRS is generated by a ceremony,
instead of centrally. So it is useful to have some function that computes the
CRS witness dimension without generating the CRS centrally.
2024-04-25 16:45:11 +02:00
tmontaigu
ddd0f2ce79
chore(integer): reduce nb tests for big params
2024-04-25 13:53:58 +02:00
tmontaigu
aeab9e851b
fix(integer): fix match_value
2024-04-25 13:53:58 +02:00
Mayeul@Zama
919f07f911
fix(shortint): is_functional_bivariate_pbs_possible takes an optional lut
2024-04-24 18:55:37 +02:00
tmontaigu
6199e04ce0
feat(integer): add vector match_value/index_of/contains/is_in
2024-04-23 10:55:36 +02:00
dependabot[bot]
77a6673d59
chore(deps): bump dtolnay/rust-toolchain
...
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) from 7164405e8653277d57afd42ba081b5aa02a70396 to bb45937a053e097f8591208d8e74c90db1873d07.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](7164405e86...bb45937a05 )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-22 13:01:57 +02:00
dependabot[bot]
631dd09445
chore(deps): bump tj-actions/changed-files from 44.0.1 to 44.3.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.0.1 to 44.3.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](635f118699...0874344d6e )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-22 09:20:46 +02:00
dependabot[bot]
a7f6ea12ce
chore(deps): bump actions/upload-artifact from 4.3.1 to 4.3.2
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.3.1 to 4.3.2.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](5d5d22a312...1746f4ab65 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-22 09:20:21 +02:00
dependabot[bot]
0a1cba43c4
chore(deps): bump actions/checkout from 4.1.2 to 4.1.3
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](9bb56186c3...1d96c772d1 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-22 09:20:12 +02:00
Agnes Leroy
666926e4b0
chore(gpu): add tests for N=8192 multi-bit PBS
2024-04-19 17:02:55 +02:00
Agnes Leroy
105e2488f6
chore(gpu): add casts and signed scalar comparisons to the hl api
2024-04-18 18:20:24 +02:00
Agnes Leroy
cf62937632
feat(gpu): cast signed/unsigned and signed/signed
2024-04-18 09:11:53 +02:00
Arthur Meyre
c0985707ad
chore(doc): fix API calls
2024-04-15 18:56:00 +02:00
Arthur Meyre
2cc20a6bd5
chore(ci): fix sage script f-string missing f
2024-04-15 18:55:06 +02:00
Agnes Leroy
28db75b3a3
fix(gpu): fix typo in doc
2024-04-15 17:06:49 +02:00
dependabot[bot]
6f31bffef6
chore(deps): bump codecov/codecov-action from 4.2.0 to 4.3.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](7afa10ed9b...84508663e9 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-15 13:15:10 +02:00
dependabot[bot]
9e6b251e68
chore(deps): bump dtolnay/rust-toolchain
...
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) from dc6353516c68da0f06325f42ad880f76a5e77ec9 to 7164405e8653277d57afd42ba081b5aa02a70396.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](dc6353516c...7164405e86 )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-15 13:14:42 +02:00
dependabot[bot]
da46d26f1b
chore(deps): bump tj-actions/changed-files from 44.0.0 to 44.0.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 44.0.0 to 44.0.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](2d756ea4c5...635f118699 )
---
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 >
2024-04-15 12:24:24 +02:00
Mayeul@Zama
b4662607bf
style(core): remove newline
2024-04-15 09:29:05 +02:00
Mayeul@Zama
faac5e10e6
style(c_api): fix typo
2024-04-15 09:29:05 +02:00
Mayeul@Zama
0fa5231e5a
style(core): remove allow(clippy::used_underscore_binding)
2024-04-15 09:29:05 +02:00
Arthur Meyre
9f36cf7120
chore(ci): make a github runner remove a label
2024-04-12 09:54:45 +02:00
Arthur Meyre
a654a47136
chore(c): change include <tfhe.h> to "tfhe.h"
...
- as tfhe is not a system library C/C++ practice is to use the "" style
2024-04-12 09:54:37 +02:00
Arthur Meyre
29dfac320c
chore(c_api): fix build on M1 mac
2024-04-11 09:23:40 +02:00
Arthur Meyre
af11862dc1
chore(ci): add zk feature for deterministic FFT C API
2024-04-11 09:23:40 +02:00
Arthur Meyre
1b5745c22f
chore(ci): add missing install for clippy_task
2024-04-11 09:23:40 +02:00
Arthur Meyre
e6970fc00d
chore(tfhe): update serialization version
2024-04-11 09:23:20 +02:00
Arthur Meyre
cc4b7dc33e
refactor(shortint): add max_noise_level field to CompressedServerKey
2024-04-11 09:23:20 +02:00
Agnes Leroy
5417ba53be
fix(gpu): add edge test for scalar comparisons
2024-04-10 06:43:17 -03:00
Pedro Alves
ac424136ac
chore(gpu): add lwe_chunk_size targeting RTX 4090 GPUs
2024-04-10 09:57:23 +02:00
Pedro Alves
9576c5fd77
feat(gpu): implement signed scalar ge, gt, le, lt, max, and min
2024-04-10 09:55:43 +02:00
Arthur Meyre
5df40597c2
chore(zk): add metadata for Cargo publish
2024-04-09 14:13:07 +02:00
Arthur Meyre
c807bce207
chore(tfhe): update ZK related parameters to use TUniform ones
2024-04-09 13:27:19 +02:00
Arthur Meyre
26747828eb
chore(ci): add a cpu count script to avoid crashing on macOS on make -j
2024-04-09 13:27:19 +02:00
Arthur Meyre
4c645267ca
chore(apis): expose TUniform 2^-40 parameters for js and C APIs
2024-04-09 13:27:19 +02:00
Arthur Meyre
bea9b77090
chore(shortint): add multi bit GPU alias
...
- add easy access to compact PK tuniform params
2024-04-09 13:27:19 +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
e5b3092414
refactor(shortint): add max noise level and p_fail fields to the parameters
2024-04-09 13:27:19 +02:00
tmontaigu
30fc8c7c74
feat(hlapi): bind cuda to FheInt
2024-04-09 07:59:35 +02:00
tmontaigu
2c106e8f01
feat(tfhe): plug zk-pok into all layers
2024-04-09 07:59:20 +02:00
Arthur Meyre
f868bb2397
feat(tfhe): add zk-pok code base
...
- integration of work done by Sarah in the repo
Co-authored-by: sarah el kazdadi <sarah.elkazdadi@zama.ai >
2024-04-09 07:59:20 +02:00
Arthur Meyre
691bff5970
chore(wop): remove outdated parameters and update other parameters
2024-04-09 07:57:54 +02:00
Arthur Meyre
555c984ab3
chore(docs): add information about IND CPA^D
2024-04-08 19:43:56 +02:00
Agnes Leroy
5b21363482
doc(gpu): add missing benchmark results
2024-04-08 18:16:45 +02:00
Pedro Alves
b021aa16d6
feat(gpu): implement signed if_then_else
2024-04-08 17:47:32 +02:00
dependabot[bot]
cda3f2b0ae
chore(deps): bump dtolnay/rust-toolchain
...
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain ) from be73d7920c329f220ce78e0234b8f96b7ae60248 to dc6353516c68da0f06325f42ad880f76a5e77ec9.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases )
- [Commits](be73d7920c...dc6353516c )
---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-08 09:27:14 +02:00
dependabot[bot]
50df70047e
chore(deps): bump codecov/codecov-action from 4.1.1 to 4.2.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](c16abc29c9...7afa10ed9b )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-08 09:21:49 +02:00
Arthur Meyre
0e10acb9f0
chore(ci): fix clippy GPU lint
2024-04-08 09:19:29 +02:00
Arthur Meyre
3d369b0771
feat(core): add experimental fast KS primitives from keytricks
2024-04-08 09:19:29 +02:00
Arthur Meyre
8ae9c16019
test(core): add stair KS tests
...
- StairKS 4 parameters were optimized for norm2 = 2^4, we don't apply the
dot product, so keeping the loops is fine as the noise grows less
2024-04-08 09:19:29 +02:00
Arthur Meyre
ed8a32d106
chore(core): use proper new type to represent a message space modulus log
2024-04-08 09:19:29 +02:00
Agnes Leroy
f9a3984c7e
doc(gpu): add benchmark results
2024-04-05 16:47:30 +02:00
tmontaigu
b6868e08d2
refactor(hlapi): improve conformance deserialization API
...
- Move safe_deserialization_conformant from being a free function
to being an associated function on each types FheUint, FheInt,
FheBool, Compact, Compressed, CompactList.
- Add safe_deserialization_conformant on CompactList for both Rust and
CAPI (altough CAPI is limited to strict len check for now)
BREAKING_CHANGE: deserialize_safe_conformant was moved from being a free
function to being an associated method of the different types, and ask
for a &ServerKey, not conformance params
BREAKING_CHANGE: is_conformant not really accessible anymore
2024-04-05 10:13:47 +02:00
Agnes Leroy
9ef3183d2e
chore(gpu): fix multi-bit scalar mul benchmark
2024-04-05 09:20:48 +02:00
Yuxi Zhao
cdeb647629
chore(docs): update doc new structure and landing page
...
- update design to fix mobile display
- remove dubs
- misc fixes and make sure user docs tests still run
- upload new designs
- add developer survey
- change designs and wordings
- delete unused images
- change page options
2024-04-04 18:57:11 +02:00
Agnes Leroy
88ff4d17cf
chore(gpu): remove carry prop after scalar mul single carry prop after scalar add/sub
2024-04-04 17:37:15 +02:00
Agnes Leroy
daadb115aa
fix(gpu): fix mult 256 bit benchmark
2024-04-04 14:41:36 +02:00
Agnes Leroy
971b0cf0b6
feat(gpu): signed scalar rotate
2024-04-04 13:49:58 +02:00
Mayeul@Zama
4c8528d70d
feat(hl): add boolean compression
2024-04-03 15:06:55 +02:00
Mayeul@Zama
865b1bdb7f
feat(hl): add integer compression
2024-04-03 15:06:55 +02:00
Mayeul@Zama
7d2bb98893
feat(all): add conformance for compressed modulus switched
2024-04-03 15:06:55 +02:00
Mayeul@Zama
d58dd56433
refactor(all): decompress takes shared reference
2024-04-03 15:06:55 +02:00
Agnes Leroy
1fc3297af8
chore(gpu): add missing underscore in comparison tests
2024-04-03 14:38:55 +02:00
Agnes Leroy
cc72594c0d
feat(gpu): signed comparisons
2024-04-03 14:38:55 +02:00
Arthur Meyre
3c39abed79
feat(core): add experimental lwe shrinking keyswitch from keytricks
2024-04-03 11:47:55 +02:00
Arthur Meyre
ab9cee529f
chore(tfhe): export macro for named params to allow external use
...
- it is sometimes useful to be able to use the keycache mechanism from
outside the crate
2024-04-03 11:47:55 +02:00
Agnes Leroy
f98bbd9146
feat(gpu): signed eq/ne
2024-04-03 09:27:44 +02:00
Mayeul@Zama
0bad5c4b92
refactor(all): decompress takes shared reference
...
remove from/into decompression
2024-04-02 14:10:24 +02:00
tmontaigu
6360cbfdd1
feat(hlapi): bind sum for cuda backend
2024-04-02 10:27:17 +02:00
dependabot[bot]
d746eb8569
chore(deps): bump JS-DevTools/npm-publish from 3.1.0 to 3.1.1
...
Bumps [JS-DevTools/npm-publish](https://github.com/js-devtools/npm-publish ) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/js-devtools/npm-publish/releases )
- [Changelog](https://github.com/JS-DevTools/npm-publish/blob/main/CHANGELOG.md )
- [Commits](79051c040d...19c28f1ef1 )
---
updated-dependencies:
- dependency-name: JS-DevTools/npm-publish
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-02 09:41:54 +02:00
dependabot[bot]
6ae6a49e0d
chore(deps): bump tj-actions/changed-files from 43.0.1 to 44.0.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 43.0.1 to 44.0.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](20576b4b9e...2d756ea4c5 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-02 09:41:25 +02:00
dependabot[bot]
1f8b310669
chore(deps): bump codecov/codecov-action from 4.1.0 to 4.1.1
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](54bcd8715e...c16abc29c9 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-04-02 09:40:10 +02:00
Agnes Leroy
cb1110fc79
feat(gpu): signed and unsigned scalar mul
...
+ remove small scalar mul
+ move around signed tests_cases
2024-03-29 11:22:51 +01:00
Arthur Meyre
80836c5dfd
feat(tfhe): use concrete-fft 0.4.1 for faster pbs 128 by default
2024-03-29 10:36:42 +01:00
Pedro Alves
1b6c26994a
feat(gpu): implement encrypted shift and rotate
2024-03-29 08:47:50 +01:00
tmontaigu
c20eccf248
feat(c_api): bind leading/trainling_ones/zeros and ilog2
2024-03-28 12:53:01 +01:00
tmontaigu
31302e532c
feat(hlapi): bind leading/trailing_ones/zeros and ilog2
2024-03-28 12:53:01 +01:00
Mayeul@Zama
a11d690fd9
feat(integer): add modulus switch compression
2024-03-27 15:22:20 +01:00
Mayeul@Zama
d76c58c38a
chore(integer): cleanup create_parametrized_test macro
2024-03-27 15:22:20 +01:00
Mayeul@Zama
5f1d6715ec
feat(shortint): add modulus switch compression
2024-03-27 15:22:20 +01:00
Beka Barbakadze
1151a7c3ef
fix(gpu): replace hardcoded degrees in multiplication.cuh by correct values.
2024-03-27 08:50:22 +01:00
Pedro Alves
5f975ff6f6
chore(gpu): replaces a mention to the low-latency PBS by just 'classical PBS' and removes a mention to the amortized variant
2024-03-26 12:15:24 -03:00
Arthur Meyre
fb4b975c34
feat(tfhe): add explicit decompress primitives for all CompressedServerKey
...
- we have a From implementation that allowed to decompress server keys but
it was not visible enough
- make the decompress methods take &self instead of self as input as we now
have the CUDA backend meaning we could be performing several decompressions
taking self by value would force the user to clone data
2024-03-26 15:45:54 +01:00
Arthur Meyre
0e9301cc4f
chore(doc): fix incorrect comment in repo README
2024-03-26 14:30:30 +01:00
Mayeul@Zama
2469c0ffde
fix(gpu): fix build.rs warning
2024-03-26 12:52:51 +01:00
Agnes Leroy
2955f0acfd
fix(gpu): fix tfhe-cuda-backend release
2024-03-26 09:11:54 +01:00
David Testé
f5fb578858
chore(ci): build cuda crates on aws instead on github runner
2024-03-26 09:11:54 +01:00
Agnes Leroy
61283254f0
fix(gpu): fix gpu clippy
2024-03-26 09:11:32 +01:00
David Testé
0dce4b5e93
chore(tfhe): rename integer ilog2 operations
2024-03-26 09:11:32 +01:00
dependabot[bot]
a296f33966
chore(deps): bump rtCamp/action-slack-notify from 2.2.1 to 2.3.0
...
Bumps [rtCamp/action-slack-notify](https://github.com/rtcamp/action-slack-notify ) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/rtcamp/action-slack-notify/releases )
- [Commits](b24d75fe0e...4e5fb42d24 )
---
updated-dependencies:
- dependency-name: rtCamp/action-slack-notify
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-03-25 13:51:08 +01:00
Arthur Meyre
2db5ac5b3d
fix(wop): fix empty extracted bits list rejected as invalid by the wopbs
...
- empty list is interpreted as being a trivial 0
- add non regression test from github issue
2024-03-25 09:42:33 +01:00
dependabot[bot]
292903a24a
chore(deps): bump JS-DevTools/npm-publish from 3.0.1 to 3.1.0
...
Bumps [JS-DevTools/npm-publish](https://github.com/js-devtools/npm-publish ) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/js-devtools/npm-publish/releases )
- [Changelog](https://github.com/JS-DevTools/npm-publish/blob/main/CHANGELOG.md )
- [Commits](4b07b26a2f...79051c040d )
---
updated-dependencies:
- dependency-name: JS-DevTools/npm-publish
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-03-25 09:39:13 +01:00
dependabot[bot]
52bbb2d1e6
chore(deps): bump tj-actions/changed-files from 43.0.0 to 43.0.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 43.0.0 to 43.0.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](77af4bed28...20576b4b9e )
---
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 >
2024-03-25 09:38:52 +01:00
Agnes Leroy
8d876a988e
chore(test): add a test macro with only classical params for CPU tests
...
Remove the macro in radix_parallel/tests_unsigned/mod.rs
2024-03-25 09:16:21 +01:00
Agnes Leroy
b57f4d6764
chore(gpu): speedup right arithmetic scalar shift
2024-03-25 09:16:21 +01:00
Agnes Leroy
82ef2cc672
feat(gpu): signed scalar shift
2024-03-25 09:16:21 +01:00
Agnes Leroy
6535bd1cca
feat(gpu): add an entry point to decompress integer server key to cuda server key
2024-03-25 09:16:00 +01:00
Beka Barbakadze
8cd8f8c176
feat(gpu): implement overflowing_sub
2024-03-22 17:15:13 +01:00
Agnes Leroy
bcbab11950
fix(gpu): fix bug in integer mult when k > 1
2024-03-22 10:33:48 +01:00
Arthur Meyre
3b291ac37d
chore(tfhe): make sure the GPU module is present during doc compilation
...
- fix lints
2024-03-22 10:12:06 +01:00
David Testé
e2f6ddbd46
chore(ci): create workflow to release tfhe-cuda-backend crate
2024-03-21 14:50:31 +01:00
Mayeul@Zama
31e2949906
style(all): regroup uses
2024-03-21 13:58:02 +01:00
Mayeul@Zama
2bf23ae9fb
fix(core): fix doctest comment
2024-03-21 13:58:02 +01:00
Mayeul@Zama
edf41b5c84
fix(shortint): fix test
2024-03-21 13:58:02 +01:00
Mayeul@Zama
98ba269c1d
chore(tfhe): remove useless comments
2024-03-21 13:58:02 +01:00
Mayeul@Zama
ffda4d3fbe
refactor(integer): ciphertext module
2024-03-21 13:58:02 +01:00
Mayeul@Zama
4046df90e9
refactor(shortint): ciphertext module
2024-03-21 13:58:02 +01:00
Mayeul@Zama
7e723f1ec2
refactor(shortint): factorize PBS code
2024-03-21 13:58:02 +01:00
Mayeul@Zama
13f7adec66
feat(core_crypto): rename modulus switch compression
2024-03-21 13:58:02 +01:00
Mayeul@Zama
259d5b6827
chore(tfhe): cleanup unused macros
2024-03-21 13:58:02 +01:00
Mayeul@Zama
4798ee17c4
chore(tfhe): make macros scoped
2024-03-21 13:58:02 +01:00
Mayeul@Zama
1c8f6ce75d
refactor(shortint): split shortint parametrized tests in 2 files
2024-03-21 13:58:02 +01:00
Mayeul@Zama
7f7591f1b4
fix(shortint): fix and rename tests
2024-03-21 13:58:02 +01:00
Arthur Meyre
d06f958990
chore(ci): force the removal of the 4090 label for PRs even for failures
...
- always() forces the evaluation of the PR removal even if there was a
failure before, which is irrelevant for removing a label
2024-03-21 10:19:31 +01:00
Pedro Alves
b4619bb745
fix(gpu): fix compilation when the user doesn't have a CUDA-capable device
2024-03-20 13:25:22 -03:00
Mayeul@Zama
f911af6e18
chore(c_api): remove useless feature flags
2024-03-20 15:07:10 +01:00
Mayeul@Zama
48309ff773
fix(c_api): run clippy on high-level-c-api
2024-03-20 15:07:10 +01:00
Pedro Alves
06af752bfc
fix(gpu): includes tests_and_benchmarks/include to format_tfhe_cuda_backend.sh
2024-03-20 08:58:29 +01:00
Arthur Meyre
73f8383def
fix(integer): fix the CRT LUT generation
2024-03-19 19:12:59 +01:00
David Testé
edca34c2c9
chore(ci): run aws gpu benchmark only on p3 instances
...
p4 (A100) and p5 (H100) resources are too scarce on AWS EC2 to use
them. A100 for example almost always fails on spawn request.
2024-03-19 15:42:02 +01:00
Pedro Alves
e6fd6823de
chore(gpu): implement a macro evaluated at compile time to retrieve the architecture
2024-03-19 11:47:10 +01:00
Agnes Leroy
ff8912bf66
chore(gpu): reduce scratch time
2024-03-19 11:47:10 +01:00
Pedro Alves
86e5640e06
fix(gpu): fix out-of-memory error in the custom benchmark tool
2024-03-19 03:07:36 -03:00
Agnes Leroy
0136642f89
feat(gpu): signed scalar bitop
2024-03-18 21:13:42 +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
Arthur Meyre
7fdcde0449
chore(ci): change slack notifications to be less confusing and more robust
...
- sometimes the notification will say fail while it did not really fail
- use the generic form which can never be wrong
2024-03-18 13:59:15 +01:00
Arthur Meyre
8a1cc3750b
chore(core): add asserts on in and out LweDimension to check they match
...
- ran into an issue where the dimensions did not agree and got weird
results because of that
2024-03-18 13:59:04 +01:00
dependabot[bot]
719bad6e7d
chore(deps): bump actions/checkout from 4.1.1 to 4.1.2
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](b4ffde65f4...9bb56186c3 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-03-18 13:58:46 +01:00
dependabot[bot]
a1483c6c9f
chore(deps): bump tj-actions/changed-files from 42.1.0 to 43.0.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 42.1.0 to 43.0.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](aa08304bd4...77af4bed28 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-03-18 11:40:53 +01:00
David Testé
c15e35782d
chore(ci): use new workflow fine-grained token
2024-03-18 10:10:26 +01:00
Miles
55f666d323
chore(tfhe): fix typos
2024-03-15 11:48:53 +01:00
Mayeul@Zama
155822bb99
fix(tfhe): fix formatting in macros
2024-03-15 09:26:53 +01:00
Mayeul@Zama
1647634c8e
fix(script): fix formatting
2024-03-15 09:26:53 +01:00
Mayeul@Zama
26aa20a78a
fix(doc): fix warning
2024-03-15 09:26:53 +01:00
Mayeul@Zama
53b89fdfae
fix(doc): add syntax highlighting to rust doctests
2024-03-15 09:26:53 +01:00
Agnes Leroy
5976ba51b1
feat(gpu): signed bitops
2024-03-15 09:12:14 +01:00
Mayeul@Zama
de6db4bc9d
fix(trivium): check warnings in benches
2024-03-14 13:08:38 +01:00
tmontaigu
de8568a5bb
fix(integer): fix parallel carry propagation on empty input
2024-03-14 10:34:56 +01:00
David Testé
83e9671071
chore(ci): check sha256 sum for nvm installation script
2024-03-14 09:22:26 +01:00
David Testé
9efe4ac69e
chore(ci): format javascript code using prettier
2024-03-14 09:22:26 +01:00
David Testé
937c364c6d
chore(ci): add format recipes for javascript code
2024-03-14 09:22:26 +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
David Testé
54ba8de83f
chore(wasm): allow parallel generation of shortint server key
2024-03-14 09:22:26 +01:00
Pedro Alves
20d92afaaf
feat(gpu): add support to larger polynomials on multi-bit PBS
2024-03-13 15:45:08 +01:00
Mayeul@Zama
865b667ffd
feat(core): add lwe ct modulus switch compression
2024-03-13 15:25:35 +01:00
Mayeul@Zama
3b35cc8269
refactor(core): simplify fast_pbs_modulus_switch
2024-03-13 15:25:35 +01:00
tmontaigu
8e19bd1b79
feat(integer): improve propagation & sum algorithms
...
For the full_propagation, the changes makes it do the best thing
depending in the degrees of the input.
First, the sum now uses full_propagate as its last step
as opposed to do a custom full propagation. This leads to
timing improvements for <= 8 bits, as the full_propagation
selects the sequential propagation that is always faster for
these precisions.
This will also improve any function that uses a sum with small
precision (like ilog2, leading/trailing_zeros/ones)
This will also improve performances for all precisions when computations
are done on modest hardware.
Second, the core algorithm of the sum now reasons
in terms of columns not rows which makes the code easier.
This makes us do less mistakes when computing the range
for which we have to extract messages and carry leading to less PBSes.
This leads to better performances on modest hardware, or when the
precision + number of elements starts to saturate the CPU threads.
2024-03-13 14:55:11 +01:00
Agnes Leroy
4e5e30550b
feat(gpu): optimize gpu int mul vector add part
...
- reduce keyswitch operations twice, reduce pbs layers twice,
remove compression and decompression operations.
remove most of the memcopies.
- expose sum ciphertexts standalone entry point
2024-03-13 16:03:42 +04:00
Agnes Leroy
ca40c8673f
chore(gpu): fix compilation without a device
2024-03-13 11:30:22 +01:00
Mayeul@Zama
9f70be9c95
feat(tfhe): disable debug assertions in devo profile
...
makes KS-PBS almost two times faster
2024-03-13 09:43:22 +01:00
Mayeul@Zama
dc44f5e517
feat(tfhe): update rust toolchain
2024-03-13 09:43:22 +01:00
Agnes Leroy
6f954bb538
feat(gpu): signed scalar sub
2024-03-12 15:32:57 +01:00
Pedro Alves
d3801446ff
chore(gpu): rename the low-latency PBS to just PBS and the fast variants to cg
2024-03-12 08:50:44 -03:00
Arthur Meyre
e81152a630
chore(tfhe): remove last remaining modular_std_dev
...
- some places were not updated, remove the last non modular std_dev
- the ones to dump parameters are modular so are kept
2024-03-12 11:12:40 +01:00
Pedro Alves
8c4675dc3e
fix(gpu): fix a bug in integer multiplication
2024-03-12 09:57:39 +01:00
Pedro Alves
29fb4fbe77
chore(gpu): refactor low-latency and multi-bit PBSs so the buffer is a structured object
2024-03-12 09:57:39 +01:00
Agnes Leroy
f84c34c903
feat(gpu): signed scalar add
2024-03-11 14:49:39 +01:00
dependabot[bot]
cc905a04c7
chore(deps): bump tj-actions/changed-files from 42.0.5 to 42.1.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 42.0.5 to 42.1.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](800a282599...aa08304bd4 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-03-11 09:30:41 +01:00
Arthur Meyre
3fc791e813
chore(ci): to avoid stack overlow crashes increase thread stack size
...
- Default Linux thread stack size seems to be 8 MB, rust limits it to 2 MB
by default, change that to avoid tests failing because of overflowed stacks
2024-03-08 19:49:22 +01:00
Pedro Alves
d4f8fb8f57
feat(gpu): Implement benchmark for low latency and amortized PBS in all variants and the FFT
2024-03-08 14:04:53 -03:00
Pedro Alves
68ce43d2f0
feat(gpu): implement custom benchmarks
2024-03-08 14:04:53 -03:00
Arthur Meyre
c5b9e5400a
chore(ci): make sure dev_bench is checked by clippy
...
- removed the experimental feature requirement
2024-03-08 10:56:36 +01:00
David Testé
8167c85764
chore(bench): reduce measurement duration to 60 for pbs benchmarks
...
This is done to speed-up benchmark duration.
2024-03-08 09:16:17 +01:00
tmontaigu
98bd45503c
chore(hlapi): add some GPU test for FheUint
...
Tests are not complete yet, but its the first step to get there
2024-03-07 20:08:11 +01:00
Agnes Leroy
ed50042719
feat(gpu): signed mul with tests and benchmarks
2024-03-07 15:37:52 +01:00
David Testé
053d56a3d6
chore(ci): format benchmark results parser with black
2024-03-07 13:33:46 +01:00
David Testé
e5b117ca29
chore(ci): handle new name format to get pbs throughput values
...
core_crypto benchmark name format has been changed to reflect
what's used in other layers. Benchmark result parser was no longer
able to compute the right value for the PBS throughput.
2024-03-07 13:33:46 +01:00
tmontaigu
9de486f33c
chore(integer): move & hardden sub/neg tests
...
Also start making non parallel test use test cases
2024-03-07 10:38:27 +01:00
Arthur Meyre
ccf879c9ae
refactor(tfhe): plug NoiseDistribution in the various APIs
2024-03-07 10:24:15 +01:00
Mayeul@Zama
d3c1f91948
test(shortint): add oprf deterministic test
2024-03-06 17:19:05 +01:00
Arthur Meyre
273dbe1b85
chore(core): make torus_modular_diff safer to use
2024-03-06 15:54:06 +01:00
Agnes Leroy
7ac061266f
feat(gpu): signed sub and neg with tests and benchmarks
...
Refactor tests in the meanwhile to avoid huge tests files.
2024-03-06 15:53:51 +01:00
Agnes Leroy
c1c56ab770
fix(gpu): fix memory bug in multi-bit PBS
2024-03-06 14:18:29 +01:00
Pedro Alves
00dad37812
chore(gpu): replace recomended lwe_chunk_size for NVIDIA Tesla H100 GPUs
2024-03-06 07:10:22 -03:00
Arthur Meyre
f94533d70d
chore(ci): fix CUDA_PATH bin not being exported in GITHUB_PATH
2024-03-06 09:22:45 +01:00
David Testé
b7d7e68d0c
chore(ci): run static linter on workflows
2024-03-05 15:00:09 +01:00
David Testé
e8135c207d
chore(ci): fix lint errors in workflows
2024-03-05 15:00:09 +01:00
Arthur Meyre
601b200351
chore(ci): fix workflows, missing leading $, skipped does not exist
...
- avoid spamming if cancelled
2024-03-04 18:19:46 +01:00
Arthur Meyre
a0d5bf2fc2
feat(core): switch GLWE primitives to the new noise distribution system
2024-03-04 15:01:25 +01:00
dependabot[bot]
58223dea09
chore(deps): bump tj-actions/changed-files from 42.0.4 to 42.0.5
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 42.0.4 to 42.0.5.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](3f54ebb830...800a282599 )
---
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 >
2024-03-04 09:59:53 +01:00
dependabot[bot]
1f3096b743
chore(deps): bump codecov/codecov-action from 3.1.5 to 4.1.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 3.1.5 to 4.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.5...54bcd8715eee62d40e33596ef5e8f0f48dbbccab )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-03-04 09:59:15 +01:00
Agnes Leroy
4a3d5d432a
chore(gpu): fix integer bench workflows
2024-03-04 09:30:10 +01:00
Agnes Leroy
c6bfcd75a6
chore(gpu): add pbs throughput benchmarks
2024-03-04 09:30:10 +01:00
Agnes Leroy
85dfd70c6b
chore(bench): fully load the cpu for throughput benches
2024-03-04 09:30:10 +01:00
Agnes Leroy
c720656340
chore(gpu): bench signed add on gpu
2024-03-04 09:26:34 +01:00
Agnes Leroy
1c209403a6
feat(gpu): signed addition
2024-03-04 09:26:34 +01:00
tmontaigu
347fc9aaa7
chore(hlapi): add cuda tests for FheBool
2024-03-01 17:17:37 +01:00
tmontaigu
198485b5fb
feat(hlapi): bin cuda scalar_eq/ne on FheBool
2024-03-01 17:17:37 +01:00
David Testé
bd7547c93d
chore(bench): benchmark 4 bits integer operations
2024-03-01 14:39:58 +01:00
Arthur Meyre
955495d714
refactor(core): change layout of compact public key encryption for LWE list
...
- this makes sure the product computed for the first ciphertext matches the
product computed for a single ciphertext in the non list case
BREAKING CHANGE:
all previous compact public key list encryptions are not compatible with
the new layout
2024-03-01 11:05:04 +01:00
David Testé
902755c33c
feat(core_crypto): add parallelized pfpks with lwe ciphertext list
2024-02-29 18:05:57 +01:00
Arthur Meyre
89f845fa4f
refactor(tfhe): use dynamic noise distributions for LWE primitives
2024-02-29 18:05:12 +01:00
Arthur Meyre
9f89d2c09d
chore(core): lighten the bound to be generable from a Gaussian distribution
2024-02-29 18:05:12 +01:00
Arthur Meyre
ea0d146ed0
chore(core): add missing unsigned integer slice add noise primitives
2024-02-29 18:05:12 +01:00
tmontaigu
943ccdf450
chore(integer): harden unsigned add tests
...
This adds degrees and noise levels checks as well as comparing
individual decrypted block values with their degrees.
2024-02-29 17:24:25 +01:00
tmontaigu
f39896ac63
refactor(integer): start refactoring tests
...
This starts splitting the long test radix tests files into
smaller ones, starting with the add family of function.
2024-02-29 17:24:25 +01:00
Pedro Alves
46a87c6f89
fix(gpu): fix scalar eq for booleans
2024-02-29 11:51:49 +01:00
David Testé
a5579532be
chore(ci): add product cost for rtx4090 to compute throughput
...
RTX4090 we're using here is owned by Zama. So we don't pay an
hourly rate to AWS per se. But in ordrer to compute throughput on
benchmarks results, the parser needs a numeric value corresponding
to the hardware used. Ops-per-dollar metric is not really used
today conversely ops-per-seconds is.
In the end we use an approximation of the cost for electrical
consumption.
2024-02-28 15:53:08 +01:00
Agnes Leroy
41e1781226
chore(gpu): move ciphertext info to dedicated file
2024-02-28 09:02:36 +01:00
Agnes Leroy
697ce94ee2
chore(gpu): remove duplicated test params
2024-02-28 09:02:21 +01:00
Arthur Meyre
a667b654ef
chore(tfhe): use div_ceil now that MSRV is 1.73
2024-02-27 18:35:54 +01:00
Arthur Meyre
1bff07b6eb
chore(tfhe): update rust MSRV to 1.73
2024-02-27 18:35:54 +01:00
David Testé
59664e84c8
chore(bench): format core_crypto benchmark names to ease parsing
2024-02-27 18:05:35 +01:00
Agnes Leroy
79dc101728
chore(gpu): fix 4090 bench workflow
2024-02-27 17:46:20 +01:00
Arthur Meyre
6828438898
chore(tfhe): bump version to 0.6.0
2024-02-27 13:24:10 +01:00
Arthur Meyre
a8f4cf7c29
chore(cuda): bump backend version to 0.2.0
2024-02-27 13:24:10 +01:00
David Testé
30d2f5f66d
chore(ci): add coverage build make recipe
2024-02-27 09:29:03 +01:00
David Testé
112cc6f6c9
chore(ci): remove private feature __coverage to use tarpaulin cfg
2024-02-27 09:29:03 +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
David Testé
6e08e91109
chore(ci): checkout repo with fetch-depth 0 to get commit hash
...
The COMMIT_HASH computed variable needs fetch-depth=0 to be able
to get the versions of the repository.
2024-02-27 08:50:38 +01:00
Agnes Leroy
75f0ad1d4b
chore(gpu): add core crypto benches to 4090 bench workflow
2024-02-27 08:50:38 +01:00
Arthur Meyre
618758bd95
fix(core): fix unsigned noise addition for custom modulus
2024-02-26 22:19:01 +01:00
Arthur Meyre
d770a271b3
chore(core): add custom power of 2 support for u128
2024-02-26 22:19:01 +01:00
David Testé
80468494b2
chore(ci): lock version of lattice-estimator in workflow
...
Latest version of lattice-estimator produce overflow errors.
We force the checkout to the last working version to avoid a red
CI.
2024-02-26 22:18:06 +01:00
Pedro Alves
26e5af542f
feat(gpu): Reintroduce a tool to independently test PBS, Keyswitch, and fft at C++ side.
2024-02-26 13:44:32 -03:00
Arthur Meyre
f23b4f21dc
chore(core): remove the possibility to seed the NoiseRandomGenerator
...
- to further avoid misuse, now the NoiseRandomGenerator itself requires a
seeder
- removed the possibility to re-seed the noise generator, even in tests, we
now have access to deterministic seeders which did not use to be the case
2024-02-26 13:28:17 +01:00
Arthur Meyre
b394da3dbb
chore(tfhe): remove unused distributions
2024-02-26 13:28:17 +01:00
Arthur Meyre
6007cd2c81
chore(core): refactor byte counts for runtime noise distribution choice
...
- we will want to be able to choose a noise distribution at runtime and not
keep a hard coded gaussian, we therefore need to be able to adapt to the
number of bytes a distribution may require to properly generate a sample
2024-02-26 13:28:17 +01:00
Arthur Meyre
a6fdc46794
chore(core): rename Encryption RNG primitives to match noise distribution
...
- we are shifting to non hardcoded noise distributions for encryption,
rename functions for mask and noise generation to indicate which hard coded
distribution was used initially
2024-02-26 13:28:17 +01:00
dependabot[bot]
0134a4a0f2
chore(deps): bump codecov/codecov-action from 4.0.1 to 4.0.2
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](e0b68c6749...0cfda1dd0a )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-02-26 13:27:24 +01:00
dependabot[bot]
68dfd96993
chore(deps): bump tj-actions/changed-files from 42.0.3 to 42.0.4
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 42.0.3 to 42.0.4.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](ec75ae5ab7...3f54ebb830 )
---
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 >
2024-02-26 13:27:07 +01:00
David Testé
6811177178
chore(ci): fix missing backslash in rtx benchmark workflow
...
This missing backslash causes the Python command to fail since
some input arguments are missing.
2024-02-26 09:32:02 +01:00
Pedro Alves
753c7aa0d2
chore(gpu): minor improvement on the LUT generation function and in
...
are_all_comparisons_block_true()
2024-02-24 08:49:59 +01:00
tmontaigu
f38a9a9b4c
feat(integer): add ilog2 and checked_ilog2
2024-02-23 18:55:34 +01:00
Agnes Leroy
c7f6eb0119
chore(gpu): change cudavec and cudastream
2024-02-23 15:04:12 +01:00
David Testé
85da12c00f
chore(ci): run gpu benchmarks on rtx4090 every friday
...
Also increase timeout value to ensure benchmarks could last more
than 6 hours to execute.
2024-02-23 12:33:14 +01:00
Arthur Meyre
20b1427f72
chore(ci): fix cuda clippy targets
...
- missing feature meant some benchmarks were not linted
- add all targets for the cuda backend
2024-02-22 17:02:04 +01:00
tmontaigu
716677f383
feat(capi): allow control of threading
2024-02-22 12:08:46 +01:00
Arthur Meyre
d09e5ab066
feat(core): add TUniform distribution to core_crypto
...
- mutualize the distribution test between Uniform and TUniform, as both are
distributions with finite support (unlike the gaussian which needs its own
distribution test)
- the distribution test requires that the values can be mapped to/from
usize to be able to accumulate the statistics of each value being generated
- the tests make use of a DistributionTestHelper which genericizes the
construction of a distribution, mapping the value to/from usize and the
computation of the theoretical cumulative distribution function (on which
the test depends to test the validity of the distribution via the DKW
inequality, see Wikipedia link in the code)
2024-02-22 10:13:59 +01:00
Arthur Meyre
f8bfeb8927
feat(core): add a way to generate values from a semi-dynamic distribution
...
- semi dynamic as the distribution is a generic parameter, as the Scalar
type needs to be generable by that distribution but it also is configurable
at runtime
2024-02-22 10:13:59 +01:00
Arthur Meyre
67b543b6e7
chore(core): rename some tests whose names made little sense
2024-02-22 10:13:59 +01:00
Agnes Leroy
b2cfe2765c
chore(gpu): add benchmarks for scalar eq/ne and cast
2024-02-21 10:04:01 +01:00
David Testé
8397637b24
chore(ci): use aws-region as input to stop ec2 instances
...
This is done to handle case where a PR is merged before AWS EC2
instance teardown. If we use profile input in this case, Slab will
try to fetch ci/slab.toml on a git reference that doesn't exists
anymore thus sending back an error without being able to terminate
the instance. By using aws-region Slab won't fetch slab.toml file.
2024-02-20 18:07:31 +01:00
tmontaigu
42b7c2f403
fix(integer): correct degree in small comparisons
2024-02-20 14:13:13 +01:00
J-B Orfila
b708abb10b
feat(core): allow switching moduli during an LWE Keyswitch
2024-02-20 10:34:39 +01:00
Arthur Meyre
e62808b2b4
chore(core): fix CiphertextModulus::new error message
...
- the returned error from try_new was ignored
- use an enum with a const_panic and hardcoded error messages to keep new
const
- impl Debug manually to have nice error messages still when unwraping on
the try_new result if it's an Err
BREAKING CHANGE:
try_new and try_new_power_of_2 return type has changed for
CiphertextModulus
2024-02-20 10:34:39 +01:00
Agnes Leroy
62135791bf
chore(gpu): panic when polynomial size is not supported
2024-02-20 09:29:04 +01:00
Agnes Leroy
41c38d127b
chore(gpu): fix GPU PBS benchmark parameters
2024-02-20 09:29:04 +01:00
tmontaigu
d55d68ec52
fix(capi): add missing function on FheBool
...
- safe ser/de
- classical ser/de
- comparisons
- scalar binary fn/comparisons
- compact & compressed fhe bool encryption
2024-02-19 19:20:00 +01:00
Arthur Meyre
9faab7b9a6
chore(ci): increase timeout for M1 mac CI
2024-02-19 18:29:57 +01:00
Agnes Leroy
ff539aab6b
chore(gpu): activate all targets for clippy_gpu
2024-02-19 16:47:19 +01:00
Agnes Leroy
799829eab4
feat(gpu): cast between unsigned cuda radix ciphertexts
2024-02-19 14:46:10 +01:00
Agnes Leroy
c30395daef
chore(gpu): add workflow for 4090 integer bench
2024-02-19 14:02:17 +01:00
tmontaigu
ebce4fcfd4
chore(hlapi): add tests for fhe_bool
2024-02-19 10:11:40 +01:00
tmontaigu
85a428bb43
fix(integer): make encrypt_bool specify the degree
...
encrypt_one_block does not leak information
on the message.
BooleanBlocks are meant for when we want to
be explicit that the value is a boolean
and are ok for this to be public.
Thus it needs to correctly set the degree to 1
for other operations to properly take advantage of that
2024-02-19 10:11:40 +01:00
tmontaigu
c4266bd610
fix(shortint): fix bitwise opts degree
...
We used `after_bitand/or/xor` on the ct_left
**after** the lut had changed its degree.
So the `after_bit` function computed the
resulting using a wrong degree for the left
ct.
2024-02-19 10:11:40 +01:00
tmontaigu
76a7cd9b24
fix(hlapi): bind missing cuda bitnot
2024-02-19 10:11:40 +01:00
dependabot[bot]
9baa54b636
chore(deps): bump tj-actions/changed-files from 42.0.2 to 42.0.3
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 42.0.2 to 42.0.3.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](90a06d6ba9...ec75ae5ab7 )
---
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 >
2024-02-19 09:29:56 +01:00
tmontaigu
863e0c275b
feat(integer): add [trailing/leading]_[zeros/ones]
2024-02-16 15:56:15 +01:00
Arthur Meyre
cd13b40dbb
chore(ci): fix GPU tests to run only with core crypto features
2024-02-16 13:43:28 +01:00
Arthur Meyre
1c8e88ebfd
chore(ci): add -e flag to gpu fmt check script
2024-02-16 13:43:28 +01:00
Arthur Meyre
02bac34f1b
chore(ci): set-up a workflow to use the RTX 4090
2024-02-16 13:43:28 +01:00
Arthur Meyre
4576508ccb
chore(ci): update macOS runner for cargo builds
2024-02-15 19:01:15 +01:00
sarah el kazdadi
7190dad1e3
chore(ci): update toolchain, fix clippy warnings
2024-02-15 19:01:15 +01:00
sarah el kazdadi
18b9458401
fix(tfhe): update pulp and bytemuck to fix nightly breakage
2024-02-15 19:01:15 +01:00
David Testé
747ade0a54
chore(ci): update gpu aws ec2 ami
...
Done to get clang-format-15 and cmake-format and latest packages
updates.
2024-02-15 14:45:45 +01:00
David Testé
ada460b429
chore(bench): fix array declaration for multi-bit gpu
2024-02-15 13:32:11 +01:00
Beka Barbakadze
56f9b221eb
feat(gpu): scalar shifts with one wave of pbs
2024-02-15 14:35:08 +04: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
Arthur Meyre
3ff5d551a9
chore(ci): make avx512 enabled by default for benchmarks
...
- was too error prone when used by other people in the company, no more
doubts and we are generally not interested in non avx512 results
2024-02-15 10:37:14 +01:00
David Testé
0b1ea3b7dc
chore(deps): update npm packages for wasm interface
...
NPM package `ip` had a critical security flaw thus packages needed
an upgrade to fix the issue.
2024-02-13 17:46:13 +01:00
dependabot[bot]
e0fddc8ea7
chore(deps): bump actions/upload-artifact from 4.3.0 to 4.3.1
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](26f96dfa69...5d5d22a312 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-02-12 13:22:21 +01:00
yuxizama
5354cffd8e
chore(doc): Update README.md structure
2024-02-12 09:38:34 +01:00
David Testé
d258d1fcf4
chore(ci): notify ec2 teardown failure on slack channel
2024-02-12 09:29:26 +01:00
David Testé
7cecbb30b2
chore(bench): run keyswitch benchmarks on multi-bit parameters
2024-02-12 09:29:11 +01:00
tmontaigu
ece82c51a5
feat(capi): add Cuda support
...
- This adds GPU support in the C API
- Also make ctest (cmake test launcher) print
test output when it fails
2024-02-09 14:45:21 +01:00
Pedro Alves
8c54c8200b
feat(gpu): implement scalar eq and ne
2024-02-09 13:04:31 +01:00
Arthur Meyre
b6bfe30065
chore(tfhe): remove some outdated concrete branding
2024-02-09 10:48:38 +01:00
Agnes Leroy
d5c0c0242c
chore(bench): fix ks benchmark
2024-02-08 22:02:11 +01:00
Arthur Meyre
6826b6b638
chore(tfhe): pin bytemuck temporarily as the 1.14.2 is broken
...
- this follows the nightly update about stdsimd vs stdarch, the change
on bytemuck's side is not properly stable compatible
2024-02-08 14:39:39 +01:00
aquint-zama
f0b4749aca
chore(doc): fix docs snippet comments
2024-02-07 09:25:26 +01:00
David Testé
eb4785001d
chore(ci): add checks on params before running lattice estimation
2024-02-06 18:11:16 +01:00
tmontaigu
16d6b2f75d
feat(capi): allow cbindgen to generate docs
...
with `documentation=true` cbindgen now properly
generates/copies any rust documentation that
are on `#[no_mangle] pub extern "C" fn` into
their corresponding declaration in the header file.
This will allows to finally start adding some documentation
on the CAPI (tfhe.h)
2024-02-06 12:09:43 +01:00
David Testé
9bdeb697ad
chore(bench): implement integer casting benchmarks
2024-02-06 09:41:17 +01:00
Agnes Leroy
b5615bb3ad
fix(gpu): fix 40 bit integer multiplication
...
Return in cuda memcpy and memset if size is 0 instead of aborting.
2024-02-06 09:08:48 +01:00
Agnes Leroy
37b94780b2
chore(bench): modify PBS bench names
2024-02-06 09:08:41 +01:00
Agnes Leroy
035a70d81f
chore(gpu): add a benchmark for keyswitch on GPU
2024-02-06 09:08:41 +01:00
David Testé
f5c971652d
refactor(boolean): put all parameters into constant array
2024-02-05 18:01:07 +01:00
Arthur Meyre
a0b75d9a37
chore(doc): rename acc->lut to better match shortint API naming in doctest
2024-02-05 17:39:13 +01:00
Arthur Meyre
90da50dc53
feat(shortint): many lut construction using MSB leftover space
2024-02-05 17:39:13 +01:00
Arthur Meyre
473a6a0f40
test(core): add a many LUT test in core crypto
...
- it does not require any new primitive so was made into a test at the core
crypto level
- shortint will have a more user friendly API, using the MSBs for selecting
the function means it should not require too much design as deltas are
always the same
2024-02-05 17:39:13 +01:00
dependabot[bot]
8f1a1da4e1
chore(deps): bump codecov/codecov-action from 3.1.5 to 4.0.1
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 3.1.5 to 4.0.1.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](4fe8c5f003...e0b68c6749 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-02-05 17:04:11 +01:00
David Testé
a3c07dedad
chore(bench): add 4_4 parameters set to pbs throughput benchmarks
2024-02-05 17:03:38 +01:00
Agnes Leroy
5513d3a894
chore(gpu): abort when trying to launch 32 bit multi-bit PBS
2024-02-05 14:58:48 +01:00
David Testé
6ef0a2b4ef
chore(ci): run ec2 teardown only if setup is not skipped
2024-02-04 09:54:37 +01:00
Arthur Meyre
bba4bcee88
chore(doc): update installation to match README
...
- added more clearly the information for x86 windows machines
2024-02-02 18:27:46 +01:00
David Testé
45befcaf40
chore(ci): switch to slab action for pull-request workflows
2024-02-02 16:46:59 +01:00
Agnes Leroy
97feefe2ed
chore(gpu): reuse memory for the single carry propagation
2024-02-02 08:27:23 +01:00
Agnes Leroy
4ef8045a67
fix(gpu): fix cuda_memset with size 0
2024-02-02 08:27:10 +01:00
tmontaigu
48f67fb427
refactor(hlapi): split long files of hlapi
...
This splits the long base.rs files into multiple ones,
to make it easier to navigate.
There is no code changes appart from moving stuff.
2024-02-01 15:43:44 +01:00
Agnes Leroy
bce3bf1733
chore(gpu): add fmt and clippy checks in tfhe-cuda-backend
2024-02-01 15:23:49 +01:00
Agnes Leroy
253062c5aa
chore(gpu): add tfhe-cuda-backend to the workspace
2024-02-01 15:23:49 +01:00
Arthur Meyre
b44ed91519
feat(integer): add smart_neg_assign
2024-02-01 10:04:22 +01:00
Arthur Meyre
ddb010d8f1
chore(integer): plug keyswitching tests with the ci_run_filter for nextest
2024-02-01 10:04:10 +01:00
Arthur Meyre
8a9559c4d1
chore(doc): fix modulus struct docstrings in shortint
...
- it stated it represented a number of bits while it represents the actual
modulus
2024-02-01 10:03:58 +01:00
Sexosexosexo
02265705fc
docs(tfhe): add fhe_strings example
2024-01-31 17:07:11 +01:00
Mayeul@Zama
7b4bb6ad55
feat(c_api): add oprf
2024-01-31 16:53:33 +01:00
Mayeul@Zama
fd084d50c5
style(c_api): reformat c test
2024-01-31 16:53:33 +01:00
Mayeul@Zama
f59cb6c632
feat(c_api): add oprf
2024-01-31 16:53:33 +01:00
Mayeul@Zama
c594734fcf
fix(integer): make oprf test more strict
2024-01-31 16:53:33 +01:00
Arthur Meyre
f9669c3294
chore(ci): update scripts and Makefile for future forward compatibility
2024-01-31 16:24:39 +01:00
Arthur Meyre
76665ab478
chore(ci): convert some make targets to be semver trick compatible
2024-01-31 16:24:39 +01:00
tmontaigu
9b454abe2a
feat(integer): add checked_div
...
A division that returns a flag to know if the the visor was 0
2024-01-31 13:44:49 +01:00
tmontaigu
da08115c10
chore(integer): add notes in docs regarding division by 0
2024-01-31 13:44:49 +01:00
Arthur Meyre
8aec783dd9
chore(integer): remove deprecated parameter set
2024-01-31 09:35:22 +01:00
Ben
4bf28b836a
chore(docs): fix typo
2024-01-31 09:34:51 +01:00
David Testé
9df529bc59
chore(ci): use slab action on fast cpu tests workflow
2024-01-31 09:09:24 +01:00
Agnes Leroy
71bff0963c
chore(gpu): check for all cuda errors and abort in device.cu/.h
...
Remove some legacy compilation warnings
2024-01-31 08:54:48 +01:00
Arthur Meyre
eeaf45dbc7
docs(bench): add scalar benchmarks for integer
2024-01-30 10:50:37 +01:00
tmontaigu
353f279a9e
feat(integer): fuse two PBS in comparisons
...
In comparisons, we were reducing a vec of orderings
(inferior, equal, superior) into one final ordering,
and then we would do one final PBS to transform that
into a boolean value (0 or 1) depending what was wanted
(<=, <, >, >=).
This fuse the last PBS (ordering -> boolean value) with
the last round of reduction, when there are only two blocks left
to be reduced.
This allows to gain one PBS. Meaning for ciphertext/cipheretxt
comparisons we get back the performance lost introduced by
the fix in f4c220c1. And comparisons between a clear and
ciphertext get an improvement.
2024-01-29 14:42:56 +01:00
tmontaigu
8355ed5c10
fix(integer): add noise cleaning pbs in comparisons
...
In comparisons we were packing blocks to then do a subtraction
between them. However this goes above the noise limit
that would guarentee the advertised error propability.
To fix that we add a pbs to clean the noise. This pbs only needs
to be added in the ciphertext/ciphertext comparisons. Making them slower
by 1 PBS.
2024-01-29 14:42:56 +01:00
dependabot[bot]
84844bb4eb
chore(deps): bump codecov/codecov-action from 3.1.4 to 3.1.5
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](eaaf4bedf3...4fe8c5f003 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-29 09:45:08 +01:00
dependabot[bot]
9b6e861f9b
chore(deps): bump tj-actions/changed-files from 42.0.0 to 42.0.2
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 42.0.0 to 42.0.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](ae82ed4ae0...90a06d6ba9 )
---
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 >
2024-01-29 09:44:57 +01:00
dependabot[bot]
b73f24057d
chore(deps): bump actions/upload-artifact from 4.1.0 to 4.3.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.1.0 to 4.3.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v4.1.0...26f96dfa697d77e81fd5907df203aa23a56210a8 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-29 09:44:40 +01:00
David Testé
43c0799655
chore(bench): add ciphertexts sum to integer benchmarks
2024-01-26 17:56:49 +01:00
David Testé
f94a63eedc
chore(bench): add pbs benchmarks on gpu
2024-01-26 17:42:31 +01:00
tmontaigu
35d65bcde7
docs(hlapi): document trivial encryption to debug
2024-01-25 10:36:07 +01:00
tmontaigu
0bfe59a656
docs(hlapi): document how to use rayon
2024-01-25 10:36:07 +01:00
yuxizama
ffe4c7135a
chore(docs): update readme links and badges
2024-01-25 10:10:12 +01:00
yuxizama
a8f329fc75
chore(docs): update README.md
...
Change support banner
2024-01-25 10:10:12 +01:00
Agnes Leroy
11db96d394
fix(gpu): make all async functions unsafe, fix cuda_drop binding, add missing sync
2024-01-24 21:34:15 +01:00
David Testé
ae8d48138c
chore(ci): add gpu tests from user documentation
2024-01-24 16:27:12 +01:00
Agnes Leroy
e912394b52
chore(gpu): fix formatting command
2024-01-24 15:46:23 +01:00
Agnes Leroy
8958b6df98
chore(gpu): fix compilation when no nvidia gpu is available
2024-01-24 15:46:23 +01:00
tmontaigu
aeb36ee14f
fix(integer): is_scalar_out_of_bounds handles bigger ct
...
Fix a bug where in is_scalar_out_of_bounds, if the scalar was
negative and the ciphertext a signed one with more blocks than
the decomposed scalar, we would do an out of bound access
(i.e a panic).
This fixes that, this will fix doing signed_overflowing_mul on 256 bits
where the bug first appeared
2024-01-24 10:06:39 +01:00
David Testé
b3976f2963
chore(ci): fix inputs for gpu full benchmark workflow
2024-01-24 10:02:28 +01:00
Arthur Meyre
0d6e0c7224
fix(core): ignore value in the body when doing LWE encryption
2024-01-23 18:37:24 +01:00
Agnes Leroy
bd26d0ecd6
chore(gpu): rename "test vector" -> "luts" and "tvi" -> "lut_indexes"
2024-01-23 16:02:45 +01:00
Agnes Leroy
16f457b57c
chore(gpu): move around code in integer.h for better readability
2024-01-23 16:02:45 +01:00
tmontaigu
6060882a7a
fix(integer): fix cast in scalar_shift/rotate
...
In scalar_shift/rotate, we get the number of bits to shift/rotate
as a generic type, the can be casted to u64.
We compute the total number of bits the ciphertext has, cast that number
to the same type as the scalar, and do "shift % num_bits".
However, if the number of bits computed exceeds the max value the scalar
type can hold, we could end up doing a remainder with 0.
e.g 256bits ciphertext and scalar type u8 => 256u64 casted to u8 results
in 0.
Fix that by casting the scalar value to u64.
2024-01-23 15:10:04 +01:00
tmontaigu
3e2833ac64
chore(hlapi): remove leftover file
...
This file was not correctly removed during the refactor
2024-01-23 14:54:01 +01:00
David Testé
bc85163c23
chore(ci): change rust-toolchain action
...
Github thrid-party Action actions-rs/toolchain is not maintained
anymore. We switch to dtolnay/rust-toolchain.
2024-01-23 14:20:31 +01:00
David Testé
45b2548b17
chore(ci): set rustbacktrace var to full to ease debug on failure
2024-01-23 14:20:14 +01:00
Arthur Meyre
0476ee0c3c
chore(docs): fix link to 0.4 semver doc
2024-01-23 10:50:34 +01:00
dependabot[bot]
8d77ea0a57
chore(deps): bump actions/upload-artifact from 3.1.2 to 4.2.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3.1.2 to 4.2.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v3.1.2...694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-23 10:32:16 +01:00
dependabot[bot]
f10fa3f13c
chore(deps): bump tj-actions/changed-files from 41.1.1 to 42.0.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 41.1.1 to 42.0.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](62f4729b5d...ae82ed4ae0 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-23 10:31:59 +01:00
dependabot[bot]
fd4e2059f4
chore(deps): bump actions/checkout from 3.5.3 to 4.1.1
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3.5.3 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3.5.3...b4ffde65f46336ab88eb53be808477a3936bae11 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-23 10:31:52 +01:00
Arthur Meyre
e7352eee8b
chore(tfhe): add version for tfhe-cuda-backend dependency
2024-01-22 17:24:51 +01:00
J-B Orfila
33a7e9f3e4
doc(gpu): add how to page about running on GPU
2024-01-22 17:18:02 +01:00
David Testé
96da25ce90
chore(ci): separate clippy and tests in different job steps
2024-01-22 16:04:07 +01:00
Agnes Leroy
548f2e5d05
chore(gpu): fix gpu package for publication
2024-01-22 15:29:26 +01:00
Arthur Meyre
f313b58c8e
doc(tfhe): add doc page about data migration which will redirect to 0.4 doc
2024-01-22 13:43:44 +01:00
J-B Orfila
fd038346b7
doc: overflow detection
2024-01-22 13:42:55 +01:00
tmontaigu
f0fcfd517b
feat(hlapi): update wasm and c_api
2024-01-22 10:06:49 +01:00
Arthur Meyre
0d2448e9e9
feat(hl_api): add raw parts API for Ciphertext types
2024-01-19 13:05:26 +01:00
Arthur Meyre
68ef237ae6
feat(hl_api): add raw parts API for ServerKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
fb39864f05
feat(hl_api): add raw parts API for PublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
69a5562aba
feat(hl_api): add raw parts API for CompressedServerKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
d49ffdd26f
feat(hl_api): add raw parts API for CompressedPublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
c87c362d42
feat(hl_api): add raw part API for CompressedCompactPublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
905ef4ea78
feat(hl_api): add raw parts API for CompactPublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
957dd47295
feat(boolean): add raw parts API for PublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
0a550ac803
feat(boolean): add raw parts API for CompressedPublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
8c62155429
feat(boolean): add raw parts API for CompressedServerKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
3e23631bdc
feat(boolean): add raw parts API for ServerKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
02b2fcf78d
feat(boolean): add raw parts API for KeySwitchingKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
d9d222c1b5
feat(integer): add raw parts API for CompressedCompactPublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
f2011cd30d
feat(integer): add raw parts API for CompactPublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
1b3d41ec44
feat(integer): add raw parts API for CompressedPublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
65816a175a
feat(integer): add raw parts API for PublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
2d1cf95900
feat(integer): add raw parts API for KeySwitchingKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
247072a81a
feat(integer): add raw parts API for CompressedServerKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
c65a58c14f
feat(integer): add raw parts API for ServerKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
3a4859553e
refactor(integer): add raw parts API for Wopbskey instead of from_shortint
2024-01-19 13:05:26 +01:00
Arthur Meyre
9c3a159ca1
feat(integer): add raw parts API for CompactCiphertextList
2024-01-19 13:05:26 +01:00
Arthur Meyre
e76ddd5a49
feat(shortint): add raw parts API for WopbsKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
fa35b6ef8f
feat(boolean): add raw parts API for CompressedCiphertext
2024-01-19 13:05:26 +01:00
Arthur Meyre
a6e835b3f1
feat(shortint): add raw parts API for CompactCiphertext and related list
2024-01-19 13:05:26 +01:00
Arthur Meyre
c586d64fab
feat(shortint): add raw parts API for CompressedServerKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
6108f180bf
feat(shortint): add raw parts API to PublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
8f0e4f6c99
feat(shortint): add raw parts API for CompressedPublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
473b7e0c6a
feat(shortint): add raw parts API to CompressedCompactPublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
e9c92bc9a3
feat(shortint): raw parts API for CompactPublicKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
e4c0c4c15f
feat(shortint): add function to recompute thread count
2024-01-19 13:05:26 +01:00
Arthur Meyre
ea7c579efc
feat(shortint): add raw parts API for ServerKey and KS Key
...
- add a method to easily get the expected LweDimension of a shortint
Ciphertext for a given ServerKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
c9d19fca19
feat(tfhe): add raw parts API for HL API forward compatibility
...
- allows to convert HL API ClientKey from 0.4 to 0.5
- add raw parts API for shortint ClientKey
- add raw parts API for integer ClientKey
- add raw parts API for HL API IntegersClientKey
- add raw parts API for HL API ClientKey
2024-01-19 13:05:26 +01:00
Arthur Meyre
f3e6074480
feat(core): backward compatibility types for fft re-exported
2024-01-19 13:05:26 +01:00
tmontaigu
17c110f536
feat(hlapi): add gpu support
2024-01-19 09:27:04 +01:00
Arthur Meyre
45e27d8836
chore(core): remove Serialize and Deserialize on GlweBody
...
- users are not expected to use those structs for serialization
2024-01-18 17:42:07 +01:00
tmontaigu
ee10508c99
refactor(hlapi): prepare hlapi for different backends/representations
...
- Split GenericInteger into FheUint and FheInt
- Prepare FheUint and FheBool to support different backends
- Allow the use of 1_1 parameters
BREAKING CHANGE: unset_server_key no longer returns the server key
2024-01-18 16:58:11 +01:00
Beka Barbakadze
9213436b93
fix(gpu): fix mem reuse in multiplication, remove extra variable from lut constructor
2024-01-18 16:06:07 +01:00
Beka Barbakadze
aa2a8e31fe
feat(gpu): return different chunk sizes for different number of ciphertexts
2024-01-18 16:06:07 +01:00
Beka Barbakadze
d49b8235bf
feat(gpu): implement memory reuse for lut objects
2024-01-18 16:06:07 +01:00
David Testé
cec4a5b60b
chore(bench): fix multi-bit parameters selection for multi-bit
...
Operation flavors for GPU don't end with "_gpu" anymore. So we
can't rely on these string, instead we are using the configuration
feature to select which multi-bit parameters set we use.
The bit size limitation for CPU in multi-bit is also put back in
place.
2024-01-18 15:43:53 +01:00
Mayeul@Zama
15147b4359
feat(integer): add oprf bench
2024-01-18 11:03:37 +01:00
Mayeul@Zama
f2ee360a47
feat(integer): add oblivious pseudo-random function
2024-01-18 11:03:37 +01:00
Mayeul@Zama
6631aae069
feat(shortint): add oblivious pseudo-random function
2024-01-18 11:03:37 +01:00
Mayeul@Zama
fa9cd866e4
feat(shortint): add no encoding functions
2024-01-18 11:03:37 +01:00
Pedro Alves
c632ac1b9a
feat(gpu): add tfhe-cuda-backend to the repository
2024-01-18 10:14:36 +01:00
Arthur Meyre
f0e6b4c395
chore(ci): add newline to workflow
2024-01-17 18:38:45 +01:00
David Testé
2cd51ed36d
chore(ci): add placeholder workflow for cuda backend
2024-01-17 17:59:44 +01:00
tmontaigu
dc04a5138e
feat(integer): add signed_overflowing_mul
2024-01-17 10:54:58 +01:00
tmontaigu
eda338aa29
fix(integer): fix decrypting negative value of N >= 32 BITS
...
Bug was probably introduced in 48405959a4
2024-01-17 10:54:58 +01:00
Arthur Meyre
df6fa86481
refactor(c_api): use DynamicBuffer as the buffer type between C and Rust
...
- allows to share data safely between C and Rust and make sure it gets
destroyed with the right destructor
- apply formatting to C tests
- 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-17 10:45:02 +01:00
David Testé
6742e150b0
chore(ci): add overflowing unsigned multiplication to benchmarks
2024-01-16 17:52:35 +01:00
tmontaigu
93fac32755
refactor(shortint): make scalar_eq/scalar_not_eq take & not &mut
...
BREAKING_CHANGE: change mutability of scalar_equal/scalar_not_equal
arguement
2024-01-16 16:21:10 +01:00
Arthur Meyre
9ac57e75c9
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-16 13:08:27 +01:00
David Testé
a7abee0491
chore(ci): gather common benchmarks groups
...
Instead of having multiple BENCH_OP_FLAVOR to run for full
benchmarks, criterion groups are now gathered by operation kind
(default, smart, unchecked).
2024-01-15 17:09:00 +01:00
tmontaigu
0228a58cfc
feat(integer): add cast_to_signed/unsigned
...
These functions does the logic of uX/iX as iX and uX/iX as uX
2024-01-15 15:14:54 +01:00
tmontaigu
f98c680e95
feat(integer): add unsigned overflowing mul
2024-01-15 12:24:04 +01:00
dependabot[bot]
dcc3d267e4
chore(deps): bump actions/upload-artifact from 4.0.0 to 4.1.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](c7d193f32e...1eb3cb2b3e )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-15 10:15:31 +01:00
dependabot[bot]
2067092e0a
chore(deps): bump tj-actions/changed-files from 41.0.1 to 41.1.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 41.0.1 to 41.1.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](716b1e1304...62f4729b5d )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-15 10:13:41 +01:00
Arthur Meyre
7c50216f7a
chore(core_crypto): remove Serde on some decomposition structs
...
- those structures are not expected to be serialized by a user
2024-01-10 18:25:18 +01:00
David Testé
77c0532793
chore(ci): add overflowing add and sub to integer benchmarks
2024-01-10 15:26:28 +01:00
Arthur Meyre
00ddfdec8b
refactor(boolean): call as_view on LWE secret keys where appropriate
...
- previous code had to manually create a view from a container, this is
less convoluted and more user friendly
2024-01-08 17:17:00 +01:00
Arthur Meyre
ef9ec13999
refactor(shortint): remove the large_lwe_secret_key from the ClientKey
...
- accessors are provided to access the large and small LWE secret keys and
make sure they have compatible data types when used in functions behaving
differently depending on the encryption key choice
2024-01-08 17:17:00 +01:00
Arthur Meyre
b53c8aac3f
feat(core): add view types and "as_view" functions for (G)LWE secret keys
2024-01-08 17:17:00 +01:00
Arthur Meyre
f052c1f8ba
chore(doc): fix docstring for FheIntX types
2024-01-05 17:30:15 +01:00
Mayeul@Zama
fef6d18605
doc(all): add doc for safe_(de)serialization
2024-01-05 10:24:36 +01:00
Mayeul@Zama
e5505ab686
chore(all): update SERIALIZATION_VERSION for 0.5 release
2024-01-05 10:24:27 +01:00
Arthur Meyre
ab2c5f09a8
chore(tfhe): update 2023 to 2024 in license files and other places
2024-01-04 16:26:21 +01:00
Mayeul@Zama
40ae841a15
refactor(all): make paste dependency non optional
2024-01-04 10:33:36 +01:00
Mayeul@Zama
0a317c5f0e
refactor(all): remove safe-deserialization feature
...
bincode dependency is not optional anymore
2024-01-04 10:33:36 +01:00
Arthur Meyre
415a8a2de5
chore(c_api): add the c_api code from the docs as a test
2024-01-03 13:26:05 +01:00
Arthur Meyre
935da25360
doc(c_api): Add an output for the users compiling the C API example
2024-01-03 13:26:05 +01:00
tmontaigu
dbeff4e4b4
docs(capi): fix C API example
2024-01-03 13:26:05 +01:00
Arthur Meyre
1e50d0cdd2
chore(doc): fix latex equation typo preventing formatting on GitHub
...
refs https://github.com/zama-ai/tfhe-rs/issues/748
2024-01-02 17:05:12 +01:00
dependabot[bot]
7c5551bf45
chore(deps): bump actions/upload-artifact from 3.1.3 to 4.0.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3.1.3 to 4.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](a8a3f3ad30...c7d193f32e )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-02 13:17:58 +01:00
dependabot[bot]
95c36d54cb
chore(deps): bump tj-actions/changed-files from 40.2.1 to 41.0.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 40.2.1 to 41.0.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](1c938490c8...716b1e1304 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-02 13:17:45 +01:00
Benoit Chevallier-Mames
384e15ca5a
style(docs): fixing a few typos in the README
2023-12-21 11:51:52 +01:00
tmontaigu
526a53f3d4
feat(integer): add signed_overflowing_scalar_add/sub
2023-12-15 10:57:21 +01:00
Mayeul@Zama
7d17b71740
fix(shortint): fix smart_add/sub
2023-12-13 09:55:20 +01:00
Mayeul@Zama
8ecb85e4dd
refactor(shortint): is_possible ops take CtNoiseDegree
2023-12-13 09:55:20 +01:00
Mayeul@Zama
cf30db7a30
fix(shortint): rename smart_apply_lookup_table_bivariate
2023-12-13 09:55:20 +01:00
Mayeul@Zama
2599f7d5ea
fix(shortint): fix ciphertexts_can_be_packed_without_exceeding_space_or_noise
2023-12-13 09:55:20 +01:00
Mayeul@Zama
ae88bb3264
fix(shortint): fix smart_evaluate_bivariate_function
2023-12-13 09:55:20 +01:00
Mayeul@Zama
6fb898db66
refactor(shortint): move bivariate_pbs to its own module
2023-12-13 09:55:20 +01:00
Mayeul@Zama
e750d2cd92
refactor(shortint): use smart_evaluate_bivariate_function and evaluate_univariate_function
2023-12-13 09:55:20 +01:00
Arthur Meyre
d8586080da
chore(integer): simplify an API to create a ServerKey from a shortint one
...
- the API required passing the client_key to get access to the message and
carry modulus, as the shortint ServerKey already has that information drop
the requirement to pass the ClientKey
BREAKING CHANGE:
new_radix_server_key_from_shortint, new_crt_server_key_from_shortint APIs
have changed and no longer require a ClienKey, the max degree methods now
only take a MessageModulus and CarryModulus instead of the full parameter
set
2023-12-13 09:41:59 +01:00
tmontaigu
4cc2e85556
feat(integer): add unsigned_overflowing_scalar_sub
2023-12-12 16:08:06 +01:00
tmontaigu
303a65c88d
feat(integer): add unsigned_overflowing_scalar_add
2023-12-12 16:08:06 +01:00
Arthur Meyre
18c01e74d6
chore(core_crypto): remove legacy new types
2023-12-12 11:06:06 +01:00
dependabot[bot]
a8b6c72910
chore(deps): bump tj-actions/changed-files from 40.2.0 to 40.2.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 40.2.0 to 40.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](da093c1609...1c938490c8 )
---
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-12-11 10:21:53 +01:00
Arthur Meyre
c2b21ed709
chore(integer): remove unused RadixDecomposition struct and code
2023-12-08 10:38:21 +01:00
tmontaigu
ad41fdf5a5
feat(integer): expose default and smart ciphertext sum
...
This expose the ciphertext sum default and smart variants
This also removes the par_seq_op functions as they are less optimal
2023-12-06 10:50:45 +01:00
Arthur Meyre
eeae19f35f
chore(core_crypto): disable seeded entities for non power of 2 moduli
...
- as random uniform generation has rejection sampling for non native moduli
the seeded decompression currently does not work as it allocates just
enough bytes for a native integer and not for the various retries which may
be needed
- follow-up issue: https://github.com/zama-ai/tfhe-rs-internal/issues/358
2023-12-05 15:25:30 +01:00
Mayeul@Zama
798572e58c
style(shortint): rename MaxNoiseLevel::valid validate
2023-12-04 18:16:46 +01:00
Mayeul@Zama
36d375943c
refactor(shortint): encapsulate Degree and MaxDegree
2023-12-04 18:16:46 +01:00
Mayeul@Zama
a1488b10d5
style(shortint): move MaxDegree
2023-12-04 18:16:46 +01:00
Mayeul@Zama
b153641280
style(shortint): scalar_sub use scalar_add
2023-12-04 18:16:46 +01:00
tmontaigu
48405959a4
feat(integer): add decrypt_trivial
...
This adds a decrypt_trivial method to all ciphertext types of
shortint and integer.
This functions tries to "decrypt" the ciphertext if it is a
trivial one, otherwise it return an error.
This is meant to be a debugging 'tool':
To debug a function / circuit, users can call the function
on trivial ciphertexts intead of real ciphertext, that way,
computations are faster _and_ they will now be able to see intermediate
values via these decrypt_trivial, to do some print-debugging or use a
debugger.
2023-12-04 15:50:53 +01:00
Arthur Meyre
d39e73be91
chore(core): freshen up native decomposition tests
...
- the classic native decomposer results are exact and there aren't that
many cases to test so tests are changed to be exhaustive
- non native currently still has some work in progress parts so won't be
made exhaustive right away, additionally the next PR for the prime Q effort
will make some changes to it, so this is why the current code has not been
touched for the non native decomposer
2023-12-04 14:56:17 +01:00
dependabot[bot]
71447d845f
chore(deps): bump tj-actions/changed-files from 40.1.1 to 40.2.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 40.1.1 to 40.2.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](25ef3926d1...da093c1609 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-12-04 09:22:17 +01:00
Arthur Meyre
837df59b44
fix(shortint): programmable_bootstrapping_native_crt could alter its input
...
- the alteration is a trick to be able to perform the wopbs in the native
crt mode but it modifies the input ciphertext and leaves it modified
meaning that the input no longer represents the same data/encryption
- applying the functon several times likely would lead to incorrect results
starting from the second call with increasing error/divergence from the
original encrypted data
- clone locally instead, should be negligible given wopbs runtime
BREAKING CHANGE:
programmable_bootstrapping_native_crt signature has changed
2023-12-01 14:46:09 +01:00
Arthur Meyre
303cac2092
chore(ci): re-enable release profile for doctest
...
- following merge of 17.0.4 in rust stable the bug uncovered by lto on
aarch64 has been fixed https://github.com/rust-lang/rust/issues/116941 so
we remove the hard coded override
2023-12-01 12:34:26 +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
tmontaigu
9dac9242be
feat(integer): add boolean_ops to work on BooleanBlock
...
This adds boolean_bitand/or/xor/not to work on BooleanBlock
This is meant to improve API of BooleanBlock.
2023-12-01 11:13:31 +01:00
tmontaigu
e97ac815eb
feat(shortint): add trivial pbs
...
When we detect that the ciphertext to be bootstrapped
is a trivial ciphertext, we can apply the lookup table
in clear thus saving computation time.
This allows shortint,integer,hlapi to have
way faster computations when all inputs are trivial
allowing to more rapidly check and debug a circuit
2023-11-30 22:01:28 +01:00
Arthur Meyre
62feb59722
chore(ci): fix doctest by using parameters with enough precision
2023-11-30 14:57:07 +01:00
Mayeul@Zama
ac8916a30f
refactor(shortint): define woppbs on server key instead of engine
2023-11-30 14:54:33 +01:00
Mayeul@Zama
069ea98ad6
style(shortint): fix remaining unused_self
2023-11-30 14:54:33 +01:00
Mayeul@Zama
e587d1835e
refactor(shortint): define operations on server key instead of engine
2023-11-30 14:54:33 +01:00
Mayeul@Zama
16121e7487
style(core): fix some unused self
2023-11-30 14:54:33 +01:00
Mayeul@Zama
3ab566de7b
style(boolean): fix some unused self
2023-11-30 14:54:33 +01:00
David Testé
2309b07703
test(integer): add smart tests for radix_parallel min/max
...
This also refactor the code to use macro to parametrize tests to
make code smaller.
2023-11-30 14:44:17 +01:00
David Testé
8755094c38
test(integer): fix tests for unsigned scalar min/max operations
2023-11-30 14:44:17 +01:00
David Testé
4da10e9dd5
chore(ci): add aws ec2 fallback profile for cpu tests
...
This is done to mitigate resource shortages in our base AWS region
(eu-west-3) due to the high number of instances that are launched
in parallel in our Pull Requests.
2023-11-30 13:02:42 +01:00
Arthur Meyre
cdda260063
chore(ci): .gitignore was ignoring all files/directories names keys
...
- this was hiding some source files in vscode search and could likely have
been very annoying when commiting stuff
2023-11-29 18:14:33 +01:00
Arthur Meyre
be413fff50
chore(shortint): remove doctest as tests as it is confirmed they fail
...
- doctest were also failing as tests and so it is not linked to doctests
- still unclear what is causing the issue, the results are sometimes way
off
- the concentration of failed tests can indicate a miscompile as those
tests never fail on the M1 CI, some alignment is causing issues from time
to time
2023-11-29 17:43:25 +01:00
Arthur Meyre
3ed960d255
chore(ci): fix a command naming issue for the CI
2023-11-29 16:07:31 +01:00
Arthur Meyre
bdadd39a34
chore(ci): add some missing spec indicators for cargo commands
2023-11-29 15:29:06 +01:00
Arthur Meyre
f03f2f9c6d
chore(ci): fix clippy trivium target which also triggered for tfhe
2023-11-29 15:29:06 +01:00
Arthur Meyre
f03ec9bbed
chore(tfhe): re-allow semicolon_if_nothing_returned
...
- create a section for lints that have been considered to be disallowed but
are kept allowed, either because they bring too little value or because
they don't help with readability in certain circumstances
2023-11-29 15:28:43 +01:00
Arthur Meyre
5137751dd2
chore(ci): fix pedantic lint with missing trailing ; on () return
2023-11-29 15:28:43 +01:00
tmontaigu
edc3449dbf
feat(integer): add signed overflowing_add
2023-11-29 13:02:58 +01:00
Arthur Meyre
6068c509de
feat(tfhe): add LWE encryption and linalg with non power of 2 moduli
2023-11-29 09:54:55 +01:00
David Testé
30a4348e3a
test(integer): use keycache for comparisons and wopbs
2023-11-28 14:11:53 +01:00
Mayeul@Zama
3013e02d90
fix(core): fix typo in comment
2023-11-28 13:10:23 +01:00
Mayeul@Zama
c029917c5c
style(all): rename NB_TEST NB_TESTS
2023-11-28 13:10:23 +01:00
Mayeul@Zama
d23d04021b
style(core): fix clippy::inconsistent_struct_constructor
2023-11-28 13:10:23 +01:00
Mayeul@Zama
5a5e9e0ac1
style(core): fix clippy::ptr_as_ptr
2023-11-28 13:10:23 +01:00
Mayeul@Zama
cc0a3bad8d
style(core): fix clippy::iter_without_into_iter
2023-11-28 13:10:23 +01:00
Mayeul@Zama
1d12f60849
style(core): fix clippy::default_trait_access
2023-11-28 13:10:23 +01:00
Mayeul@Zama
a0db39c86e
style(core): fix clippy::redundant_closure_for_method_calls
2023-11-28 13:10:23 +01:00
Mayeul@Zama
ef4558ac13
style(core): fix clippy::trivially_copy_pass_by_ref
2023-11-28 13:10:23 +01:00
Mayeul@Zama
bfb22b4531
style(core): fix clippy::needless_pass_by_value
2023-11-28 13:10:23 +01:00
Mayeul@Zama
88025010e1
style(core): fix clippy::unnecessary_wraps
2023-11-28 13:10:23 +01:00
Mayeul@Zama
b1f4f3b330
style(core): fix clippy::semicolon_if_nothing_returned
2023-11-28 13:10:23 +01:00
Mayeul@Zama
7575a426ab
style(core): fix clippy::used_underscore_binding
2023-11-28 13:10:23 +01:00
Mayeul@Zama
1ac57218b1
style(core): fix clippy::manual_let_else
2023-11-28 13:10:23 +01:00
Mayeul@Zama
b7c3f16e24
style(core): fix clippy::implicit_clone
2023-11-28 13:10:23 +01:00
Mayeul@Zama
bf4f9198fb
style(core): fix clippy::if_not_else
2023-11-28 13:10:23 +01:00
Mayeul@Zama
e618e1d05d
style(core): fix clippy::uninlined_format_args
2023-11-28 13:10:23 +01:00
Mayeul@Zama
000428d688
style(core): replace assert by unwrap
2023-11-28 13:10:23 +01:00
Arthur Meyre
937c90666b
chore(core): change the test LUT to apply the identity function
...
- the identity function more easily detects errors in the PBS as each mega
case contains a different value compared to its neighbours
2023-11-28 11:27:45 +01:00
sarah el kazdadi
b6a6f1b098
feat(core): specialize keyswitch implementation for small scalar values
2023-11-27 09:57:37 +01:00
David Testé
c2d7f1748c
chore(ci): add core_crypto layer to code coverage
2023-11-22 10:21:17 +01:00
Mayeul@Zama
e8cd55dee6
feat(shortint): add degree information in CheckError::CarryFull
2023-11-21 19:52:26 +01:00
Mayeul@Zama
95aea9dbe8
feat(shortint): add noise checks
2023-11-21 19:52:26 +01:00
Mayeul@Zama
89f701d307
refactor(shortint): refactor CheckError
2023-11-21 19:52:26 +01:00
Mayeul@Zama
224146686f
feat(shortint): add max_noise_level
2023-11-21 19:52:26 +01:00
Mayeul@Zama
b6b5f92220
fix(integer): update noise_level manually in direct calls to core_crypto
2023-11-21 19:52:26 +01:00
David Testé
0fec9e252b
chore(ci): change benchmark aws ec2 machine type
...
This instance type hpc7a.96xlarge yields better performances for
nearly the same hourly cost.
2023-11-21 14:34:08 +01:00
Arthur Meyre
53c9b82824
chore(shortint): fix typo for NoiseLevel variant UNKNOWN
2023-11-20 18:54:14 +01:00
tmontaigu
f670a950d6
fix(integer): fix inner index computation in sum
...
In the function that sums a vec of ciphertexts,
we track trivial zeros to avoid un-needed PBSes.
One of this tracker is `last_block_where_addition_happened`
however it was not properly computed.
It was initialized to `num_blocks - 1`, and then got applied
a bunch of `max(current, new)` where 0 <= new <= num_block - 1
which means last_block_where_addition_happened was always num_blocks - 1.
The correct initial value is 0.
2023-11-20 16:40:21 +01:00
tmontaigu
a44970a9a3
feat(integer): avoid un-necessary computations in mul params 1_X
...
When the parameters have 1 bit of message (message modulus == 2)
then the multiplication of 2 blocks does not create a result that can
go into the carry space.
We use that fact to avoid doig un-necessary computations
when multiplying integers encrypted under parameters with 1 bit.
2023-11-20 15:21:59 +01:00
Arthur Meyre
55775b8e02
fix(shortint): fix overflow behavior of NoiseLevel
...
- we will need to use a MAX/UNKNOWN level for forward compatibility with
old serialized ciphertexts, this patch ensures the add/mul behavior
saturates properly to usize::MAX to force a refresh in operations which
do it automatically
2023-11-17 18:34:02 +01:00
Arthur Meyre
523d561de6
chore(ci): add _ci_run_filter to standalone tests in shortint
...
- those tests were likely ignored, this is no longer the case
2023-11-17 18:34:02 +01:00
tmontaigu
61a50d0bcc
chore(integer): make oveflowing_add/sub return BooleanBlock
2023-11-17 16:22:20 +01:00
Arthur Meyre
ee57f5658b
chore(ci): refactor integer script and skip div and rem preferring div_rem
2023-11-17 15:00:50 +01:00
tmontaigu
9362965f50
feat(integer): add accessors to inner shortint sks
...
Users can access blocks from an integer but they don't have
the ability to use the inner shortint server key to process
individual blocks.
This adds an AsRef impl on integer ServerKey to allow that.
This also adds shortcuts to the integer ServerKey to get
the MessageModulus/CarryModulus (these are shorticuts
because users could do `integer_key.as_ref().message_modulus`.
2023-11-16 16:25:27 +01:00
Arthur Meyre
00fb60451d
chore(ci): group signed and unsigned integer for better runtime homogeneity
2023-11-16 14:18:30 +01:00
Arthur Meyre
18b9fd4464
chore(ci): re-enable mistakenly disabled AVX512 for integers
2023-11-16 14:18:30 +01:00
Arthur Meyre
eace0bfb85
chore(ci): spread tests between two CI machines/workflow for faster runtime
2023-11-16 14:18:30 +01:00
Arthur Meyre
af1be5ebca
chore(core): fix noise generation which could overflow the custom modulus
...
- updated some function name (for modulus checking) to be clearer on what
they do and when to use them
2023-11-16 08:58:40 +01:00
tmontaigu
916bd8a09f
feat(hlapi): move if_then_else/cmux to FheBool
...
- This makes FheBool use integer::BooleanBlock internally.
- It makes comparisons (eq, ne, le, etc) return a FheBool instead of
FheUint/FheInt.
- It also moves the if_then_else and cmux methods to FheBool.
- Adds casting from FheBool to FheUint/FheInt (but not from
FheUint/FheInt to FheBool as we expect users to do `a.ne(0)`
as its matches Rust)
BREAKING CHANGE:
- Comparisons now return FheBool
- if_then_else/cmux are now methods of FheBool.
2023-11-15 23:22:30 +01:00
tmontaigu
20cb0642ce
refactor(hlapi): implement CastFrom for GenericInteger
...
And add the trait to the prelude so that users can use
it.
2023-11-15 23:22:30 +01:00
Arthur Meyre
151f9f6d82
chore(ci): fix build on main following several big merges
2023-11-15 13:29:08 +01:00
Arthur Meyre
8db8cb49e4
chore(shortint): add some flaky/failing doctests as actual tests
...
- check that those are actually failing or that they are a doctest bug
- add _ci_run_filter so that we can easily make sure tests run in CI even
if they don't have the "parameter format"
2023-11-15 11:10:44 +01:00
Arthur Meyre
b4583976a2
chore(tfhe): fix .gitignore for key cache
...
- this was not properly ignoring the keycache if a file had a specific
extension
2023-11-15 11:10:30 +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
f02f1fb297
feat(integer): add unsigned_oveflowing_add
2023-11-14 18:57:09 +01:00
Mayeul@Zama
17642fa703
refactor(shortint): remove unused EngineResult
2023-11-14 16:30:09 +01:00
Mayeul@Zama
23fa9b24bd
refactor(shortint): separate lut generation from ShortintEngine
2023-11-14 16:30:09 +01:00
tmontaigu
0453b9bd60
fix(integer): fix signed_overflowing_sub using trivial 0
2023-11-13 15:43:33 +01:00
Arthur Meyre
9b2cf67911
chore(tfhe): fix required features for the generate_test_keys util
2023-11-13 10:05:17 +01:00
dependabot[bot]
36a7656048
chore(deps): bump tj-actions/changed-files from 40.1.0 to 40.1.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 40.1.0 to 40.1.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](18c8a4eceb...25ef3926d1 )
---
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-11-13 09:58:27 +01:00
Arthur Meyre
61c8eadd58
chore(ci): update Makefile for semver trick compatibility
...
- adding the tfhe package as a dependency is currently causing issues with
Cargo because of unified feature resolution it seems, it needs an
additional version specifier to disambiguate which package we are referring
to, an issue exists on their end but I don't think a fix is to be expected
soon https://github.com/rust-lang/cargo/issues/12891
- commiting this to main and then backporting the relevant pieces to 0.4.x
2023-11-10 15:35:38 +01:00
Arthur Meyre
fdd4d9d1cc
chore(c_api): add more comments in the build.rs file and cbindgen.toml
2023-11-10 15:35:38 +01:00
Arthur Meyre
62700ab853
chore(tfhe): clarify dependency vs feature selection
2023-11-10 15:35:38 +01:00
Arthur Meyre
27445645e7
chore(c_api): have a way to skip cbindgen in a semver trick setting
2023-11-10 15:35:38 +01:00
tmontaigu
ea0cd26c0b
chore(tfhe): fix builds on main
2023-11-10 15:15:31 +01:00
David Testé
ff48582679
test(core_crypto): silence dead code warnings on test utils
2023-11-10 09:35:16 +01:00
tmontaigu
a77c87ff12
refactor(hlapi): make GenericInteger generic over the Id
2023-11-09 20:33:53 +01:00
tmontaigu
6d143f1edc
refactor(hlapi): remove unused FromParameters trait
2023-11-09 20:33:53 +01:00
Arthur Meyre
216e6b443a
chore(tfhe): fix pedantic lints
2023-11-09 17:12:00 +01:00
Arthur Meyre
1400ae946c
test(tfhe): add uniform random test
...
- use DKW test, it is e.g. used in
https://github.com/wch/r-source/blob/trunk/tests/p-r-random-tests.R
See Wikipedia DKW inequality
2023-11-09 17:12:00 +01:00
Arthur Meyre
c332902a05
feat(core): add support for non power of 2 moduli for random generation
...
- add convenience function to get truncated f64 value of an integer modulus
- update trait bounds for random generation for clearer diagnostics
2023-11-09 17:12:00 +01:00
Arthur Meyre
cf7a7f132d
chore(doc): update a slightly wrong docstring
2023-11-09 14:38:43 +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
Arthur Meyre
1f825dde08
chore(tfhe): bump version to 0.5.0
2023-11-08 15:55:22 +01:00
tmontaigu
f9222de47c
feat(integer): add signed_overflowing_sub
2023-11-08 15:11:05 +01:00
Mayeul@Zama
5732e8dd7a
test(hlapi): test base and compressed integer conformance
2023-11-08 09:25:55 +01:00
Mayeul@Zama
9db35c5474
chore(clippy): remove useless #[allow(warning)]
2023-11-07 16:47:04 +01:00
Mayeul@Zama
b69f73e8e6
chore(clippy): fix use_self warnings
2023-11-07 16:47:04 +01:00
Mayeul@Zama
90bdf75147
chore(clippy): enable nursery lints
2023-11-07 16:47:04 +01:00
Mayeul@Zama
233ea17adf
chore(clippy): enable pedantic lints
2023-11-07 16:47:04 +01:00
David Testé
df6ee79841
chore(ci): test examples and apps in the ci
2023-11-07 10:58:03 +01:00
Mayeul@Zama
6497fb9a15
feat(shortint): update noise level in operations
2023-11-06 11:33:24 +01:00
Mayeul@Zama
d8894e3b69
feat(shortint): add noise level to ciphertexts
2023-11-06 11:33:24 +01:00
dependabot[bot]
42636bab13
chore(deps): bump tj-actions/changed-files from 40.0.0 to 40.1.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 40.0.0 to 40.1.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](af292f1e84...18c8a4eceb )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-11-06 09:42:04 +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
Mayeul@Zama
5272c95de4
fix(shortint): fix modulus on LUT output in test
2023-11-03 09:45:22 +01:00
Mayeul@Zama
27d7ace3ef
feat(shortint): fix keyswitching wrapping behavior
2023-11-03 09:45:22 +01:00
Mayeul@Zama
d80ab231a8
fix(shortint): add LUT generation without carry
2023-11-03 09:45:22 +01:00
tmontaigu
fe3fa531f9
refactor(hlapi): Remove shortint support from HLAPI
...
This removes the wrapping of shortints from the HLAPI,
the reasons are:
Contrary to integers for which we have different bit size
by combining different number of blocks from the _same_ key.
shortints had different bit size, but also different keys
which lead to:
- Not being able to cast between 2 different shortint type
and between 1 shortint and 1 integer. Technically these casts
are possible, but requires a keyswitch (and likely a PBS).
But the keyswitch requires parameters, which may not always exists.
- Due to each shortint having different keys, the internal code to
manage that made heavy use of macros to avoid having thousands of
repeated lines. However, this made the code harder to follow / modify
especially for people that were not familiar with that.
- In practive to really benefit from shortints, proper management of
carry space is needed, however the HLAPI completely hides that,
resulting in less optimal performances. In short, shortints
are better used as a low level construct.
- Building a FheUint4 with two block of message_2_carry_2
is likely to be faster the one message_4_carry_4 for most use
cases.
So removing the wrapping of shortints will simplify the code, and
allow for more simplification later.
Also, it will allow us to expose Fhe{Ui/I}nt{2, 4, 6} types
which are compatible (cast_from/into) with Fhe{Ui/I}nt{8, 16, 32, etc}.
BREAKING CHANGE:
- FheUint{2,3,4} removed from HLAPI
- All HLAPI functions thied to shortints are removed
2023-10-31 09:32:05 +01:00
tmontaigu
5c1573c266
fix(integer): fix worst case noise growth in encrypted shifts
...
In encrypted shifts we pack 3 bits from 3 different blocks into the same
blocks by doing `b0 * 4 + 2 * b1 + b2`, and then do a PBS to simulate a
hardware mux gate.
If the inputs of shift (ie, in lhs << rhs, lhs != rhs, ie we don't do
lhs << lhs) this is fine regarding the norm2 noise.
However if we do things like `a << a` or `a >> a`, which is probably a
very rare thing but not impossible, the norm2 noise would go above the
limit that guarantees our error probability.
To fix that, we extract the bits that tells shift amount, so that they
are already properly aligned to their mux input position.
The packing becomes `b0 + 2 * b1 + b2` and so,
the noise growth is ok even in the worst case of doind `a << a`.
2023-10-30 15:02:02 +01:00
dependabot[bot]
7772e8112d
chore(deps): bump tj-actions/changed-files from 39.2.3 to 40.0.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 39.2.3 to 40.0.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](95690f9ece...af292f1e84 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-10-30 12:07:44 +01:00
dependabot[bot]
5e92cb1475
chore(deps): bump JS-DevTools/npm-publish from 3.0.0 to 3.0.1
...
Bumps [JS-DevTools/npm-publish](https://github.com/js-devtools/npm-publish ) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/js-devtools/npm-publish/releases )
- [Changelog](https://github.com/JS-DevTools/npm-publish/blob/main/CHANGELOG.md )
- [Commits](6fd3bc8dad...4b07b26a2f )
---
updated-dependencies:
- dependency-name: JS-DevTools/npm-publish
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-10-30 12:07:24 +01:00
dependabot[bot]
f51e19b071
chore(deps): bump actions/checkout from 4.1.0 to 4.1.1
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4.1.0...b4ffde65f46336ab88eb53be808477a3936bae11 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-10-30 12:06:53 +01:00
tmontaigu
aeb00ae584
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
2023-10-27 18:01:55 +02:00
Arthur Meyre
ce5e9c1bdb
chore(integer): more CRT tests and related fixes
...
- add remaining tests
- fix unchecked scalar mul for small carries
2023-10-27 11:30:00 +02:00
Arthur Meyre
4d4e124e94
chore(integer): add crt 32 bits tests with 5_1 params
...
- remove buggy unchecked_scalar_add_assign and replace by the proper
implementation which had a different name
BREAKING CHANGE:
removed an API entry point which was not required
2023-10-27 11:30:00 +02:00
Arthur Meyre
ca6d37e06f
feat(integer): better handle trivial 0 blocks from LHS
...
- currently the filter only applied to the RHS but LHS can also benefit
from the filter
2023-10-27 10:31:24 +02:00
Mayeul@Zama
e3143315f3
fix(integer): disable broken assert in smart_crt_sub_assign
2023-10-27 09:43:51 +02:00
Mayeul@Zama
f8636fe814
feat(integer): add asserts in smart ops
2023-10-27 09:43:51 +02:00
tmontaigu
7e72400321
chore(doc): replace some ^ which could be interpreted as xor not pow
2023-10-26 23:42:58 +02:00
tmontaigu
728b409256
chore(integer): move comparator test out of it
...
Move the comparisons test (eq, ne, ge, gt, etc)
that were in the comparator module out of the comparator module.
This is so that in later commits will create test cases out
of these tests so they can, like other unsigned tests be
used to test other implementations of ServerKey
2023-10-25 10:31:55 +02:00
Arthur Meyre
d91404e567
chore(integer): remove empty where clause
2023-10-25 09:41:37 +02:00
David Testé
e11c3d7b7c
chore(ci): add signed integer benchmarks to the CI
2023-10-25 09:14:00 +02:00
David Testé
6f8eeb043c
chore(bench): add default ops for singed integers benchmarks
2023-10-25 09:14:00 +02:00
Arthur Meyre
00d55182b4
chore(ci): update examples to have a tmp dir to avoid rights issues in /tmp
...
- on machines where multiple users can log in, some files used for
serialization doctests would cause rights access issues and crash doctests
2023-10-23 15:03:18 +02:00
dependabot[bot]
6f6ce106c3
chore(deps): bump tj-actions/changed-files from 39.2.2 to 39.2.3
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 39.2.2 to 39.2.3.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](408093d9ff...95690f9ece )
---
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-23 10:28:00 +02:00
dependabot[bot]
68fcbb5280
chore(deps): bump JS-DevTools/npm-publish from 2.2.2 to 3.0.0
...
Bumps [JS-DevTools/npm-publish](https://github.com/js-devtools/npm-publish ) from 2.2.2 to 3.0.0.
- [Release notes](https://github.com/js-devtools/npm-publish/releases )
- [Changelog](https://github.com/JS-DevTools/npm-publish/blob/main/CHANGELOG.md )
- [Commits](fe72237be0...6fd3bc8dad )
---
updated-dependencies:
- dependency-name: JS-DevTools/npm-publish
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-10-23 10:27:35 +02:00
dependabot[bot]
3f46389cc8
chore(deps): bump actions/checkout from 4.1.0 to 4.1.1
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](8ade135a41...b4ffde65f4 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-10-23 10:27:10 +02:00
Arthur Meyre
9e8dd01cb9
chore(ci): enable integer multi bit tests on M1
2023-10-20 17:55:38 +02:00
tmontaigu
0085ceb97b
chore(ci): set node version
2023-10-20 10:24:50 +02:00
tmontaigu
be9a4d2d9c
chore(wasm): update dependencies of wasm tests
2023-10-20 10:24:50 +02:00
Arthur Meyre
87421e8307
chore(ci): update M1 workflow to not explode the 6h GitHub limit
...
- run doc tests for CI with LTO off following M1 investigation
- LTO fat may be a cause of the wopbs flaky tests, disabling to check
2023-10-19 14:18:05 +02:00
Arthur Meyre
0c3919628f
refactor(core): use avx512 intrinsics when available for data conversions
...
- we use inline assembly for now as rust does not propose those in the std
or core arch crates at the moment
- add tests for avx512 conversion
2023-10-19 13:21:19 +02:00
Arthur Meyre
f1c21888a7
chore(doc): encourage users to use dedicated keys to Radix or CRT
2023-10-19 09:52:22 +02:00
tmontaigu
2624beb7fa
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-18 19:26:01 +02:00
tmontaigu
e44c38a102
chore(ci): tell nvm to use node version 20 in wasm parallel tests
2023-10-18 19:04:27 +02:00
Arthur Meyre
4535230874
refactor(core): rename pbs_modulus_switch to fast_pbs_modulus_switch
...
- update docstring to reflect the change that has been done
BREAKING CHANGE:
pbs_modulus_switch is currently part of the public API and the rename is
therefore a breaking change
2023-10-17 16:53:19 +02:00
Arthur Meyre
a7b2d9b228
chore(ci): update check toolchain to latest nightly
...
- no new lints
2023-10-17 16:13:26 +02:00
Arthur Meyre
ab923a3ebc
fix(crt): fix mul for non symmetrical parameters
...
- add non reg test for 32 bits mul with 5_1 parameters
2023-10-17 14:22:00 +02:00
Arthur Meyre
a0e85fb355
feat(core): add more custom moduli primitives to UnsignedInteger
...
As always for now the objective is to have functional custom modulus
implementations, not efficient ones
- add multiplication
- add leading_zeros
- add neg
2023-10-17 13:31:35 +02:00
Arthur Meyre
ecee305340
chore(core): change prelude algorithms imports
2023-10-17 13:31:35 +02:00
Mayeul@Zama
f08ea8cf85
fix(integer): fix max_degree formula
2023-10-17 11:35:08 +02:00
Mayeul@Zama
096e320b97
fix(crt): use 3_3 parameters for crt tests
2023-10-17 11:35:08 +02:00
Mayeul@Zama
95aac64c1c
style(crt): compute modulus from base in tests
2023-10-17 11:35:08 +02:00
Mayeul@Zama
76aaa56691
fix(integer): fix small mul test
2023-10-17 11:35:08 +02:00
Mayeul@Zama
a40489bdd2
style(shortint): do not use assign ops on a cloned input
2023-10-17 11:35:08 +02:00
Mayeul@Zama
4bf617eb10
feat(shortint): cleanup input if necessary in ops
2023-10-17 11:35:08 +02:00
Mayeul@Zama
070073d229
feat(shortint): cleanup input if necessary in apply_lookup_table_bivariate
2023-10-17 11:35:08 +02:00
Arthur Meyre
6c1ca8e32b
chore(core): use modular_distance instead of abs_diff in fft tests
...
- we are doing backwards conversions to the torus, so values could wrap
around near 0 or u64::MAX, take the modular distance which represents the
distance on the torus
2023-10-17 10:29:24 +02:00
Arthur Meyre
6523610ca4
refactor(core): refactor conversion code from f64 to i64
...
- observed that the subnormal case is already handled by the shift logic so
the special handling was not required
- add test for avx512 conversion
2023-10-17 10:29:24 +02:00
Arthur Meyre
41c20e22f5
chore(ci): enable AVX512 for integer and multi bit integer tests
2023-10-17 10:28:14 +02:00
J-B Orfila
4a00d25cb1
doc: updating doc for v0.4
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 >
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
Mayeul@Zama
380ee52986
test(hlapi): test compact integer conformance
2023-10-05 09:15:58 +02:00
Mayeul@Zama
439a28f68b
feat(global): impl ParameterSetConformant for ciphertexts
2023-10-05 09:15:58 +02:00
Mayeul@Zama
2eb1e37ca7
feat(global): add safe deserialization
2023-10-05 09:15:58 +02:00
Mayeul@Zama
eb1b136c45
feat(core): add to_equivalent_lwe_dimension
2023-10-05 09:15:58 +02:00
Mayeul@Zama
1376bcba7c
chore(test): add type hint for rust-analyzer
2023-10-05 09:15:58 +02:00
tmontaigu
b5b4e54b9b
feat(hlapi): add FheInt{8,16,32,64,128,256}
2023-10-04 20:41:19 +02:00
Arthur Meyre
23c2bd790a
chore(test): fix incorrect memory buffer size in wopbs core_crypto tests
2023-10-04 14:17:33 +02:00
tmontaigu
251ee9aa0e
chore(hlapi): add InnerCiphertext type to integer wrapper
...
Make the GenericInteger struct have a generic `InnerCiphertext`
instead of always RadixCiphertext.
This is to prepare the addition of signed types which will use a
SignedRadixCiphertext.
2023-10-03 16:26:09 +02:00
Arthur Meyre
fad066a996
refactor(core): remove a copy in the external product
...
- add an fft backward primitive that can use the input fourier buffer as
output as well
- gains 0.6 ms on 2_2 m6i.metal
2023-10-03 13:10:01 +02:00
tmontaigu
6ef1f22b33
feat(hlapi): tie scalar ops with corresponding clear type
...
Operations that used a scalar as right operand where generically
implemented meaning a user could, for example, add a u32 to a FheUint8.
Rust only allows operations between matching types, so we do the same
thing.
BREAKING CHANGE: This is a breaking change on the Rust API, but
for the better I believe. On the C API it is not a breaking change
as we already made that association as it was simpler to implement
2023-10-02 23:17:30 +02:00
tmontaigu
8cc8dba1ab
feat(integer): add encryption of signed radix via compressed pk
2023-10-02 16:02:36 +02:00
tmontaigu
082328c91a
feat(integer): add default signed_scalar div/rem/div_rem
2023-10-02 16:02:18 +02:00
tmontaigu
fdb6faa0a8
fix(integer): clean output quotient of division
...
The quotient was slowly computed by
getting a resut bit, shifting it to its position then adding it
to a quotient block, i.e quotient += bit << pos;
This meant that the output quotient was noisy, too noisy for
parameters like param_message_4_carry_4, and so the signed division
would then negate and cmux this quotient and due to the high noise,
some computations would fail, on param_message_4_carry_4.
To fix this we clean the quotient's noise before returning it.
2023-10-02 08:48:45 +02:00
Arthur Meyre
856440386f
chore(csprng): the stabilized aarch64 intrisics were in Rust 1.72
...
- update the version accordingly
2023-09-29 18:33:39 +02:00
tmontaigu
2e8189514c
feat(integer): make compact ciphertext compatible with signed
2023-09-28 20:41:38 +02:00
tmontaigu
29b2454cce
feat(integer): add sign extend fn for SignedRadixCiphertext
2023-09-28 17:48:41 +02:00
tmontaigu
9ed2589c7a
chore(integer): impl RecomposableSignedInteger for StaticSignedBigInt
2023-09-28 14:01:14 +02:00
tmontaigu
36b71529e6
chore(integer): make tests work with different ServerKey
...
This is a first step, a second step would be
to plug the non parallel radix tests so that
they are testing the same things.
2023-09-28 10:50:18 +02:00
Arthur Meyre
b738946d72
chore(core): add utils to test noise distribution for power of 2 q
2023-09-28 09:49:30 +02:00
David Testé
62f1425257
chore(bench): add missing unsigned integer operations
2023-09-28 08:47:39 +02:00
David Testé
44e491b93f
style(integer): rename absolute_value functions to abs
...
Also add _parallelized suffix since the implementation is located in
radix_parallel directory.
2023-09-28 08:47:39 +02:00
tmontaigu
a470b26672
fix(integer): StaticSignedBigInt right shift
2023-09-27 18:37:25 +02:00
tmontaigu
015409424c
chore(hlapi): remove unused keychain_member from macro
2023-09-27 14:33:24 +02:00
tmontaigu
37be751188
fix(integer): is_neg/sub/add possible
...
The way we did the is_neg/add/sub possible at the integer level was
incorrect in two ways.
1) We simply called the is_neg/add/sub_possible from
the shortint impl on each block as if the were independant.
However that is not the case, and to the check did not reflect
actual computation.
2) We checked that we did not go beyond max degree on each block,
However, a more correct approach would be to check that adding
the potential carry from preceding block would not exceeding the
current block max capacity.
2023-09-26 16:02:15 +02:00
sarah el kazdadi
2580a834af
feat(core): optimize monic polynomial operations in pbs
2023-09-26 15:02:33 +02:00
David Testé
a029bd878e
chore(ci): fix file exclusion for coverage reports
2023-09-26 08:58:36 +02:00
David Testé
400e7930b6
chore(ci): fix options typos for new tarpaulin version
2023-09-26 08:58:36 +02: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
9dd2d39f1c
style(global): fix typos
2023-09-25 17:27:29 +02:00
dependabot[bot]
4045a3bc2f
chore(deps): bump tj-actions/changed-files from 39.0.2 to 39.2.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 39.0.2 to 39.2.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](6ee9cdc581...8238a41032 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-25 10:30:28 +02:00
dependabot[bot]
b4ffeccd46
chore(deps): bump actions/checkout from 4.0.0 to 4.1.0
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](3df4ab11eb...8ade135a41 )
---
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-09-25 10:30:22 +02:00
tmontaigu
7fe3ad3b6e
feat(integer): improve scalar_mul
...
This changes the algorithm for scalar_mul.
The new algorithm allows to remove a lot of work.
For small precisions (16, 32, 64) the gains are in range 5%-10%
for higher precisions the gains are 25%-50%.
This also changes the mul to use the functions that sums many
clean ciphertexts in parallel. For mul, there is only a 5%-10%
improvements for 128bits and 256bits mul.
2023-09-22 15:45:07 +02:00
tmontaigu
7fdd4f9532
chore(integer): add default signed bitand/or/xor tests
2023-09-22 14:50:27 +02:00
Arthur Meyre
81eef39ddb
feat(core): add parallel variant of extract_lwe_sample_from_glwe
...
- allows to quickly extract all coefficients packed in a GLWE cipehrtext
2023-09-22 10:55:02 +02:00
tmontaigu
b6459e3cda
fix(integer): fix signed div_rem test for 0/0
2023-09-21 21:38:16 +02:00
Arthur Meyre
f2ef78c348
refactor(core): simplify closest_representable and pbs_modulus_switch
...
- both code were selecting the bit below the last representable bit,
extracted it and then added it to the bit above, the same effect can be
achieved by adding a 1 at the bit below the last representable bit
- update closest_representable to use an approach more like
pbs_modulus_switch yielding assembly with 42% less instructions (12 -> 7)
2023-09-21 15:54:53 +02:00
Mayeul@Zama
aef8f31621
chore(deps): update cargo dependencies
2023-09-21 15:11:13 +02:00
sarah el kazdadi
df78d178da
fix(integer): replace unnecessary unsafe code in integer shift/add
2023-09-21 11:02:41 +02:00
Arthur Meyre
9297a886a4
chore(docs): fix docstring about encryption key choice
2023-09-20 16:02:55 +02:00
tmontaigu
28b4f91a32
fix(integer): only propagate if necessary after trimming
...
By unconditionally propagating carries after trimming
we would sometimes do work for nothing, and as propagating
carries is not cheap at all it would degrade performances.
So only propagate when necessary
2023-09-20 15:57:33 +02:00
David Testé
04fb46e41b
chore(ci): print security level in parameters check
...
The devo profile is used to speed up the compilation phase.
2023-09-20 15:33:39 +02:00
David Testé
53da809f37
chore(ci): reduce max dimension threshold in lattice estimator
2023-09-20 09:39:50 +02:00
David Testé
723910c669
chore(ci): fix end-of-file newlines
2023-09-20 09:39:50 +02:00
David Testé
8ecf8879fb
chore(ci): add end-of-file newline checks recipe
2023-09-20 09:39:50 +02:00
tmontaigu
2427f744f8
feat(integer): add unchecked implementation of signed ciphertext
2023-09-20 08:50:15 +02:00
Arthur Meyre
422e1f23d5
feat(core): add GLWE linear algebra primitives
...
- add appropriate tests and doctest
2023-09-19 11:41:16 +02:00
sarah el kazdadi
30a5ade17f
fix(csprng): enable target_feature attributes for functions using simd intrinsics
2023-09-19 09:19:47 +02:00
tmontaigu
6cdd41c22f
fix(integer): fix is_neg_possible
...
shortint's is_neg_possible did not check the degree on the correct value.
It check the degree on the value that should be added to the next block
not on the value that actually becomes the degree.
integer's is neg possible had the same problem so we also fix it
and also check the next block can 'receive' the value that should be added to it.
Our tests did not catch that as they were not testing non empty carry case
2023-09-18 17:19:48 +02:00
Mayeul@Zama
f369bec394
feat(core): add par_convert_standard_lwe_multi_bit_bootstrap_key_to_fourier
2023-09-18 14:35:06 +02:00
Mayeul@Zama
df4e9c69c7
feat(core): add par_convert_bootstrap_key_fourier
2023-09-18 14:35:06 +02:00
Mayeul@Zama
0e3d129906
feat(core): add par_fill_with_forward_fourier
2023-09-18 14:35:06 +02:00
Mayeul@Zama
682e455c94
feat(core): add par_convert_polynomials_list_to_fourier
2023-09-18 14:35:06 +02:00
Mayeul@Zama
b553a68fa9
chore(docs): simplify improved formula in dark market
2023-09-18 09:58:13 +02:00
Mayeul@Zama
be95eadf79
chore(docs): remove fallible directory change
2023-09-18 09:58:13 +02:00
Mayeul@Zama
0213a11a0c
chore(docs): refactor dark market
2023-09-18 09:58:13 +02:00
Mayeul@Zama
413fde3b3b
chore(docs): doc fixes and improvements
2023-09-18 09:58:13 +02:00
sarah el kazdadi
40f8ac9adf
feat(core): replace unsafe simd intrinsics
2023-09-18 09:30:17 +02:00
dependabot[bot]
2ab25c1084
chore(deps): bump rtCamp/action-slack-notify from 2.2.0 to 2.2.1
...
Bumps [rtCamp/action-slack-notify](https://github.com/rtcamp/action-slack-notify ) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/rtcamp/action-slack-notify/releases )
- [Commits](https://github.com/rtcamp/action-slack-notify/compare/v2.2.0...b24d75fe0e728a4bf9fc42ee217caa686d141ee8 )
---
updated-dependencies:
- dependency-name: rtCamp/action-slack-notify
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-18 09:25:56 +02:00
dependabot[bot]
86c62b70e5
chore(deps): bump JS-DevTools/npm-publish from 2.2.1 to 2.2.2
...
Bumps [JS-DevTools/npm-publish](https://github.com/js-devtools/npm-publish ) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/js-devtools/npm-publish/releases )
- [Changelog](https://github.com/JS-DevTools/npm-publish/blob/main/CHANGELOG.md )
- [Commits](5a85faf05d...fe72237be0 )
---
updated-dependencies:
- dependency-name: JS-DevTools/npm-publish
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-18 09:25:49 +02:00
dependabot[bot]
18d790fc26
chore(deps): bump actions-ecosystem/action-add-labels
...
Bumps [actions-ecosystem/action-add-labels](https://github.com/actions-ecosystem/action-add-labels ) from 1.1.0 to 1.1.3.
- [Release notes](https://github.com/actions-ecosystem/action-add-labels/releases )
- [Commits](bd52874380...18f1af5e35 )
---
updated-dependencies:
- dependency-name: actions-ecosystem/action-add-labels
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-18 09:25:38 +02:00
dependabot[bot]
e9e3dae786
chore(deps): bump actions/checkout from 3.5.3 to 4.0.0
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3.5.3 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3.5.3...3df4ab11eba7bda6032a0b82a6bb43b11571feac )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-18 09:25:33 +02:00
dependabot[bot]
9b1dccbcb4
chore(deps): bump tj-actions/changed-files from 39.0.1 to 39.0.2
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 39.0.1 to 39.0.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](246636f5fa...6ee9cdc581 )
---
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-09-18 09:25:28 +02:00
David Testé
cef011dd91
chore(ci): add compact keys to parameters security checks
2023-09-18 09:12:51 +02:00
Arthur Meyre
19f7d5af5c
chore(test): remove some unused imports
2023-09-15 18:27:57 +02:00
Arthur Meyre
95ca5a80dc
feat(tfhe): plug parallel decompression in higher level APIs
...
- boolean, shortint and integer have been updated to benefit from paralle
decompression
2023-09-15 18:27:57 +02:00
Arthur Meyre
b5fded34d1
feat(core): add multi bit BSK parallel decompression
...
- added decompression equivalence test
2023-09-15 18:27:57 +02:00
Arthur Meyre
0c3b09c83d
chore(core): update multi bit BSK decompression to match encryption
...
- test passes
2023-09-15 18:27:57 +02:00
Arthur Meyre
85a19d30a9
feat(core): add KSK parallel decompression
...
- update to check decompression equivalence
2023-09-15 18:27:57 +02:00
Arthur Meyre
f58132c391
feat(core): add GGSW par decompression, add LWE BSK par decompression
...
- add par decompression equivalency test
2023-09-15 18:27:57 +02:00
Arthur Meyre
099bff84aa
refactor(core): use forking to decompress GGSW ciphertext list
...
- existing BSK equivalency test passes which means the change is compatible
2023-09-15 18:27:57 +02:00
Arthur Meyre
42ad474a46
feat(core): add parallel decompression to GGSW ciphertext
...
- added equivalence test for parallel decompression
2023-09-15 18:27:57 +02:00
Arthur Meyre
9f6827b803
chore(core): update code to use the newly introduced MaskRandomGenerator
2023-09-15 18:27:57 +02:00
Arthur Meyre
d23c0df449
refactor(core): update decompression code for LweCiphertextList
...
- update related algorithms
2023-09-15 18:27:57 +02:00
Arthur Meyre
229bfeebe4
chore(core): remove unsafe new_unchecked on CiphertextModulus
...
- the function has been renamed to new and is now generally available
2023-09-15 18:27:16 +02:00
David Testé
48aab9d494
chore(ci): add boolean layer to code coverage
2023-09-15 11:00:23 +02:00
David Testé
e4769a8212
chore(ci): do not trigger code coverage on pr sync
...
Automatic code coverage will be enable again, once all the layers of the
library have coverage implemented.
2023-09-15 08:33:10 +02:00
David Testé
79bdaaba20
chore(ci): disable codecov patch status
...
This is done to avoid noisy reports in GitHub since coverage in all the
library layers haven't been implemented yet.
2023-09-15 08:33:10 +02:00
Arthur Meyre
02a14fff7c
feat(core): add parallel LWE packing keyswitch
...
- update test to check equivalence of parallel and serial algorithm
2023-09-14 14:45:35 +02:00
Arthur Meyre
72cce4c5b2
chore(core): move thread_count computation before buffer allocations
...
- for parallel LWE KS and LWE PFPKS
- remove useless type annotation as well
2023-09-14 14:45:35 +02:00
David Testé
a317c4b9dd
chore(ci): run code coverage workflow on aws ec2 instance
2023-09-14 13:32:09 +02:00
David Testé
2e2bd5ba29
chore(ci): use aws ami with missing packages installed
...
libssl-dev and pkg-config packages were missing to be able to install
cargo tarpaulin.
2023-09-14 13:32:09 +02:00
David Testé
827d8d8708
chore(ci): run coverage only if source files have changed
2023-09-14 13:32:09 +02:00
David Testé
bf434be347
chore(ci): exclude unwanted files from coverage
2023-09-14 13:32:09 +02:00
Arthur Meyre
ed83fbb460
chore(tfhe): remove unused deps, drop once_cell, enable paste when needed
...
- bump to 1.72 for std lib OnceLock and stabilized ARM intrisics
2023-09-14 10:52:34 +02:00
David Testé
0aad2e669b
chore(ci): notify slack about coverage only in case of failure
2023-09-13 15:25:32 +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
Arthur Meyre
b77286bcbc
chore(bench): fix pbs bench code which had issues with name type
...
- clippy will be hardened in a subsequent commit
2023-09-13 11:49:33 +02:00
Mayeul@Zama
609f83bbff
style(shortint): smart always take mut references
2023-09-13 09:44:46 +02:00
David Testé
2a8ebb81d8
chore(ci): fix trivium test recipes
2023-09-13 09:09:39 +02:00
David Testé
1a2a17a6ab
chore(ci): avoid running full suite several times on approval
...
If two or more reviewers approve a Pull Request successively with
no new commits in between, the full test suite would have been run
for each approval. With this commit, the full test suite would be
run again upon approval only if a push has occurred.
2023-09-13 09:09:20 +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é
b29936d844
test(shortint): add key switching key handling in keycache
...
This mainly done to speed up coverage test by avoiding generating
key on each tests.
2023-09-13 09:09:03 +02:00
David Testé
25914cc727
test(shortint): make tests suite lighter for coverage target
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
Asher
4a99e54c0d
chore(docs): typo in readme
2023-09-12 18:34:06 +02:00
tmontaigu
2383591351
chore(hlapi): move integrations tests into src dir
2023-09-12 10:32:42 +02:00
tmontaigu
dc464f398d
chore(trivium): fix module inception
2023-09-12 10:32:26 +02:00
Mayeul@Zama
ce70b5758a
refactor(shortint): replace apply_msg_identity_lut_assign by message_extract
2023-09-11 17:38:15 +02:00
Mayeul@Zama
1c76a08373
refactor(shortint): replace clear_carry by message_extract
2023-09-11 17:38:15 +02:00
Mayeul@Zama
9b19bd1e8b
refactor(shortint): remove comp_assign operations
2023-09-11 17:38:15 +02:00
Arthur Meyre
a3dde21240
refactor(core): add NoiseRandomGenerator
...
- update EncryptionRandomGenerator to make use of that generator
2023-09-11 17:29:47 +02:00
Arthur Meyre
005e1afe2f
refactor(core): add MaskRandomGenerator
...
- update EncryptionRandomGenerator to make use of that generator
- remove fork_n and par_fork_n on EncryptionRandomGenerator which were lazy
shortcuts to get multi bit PBS working faster
- MaskRandomGenerator will be usable for parallel decompression, which will
be done in a subsequent commit
2023-09-11 17:29:47 +02:00
Arthur Meyre
17c404b77d
chore(core): re-organize encryption.rs to have smaller files
...
- preparatory work for refactor around mask and noise generators to allow
parallel decompression
2023-09-11 17:29:47 +02:00
Arthur Meyre
1403971d15
feat(core): add parallel LWE PFPKS and LWE KS
...
- add utility algorithms where applicable
2023-09-11 13:25:43 +02:00
Arthur Meyre
94ad69bfa3
chore(docs): update toolchain requirements
2023-09-11 13:05:33 +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
Arthur Meyre
d0e1a582e1
chore(csprng): add code base taken from concrete-core repo
2023-09-11 13:05:33 +02:00
Arthur Meyre
546cb369a8
chore(c_api): mark some functions manipulating pointers as unsafe
...
- restrict visibility to the c_api
BREAKING CHANGE:
change in visibility specifier is a breaking change though those functions
were not meant to be used by external users
2023-09-11 12:49:57 +02:00
dependabot[bot]
445af7ab97
chore(deps): bump tj-actions/changed-files from 38.2.1 to 39.0.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 38.2.1 to 39.0.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](2f7246cb26...246636f5fa )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-11 10:05:38 +02:00
dependabot[bot]
23f8c69bae
chore(deps): bump actions/upload-artifact from 3.1.2 to 3.1.3
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](0b7f8abb15...a8a3f3ad30 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-11 10:05:29 +02:00
dependabot[bot]
b8df207b68
chore(deps): bump actions/checkout from 3.6.0 to 4.0.0
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3.6.0 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](f43a0e5ff2...3df4ab11eb )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-11 10:05:17 +02:00
sarah el kazdadi
03688aee4c
feat(fft): use monomial fft for multibit pbs
2023-09-08 18:27:43 +02:00
David Testé
5a3652f398
chore(ci): add clippy target for trivium application
2023-09-08 16:49:27 +02:00
David Testé
ae3c261d1e
chore(bench): add 128 and 256 bit sizes for multi-bit benchmarks
2023-09-08 13:25:28 +02:00
tmontaigu
95dcf95e88
fix(integer): make trim_radix_msb handle dirty inputs
2023-09-08 10:29:25 +02:00
J-B Orfila
b92d6400f4
chore(bench): add new parameter sets to bench
2023-09-07 14:49:20 +02:00
David Testé
9ba27b4082
chore(ci): add multiplier to get effective pbs throughput value
2023-09-06 11:02:47 +02:00
dependabot[bot]
b164c90d75
chore(deps): bump tj-actions/changed-files from 38.1.3 to 38.2.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 38.1.3 to 38.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](c860b5c47f...2f7246cb26 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-04 16:11:54 +02:00
Arthur Meyre
ff893ca6ef
chore(wopbs): rework the inner part of WopLUTBase to be easier to use
...
BREAKING CHANGE: Wopbs LUT structs for shortint and integer have changed
APIs
2023-09-04 13:19:37 +02:00
tmontaigu
2dd1e13dad
fix(integer): add assert on scalar bits in scalar_div
...
To work the scalar div requires that the scalar type (u32, u64, etc)
has at least as many bits of precision that what the ciphertext
encrypts (e.g. if the ciphertext encrypt 32bits, the scalar type must
have at least 32 bits)
We were missing the assert which lead to misuse, so we add it.
2023-09-01 18:04:51 +02:00
tmontaigu
4393fce861
feat(integer): be smarter about parallel carry propagation usage
...
The parallel carry propagation algorithm is a lot faster
than the non parallel one, however to actually be faster
it requires the CPU to have enough threads.
This adds checks so that we use the parallel algorithm
only if this condition is met.
This should improve performance on smaller CPUs
typically found in standard laptops/desktops.
2023-09-01 18:04:34 +02:00
Arthur Meyre
4f10cfa6dd
chore(tfhe): bump version to 0.4.0
2023-08-31 14:29:17 +02:00
Mayeul@Zama
a6e4488de2
feat(js_test): add warning for expected error lor
2023-08-31 09:28:28 +02:00
Mayeul@Zama
878f3fa448
style(shortint): allow needless_pass_by_ref_mut on smart ops
2023-08-31 09:28:28 +02:00
Mayeul@Zama
90b887a56f
style(tfhe): rename module
2023-08-31 09:28:28 +02:00
Mayeul@Zama
7dc52cf4ef
chore(toolchain): fix clippy lints
2023-08-31 09:28:28 +02:00
Mayeul@Zama
a69333ed37
chore(toolchain): format rust
2023-08-31 09:28:28 +02:00
Mayeul@Zama
ffad25449e
chore(toolchain): update toolchain
2023-08-31 09:28:28 +02:00
tmontaigu
6d471856c7
chore(docs): add section about writing trait bounds
...
This how to shows how to write the trait bounds of function
for the high level API.
2023-08-30 17:14:45 +02:00
David Testé
65749cb39b
chore(bench): benchmark shortint ops against multi-bit parameters
2023-08-30 13:31:46 +02:00
David Testé
bf36316c12
chore(bench): benchmark server key creation from compressed one
2023-08-30 13:31:46 +02:00
David Testé
d98bb0eb86
chore(bench): measure bootstrap compressed key sizes
2023-08-30 13:31:46 +02:00
Arthur Meyre
5747af6dce
feat(core): add LwePackingKeyswitchKey entity and algorithms
...
BREAKING CHANGE:
- more stringent checks for ciphertext moduli on some operations
- uniformized order of certain parameters for keyswitching primitives
- uniformized some primitives name
2023-08-30 10:54:35 +02:00
David Testé
cf08436c7d
chore(bench): add pbs_ks parameters to pbs benchmarks
2023-08-29 10:02:01 +02:00
dependabot[bot]
241bddccaf
chore(deps): bump rtCamp/action-slack-notify from 2.2.0 to 2.2.1
...
Bumps [rtCamp/action-slack-notify](https://github.com/rtcamp/action-slack-notify ) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/rtcamp/action-slack-notify/releases )
- [Commits](12e36fc18b...b24d75fe0e )
---
updated-dependencies:
- dependency-name: rtCamp/action-slack-notify
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-28 13:39:57 +02:00
dependabot[bot]
8ce1984214
chore(deps): bump tj-actions/changed-files from 37.6.1 to 38.1.3
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 37.6.1 to 38.1.3.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](a0585ff990...c860b5c47f )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-28 10:17:42 +02:00
dependabot[bot]
82ef430dfa
chore(deps): bump actions/checkout from 3.5.3 to 3.6.0
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](c85c95e3d7...f43a0e5ff2 )
---
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-08-28 10:17:31 +02:00
tmontaigu
2348303b26
chore(ci): pin clap dependency
2023-08-25 21:03:42 +02:00
tmontaigu
a35386f740
chore(ci): remove ability for tests to be retried
2023-08-24 20:38:07 +02:00
tmontaigu
3df542c5f8
chore(bench): bench integer scalar ops up to 256 bits
2023-08-24 16:53:41 +02:00
David Testé
37623eedf3
chore(ci): add shortint pbs_ks parameters to security check
2023-08-23 09:05:45 +02:00
David Testé
fa8cf73d57
chore(ci): run parameters security check job unconditionally
...
Even if the parameters haven't changed in a commit, the lattice
estimator could have been updated. Hence the reason to run this
quick check on every push on main.
2023-08-23 09:05:45 +02:00
David Testé
872b20a4a1
chore(bench): add division and modulo ops to integer benchmarks
2023-08-23 09:05:16 +02:00
dependabot[bot]
4920e3b4df
chore(deps): bump tj-actions/changed-files from 37.6.0 to 37.6.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 37.6.0 to 37.6.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](87697c0dca...a0585ff990 )
---
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-08-21 23:18:38 +02:00
David Testé
75a0881e9d
fix(boolean): increase noise for tfhe_lib parameters set
...
This is done to match the values exposed in TFHE_LIB project.
2023-08-21 09:37:56 +02:00
dependabot[bot]
f67effc359
chore(deps): bump tj-actions/changed-files from 37.5.1 to 37.6.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 37.5.1 to 37.6.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](a96679dfee...87697c0dca )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-11 22:13:39 +02:00
David Testé
e8eb82f7ae
chore(bench): use clean inputs for unchecked ops benchmarks
...
Previousely, unchecked_eq benchmark would fail at each run. Since
unchecked operations require clean inputs, we change the way we
instantiate benchmark functions.
2023-08-11 13:22:59 +02:00
David Testé
53018ddc36
chore(ci): ignore tfhe_lib_parameters check in lattice esitmator
...
This third-party parameters set is known to be less secure, so
there is no need to make the CI fail because of this set.
2023-08-11 11:08:59 +02:00
David Testé
9ef62acff1
chore(ci): change full suite benchmarks worflow description
...
This is done to avoid having the same name than the other
full benchmarks workflow.
2023-08-11 09:18:47 +02:00
aquint-zama
12220b2a18
chore(docs): design upgrade
2023-08-10 18:46:29 +02:00
tmontaigu
625c150dc1
feat(integer): start adding signed radix ciphertext
...
This introduces the SignedRadixCiphertext type
which encrypts signed values (i8, i16, etc).
Encryption and decryption functions are added.
This also makes the addition work with signed
values as the algorithm is the same.
2023-08-10 17:47:13 +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
David Testé
c5d93f4b38
chore(bench): Put integer comparisons ops in different groups
...
This is done to avoid hitting GitHub's hard limit of 6hours
maximum execution per job.
This commit also enable the cron job for the full benchmarks suite.
2023-08-10 11:16:43 +02:00
tmontaigu
7a465cd258
feat(integer): make full_propagate_parallelized more parallel
...
Using the functions that were introduced recently,
it is possible to make the full_propagate_parallelized method
more parallel than it was, resulting in faster computations.
The new carry propapagation should now be the cost of
a default add + one PBS, so ~400ms in 256 instead of ~3s.
However its probably slower for smaller number of blocks (eg 4 blocks)
This is done by extracting carry and messages in parallel,
then adding the carries to the correct message, the final step
is to use the single carry propapagation function.
2023-08-08 17:04:46 +02:00
tmontaigu
a0946ac509
feat(hlapi): add if_then_else
2023-08-08 11:35:37 +02:00
tmontaigu
5521f2a4a4
feat(integer): add if_then_else
...
This adds if_then_else (aka cmux / select)
to the integer API.
This also makes the min/max implementation use that
cmux instead of their own version of it, and allows
to save one pbs.
2023-08-08 11:35:37 +02:00
J-B Orfila
1a9e40c860
feat(boolean): add KS-PBS pattern choice to boolean
...
Co-authored-by: tmontaigu<thomas.montaigu@laposte.net >
2023-08-08 11:35:06 +02:00
David Testé
bc3e3e46a0
chore(bench): remove scalar prefix to default operations
...
This was making benchmark results parsing error-prone since scalar
operations must have the same name. It's the operand_type field
in the record parameters that acts as identifier (CipherText or
PlainText).
2023-08-04 08:45:46 +02:00
Arthur Meyre
60c87b6d95
chore(ci): the workflow was seen as ill formed by github
...
- it was sending error messages via email, silence it by having it well
formed
2023-08-02 15:14:29 +02:00
Arthur Meyre
df4c9f511d
chore(ci): add placeholder workflow to be able to experiment with actions
...
- most of the time the workflow file needs to exist in main, with this it's
possible to experiment directly on ones branch as the file already exists
in main
2023-08-02 13:31:04 +02:00
David Testé
69bfd6556f
chore(bench): prefix benchmarked function by its related layer
...
Replace ServerKey::[...] benchmark identifier by shortint::[...]
and integer::[...] to ease resutls parsing.
2023-08-02 10:26:06 +02:00
David Testé
7fad91e429
chore(ci): fix full benchmarks workflows
...
Workspace is cleaned between jobs so we can't factorize parts
of the benchmarks.
2023-08-02 10:26:06 +02:00
David Testé
0da30d5e58
chore(bench): benchmark with only one bit size for scalar
2023-08-02 10:26:06 +02:00
David Testé
97ce5b617a
chore(bench): handle scalar bit size on integer results parsing
2023-08-02 10:26:06 +02:00
David Testé
a4723b03f3
chore(ci): install job dependencies right before running benchs
...
Since full benchmarks use a matrix to run jobs, we need to install
job dependencies (rustup, checkout repositories, ...) each time
because at the end of the job the workspace will be cleaned.
2023-08-02 10:26:06 +02:00
Arthur Meyre
d24d484bcf
chore(bench): apply fix to circumvent rust's weird shift behavior
2023-08-02 10:26:06 +02:00
David Testé
9945cdd9b2
chore(ci): bench multiple scalar bit sizes and add operators
...
Scalar operations are benchmarked against scalar bit sizes.
Scalar division and modulo are added to the benchmark set.
2023-08-02 10:26:06 +02:00
tmontaigu
04a0aa0c31
feat(hlapi): allow scalar ops on values up to U256
...
This enables to use u128 and U256 as operands to
operations in the high level api.
BREAKING CHANGE: a breaking change in the C API for scalar operations
for FheUint128 and FheUint256 as they previously required
a u64 and now a U218 / U256 respectively.
2023-08-01 15:12:10 +02:00
Arthur Meyre
898c305acd
refactor(keycache): refactor the named_params_impl macro
...
- allows to easily create named parameters from non standard shortint
parameter structs
- allows to reate such named parameters easily outside of the keycache mod
the way the macro was written before expanded to more macro calls that may
not have been in scope and rendered the macro virtually useless
2023-08-01 14:56:58 +02:00
dependabot[bot]
f5854db0b1
chore(deps): bump tj-actions/changed-files from 37.4.0 to 37.5.1
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 37.4.0 to 37.5.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](de0eba3279...a96679dfee )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-07-31 18:32:08 +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
J-B Orfila
b7d830c57f
docs: update the README for v0.3
2023-07-27 15:16:26 +02:00
David Testé
9b983745da
chore(ci): create benchmarks workflows that runs the full suite
...
It will allow to runs benchmarks all the operations in shortint and
integer layers.
2023-07-27 12:52:42 +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
Arthur Meyre
58b4089524
chore(docs): add remarks on smart operations taking mutable inputs
2023-07-26 11:57:53 +02:00
Arthur Meyre
98db328de2
fix(integer): set proper MaxDegree for CompressedServerKey
...
- add shortint API to generate a CompressedServerKey with MaxDegree
- add non regression test based on the user issue
- factorize MaxDegree computation for integer server keys
2023-07-26 10:00:24 +02:00
David Testé
f5fab4db99
chore(bench): run groups of benchmarks using env variable
2023-07-26 09:36:29 +02:00
Arthur Meyre
95f2eef94f
chore(doc): fix multiplication typo
2023-07-25 20:51:15 +02:00
David Testé
2c10a792a5
chore(ci): trigger benchmarks only if layers have changed
...
For example, if only shortint layer related files have changed,
only the shortint benchmarks would be run on push.
However, if any files changed in the common_benches group then
all the benchmarks would be run.
2023-07-25 09:13:41 +02:00
dependabot[bot]
96689443ef
chore(deps): bump tj-actions/changed-files from 37.1.2 to 37.4.0
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 37.1.2 to 37.4.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](2a968ff601...de0eba3279 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-07-24 13:04:38 +02:00
Arthur Meyre
514cb9e6af
feat(core): add concrete-cpu tests for wopbs
...
- manage luts a bit differently to match TFHE-rs wopbs implementation
2023-07-24 10:56:49 +02:00
Pakorn Nathong
c79da46bb2
feat(integer): expose scalar mul and sub trait
2023-07-24 10:56:14 +02:00
tmontaigu
a8449f1ded
feat(integer): allow scalar shift/rotate with more unsigned types
...
This is mainly for convenience.
Also, rust implements shift by u8, u16..u128 for each types.
(even shift by i8...i128 are implemented).
2023-07-21 13:31:29 +02:00
tmontaigu
11517703e6
fix(integer): remove incorrect bounds
...
In 35c6aea84b the bounds for
the scalar_div family of functions were changed.
However, the a few bounds `u64: From<T>` were
not removed meaning the functions which still
had these were still stuck with u64 as the max scalar value.
This commit removes the leftover bounds.
2023-07-20 17:10:26 +02:00
tmontaigu
35c6aea84b
feat(integer): allow scalar_div/rem up to 256 bits
2023-07-20 13:55:21 +02:00
J-B Orfila
4e37f7e5bf
docs(all): TFHE-rs v0.3.0 doc update
2023-07-19 11:08:36 +02:00
tmontaigu
a69a9c727b
feat(integer): allow scalar_mul with U256
...
Same as scalar_sub, the UnsignedInteger bound was to strict, so we create a
`ScalarMultiplier` trait to allow using U256 as a scalar.
2023-07-17 16:30:17 +02:00
tmontaigu
bafb4f9e17
feat(integer): allow scalar sub with 256 bit scalar
...
The scalar (T) in scalar_sub could be at most a u128
because the bounds were `T: UnsignedInteger` and our
U256 does not implement this trait yet.
To make scalar_sub accept a U256 we create
a smaller trait.
2023-07-17 16:30:17 +02:00
Arthur Meyre
0663d7ca0e
chore(ci): use aws ami with the latest updates
...
- Ubuntu 22.04 based
2023-07-17 15:57:58 +02:00
Arthur Meyre
8112684aae
chore(ci): yet another bench fix
2023-07-17 15:51:07 +02:00
Arthur Meyre
f2f4cb7937
chore(ci): select benches to run
2023-07-17 14:16:28 +02:00
Arthur Meyre
e0e6aa845a
chore(core): track caller on CiphertextModulus methods that can fail
2023-07-17 14:16:12 +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
763ad60ff9
chore(ci): fix m1 workflow run conidition
2023-07-17 11:07:32 +02:00
Arthur Meyre
6f4f923951
chore(ci): avoid removing labels when we are not on a PR
2023-07-17 11:07:32 +02:00
dependabot[bot]
5de984f7d6
chore(deps): bump tj-actions/changed-files from 37.0.5 to 37.1.2
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from 37.0.5 to 37.1.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](54849deb96...2a968ff601 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-07-17 10:32:28 +02:00
dependabot[bot]
640b849d4b
chore(deps): bump JS-DevTools/npm-publish from 2.2.0 to 2.2.1
...
Bumps [JS-DevTools/npm-publish](https://github.com/js-devtools/npm-publish ) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/js-devtools/npm-publish/releases )
- [Changelog](https://github.com/JS-DevTools/npm-publish/blob/main/CHANGELOG.md )
- [Commits](a25b4180b7...5a85faf05d )
---
updated-dependencies:
- dependency-name: JS-DevTools/npm-publish
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-07-17 10:32:07 +02:00
Arthur Meyre
7d484583ff
chore(ci): add more triggers for re-running benches
...
- the bench "dependency" tree is bigger than first assumed
2023-07-17 09:36:54 +02:00
Arthur Meyre
68aa2ba25a
chore(ci): fix workflow dispatch not triggering bench start
2023-07-17 09:36:54 +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
f982c58538
chore(shortint): make shortint div behavior match integer on div by zero
2023-07-13 13:22:43 +02:00
Arthur Meyre
e2e901c220
chore(ci): fix usage of changed files
2023-07-12 17:27:06 +02:00
Arthur Meyre
507c569eee
chore(shortint): add more convenience parameter aliases
2023-07-12 17:26:52 +02:00
Arthur Meyre
c37d9c590b
chore(hlapi): remove leftover empty file
2023-07-12 14:55:12 +02:00
Arthur Meyre
549e9e70da
chore(benches): need to checkout repo to check changed files for benchmarks
2023-07-10 13:05:17 +02:00
Arthur Meyre
d56afcd8c3
chore(integer): disable most sequence default add tests
...
- those are too slow and not the most optimized option to perform those
operations
2023-07-10 09:34:10 +02:00
Arthur Meyre
2019cd1708
chore(ci): M1 don't run multibit integer tests (too slow)
2023-07-10 09:34:10 +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
4b174d552a
chore(ci): run all M1 tests in FAST_TESTS=TRUE mode for better coverage
2023-07-10 09:34:10 +02:00
Arthur Meyre
1764c88de0
chore(ci): run schedule build only on public repo
2023-07-10 09:34:10 +02:00
Arthur Meyre
e4af2bad0f
chore(test): fix wopbs only test which was using a wrong set of parameters
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
Arthur Meyre
10f034171f
chore(ci): LTO is causing issues in M1 CI tests use LTO off instead
2023-07-10 09:34:10 +02:00
Arthur Meyre
5e0aff616e
chore(ci): run tests on M1 without integer as those are too long
...
- add a nightly trigger
2023-07-10 09:34:10 +02:00
Arthur Meyre
9687c55eb6
chore(ci): fix c_api_tests.sh to use threads on M1 properly
2023-07-10 09:34:10 +02:00
Arthur Meyre
222c5e1c19
chore(tfhe): misc fixes for error messages
2023-07-10 09:34:10 +02:00
Arthur Meyre
ea47265f15
chore(tfhe): remove unwarranted uses of unsafe when the code is not unsafe
...
- marking functions unsafe because the computations may be wrong due to a
bad choice of crypto parameters is not in line with the meaning of unsafe
in rust, so remove those uses
2023-07-10 09:33:18 +02:00
David Testé
465b79f42d
chore(ci): trigger benchmarks only on specific file changes
2023-07-10 09:30:15 +02:00
tmontaigu
2557b29230
fix(shortint): Ciphertext::copy_from
...
Ciphertext::copy_from did not copy the degree
resulting in potential bad results for some operations.
This fixes it, and rewrites to use destructuring
in order to prevent such thing from happenning again
(with destructuring, if a member is not destructured,
a compile error is emited)
Also we move the implementation of copy_from into
clone_from.
2023-07-09 20:15:07 +02:00
tmontaigu
490bdaea30
fix(integer): fix U256::copy_to_be_byte_slice
...
There was a bug in to_be_bytes_slice, it was missing a
`slice.reverse()` (from_be_bytes correctly has it)
The from/to functions have been refactored to used
from_be_bytes / to_be_bytes, etc from the stdlib to
only have one layer of endianess to manage.
The test value used did not catch that so we change the value
used to expose the problem.
2023-07-07 15:29:35 +02:00
tmontaigu
936ac05e51
chore(core): fix typo in SignedInteger trait doc
2023-07-07 10:10:12 +02:00
tmontaigu
d496cfa431
feat(hlapi): bind scalar_bitwise/div/rem operations
2023-07-06 17:57:58 +02:00
Arthur Meyre
16be1c1c1d
chore(bench): enable auto integer multi bit bench launch
2023-07-06 17:06:43 +02:00
Arthur Meyre
f2f4e397f1
chore(tfhe): bump version to 0.3.0
2023-06-30 23:10:26 +02:00
David Testé
facc2a162f
test(integer): add unit and doc test for bitnot operator
2023-06-30 19:42:18 +02:00
Arthur Meyre
5981a886fd
chore(bench): add multi bit key size measurements
2023-06-30 18:37:52 +02:00
tmontaigu
e98315fa60
feat(integer): add division by encrypted value
...
Adds a simple and slow algorithms for division/remainder
but at least it enables to use of this operators.
This also adds the same implementation in clear
so we will now be able to have u256 div.
2023-06-30 16:26:22 +02:00
Arthur Meyre
6b235f6fef
chore(bench): fix issue due to overlapping merge
2023-06-30 13:15:36 +02:00
Arthur Meyre
4d376eea39
chore(bench): proper param name fix for WASM bench
2023-06-30 11:16:31 +02:00
tmontaigu
d93ddbe897
feat(integer): add scalar division/remainder
2023-06-30 09:46:47 +02:00
tmontaigu
189018ed05
feat(hlapi): allow use of multibit for integers
2023-06-30 09:45:14 +02:00
David Testé
fdae4e958c
chore(ci): add bitnot operators to integer benchmarks
2023-06-30 09:32:42 +02:00
David Testé
d5ef359a04
chore(ci): use multi-bit params in shortint for pbs benchmarks
...
Use up-to-date crypto parameters for PBS benchmarks with multi-bit
instead of hardcoded ones.
2023-06-30 09:31:56 +02:00
J-B Orfila
a52cd6454d
feat(shortint): add encrypt_message_and_carry
2023-06-29 17:34:36 +02:00
Arthur Meyre
142851792a
chore(bench): fix param names
2023-06-29 16:20:58 +02:00
David Testé
e52bc09db5
chore(ci): add integer benchmarks with multi-bit parameters
2023-06-29 15:30:19 +02:00
Arthur Meyre
5bea1e0bc0
chore(ci): fix fast tests launching too many multi bit parameters
2023-06-28 19:14:20 +02:00
Arthur Meyre
224d81378a
chore(docs): add information about the KS_PBS/PBS_KS naming "spec"
2023-06-28 19:14:20 +02:00
Arthur Meyre
011cb48ded
chore(shortint): update exposed parameters
2023-06-28 19:14:20 +02:00
Arthur Meyre
da05f16c10
chore(shortint): add aliases for "old" parameter sets
...
- wopbs not included as it's due a heavy rewok
2023-06-28 19:14:20 +02:00
Arthur Meyre
ffc2472c95
chore(shortint): update keycache for CPK params, remove unusable params
2023-06-28 19:14:20 +02:00
Arthur Meyre
c0b82c77fb
chore(shortint): plug cpk tests in scripts
2023-06-28 19:14:20 +02:00
Arthur Meyre
b09dc1f3ca
chore(tfhe): rename params
2023-06-28 19:14:20 +02:00
J-B Orfila
a8e8a2e555
chore(shortint): update param compact key
2023-06-28 19:14:20 +02:00
David Testé
61819b2cea
chore(ci): add ciphertext modulus for boolean crypto parameters
2023-06-28 18:14:27 +02:00
David Testé
1ee4440c0a
chore(ci): put casting benchmarks into group to parse results
...
Fix usage of generics for crypto parameters in utilities.
2023-06-28 12:01:06 +02:00
David Testé
cbfaf63964
chore(ci): add pbs throughput benchmarks
...
This implies to add a conversion method to CiphertextModulus in
order to create the CryptoParametersRecord struct used as utils.
2023-06-27 18:16:27 +02:00
Arthur Meyre
6ac96bb46a
chore(tfhe): dump non deterministic key and use deterministic when required
2023-06-27 16:10:22 +02:00
David Testé
f9b49eeb39
chore(ci): add feature gate for shortint benchmarks in utilities
2023-06-27 16:00:04 +02:00
Arthur Meyre
fdda5c56f2
feat(multibit): give the possibility to select deterministic execution
...
BREAKING CHANGE:
shortint ServerKey serialization has changed due to the additional info for
deterministic execution carried by the MultiBit variant
2023-06-27 13:21:23 +02:00
tmontaigu
cb20b4ad3a
fix(integer): fix strict assert in add_paralellized
2023-06-27 12:54:50 +02:00
David Testé
fb653ef9b2
chore(ci): write shortint casting benchmarks to json file
2023-06-27 12:33:54 +02:00
Arthur Meyre
2e58fe36a4
test(core): add test on noise variance for lwe encryption
2023-06-26 14:27:09 +02:00
tmontaigu
2cbd8c9fd5
feat(integer): implement more U256 operators
...
This implements the following operators for U256
- BitXor
- Mul
- is_power_of_two
- ilog2
- SubAssign
2023-06-23 18:59:41 +02:00
twiby
11ac8e6cb9
feat(trivium): add bench for casting and packing
2023-06-23 16:01:40 +02:00
twiby
5f635e97fa
feat(apps): add Trivium application of TFHE
2023-06-23 16:01:40 +02:00
twiby
7426e441ba
feat(hlapi): keys can be derefed into their underlying keys
2023-06-23 16:01:40 +02:00
twiby
8ae799c477
feat(hlapi): impl TryFrom opeartors for GenericInteger: RadixCiphertext and Vec<Ciphertext>
2023-06-23 16:01:40 +02:00
tmontaigu
ee232ed81e
feat(integer): add scalar bitwise operations
...
Nothing much interesting in terms of performance,
we only use the fact that we can 'inspect' the scalar
to avoid unnecessary work.
2023-06-23 15:57:21 +02:00
tmontaigu
16f4c721ab
chore(wasm): re-enable tests which were wrongly disabled
...
Also fix a small typo, in HLAPI error message
2023-06-23 15:02:32 +02:00
Arthur Meyre
7ea13715ee
chore(ci): run example tests
2023-06-22 11:57:27 +02:00
Arthur Meyre
a924b6ebde
chore(ci): fix actions URL in a few workflows
2023-06-22 10:31:35 +02:00
Arthur Meyre
2b5d39c927
chore(ci): make release idiot proof
2023-06-22 10:31:35 +02:00
Morten Dahl
aafcbd0a3f
chore(docs): fix typo
2023-06-21 18:09:12 +02:00
Arthur Meyre
e810b42eb6
chore(tfhe): remove wildcard deps
2023-06-21 16:24:22 +02:00
tmontaigu
352b282149
feat(hlapi): bind not operator (!)
2023-06-20 21:16:40 +02:00
tmontaigu
bc5f648c35
feat(hlapi): bind scalar comparisons
2023-06-20 21:16:40 +02:00
tmontaigu
7f83761fde
feat(hlapi): bind not equal
2023-06-20 21:16:40 +02:00
tmontaigu
8c3993def2
feat(hlapi): bind bit rotations
2023-06-20 15:52:47 +02:00
tmontaigu
a361ad339d
feat(hlapi): bind shift by encrypted amount
...
To keep things easy we have to drop the part
where the macro generated the docs.
2023-06-20 15:52:47 +02:00
sarah el kazdadi
aa82d9f19c
feat(multibit): implement deterministic multibit pbs
2023-06-20 13:23:44 +02:00
tmontaigu
eae2d8137b
refactor(shortint): rename generate_accumulator into generate_lookup_table
...
This renames the generate_accumulator* family of
functions into `generate_lookup_table`.
The reasoning is that we have `generate_accumulator`
which returns a `LookupTable` type, and you use
that with the `apply_lookup_table` function which is not
coherent.
Accumulator was the name we had originaly and consistently
for these, however lookup_table is probably easier to
understand / guess what it is about.
Also, it is the term used in concrete, the other
Zama product.
2023-06-19 18:09:28 +02:00
tmontaigu
ca127b2878
refactor(all): remove PBSOrder generic marker
...
The motivation for this change is that having the Big/Small
being a generic parameter of types, makes the code more complex
than it should be.
Also, It was not complete, not all structs had this generic parameter
making the whole thing a bit more clunky.
2023-06-19 15:16:09 +02:00
Arthur Meyre
80b5ce7f63
chore(core): remove Deref and DerefMut for Polynomial
...
- add indexing and iteration primitives
2023-06-19 13:21:39 +02:00
dependabot[bot]
2469aa0c2a
chore(deps): bump actions/checkout from 3.5.2 to 3.5.3
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3.5.2...c85c95e3d7251135ab7dc9ce3241c5835cc595a9 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-06-19 11:47:07 +02:00
Arthur Meyre
48b307c627
chore(ci): fix wasm test docker
2023-06-19 11:46:52 +02:00
Arthur Meyre
8100b2d0de
chore(ci): skip super slow integer tests in CI
2023-06-19 09:25:29 +02:00
Arthur Meyre
aab390470c
chore(ci): add PR template
2023-06-19 09:25:16 +02:00
aquint-zama
f8f723f42d
chore(readme): add citing tfhe-rs section
2023-06-16 14:14:13 +02:00
Arthur Meyre
1afdc71689
chore(tfhe): bump version for pre-release
2023-06-16 14:12:39 +02:00
tmontaigu
120f6b0304
feat(integer): add scalar comparisons
...
This adds scalar comparisons and min/max
- eq (==) and ne (!=) have similar performances
to the non scalar version, only gaining a few milliseconds
when the scalar value is smaller than the encrypted value
- orderings (<, >, <= ,>=) have more interesting
performances gain the more the scalar value
is small than the number of encrypted bits in the
integer ciphertext.
e.g:
comparing an encrypted U256 to a value <= u128::MAX
brings the comparison time from 234 ms to 194 ms
comparing an encrypted U256 to a value <= u64::MAX
brings the comparison time from 234 ms to 169 ms
2023-06-16 10:41:39 +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é
5690796da4
chore(ci): write boolean keys results file at the correct location
2023-06-14 18:47:32 +02:00
twiby
00c4eb417b
fix(shortint): key switching key doctests
2023-06-14 18:45:54 +02:00
David Testé
42374db7cb
chore(ci): use correct path to wasm pk generation result file
2023-06-14 15:57:59 +02:00
twiby
f98127498e
feat(integer): add CastingKey struct to allow users to switch between integer parameter sets.
...
Possibilities are limited: you can only cast to a parameter set with the exact same representation: same message and carry size, same number of blocks in a radix representation, and same basis in crt representation.
2023-06-14 13:53:12 +02:00
twiby
d70729668e
feat(shortint): add CastingKey struct to allow users to change server_key during a server circuit
2023-06-14 13:53:12 +02:00
twiby
8d339f2fbf
feat(boolean): add CastingKey struct to allow users to change server_key during a server circuit
2023-06-14 13:53:12 +02: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
tmontaigu
bd061dc85c
refactor(hlpai): remove ServerKeyOp trait and macros
...
Since 8b3d31ae8a
integers use the same serve key, so
the `GenericIntegerServerKey<P>` type was removed.
Since `GenericIntegrServerKey<P>` does not exist,
there is much less need for the collection
of server key traits (ServerKeyAdd, SeverKeySub).
This commit removes them, as well as the macro layer
that was used to implement it
2023-06-13 12:57:03 +02:00
tmontaigu
2defb5a669
feat(c_api): safer destroys
...
This adds a null check in the different destroy function
of the C API. The performance impact of this should
be negligible / inexistant but should make usage more
ergonomic and safer.
Also this renames the detroy functions from being named
`destroy_shortint_*` | `destroy_boolean_*` to
`shortint_destroy_*` | `boolean_destroy_*` as it is more
coherent with the rest of the API where functions starts with `shortint`
or `boolean`.
2023-06-13 09:38:56 +02:00
David Testé
1b0f3631d4
chore(ci): fix wasm benchmarks and boolean keys measurement
...
Now use the CI version of the make recipe to run WASM client
benchmarks. In addition, boolean keys and wasm parsing is fixed
so that benchmarks_parameters directory is created and populated
under tfhe directory.
2023-06-12 18:30:36 +02:00
David Testé
06ddfe893a
chore(ci): notify slack channel in case of benchmarks failure
2023-06-12 15:20:42 +02:00
David Testé
b69c9e7e7a
chore(ci): create profile for wasm client bench and add in workflow
2023-06-12 15:20:13 +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
3a17ebd2fa
feat(c_api): add entry point to generate LWE multi bit BSK
2023-06-12 14:18:13 +02:00
Agnes Leroy
dd15fd1b05
fix(core): fix multi bit bsk number of GGSWs check
2023-06-12 14:18:13 +02:00
dependabot[bot]
097ea6500c
chore(deps): bump actions/checkout from 3.5.2 to 3.5.3
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](8e5e7e5ab8...c85c95e3d7 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-06-12 13:51:34 +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
f8b497a4b8
chore(ci): fix integer bench workflow uploads
2023-06-12 10:23:13 +02:00
tmontaigu
189f02b696
refactor(hlapi): simplify wrapping of booleans
...
The way the boolean type was
wrapped was done the same way
shortints and integers were wrapped.
This was so that the internal code was
consistent despite not needing the same complexity.
Now that integers are wrapped differently it make
sense to remove the consistency constraint and
simplify the way booleans are wrapped in the HLAPI
2023-06-09 17:04:29 +02:00
tmontaigu
5654fe7981
feat(integer): scalar_mul generic over UnsignedInteger
...
This makes the scalar_mul family of operation
accepts any scalar of type T that implements
the UnsignedInteger traits.
This unlocks scalar_multiplication with
scalar being a u128.
2023-06-09 15:21:24 +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
tmontaigu
efac3c842f
feat(c_api): add #[repr(C)] for boolean parameters
...
The same thing was done in 3508019cd2
for shortint.
This does it for booleans
2023-06-09 11:53:22 +02:00
Arthur Meyre
7dbb4485bc
chore(shortint): use the right noise at encryption time
2023-06-09 10:49:17 +02:00
aquint-zama
a5906bb7cb
chore(tfhe): add a Code of Conduct
2023-06-08 14:06:29 +02:00
Jeremy Shulman
90b7494acd
chore(doc): attach tutorials to doc
2023-06-08 14:05:46 +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
200c8a177a
feat(core): add std multi-bit bootstrapping
2023-06-07 16:12:37 +02:00
Arthur Meyre
2f6c1cf0b5
chore(ci): add docs alias make target for doc
2023-06-07 14:18:49 +02:00
tmontaigu
b96027f417
feat(integer): improve default sub latency
2023-06-07 11:04:11 +02:00
tmontaigu
90c850ca0d
feat(integer): improve scalar add,sub and negation
...
- scalar_add now uses the same parallel carry propagation algorithm
as the add function.
- scalar_sub now uses the same parallel carry propagation algorithm
as the sub function.
- the 'default' negation function uses the now improved scalar_add
to be faster
- unchecked_scalar_add, smart_scalar_add, checked_scalar_add, scalar_add
have been updated to work on generic scalar type so it should work
on u32, u64, u128, U256, etc
- unchecked_scalar_sub, smart_scalar_sub, checked_scalar_sub, scalar_sub
have been updated to work on generic scalar type so it should work
on u32, u64, u128.
As U256 does not yet implement the UnsignedInteger trait, its not
usable yet as a scalar type for the sub operation.
- The HLAPI is still locked to u64 scalars, it will be updated
when most / all scalar ops are ready
2023-06-06 19:56:56 +02:00
Arthur Meyre
c8d3008a8d
chore(shortint): proper ThreadCount serialization for bootstrapping key
...
- skip thread_count on serialization, deserialize using the function to
properly populate thread_count
2023-06-06 16:58:23 +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
twiby
4ae202d8a4
refactor(tfhe): provide CiphertextBase with functions to convert from a generic type OpOrder to a specific struct.
...
This allows removing all calls to std::mem::transmute in shortint/engine/server_side/mod.rs, isolating unsafe blocks in the conversion functions. This makes the code safer and more likely to panic! in case of an error.
2023-06-06 12:19:56 +02:00
dependabot[bot]
7eb8601540
chore(deps): bump JS-DevTools/npm-publish from 2.1.0 to 2.2.0
...
Bumps [JS-DevTools/npm-publish](https://github.com/JS-DevTools/npm-publish ) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/JS-DevTools/npm-publish/releases )
- [Changelog](https://github.com/JS-DevTools/npm-publish/blob/main/CHANGELOG.md )
- [Commits](541aa6b21b...a25b4180b7 )
---
updated-dependencies:
- dependency-name: JS-DevTools/npm-publish
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-06-06 10:23:30 +02:00
tmontaigu
8a1691c536
chore(wasm): remove serialization in web test
...
In the web wasm test we serialize the public key
to print its size (38_931_6265 bytes) this
means we hold the public key twice in ram.
I suspect this causes frequent out of
memory errors which then result in the
test timing out.
So we remove that hoping it has a positive impact
2023-06-02 17:19:04 +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
Arthur Meyre
2b9a49db87
chore(tfhe): switch to using Into for PBS parameters conversion
...
- it seems generally better for some "Self conversion" i.e. Into<A> for A
seems to work better than From<A> for A
2023-06-02 16:00:28 +02:00
Arthur Meyre
62ddb24f00
chore(ci): add multibit to key cache generation
2023-06-02 16:00:28 +02:00
Arthur Meyre
c6ae463b41
feat(shortint): add the possibility to use multi bit PBS
2023-06-02 16:00:28 +02:00
tmontaigu
4947eefad4
fix(u256): align with rust for shift behaviours
2023-06-02 12:00:42 +02:00
tmontaigu
71209e3927
feat(integer): make scalar shift match rust when shift >= bit size
...
When the scalar value denoting the shift was bigger or equal to
the total number of bits in the ciphertext we would return zeros.
To match more the rust behaviour as well as the behaviour of
non scalar shift / rotate, the scalar shift will now remove
any higher bits of the clear shift value
2023-06-02 11:35:54 +02:00
tmontaigu
2a66ea3d16
feat(intger): add shifts and rotates on encrypted values
...
This implemantation is base on barrel shifters
which are used un hardware
2023-06-02 11:35:54 +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
Arthur Meyre
8ae92a960d
chore(ci): add multibit workflow
2023-06-02 08:55:42 +02:00
tmontaigu
b042c2f7d6
refactor(integer): improve decomposition/recomposition into blocks
...
This new implementation should hopefully be a little bit easier to understand.
But more importantly it is more general/generic,
the previous implementation required the input type to be able to be described as u64 words,
the new one works for any type (as long as needed trait are implemented)
Also the new implementation is separated from the encryption code,
meaning it will be usable by scalar operation, which will allow us
to deduplicate code and start making scalar ops support scalar values
that are on more than 64-bits.
2023-06-01 18:13:34 +02:00
tmontaigu
e307da5c7f
feat(integer): make eq (==) faster and add ne (!=)
2023-05-31 19:03:02 +02:00
Arthur Meyre
3d5b88d608
chore(core): encode the proper expectation wrt to ciphertext modulus
...
- we don't manage any non native moduli but rather native-compatible moduli
so update the asserts accordingly
2023-05-30 15:39:14 +02:00
Arthur Meyre
4fbf0691c5
chore(core): rename get_scaling_to_native_torus
...
- function now named get_power_of_two_scaling_to_native_torus to emphasize
it's reserved to power of 2 moduli
2023-05-30 15:39:14 +02:00
Arthur Meyre
5d277e85b9
feat(core): add non native decomposer
2023-05-30 15:39:14 +02:00
Arthur Meyre
778eea30e9
chore(tfhe): remove anyhow, just use Box<dyn std::error::Error>
2023-05-30 11:55:43 +02:00
tmontaigu
63247fa227
chore(sha256_example): use array_fn
2023-05-25 00:22:01 +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
Sexosexosexo
509fe7a63e
docs(tfhe): add boolean sha256 tutorial
...
Clap dev dependency added
2023-05-25 00:22:01 +02:00
tmontaigu
4eac45f0c6
fix(dark_market): fix change cwd logic
2023-05-24 23:30:26 +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
Yagiz Senal
e66a329e33
docs(tfhe): add dark market tutorial
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
Rick Klomp
b501cc078a
docs(tfhe): add FHE Regex Pattern Matching Engine
...
this includes a tutorial and an example implementation for the regex bounty
2023-05-24 22:11:53 +02:00
tmontaigu
800878d89e
feat(hlapi): add CompressedPublicKey decompression
2023-05-23 14:19:35 +02:00
tmontaigu
20d0e81bae
feat(boolean): add CompressedPublicKey
2023-05-19 19:07:16 +02:00
tmontaigu
d3dbf4ecc9
feat(integer): allow decompressing CompressedPublicKey
2023-05-19 15:32:25 +02:00
tmontaigu
c20ca07cd3
chore(ci): reduce number of test-threads
...
Reduce number of test-threads being spawned
to reduce propability if tests getting killed due
to out of memory
2023-05-17 15:58:27 +02:00
tmontaigu
9f6c7e9139
feat(hlapi): add CompressedServerKey
...
Now that WopPBS key are optional in the hlapi
we can have a CompressedServerKey.
If a user tries to create a CompressedServerKey
but has enabled function evaluation on integers
(WopPBS) then it will panic as WopPBS are not yet compressible.
And 'stuffing' the non-compressed wopbs-key in the
compressed server key, would defeat the purpose of
compressed server key, as WopPBS key makes of for
the vast majority of the space used.
Also having CompressedServerKey is required to
be able to have wasm API of the hlapi
as wasm cannot generate normal server key.
2023-05-17 11:15:37 +02:00
David Testé
3c8d6a6f8b
chore(ci): handle aws tests in pull request from forked repository
2023-05-17 08:42:19 +02:00
Arthur Meyre
1c837fa6f0
test(core): add normality test based on Shapiro-Francia
2023-05-16 10:12:28 +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
tmontaigu
20fb697d57
refactor(hlapi): disable WopPBS by default in hlapi
...
In the HLAPI, the WopPBS is enabled by default,
meaning the WopPBS key is generated when integers
are enabled.
This is not really good as the wopbs key is huge
(~700MB with PARAM_2_2) and only used for function evaluation
which does not scale for all types exposed by the halpi
and is still a bit experimental so not really advertised in the docs.
Also keys for wopbs are not compressible yet
(that is why the HLAPI does not yet have a CompressedServerKey).
So disabling wopbs by default will enable to have a compressed server
key that actually compresse things.
2023-05-15 19:01:53 +02:00
tmontaigu
0429d56cf3
chore(U256): add small tests
2023-05-15 11:40:44 +02:00
tmontaigu
509bf3e284
docs(bench): update results of benchmarks in the docs
2023-05-12 21:58:47 +02:00
Arthur Meyre
b2fc1d5266
refactor(shortint): make a difference between PBS and Wopbs parameters
...
- preparatory work to manage several PBS implementations and harmonize
parameters management
BREAKING CHANGE:
- parameters structures changed
- gen_keys for integer now takes parameters by value to uniformize with
shortint
2023-05-12 17:20:05 +02:00
Arthur Meyre
62d94dbee8
chore(tfhe): fix double Example heading in docstring
2023-05-12 17:20:05 +02:00
Agnes Leroy
fbe911d7db
chore(tfhe): hard set number of threads to 10 for the multi-bit PBS
...
It's the optimal value measured on an m6i.metal instance where we run the benchmarks
2023-05-12 15:12:11 +02:00
tmontaigu
ba72faf828
chore(readme): remove non-needed mut in boolean example
2023-05-11 22:25:12 +02:00
tmontaigu
c387b9340f
feat(integer): improve mul and scalar mul
...
This improves the mul and scalar_mul algorithms
to be faster
The improvement is made within the code
that was responsible for summing up all
the terms by making better use of carries
and avoiding uncessary propagations.
The scalar mul forwards the call to a right shift
when the scalar is a power of two as it just cost one
PBS so it will always be faster.
For 64-bits, target-cpu=native + avx512:
- mul before: 3.4s
- mul after: 900ms
2023-05-11 14:07:11 +02:00
Arthur Meyre
cbb7d30fb8
chore(core): avoid having branching depending on secret values in PKE
2023-05-11 11:12:43 +02:00
David Testé
6e4a707eff
chore(ci): compute throughput as operations per second
...
Since most of the operations are over 1 ms, there is no point
to compute the number of operation per millisecond.
2023-05-11 08:58:45 +02:00
tmontaigu
06b700f904
feat(integer): improve parallel algorithms for add/sub
...
This adds fully parallel algorithms for the addition and subtraction
These algorithms take ciphertexts with clean carries and
return creates a sum ciphertext that also has clean carries.
The carries are propagated in parallel, using
parallel algorithms for prefix sum / cumulative sum.
The is one based on Hillis and Steele, it the fastest
but uses a lot of threads.
The other on Blelloch, it requires less threads but is a
bit slower.
256bits addition using param_2_2 goes down from ~2.7s to:
- 364ms using Hillis and Steele
- 474ms using Blelloch
The commit also adds bitwise not, as it it necessary for the
subtraction.
2023-05-10 14:43:40 +02:00
dependabot[bot]
cfbabf7480
chore(deps): bump JS-DevTools/npm-publish from 2.0.0 to 2.1.0
...
Bumps [JS-DevTools/npm-publish](https://github.com/JS-DevTools/npm-publish ) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/JS-DevTools/npm-publish/releases )
- [Changelog](https://github.com/JS-DevTools/npm-publish/blob/main/CHANGELOG.md )
- [Commits](0be441d808...541aa6b21b )
---
updated-dependencies:
- dependency-name: JS-DevTools/npm-publish
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-05-09 11:15:16 +02:00
tmontaigu
291ed9026f
feat(hlapi): add casting between integer types
...
This adds the casting of integer types.
Downcasting truncates blocks.
Upcasting appends 0s
Casting is done via the introduced `cast_from` associated
function and the `cast_into` method. They are the equivalent of
the `From` and `Into` traits.
It was not possible to implement casting by implementing the
standard `From` and `Into` traits as initially planned because:
```rust
impl<P1, P2> From<GenericInteger<P1>> for GenericInteger<P2>
where P1: IntegerParameter,
P2: Integer Parameter, {
fn from(_: GenericInteger<P1>) -> Self {
todo!()
}
}
```
As it conflicts the blanket impl found in the stdlib
`impl<T> From<T> for T;` as P1, P2 may be the same and we have no way
of telling the compiler to consider this impl only when P1 != P2.
So we had to create our own stuff
2023-05-05 21:43:10 +02:00
tmontaigu
610f0010b8
refactor(hlapi): remove RefCell used to wrap integers
...
Our integer types are based on tfhe::integer.
Originally, operators (+, -, *, <<, etc) were mapped to "smart" operations
until commit "ee96a0ff185fedb9c4467a5b0c8195798c30b19f" where we swapped
to "default" ops.
The motivation of swapping from smart to default was that default ops
timing was always the same, so its easier to predict and reason about when
comparing with available benchmarks.
However, they may give worse performance depending
on the computations being done (addition/subtraction heavy or not).
In the High level API, we overloaded operators on const ref e.g. `&a + &b`
but as we initially mapped to smart operations we needed interior mutability.
RefCell was chosen, mainly because using Mutexes would have allowed
users to write "fake" parallel code, that is, the code compiles but is not
truly parallel due to the mutexes. RefCell makes writting parallel code
harder but If you manage to do it, its truly parallel.
After moving to default ops for the hlapi, we kept the inner RefCells
to allow time to decide to retract the change.
The final choice is to keep default ops as the default, so that means
we can remove the RefCells.
Entry points to smart operation will be added later to enable
'power users' to explicitely try them and see if they bring
improvement(s) for them.
Letting advanced user explicitely handle mutability of smart
operations and let them choose their synchronisation is likely a better
choice than making it for them as its an important choice.
2023-05-05 18:21:43 +02:00
tmontaigu
8b3d31ae8a
refactor(hlapi): use one unique key for integers
...
This refactor of the inner workings of the High Level API
makes it so that all integer types share and use the same key
to encrypt their blocks
Before this commit, users that wanted to use integers via the
hlapi needed to select the type amongst the ones available
and enable it (eg i want to use 16 bits integers so I call
enable_default_uint16).
This meant that if users wanted to use many integer types
they would have to manually enable them. Since each type had its
own key, it meant they were completely separate (no casting possible)
and the different key type `ClientKey`, `ServerKey` would become very
big. So in practice you would stick to one and only integer type in your
program.
With this changes, users that wishes to use integers, will just need
to enable them (enable_default_integers()), and will get access to
all statically difined integer types (FheUint8, FheUint16, etc)
at the cost of one key for of these types.
This reduces complexity, memory footprint and,
will enable to introduce in commits later the ability to cast between
integer types.
BREAKING CHANGES:
- Serialized keys are not backward compatible
- enable_default_uint[8,16,etc] become enable_default_integers
2023-05-05 16:05:58 +02:00
sarah el kazdadi
98539aaa61
fix(pbs): fix bug in rounding code in f128 pbs
2023-05-05 15:32:59 +02:00
Arthur Meyre
9a80a01dc3
feat(integer): add trim/extend APIs for radix ciphertexts
2023-05-04 09:46:06 +02:00
tmontaigu
ecf9d50058
feat(integer): add parallelized scalar rotate_left/right
...
Like shifts, rotates are implemented by combining
a rotation of the block and bivariate PBSs in case
the rotation number `n` is not a multiple of the number
of bits in a block.
Since the behaviour of rotations is to 'cycle' bits
back the end/beginning of the 'bit slice' (i.e. no bits is ever lost like
it can with shifts), the performance is always the same when
(n % nb_bits_in block) != 0. However the implementation is simpler.
So assuming a machine where the number of threads
is >= to the ciphertext's number of block, the operation
cost one bivariate PBS.
2023-05-02 17:52:44 +02:00
Arthur Meyre
65e4aab38d
chore(shortint): fix docstrings which were mixing big and small key params
2023-05-02 17:21:39 +02:00
Arthur Meyre
ac348870ba
refactor(shortint): add encryption key choice in parameters
...
BREAKING CHANGE:
- Parameters layout change
- C API removal of SHORTINT_NATIVE_MODULUS which was a leftover from
a refactor
2023-05-02 17:21:39 +02:00
Arthur Meyre
6adfcaa5f7
chore(tfhe): bump version to 0.3.0
2023-05-02 11:10:14 +02:00
Arthur Meyre
bc6bbe66d9
chore(shortint): fix some wopbs function signature
2023-05-02 11:10:04 +02:00
Arthur Meyre
871d4aea17
refactor(core): refactor CiphertextModulus to be less error prone
2023-04-28 16:40:33 +02:00
Arthur Meyre
f81376b762
chore(ci): start benches only on our repo
2023-04-28 11:17:31 +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
Arthur Meyre
16ce2a8a3f
refactor(wopbs): manage LUTs for wopbs to avoid copies
2023-04-28 09:45:11 +02:00
tmontaigu
f018987eac
feat(integer): improve scalar shifts performances
...
This reworks the left/right scalar shift method.
This new implementation takes more advantage of the
radix representation property and use a combo
of shifting/moving blocks via a rotate_left/right
optionnaly followed by in-block shifting and propagation
to other blocks.
This new implementation requires the carries to be empty
(not sure what the preconditions were for the previous implementation)
and the output will also have clean carries.
Requiring empty carries allows to do the shift in a way
that scales well with the number of blocks as we can use truly parallel
operations.
This means that the time required to shift is dependent
in the shift value, which should not be a security problem
as its a clear value. (The previous implementation also
had timing that depended on the shift value)
There are two scenarios possible:
- The shift only require to move blocks -> its fast
- The shift requires moving + in-block shifting -> slower,
but still faster than the previous implementation.
Worst case is when shift is less than the number of bits
in a block.
This also changes the type of the `shift` parameter from
`usize` to `u64` to be consistent with other scalar operations.
The follwing pseudo bench code on 64 bits
gives the following time ranges:
With changes:
```
unchecked_left: BenchStat {
min: 16.743µs
max: 526.518563ms
mean: 150.77871ms
}
unchecked_left_parallelized: BenchStat {
min: 17.291µs
max: 94.408455ms
mean: 30.092279ms
}
unchecked_right: BenchStat {
min: 16.723µs
max: 548.417332ms
mean: 160.345234ms
}
unchecked_right_parallelized: BenchStat {
min: 16.978µs
max: 97.955322ms
mean: 33.500562ms
}
Measured in 37.890296743s
```
Previous code:
```
unchecked_left: BenchStat {
min: 1.055401595s
max: 1.156574075s
mean: 1.085648592s
}
unchecked_left_parallelized: BenchStat {
min: 559.636545ms
max: 630.83338ms
mean: 584.747893ms
}
unchecked_right: BenchStat {
min: 1.055041354s
max: 2.314891255s
mean: 1.644513996s
}
unchecked_right_parallelized: BenchStat {
min: 562.017144ms
max: 1.275945891s
mean: 894.812286ms
}
Measured in 421.412913883s
```
```rust
use rand::Rng;
use std::time::Instant;
use tfhe::integer::{gen_keys, RadixClientKey};
use tfhe::shortint::parameters::PARAM_MESSAGE_2_CARRY_2;
const NB_CTXT: usize = 32;
const NB_TEST: usize = 100;
struct BenchStat {
min: Option<std::time::Duration>,
max: Option<std::time::Duration>,
sum: std::time::Duration,
count: u32,
}
impl BenchStat {
fn update(&mut self, elapsed: std::time::Duration) {
if self.min.is_none() {
self.min = Some(elapsed);
} else {
self.min = self.min.map(|l| l.min(elapsed));
}
if self.max.is_none() {
self.max = Some(elapsed);
} else {
self.max = self.max.map(|l| l.max(elapsed));
}
self.sum += elapsed;
self.count += 1;
}
fn print(&self) {
println!("BenchStat {{");
println!(" min: {:?}", self.min.unwrap());
println!(" max: {:?}", self.max.unwrap());
println!(" mean: {:?}", self.sum / self.count);
println!("}}");
}
}
type ShiftType = u64;
fn main() {
let mut unchecked_left_timing = BenchStat::default();
let mut unchecked_left_parallelized_timing = BenchStat::default();
let mut unchecked_right_timing = BenchStat::default();
let mut unchecked_right_parallelized_timing = BenchStat::default();
let total = Instant::now();
let param = PARAM_MESSAGE_2_CARRY_2;
let (cks, sks) = gen_keys(¶m);
let cks = RadixClientKey::from((cks, NB_CTXT));
let mut rng = rand::thread_rng();
//Nb of bits to shift
let tmp_f64 = param.message_modulus.0 as f64;
let nb_bits = tmp_f64.log2().floor() as usize * NB_CTXT;
let modulus = (param.message_modulus.0 as u128).pow(NB_CTXT as u32);
assert_eq!(nb_bits, 64);
for i in 0..NB_TEST {
println!("{} / {NB_TEST}", i + 1);
let clear = rng.gen::<u128>() % modulus;
let scalar = rng.gen::<u128>() % nb_bits as u128;
println!("clear: {clear}, scalar: {scalar}");
let ct = cks.encrypt(clear);
{
let before = Instant::now();
let ct_res = sks.unchecked_scalar_left_shift(&ct, scalar as ShiftType);
unchecked_left_timing.update(before.elapsed());
//assert!(ct_res.block_carries_are_empty());
let dec_res: u128 = cks.decrypt(&ct_res);
assert_eq!((clear << scalar) % modulus, dec_res);
let before = Instant::now();
let ct_res = sks.unchecked_scalar_left_shift_parallelized(&ct, scalar as ShiftType);
unchecked_left_parallelized_timing.update(before.elapsed());
//assert!(ct_res.block_carries_are_empty());
let dec_res: u128 = cks.decrypt(&ct_res);
assert_eq!((clear << scalar) % modulus, dec_res);
}
{
let before = Instant::now();
let ct_res = sks.unchecked_scalar_right_shift(&ct, scalar as ShiftType);
unchecked_right_timing.update(before.elapsed());
// assert!(ct_res.block_carries_are_empty());
let dec_res: u128 = cks.decrypt(&ct_res);
assert_eq!((clear >> scalar) % modulus, dec_res);
let before = Instant::now();
let ct_res = sks.unchecked_scalar_right_shift_parallelized(&ct, scalar as ShiftType);
unchecked_right_parallelized_timing.update(before.elapsed());
//assert!(ct_res.block_carries_are_empty());
let dec_res: u128 = cks.decrypt(&ct_res);
assert_eq!((clear >> scalar) % modulus, dec_res);
}
}
print!("unchecked_left: ");
unchecked_left_timing.print();
print!("unchecked_left_parallelized: ");
unchecked_left_parallelized_timing.print();
print!("unchecked_right: ");
unchecked_right_timing.print();
print!("unchecked_right_parallelized: ");
unchecked_right_parallelized_timing.print();
println!("Measured in {:?}", total.elapsed());
}
```
BREAKING CHANGE: parameter type changed from usize to u64
2023-04-27 17:18:55 +02:00
Arthur Meyre
20f6c5419b
chore(core): re-enable split pbs for u128
2023-04-25 17:42:40 +02:00
Arthur Meyre
58b530f40b
chore(doc): fix docstring ref
2023-04-25 17:42:40 +02:00
Arthur Meyre
689ad195f3
refactor(integer): remove usage of Mutex for determinism
2023-04-25 15:25:51 +02:00
sarah el kazdadi
4a1eda25d3
fix(split): fix split pbs backward conversion
2023-04-24 16:08:23 +02:00
Arthur Meyre
af936df064
chore(core): change rng tests to better avoid false failures
...
- we still check we generate non zero values but add retry conditions or
have less stringent checks, to allow some values to be zero for example as
it's a valid value that can be generated
- each test suite (test and doctest) for these tests ran 1000 times without
failure
2023-04-24 13:26:35 +02:00
dependabot[bot]
0233a69ea6
chore(deps): bump JS-DevTools/npm-publish from 1.4.3 to 2.0.0
...
Bumps [JS-DevTools/npm-publish](https://github.com/JS-DevTools/npm-publish ) from 1.4.3 to 2.0.0.
- [Release notes](https://github.com/JS-DevTools/npm-publish/releases )
- [Changelog](https://github.com/JS-DevTools/npm-publish/blob/main/CHANGELOG.md )
- [Commits](0f451a9417...0be441d808 )
---
updated-dependencies:
- dependency-name: JS-DevTools/npm-publish
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-04-24 12:56:59 +02:00
Arthur Meyre
f72a6ec835
chore(doc): fix typo
2023-04-24 09:30:16 +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
Arthur Meyre
c112a43a63
chore(core): add more sanity checks on RNG
2023-04-21 14:36:14 +02:00
Arthur Meyre
2813812380
fix(core): fix rng
2023-04-21 14:36:14 +02:00
tmontaigu
84a6036789
feat(boolean): add BooleanEngine::replace_thread_local
...
This new associated function allows to replace
the engine used in the thread.
2023-04-20 15:16:13 +02:00
David Testé
658368d0b6
chore(ci): create dummy release workflow
...
This is done to be able to test the effective worklfow
implementation in a development branch.
2023-04-20 10:26:31 +02:00
Arthur Meyre
9368049adf
chore(core): disable split pbs128
2023-04-19 18:38:22 +02:00
David Testé
5e8ca0b52c
chore(ci): fix decomposition basis and add bit size to params
...
Decomposition basis wasn't correctly set to handle CRT. Now it uses
a Vec that would be displayed as a string in the database.
In addition the bit size has been added to ease comparison between
various of them in Grafana.
2023-04-19 17:58:22 +02:00
Arthur Meyre
605cd5b3b0
chore(doc): updated benchmarks for min to reflect the fix done to min/max
2023-04-19 16:56:46 +02:00
David Testé
4bfe9c22d4
chore(ci): remove unused env variable in boolean benchmarks
2023-04-19 16:28:13 +02:00
Arthur Meyre
1c0b36c672
chore(bench): only run avx512 benches
2023-04-19 09:23:01 +02:00
Arthur Meyre
7dccb01a8d
fix(integer): fix mul correctness
...
- update benches accordingly
2023-04-19 09:23:01 +02:00
Arthur Meyre
7bff348367
chore(bench): more multi-bit bench params
2023-04-19 09:03:58 +02:00
tmontaigu
74a5a278b6
fix(hlapi): use correct number of blocks for FheUint32
...
The FheUint32 was wrongly defined as being 32 blocks of 2 bits
when it should have been 16 blocks.
2023-04-18 18:40:39 +02:00
tmontaigu
426ced3295
feat(hlapi): add trivial encryptions
2023-04-18 15:07:06 +02:00
tmontaigu
7af5fcc7eb
feat(integer): add trivial encryption
2023-04-18 15:07:06 +02:00
Arthur Meyre
12d9947149
chore(integer): add non regression test for scalar mul fix
2023-04-18 10:46:19 +02:00
dependabot[bot]
7c54896e68
chore(deps): bump actions/checkout from 3.5.0 to 3.5.2
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3.5.0 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](8f4b7f8486...8e5e7e5ab8 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-04-17 11:17:58 +02:00
J-B Orfila
04533dedfe
chore(doc): fix typo
2023-04-14 18:30:30 +02:00
J-B Orfila
d01be35557
chore(doc): fix TOML
2023-04-14 18:30:30 +02:00
J-B Orfila
9fc32e2f52
chore(doc): fix dead links
2023-04-14 13:37:03 +02:00
Arthur Meyre
e1e78b8b9d
chore(integer): restore empty carry check for default comparator tests
...
- only extract assign message instead of doing a full propagate as carries
are not supposed to be non zero (though the degree will have grown)
2023-04-14 13:34:35 +02:00
J-B Orfila
a2384e0d1f
chore(doc): last fixes
2023-04-13 14:38:42 +02:00
J-B Orfila
37da2f1f1e
chore(doc): bench integers added
2023-04-13 14:38:42 +02:00
J-B Orfila
8c775e5a27
chore(doc): add default benches
2023-04-13 14:38:42 +02:00
J-B Orfila
43ba7e103d
chore(doc): 0.2 doc
2023-04-13 14:38:42 +02:00
Arthur Meyre
448e634748
fix(integer): fix scalar mul bug when representing integers > 64 bits
...
- a product was overflowing, we now compute a progressive division with
the same effect and stop once we reach zero to limit the number of
generated tasks
2023-04-13 13:26:48 +02:00
Arthur Meyre
6268752ac9
fix(integer): fix radix wopbs table size issue
2023-04-13 11:03:33 +02:00
David Testé
e0ed2d91c6
chore(ci): add shortint default ops to benchmarks
2023-04-12 19:11:15 +02:00
Arthur Meyre
fef389e002
chore(core): more reasonable LWE sub test
...
- otherwise we are just checking that x.wrapping_sub(x) == 0
2023-04-12 16:21:20 +02:00
Arthur Meyre
ae30f7c086
chore(bench): use clean inputs for default ops bench
...
- by design default ops are made to work best on clean CTs
2023-04-12 15:48:00 +02:00
Arthur Meyre
3f719a30f6
chore(tfhe): update check toolchain
2023-04-12 15:47:46 +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
Arthur Meyre
f768e62d89
refactor(tfhe): add support for power of 2 q for LWE linalg + KS + PBS
2023-04-11 23:01:25 +02:00
tmontaigu
ee96a0ff18
chore(hlapi): use 'default' ops
2023-04-11 21:56:01 +02:00
J-B Orfila
ee944b3129
chore(ci): add default op
2023-04-11 21:35:56 +02:00
David Testé
672f855770
chore(ci): make curl based job step fails upon 4xx or 5xx response
2023-04-11 21:35:56 +02:00
David Testé
362992a4ba
chore(ci): benchmark only fastest integer operations
...
This is done to speed-up execution and to avoid having benchmark
job running for more than 6 hours in GitHub Actions. The selected
operations set gathers the ones that most user would look for, i.e
the fastest and smartest ones.
2023-04-11 21:35:56 +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
Arthur Meyre
b484b8a851
chore(core): add multi bit PBS bench structure
2023-04-11 21:35:56 +02:00
Arthur Meyre
6dea738725
chore(integer): fix default scalar_mul missing full propagate
2023-04-11 21:29:12 +02:00
Arthur Meyre
3bb342879f
chore(tfhe): temporarily disable integer 3_3 tests
2023-04-11 21:29:12 +02:00
Jérémy Zaccherini
9f024e2dac
chore(tfhe): update design and links of the README.md
2023-04-11 21:28:44 +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
Arthur Meyre
16596137c1
chore(integer): disable smart_add for params 1_1 which is very slow
2023-04-11 19:05:17 +02:00
Arthur Meyre
03cd7ef15a
feat(integer): add default scalar shift ops
2023-04-11 19:05:17 +02:00
Arthur Meyre
4cda0a7211
feat(integer): add default sub op
2023-04-11 19:05:17 +02:00
Arthur Meyre
9b668c1d50
feat(integer): add default scalar ops
2023-04-11 19:05:17 +02:00
Arthur Meyre
dc4d9c7968
feat(integer): add default neg op
2023-04-11 19:05:17 +02:00
Arthur Meyre
e3e7abd652
feat(integer): add default mul ops
2023-04-11 19:05:17 +02:00
Arthur Meyre
4265fbe67e
feat(integer): add "default" radix_parallel comparison ops
2023-04-11 19:05:17 +02:00
Arthur Meyre
337400ce3d
feat(integer): add "default" radix_parallel bitwise ops
2023-04-11 19:05:17 +02:00
Arthur Meyre
be650d8e6b
feat(integer): add "default" radix_parallel add ops
2023-04-11 19:05:17 +02:00
Arthur Meyre
47604a6297
feat(shortint): add "default" sub operations
2023-04-11 19:01:12 +02:00
Arthur Meyre
95d6fc5b1b
feat(shortint): add "default" shift operations
2023-04-11 19:01:12 +02:00
Arthur Meyre
19a6855b82
chore(shortint): add default scalar ops tests
2023-04-11 19:01:12 +02:00
Arthur Meyre
f894c33bfd
feat(shortint): add "default" scalar sub operations
2023-04-11 19:01:12 +02:00
Arthur Meyre
6578aff8a4
feat(shortint): add "default" scalar mul operations
2023-04-11 19:01:12 +02:00
Arthur Meyre
9096c62f32
feat(shortint): add "default" scalar add operations
2023-04-11 19:01:12 +02:00
Arthur Meyre
22f186af17
feat(shortint): add "default" neg operations
2023-04-11 19:01:12 +02:00
Arthur Meyre
7820523d1f
feat(shortint): add "default" mul ops
2023-04-11 19:01:12 +02:00
Arthur Meyre
c0386c7e54
feat(shortint): add "default" div and mod operations
2023-04-11 19:01:12 +02:00
Arthur Meyre
1ea73a68c4
feat(shortint): add "default" comp_op
2023-04-11 19:01:12 +02:00
Arthur Meyre
6a02ae04e1
feat(shortint): add "default" bitwise ops
2023-04-11 19:01:12 +02:00
Arthur Meyre
becd11b45f
feat(shortint): add "default" add and add_assign operators
2023-04-11 19:01:12 +02:00
Arthur Meyre
366964f1e6
feat(shortint): add function to check if a ciphertext has an empty carry
2023-04-11 19:01:12 +02:00
Arthur Meyre
32f8561af1
chore(tfhe): add devo profile to be able to iterate faster on tests
2023-04-11 19:01:12 +02:00
tmontaigu
063ad26b9e
feat(tfhe): add CompressedPublicKey
2023-04-11 18:04:42 +02:00
tmontaigu
dba18a889a
feat(hlapi): add 32, 64, 128 bits types
2023-04-11 16:58:32 +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
J-B Orfila
d4c7aff90b
fix(integer): fix unchecked_add in unchecked_mul
2023-04-07 15:55:08 +02:00
Arthur Meyre
1d9f8c57da
chore(core): fix multi bit parameters
2023-04-07 11:55:33 +02:00
J-B Orfila
aa58748d33
refactor(integer): simplify PubliKey API
2023-04-07 11:55:33 +02:00