# What should I do to serialize the ciphertext and secret key of threshold ckks?

**URL:** <https://openfhe.discourse.group/t/what-should-i-do-to-serialize-the-ciphertext-and-secret-key-of-threshold-ckks/854>\
**Category:** Library Questions\
**Tags:** openfhe-help\
**Created:** [October 22, 2023, 1:56pm UTC](https://openfhe.discourse.group/t/what-should-i-do-to-serialize-the-ciphertext-and-secret-key-of-threshold-ckks/854 "2023-10-22T13:56:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![crazyRobert](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@crazyRobert](https://openfhe.discourse.group/u/crazyRobert)\
**Post date:** [October 22, 2023, 1:56pm UTC](https://openfhe.discourse.group/t/what-should-i-do-to-serialize-the-ciphertext-and-secret-key-of-threshold-ckks/854/1 "2023-10-22T13:56:48Z")

</div>

May I ask what additional import operations are required for this serialization? I tried to serialize everyone’s secret key, but the error was reported as follows：

 ![JRCNU%Z1HXWZ~PBXLCBS_2](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/25437187d95d7b3c9a26d6207559c535224fa4d4.png)

---

<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 26, 2023, 4:45pm UTC](https://openfhe.discourse.group/t/what-should-i-do-to-serialize-the-ciphertext-and-secret-key-of-threshold-ckks/854/2 "2023-10-26T16:45:28Z")

</div>

`kp1` includes a key pair, i.e., a secret key (share) and public key. You should serialize `kp1.secretKey` in your example instead of `kp1`.
