# Is it possible to store and manage (R)LWE Keys in Any KMS?

**URL:** <https://openfhe.discourse.group/t/is-it-possible-to-store-and-manage-r-lwe-keys-in-any-kms/448>\
**Category:** FHE Use Cases\
**Created:** [April 4, 2023, 7:37am UTC](https://openfhe.discourse.group/t/is-it-possible-to-store-and-manage-r-lwe-keys-in-any-kms/448 "2023-04-04T07:37:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ss\_vinoth22](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@ss\_vinoth22](https://openfhe.discourse.group/u/ss_vinoth22)\
**Post date:** [April 4, 2023, 7:37am UTC](https://openfhe.discourse.group/t/is-it-possible-to-store-and-manage-r-lwe-keys-in-any-kms/448/1 "2023-04-04T07:37:31Z")

</div>

How to store and retrieve Keys for FHE? Currently, Any cloud KMS does not support that. I just wanted to know how you store keys and retrieve them.

---

<div class="post-metadata">

**Author:** ![saroja](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@saroja](https://openfhe.discourse.group/u/saroja)\
**Post date:** [April 4, 2023, 3:12pm UTC](https://openfhe.discourse.group/t/is-it-possible-to-store-and-manage-r-lwe-keys-in-any-kms/448/2 "2023-04-04T15:12:01Z")

</div>

You can store keys as files through our serialization API, and retrieve them later through deserialization. See these serialization examples for BFV, BGV, and CKKS:

- [BFV](https://github.com/openfheorg/openfhe-development/blob/main/src/pke/examples/simple-integers-serial.cpp)
- [BGV](https://github.com/openfheorg/openfhe-development/blob/main/src/pke/examples/simple-integers-serial-bgvrns.cpp)
- [CKKS](https://github.com/openfheorg/openfhe-development/blob/main/src/pke/examples/simple-real-numbers-serial.cpp)

---

<div class="post-metadata">

**Author:** ![ss\_vinoth22](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@ss\_vinoth22](https://openfhe.discourse.group/u/ss_vinoth22)\
**Post date:** [April 5, 2023, 1:27am UTC](https://openfhe.discourse.group/t/is-it-possible-to-store-and-manage-r-lwe-keys-in-any-kms/448/3 "2023-04-05T01:27:08Z")

</div>

Oh, OK, Sorry I’m quite new to the homomorphic encryption algorithm,  
I mean, where can we store these keys? In S3 Storage?  
In other existing algorithms, you can create Keys, store them in a cloud vault/KMS, and do key rotations.  
I don’t see any solutions for this. I’m trying to implement this for our new healthcare product in which we manage the keys on behalf of users, and I’m looking for a proper process to create, store, retrieve and rotate homomorphic keys.

---

<div class="post-metadata">

**Author:** ![saroja](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@saroja](https://openfhe.discourse.group/u/saroja)\
**Post date:** [April 5, 2023, 2:09pm UTC](https://openfhe.discourse.group/t/is-it-possible-to-store-and-manage-r-lwe-keys-in-any-kms/448/4 "2023-04-05T14:09:03Z")

</div>

We don’t provide an API to store them in a cloud vault/KMS. You will have to write your own code to do this after serializing keys from OpenFHE.

---

<div class="post-metadata">

**Author:** ![ss\_vinoth22](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@ss\_vinoth22](https://openfhe.discourse.group/u/ss_vinoth22)\
**Post date:** [April 6, 2023, 12:26am UTC](https://openfhe.discourse.group/t/is-it-possible-to-store-and-manage-r-lwe-keys-in-any-kms/448/5 "2023-04-06T00:26:49Z")

</div>

Ya, I got that. I Assume OpenFHE generates LWE Keys and are ideally only asymmetric keys. Unfortunately, the current Vault or KMS cannot store LWE Keys. Then I wondered where others are Storing keys to use this algorithm. Could you correct me if I’m wrong?
