# About Key Generation

**URL:** <https://openfhe.discourse.group/t/about-key-generation/794>\
**Category:** FHE Use Cases\
**Tags:** questions\
**Created:** [September 7, 2023, 11:34am UTC](https://openfhe.discourse.group/t/about-key-generation/794 "2023-09-07T11:34:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenan](https://avatars.discourse-cdn.com/v4/letter/k/e495f1/32.png) [@kenan](https://openfhe.discourse.group/u/kenan)\
**Post date:** [September 7, 2023, 11:34am UTC](https://openfhe.discourse.group/t/about-key-generation/794/1 "2023-09-07T11:34:41Z")

</div>

Is the key generated by a trusted third party, or are private keys generated locally, while other keys are generated by third parties

---

<div class="post-metadata">

**Author:** ![dcousins](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/dcousins/32/71_2.png) [@dcousins](https://openfhe.discourse.group/u/dcousins)\
**Post date:** [September 7, 2023, 8:43pm UTC](https://openfhe.discourse.group/t/about-key-generation/794/2 "2023-09-07T20:43:19Z")

</div>

Either way, it depends on the application. As long as the parties share the same cryptocontext object (via serialization / deserialization), public and secret keys can be generated by one and shared as needed, or generated locally.

We will be posting a repo with examples of multiple parties interacting over sockets, and showing how you can share cryptocontext, keys and ciphertexts. In the mean time, there is a palisade repo that shows how it can be done (this is the basis for the new repo I just mentioned) [PALISADE / PALISADE serial examples · GitLab](https://gitlab.com/palisade/palisade-serial-examples)
