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.
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.
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)
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.
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.
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
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
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.