Skip to content

292 update the repository for v160 - #293

Open
dsuponitskiy wants to merge 8 commits into
devfrom
292-update-the-repository-for-v160
Open

dsuponitskiy wants to merge 8 commits into
devfrom
292-update-the-repository-for-v160

Conversation

@dsuponitskiy

Copy link
Copy Markdown
Collaborator
  1. Port the PKE and BinFHE examples from openfhe-development to openfhe-python by converting them from C++ to Python.
  2. Add Python bindings for all APIs used in those examples that are not currently available in openfhe-python.
  3. Add Python bindings for additional APIs commonly used by openfhe-python users.

- Port the missing PKE and BinFHE examples and expose the APIs they need, including functional bootstrapping,
  BinFHE public-key support, and serialization.
- Move the functional-bootstrapping bindings into fbt.cpp and extend the example tests
  to check the complete v1.6 inventory.
The binfhe examples keep their cryptocontexts and bootstrapping keys in module-level globals (1-2.5 GB each),
so running all of them in one pytest process accumulates tens of GB and gets pytest killed on the runner.
Running every example in its own interpreter returns the memory to the OS after each test.
The examples added for 1.6.0 hard-coded FLEXIBLEAUTO scaling, which 128-bit CKKS rejects. Pick FIXEDAUTO and
matching modulus sizes when get_native_int() is 128, the same way the older examples do, and skip the composite scaling
and functional bootstrapping examples on 128-bit builds since those techniques only exist for 64-bit.
- Fix bind_eval_multinplace_scalar_overloads, which registered EvalAddInPlace instead of EvalMultInPlace.
  The scalar EvalAddInPlace overloads are bound elsewhere, so nothing is lost.
- Bind PrivateKey(cryptoContext). RecoverSharedKey() dereferences sk->GetCryptoContext(),
  so a default-constructed key crashed it.
- Add CryptoContext.GetElementParams(), needed to call GetPlaintextForDecrypt().
- Add the CryptoContext overloads of SerializeEvalSumKey and check is_open(),
  so an unusable path returns False instead of a cereal error.
- Add tests/test_api_coverage.py, which checks decrypted values rather than method presence.
Bind missing BinFHE APIs, plus LWESwitchingKey which KeySwitchGen returns and SwitchCTtoqn consumes.
- Drop the LWEPrivateKey default constructor. BinFHEContext only checks for a null key, so an empty one segfaulted
  BTKeyGen, PubKeyGen and KeySwitchGen. Keys come from KeyGen(), KeyGenN() or deserialization.
- Move the integer conversions into integer_conversions.h, replacing the copies in bindings.cpp, binfhe_bindings.cpp and
  fbt.cpp.
- Widen LWECiphertext.GetModulus(), which truncated for NATIVE_INT=128.
- Add tests/test_binfhe_api_coverage.py.
@dsuponitskiy dsuponitskiy self-assigned this Oct 9, 2026
@dsuponitskiy dsuponitskiy added the new release new release label Oct 9, 2026
@dsuponitskiy dsuponitskiy added this to the Release 1.6.1.0 milestone Oct 9, 2026
- Add docstrings for the 79 bindings added by the two API-coverage commits, taken from the doxygen comments
  in openfhe-development.
- Move the remaining docstrings out of the .cpp files into *_docs.h.  fbt.cpp gets its own header, since these hold
  external-linkage globals.
- Fix stale parameter names (keyId -> keyTag, i -> index and others), and add or drop the :param: and :return: entries
  that no longer matched.
- Indent the 20 docstrings that were flush left.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new release new release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the repository to reflect the changes in openfhe-development v1.6.0-1.6.1

2 participants