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