# RLWE x RGSW External Product

**URL:** <https://openfhe.discourse.group/t/rlwe-x-rgsw-external-product/1654>\
**Category:** Library Questions\
**Created:** [October 19, 2024, 1:57pm UTC](https://openfhe.discourse.group/t/rlwe-x-rgsw-external-product/1654 "2024-10-19T13:57:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://openfhe.discourse.group/u/sam)\
**Post date:** [October 19, 2024, 1:57pm UTC](https://openfhe.discourse.group/t/rlwe-x-rgsw-external-product/1654/1 "2024-10-19T13:57:06Z")

</div>

Hi, is there any function for External product in openfhe library that allows to multiply two ciphertexts – a GLWE and a GGSW – and that returns in output a new ciphertext – a GLWE one

---

<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 21, 2024, 8:18pm UTC](https://openfhe.discourse.group/t/rlwe-x-rgsw-external-product/1654/2 "2024-10-21T20:18:47Z")

</div>

Please see [Can binFHE do ciphertext multiplication?](https://openfhe.discourse.group/t/can-binfhe-do-ciphertext-multiplication/1059) I also noticed the following OpenFHE fork: [GitHub - LightFHE/CircuitBootstrap](https://github.com/LightFHE/CircuitBootstrap) It probably has an exposed API for the RLWE x RGSW product (but I did not check it in detail).

---

<div class="post-metadata">

**Author:** ![sam](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@sam](https://openfhe.discourse.group/u/sam)\
**Post date:** [December 9, 2024, 1:50pm UTC](https://openfhe.discourse.group/t/rlwe-x-rgsw-external-product/1654/3 "2024-12-09T13:50:10Z")

</div>

Hi there is an example given but i am not able to understand. can you please explain which api to be used for multiplication and addition both

---

<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:** [December 12, 2024, 2:02am UTC](https://openfhe.discourse.group/t/rlwe-x-rgsw-external-product/1654/4 "2024-12-12T02:02:30Z")

</div>

I just checked. It is not directly exposed in the API (in the Circuit Bootstrap repo as well - as far I can tell). Many RGSW operations were added to a prototype branch for threshold FHEW (see [openfhe-development/src/binfhe/lib/binfhecontext.cpp at threshold-fhew · openfheorg/openfhe-development · GitHub](https://github.com/openfheorg/openfhe-development/blob/threshold-fhew/src/binfhe/lib/binfhecontext.cpp)), e.g., RGSW multiply + add.

I’ve created an issue to add the external product API to OpenFHE 1.3.0: [Add RGSW x RLWE external product · Issue #922 · openfheorg/openfhe-development · GitHub](https://github.com/openfheorg/openfhe-development/issues/922)
