# Multikey version

**URL:** https://openfhe.discourse.group/t/multikey-version/1638
**Category:** Library Questions
**Created:** [October 12, 2024, 9:46pm UTC](https://openfhe.discourse.group/t/multikey-version/1638 "2024-10-12T21:46:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rahulay](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@rahulay](https://openfhe.discourse.group/u/rahulay)
#### Post date: [October 12, 2024, 9:46pm UTC](https://openfhe.discourse.group/t/multikey-version/1638/1 "2024-10-12T21:46:25Z")

</div>

Hi all,

I wonder if it is possible to extend the OpenFHE CKKS or other schemes to enable multikey to perform distributed addition

For example let’s assume there are 3 users who share a secret key s where s1+s2+s3=s.

User 1 encrypts m1 using s1.  
User 2 encrypts m2 using s2.  
User 3 encrypts m3 using s3.

If they all use the same a then enc(m1) = a.s1+ m1+e  
enc(m2) = a.s2+ m2+e  
enc(m3) = a.s3+ m3+e

Adding these three would become a.s + m1+m2+m3 + noise which should be decrypted by s.

I wonder if this functionality is available or can be developed using OpenFHE?

Thx

---

<div class="post-metadata">

### Author: ![ypolyakov](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/ypolyakov/32/47_2.png) [@ypolyakov](https://openfhe.discourse.group/u/ypolyakov)
#### Post date: [October 17, 2024, 4:52pm UTC](https://openfhe.discourse.group/t/multikey-version/1638/3 "2024-10-17T16:52:08Z")

</div>

Hi @rahulay,

The functionality is not directly available but can be developed using OpenFHE, i.e., it is compatible with threshold FHE. Currently, roughly the same functionality is used to compute the public joint key (in this case, all messages m\_i are zero). The main point is that the result of the addition will be compatible with the the threshold FHE setting (it is encrypted under the joint key corresponding to s\_1+s\_2+s\_3). You can find some of the functionality available as part of interactive CKKS bootstrapping useful: [openfhe-development/src/pke/examples/tckks-interactive-mp-bootstrapping.cpp at v1.2.1 · openfheorg/openfhe-development · GitHub](https://github.com/openfheorg/openfhe-development/blob/v1.2.1/src/pke/examples/tckks-interactive-mp-bootstrapping.cpp) There, a common random polynomial is also used.

---

<div class="post-metadata">

### Author: ![rahulay](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@rahulay](https://openfhe.discourse.group/u/rahulay)
#### Post date: [October 18, 2024, 9:24am UTC](https://openfhe.discourse.group/t/multikey-version/1638/4 "2024-10-18T09:24:47Z")

</div>

Thank Yuriy.  
I will check this out.
