# A subset of the keys to perform computation and decryption

**URL:** <https://openfhe.discourse.group/t/a-subset-of-the-keys-to-perform-computation-and-decryption/2061>\
**Category:** Library Questions\
**Tags:** feature-requests, openfhe-help\
**Created:** [June 4, 2025, 8:39am UTC](https://openfhe.discourse.group/t/a-subset-of-the-keys-to-perform-computation-and-decryption/2061 "2025-06-04T08:39:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![svetlana](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@svetlana](https://openfhe.discourse.group/u/svetlana)\
**Post date:** [June 4, 2025, 8:39am UTC](https://openfhe.discourse.group/t/a-subset-of-the-keys-to-perform-computation-and-decryption/2061/1 "2025-06-04T08:39:04Z")

</div>

Hello.

We are using the Python wrapper and working with CKKS.

In the threshold example with 5 parties, [openfhe-python/examples/pke/threshold-fhe-5p.py at main · openfheorg/openfhe-python](https://github.com/openfheorg/openfhe-python/blob/main/examples/pke/threshold-fhe-5p.py), all 5 keys are used for decryption.

Is it possible to generate keys for all parties, and then use a subset of these parties to perform computation and decryption using only the keys of this subset? An example is federated averaging / federated learning.

Thanks in advance for any replies.

Svetlana

---

<div class="post-metadata">

**Author:** ![andreea.alexandru](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/andreea.alexandru/32/378_2.png) [@andreea.alexandru](https://openfhe.discourse.group/u/andreea.alexandru)\
**Post date:** [June 4, 2025, 3:48pm UTC](https://openfhe.discourse.group/t/a-subset-of-the-keys-to-perform-computation-and-decryption/2061/2 "2025-06-04T15:48:07Z")

</div>

Currently, the only type of threshold decryption supported in OpenFHE (C++ library) is the experimental one described [here](https://openfhe.discourse.group/t/openfhe-python-bfv-threshold/1997/2). However, this is not exposed to the python wrapper, so you would need to do some scaffolding work for this.
