# \#openfhe-help

**URL:** https://openfhe.discourse.group/tag/openfhe-help/11.md

[Latest](https://openfhe.discourse.group/latest.md) · [Categories](https://openfhe.discourse.group/categories.md) · [Tags](https://openfhe.discourse.group/tags.md)

---

## [BFV Plaintext Modulus](https://openfhe.discourse.group/t/bfv-plaintext-modulus/2315)

<div class="topic-metadata">

**Author:** [@fishr](https://openfhe.discourse.group/u/fishr)\
**Replies:** 1\
**Last updated:** [April 29, 2026, 6:45pm UTC](https://openfhe.discourse.group/t/bfv-plaintext-modulus/2315 "2026-04-29T18:45:54Z")

</div>

Hello everyone, I’m currently struggling with understanding why my ciphertexts are not decrypting correctly. The library API does not report any errors. Here is the minimal example: #include \<openfhe.h\> using namespa…

---

## [Modulus mismatch in EvalCKKStoFHEW after KeySwitch from reconstructed ciphertext](https://openfhe.discourse.group/t/modulus-mismatch-in-evalckkstofhew-after-keyswitch-from-reconstructed-ciphertext/2308)

<div class="topic-metadata">

**Author:** [@Mosi](https://openfhe.discourse.group/u/Mosi)\
**Replies:** 1\
**Last updated:** [April 9, 2026, 5:41pm UTC](https://openfhe.discourse.group/t/modulus-mismatch-in-evalckkstofhew-after-keyswitch-from-reconstructed-ciphertext/2308 "2026-04-09T17:41:22Z")

</div>

Hi, I am implementing a pipeline where a ciphertext is generated externally, reconstructed in OpenFHE by manually setting its polynomial elements and metadata, KeySwitched to a server key, multiplied twice by a scalar, …

---

## [Possible values for ScalingModSize in BFV](https://openfhe.discourse.group/t/possible-values-for-scalingmodsize-in-bfv/2294)

<div class="topic-metadata">

**Author:** [@krist](https://openfhe.discourse.group/u/krist)\
**Replies:** 2\
**Last updated:** [March 10, 2026, 10:48am UTC](https://openfhe.discourse.group/t/possible-values-for-scalingmodsize-in-bfv/2294 "2026-03-10T10:48:20Z")

</div>

Hello. I am trying to use BFV for encrypting vectors which can contain values \\{-1, 0, 1\\}. The use case is for multiparty with 3 Clients. The Version being used in the Python wrapper. I have been experimenting with di…

---

## [Serialize and Deserialize SchemeSwitching in openfhe-python](https://openfhe.discourse.group/t/serialize-and-deserialize-schemeswitching-in-openfhe-python/2277)

<div class="topic-metadata">

**Author:** [@div](https://openfhe.discourse.group/u/div)\
**Replies:** 1\
**Last updated:** [March 2, 2026, 12:18pm UTC](https://openfhe.discourse.group/t/serialize-and-deserialize-schemeswitching-in-openfhe-python/2277 "2026-03-02T12:18:49Z")

</div>

Dear Team, For the scheme-switching.py example mentioned on the github repository of openfhe python, I want to replicate it in form of client server environment. This requires serialization. Now I have serialized crypto…

---

## [Question on Two Implementation of Composite Rescaling](https://openfhe.discourse.group/t/question-on-two-implementation-of-composite-rescaling/2269)

<div class="topic-metadata">

**Author:** [@JianmingTong](https://openfhe.discourse.group/u/JianmingTong)\
**Replies:** 3\
**Last updated:** [January 28, 2026, 5:01pm UTC](https://openfhe.discourse.group/t/question-on-two-implementation-of-composite-rescaling/2269 "2026-01-28T17:01:14Z")

</div>

Hi! I found the current composite rescaling is implemented by iteratively dropping the last moduli until the number of dropped moduli hit the level (i.e. the composite degree), as detailed in this link: Would there be …

---

## [Hierarchical parallel with OpenFHE using OpenMP](https://openfhe.discourse.group/t/hierarchical-parallel-with-openfhe-using-openmp/2259)

<div class="topic-metadata">

**Author:** [@cappuccino](https://openfhe.discourse.group/u/cappuccino)\
**Replies:** 2\
**Last updated:** [January 22, 2026, 3:33pm UTC](https://openfhe.discourse.group/t/hierarchical-parallel-with-openfhe-using-openmp/2259 "2026-01-22T15:33:51Z")

</div>

Hi I’m researching parallel processing using CKKS, and it seems the OpenFHE library internally implements parallel processing using OpenMP. I’d like to perform hierarchical parallel processing using the code below. Is …

---

## [Evaluating BinGate on LWECiphertext after CKKS to FHEW scheme switching](https://openfhe.discourse.group/t/evaluating-bingate-on-lweciphertext-after-ckks-to-fhew-scheme-switching/2229)

<div class="topic-metadata">

**Author:** [@Omar](https://openfhe.discourse.group/u/Omar)\
**Replies:** 4\
**Last updated:** [December 12, 2025, 4:29pm UTC](https://openfhe.discourse.group/t/evaluating-bingate-on-lweciphertext-after-ckks-to-fhew-scheme-switching/2229 "2025-12-12T16:29:04Z")

</div>

Hello, I’m trying to convert two CKKS ciphertexts into their encrypted bits (FHEW ciphertexts) using scheme switching. Extracting the bits from the converted CKKS ciphertext is working fine. But, when I perform the XOR …

---

## [How to set Q value](https://openfhe.discourse.group/t/how-to-set-q-value/2231)

<div class="topic-metadata">

**Author:** [@cappuccino](https://openfhe.discourse.group/u/cappuccino)\
**Replies:** 6\
**Last updated:** [December 11, 2025, 4:06pm UTC](https://openfhe.discourse.group/t/how-to-set-q-value/2231 "2025-12-11T16:06:19Z")

</div>

Hello developers! I have a question about mod Q in CKKS. I understand that the OpenFHE specifications determine a certain mod Q value when N is set. And to set a large mod Q, I can use the parameters.SetNumLargeDigits…

---

## [Replicate inner product result to each element of the result](https://openfhe.discourse.group/t/replicate-inner-product-result-to-each-element-of-the-result/2233)

<div class="topic-metadata">

**Author:** [@DarkFrak74](https://openfhe.discourse.group/u/DarkFrak74)\
**Replies:** 2\
**Last updated:** [December 11, 2025, 10:13am UTC](https://openfhe.discourse.group/t/replicate-inner-product-result-to-each-element-of-the-result/2233 "2025-12-11T10:13:22Z")

</div>

Hi, I’m trying to perform an inner product and then apply a Chebyshev function approximation to the result. However, for the final result of my operation (as the last operation will be an element-wise multiplication), I …

---

## [BFV to CKKS switching](https://openfhe.discourse.group/t/bfv-to-ckks-switching/2232)

<div class="topic-metadata">

**Author:** [@narger](https://openfhe.discourse.group/u/narger)\
**Replies:** 4\
**Last updated:** [December 11, 2025, 9:14am UTC](https://openfhe.discourse.group/t/bfv-to-ckks-switching/2232 "2025-12-11T09:14:49Z")

</div>

Hi all, I am trying to build a pipeline to convert some BFV ciphertexts to CKKS ones. I know that the two encodings are somewhat similar (the \\Delta term should be adjusted accordingly), and the main step is simply to bo…

---

## [Mod reduction error](https://openfhe.discourse.group/t/mod-reduction-error/2225)

<div class="topic-metadata">

**Author:** [@cappuccino](https://openfhe.discourse.group/u/cappuccino)\
**Replies:** 6\
**Last updated:** [December 5, 2025, 7:49am UTC](https://openfhe.discourse.group/t/mod-reduction-error/2225 "2025-12-05T07:49:48Z")

</div>

Hello, fellow developers. I’m using CKKS with ML, and I have a question about mod reduction. I’m using the ModReduce function to speed things up, but I encountered an error when using this function. Below is a simplif…

---

## ["The decryption failed because the approximation error is too high. Check the parameters" with bootstrapping](https://openfhe.discourse.group/t/the-decryption-failed-because-the-approximation-error-is-too-high-check-the-parameters-with-bootstrapping/2206)

<div class="topic-metadata">

**Author:** [@cappuccino](https://openfhe.discourse.group/u/cappuccino)\
**Replies:** 2\
**Last updated:** [November 7, 2025, 8:04am UTC](https://openfhe.discourse.group/t/the-decryption-failed-because-the-approximation-error-is-too-high-check-the-parameters-with-bootstrapping/2206 "2025-11-07T08:04:22Z")

</div>

I’m using the CKKS cipher and encountered the following error: The decryption failed because the approximation error is too high. Check the parameters. I checked out Error “The decryption failed because the approximati…

---

## [About precision, scale value and basic operation of boot strapping](https://openfhe.discourse.group/t/about-precision-scale-value-and-basic-operation-of-boot-strapping/2204)

<div class="topic-metadata">

**Author:** [@cappuccino](https://openfhe.discourse.group/u/cappuccino)\
**Replies:** 3\
**Last updated:** [November 6, 2025, 5:03pm UTC](https://openfhe.discourse.group/t/about-precision-scale-value-and-basic-operation-of-boot-strapping/2204 "2025-11-06T17:03:26Z")

</div>

While using bootstrap with the following program, three questions came to mind. Isn’t the accuracy of the bootstrapped ciphertext low? I can observe a 50-bit → 10-bit error. The scale value of the bootstrapped ciph…

---

## [Can I use arbitrarily large ciphertext moduli (q\_i) in BGV/BFV?](https://openfhe.discourse.group/t/can-i-use-arbitrarily-large-ciphertext-moduli-q-i-in-bgv-bfv/2203)

<div class="topic-metadata">

**Author:** [@oksuman](https://openfhe.discourse.group/u/oksuman)\
**Replies:** 3\
**Last updated:** [November 6, 2025, 5:42am UTC](https://openfhe.discourse.group/t/can-i-use-arbitrarily-large-ciphertext-moduli-q-i-in-bgv-bfv/2203 "2025-11-06T05:42:46Z")

</div>

Hello, I’m wondering whether it is possible to use arbitrarily large ciphertext moduli (q\_i) in the BGV or BFV schemes. In particular, I would like to set a large first modulus (q\_0), up to about 800 bits. However, I f…

---

## [Segmentation Fault when Implementing EvalStC/EvalCtS Methods in CKKS](https://openfhe.discourse.group/t/segmentation-fault-when-implementing-evalstc-evalcts-methods-in-ckks/2084)

<div class="topic-metadata">

**Author:** [@haohaohao](https://openfhe.discourse.group/u/haohaohao)\
**Replies:** 4\
**Last updated:** [November 6, 2025, 3:32am UTC](https://openfhe.discourse.group/t/segmentation-fault-when-implementing-evalstc-evalcts-methods-in-ckks/2084 "2025-11-06T03:32:38Z")

</div>

Problem Overview I’m trying to implement direct access methods for Slots-to-Coefficients (EvalStC) and Coefficients-to-Slots (EvalCtS) transformations in CKKS bootstrapping. While EvalBootstrap works perfectly, calling E…

---

## [How to support 55 (q\_0) + 40 (q\_i), i\>0 in OpenFHE](https://openfhe.discourse.group/t/how-to-support-55-q-0-40-q-i-i-0-in-openfhe/2195)

<div class="topic-metadata">

**Author:** [@JianmingTong](https://openfhe.discourse.group/u/JianmingTong)\
**Replies:** 1\
**Last updated:** [October 20, 2025, 4:39pm UTC](https://openfhe.discourse.group/t/how-to-support-55-q-0-40-q-i-i-0-in-openfhe/2195 "2025-10-20T16:39:57Z")

</div>

Dear developers Might I seek guidance on how to implement the following security parameters inside OpenFHE and make it able to pass the 128-bit security checking? I’m using this example to test the bootstrapping open…

---

## [Cannot using HEStd\_128\_classic crashes my terminal](https://openfhe.discourse.group/t/cannot-using-hestd-128-classic-crashes-my-terminal/2187)

<div class="topic-metadata">

**Author:** [@Omar](https://openfhe.discourse.group/u/Omar)\
**Replies:** 1\
**Last updated:** [October 3, 2025, 6:59am UTC](https://openfhe.discourse.group/t/cannot-using-hestd-128-classic-crashes-my-terminal/2187 "2025-10-03T06:59:40Z")

</div>

Hello, I’m trying to run the following simple program in CKKS, it’s similar to the code in advanced-ckks-bootstrapping.cpp. I’m using WSL on Windows and the program compiles. But when I run it, it prints “CKKS scheme is…

---

## [Deserializing Ciphertexts is slow](https://openfhe.discourse.group/t/deserializing-ciphertexts-is-slow/2103)

<div class="topic-metadata">

**Author:** [@g\_tasop](https://openfhe.discourse.group/u/g_tasop)\
**Replies:** 6\
**Last updated:** [July 31, 2025, 4:54pm UTC](https://openfhe.discourse.group/t/deserializing-ciphertexts-is-slow/2103 "2025-07-31T16:54:00Z")

</div>

Hello, I am working on an application in a client-server setup where the two parties need to exchange a large number of Ciphertexts. Before sending them over the network the client needs to perform these operations for e…

---

## [How to create a Plaintext from a raw DCRTPoly for decoding?](https://openfhe.discourse.group/t/how-to-create-a-plaintext-from-a-raw-dcrtpoly-for-decoding/2113)

<div class="topic-metadata">

**Author:** [@Emmaka](https://openfhe.discourse.group/u/Emmaka)\
**Replies:** 2\
**Last updated:** [July 25, 2025, 9:06pm UTC](https://openfhe.discourse.group/t/how-to-create-a-plaintext-from-a-raw-dcrtpoly-for-decoding/2113 "2025-07-25T21:06:10Z")

</div>

I am implementing a custom multi-key CKKS protocol using OpenFHE’s low-level components (like DCRTPoly and the ring operators). My custom aggregation function successfully produces a final DCRTPoly which represents the …

---

## [OpenFHE SetSlots method: what is the usage scenario?](https://openfhe.discourse.group/t/openfhe-setslots-method-what-is-the-usage-scenario/620)

<div class="topic-metadata">

**Author:** [@Knightley](https://openfhe.discourse.group/u/Knightley)\
**Replies:** 12\
**Last updated:** [June 18, 2025, 2:34am UTC](https://openfhe.discourse.group/t/openfhe-setslots-method-what-is-the-usage-scenario/620 "2025-06-18T02:34:57Z")

</div>

I know slots is something like the batch size. What is the usage scenario of SetSlots method? In a machine learning application, the size of cipher text will become smaller due to downsampling, can OpenFHE change batch …

---

## [Integrating FPGA Accelerator into OpenFHE](https://openfhe.discourse.group/t/integrating-fpga-accelerator-into-openfhe/1604)

<div class="topic-metadata">

**Author:** [@B1ankScript](https://openfhe.discourse.group/u/B1ankScript)\
**Replies:** 1\
**Last updated:** [June 6, 2025, 7:29pm UTC](https://openfhe.discourse.group/t/integrating-fpga-accelerator-into-openfhe/1604 "2025-06-06T19:29:55Z")

</div>

Hello, I want to create a CPU-FPGA heterogeneous FHE accelerator now. The CPU and FPGA are connected using PCIe, and the host uses Xilinx OpenCL to interact with Xilinx Alveo U280 FPGA. I want to write HLS kernel functi…

---

## [A subset of the keys to perform computation and decryption](https://openfhe.discourse.group/t/a-subset-of-the-keys-to-perform-computation-and-decryption/2061)

<div class="topic-metadata">

**Author:** [@svetlana](https://openfhe.discourse.group/u/svetlana)\
**Replies:** 1\
**Last updated:** [June 4, 2025, 3:48pm UTC](https://openfhe.discourse.group/t/a-subset-of-the-keys-to-perform-computation-and-decryption/2061 "2025-06-04T15:48:07Z")

</div>

Hello. We are using the Python wrapper and working with CKKS. In the threshold example with 5 parties, openfhe-python/examples/pke/threshold-fhe-5p.py at main · openfheorg/openfhe-python, all 5 keys are used for decryp…

---

## [Need guidance on modifying OpenFHE for custom bootstrapping implementation](https://openfhe.discourse.group/t/need-guidance-on-modifying-openfhe-for-custom-bootstrapping-implementation/2021)

<div class="topic-metadata">

**Author:** [@haohaohao](https://openfhe.discourse.group/u/haohaohao)\
**Replies:** 1\
**Last updated:** [May 9, 2025, 3:29pm UTC](https://openfhe.discourse.group/t/need-guidance-on-modifying-openfhe-for-custom-bootstrapping-implementation/2021 "2025-05-09T15:29:36Z")

</div>

Hi OpenFHE community, I’m trying to implement a custom bootstrapping program in OpenFHE, which requires modifying underlying code and recompiling. I have a few questions: Development Location: Should I make changes di…

---

## [Switching Context of OpenFHE In and Out of memory in a large scale application](https://openfhe.discourse.group/t/switching-context-of-openfhe-in-and-out-of-memory-in-a-large-scale-application/1995)

<div class="topic-metadata">

**Author:** [@ngesbrian23](https://openfhe.discourse.group/u/ngesbrian23)\
**Replies:** 1\
**Last updated:** [April 17, 2025, 5:02pm UTC](https://openfhe.discourse.group/t/switching-context-of-openfhe-in-and-out-of-memory-in-a-large-scale-application/1995 "2025-04-17T17:02:36Z")

</div>

I am working on a project with OpenFHE that requires a large amount of rotation keys so I am looking for ways to reduce my memory usage by switching context of my program in and out of memory. I am using the the followin…

---

## [OpenFHE Build Issues](https://openfhe.discourse.group/t/openfhe-build-issues/1983)

<div class="topic-metadata">

**Author:** [@Pavanranganath](https://openfhe.discourse.group/u/Pavanranganath)\
**Replies:** 1\
**Last updated:** [April 11, 2025, 6:28pm UTC](https://openfhe.discourse.group/t/openfhe-build-issues/1983 "2025-04-11T18:28:01Z")

</div>

I’m attempting to build OpenFHE for WebAssembly using emcmake and encountered a couple of issues. Since openfhe-wasm is still a work in progress, I analyzed and tried to fix them. Would appreciate feedback on whether my …

---

## [Parameter Mismatch Between CryptoContext and Public Key When Using Separate Serialization](https://openfhe.discourse.group/t/parameter-mismatch-between-cryptocontext-and-public-key-when-using-separate-serialization/1975)

<div class="topic-metadata">

**Author:** [@reneroliveira](https://openfhe.discourse.group/u/reneroliveira)\
**Replies:** 1\
**Last updated:** [April 3, 2025, 7:12pm UTC](https://openfhe.discourse.group/t/parameter-mismatch-between-cryptocontext-and-public-key-when-using-separate-serialization/1975 "2025-04-03T19:12:59Z")

</div>

Doubt of @Ankush-anonymous below. Any help is welcome: I’m encountering an issue when trying to use separate functions (or executables) for key generation and vote encryption. In my workflow, I generate the CryptoContex…

---

## [About the BINFHE KeyGen and Decrypt](https://openfhe.discourse.group/t/about-the-binfhe-keygen-and-decrypt/1962)

<div class="topic-metadata">

**Author:** [@wowblk8](https://openfhe.discourse.group/u/wowblk8)\
**Replies:** 3\
**Last updated:** [March 28, 2025, 10:50pm UTC](https://openfhe.discourse.group/t/about-the-binfhe-keygen-and-decrypt/1962 "2025-03-28T22:50:25Z")

</div>

Hi OpenFHE team! I want to know if this operation is incorrect and if there should be a warning if it is wrong. In my code, the first parameter BinFHE::BTKeyGen uses the secret key generated by the second parameter, b…

---

## [InnerProduct question](https://openfhe.discourse.group/t/innerproduct-question/1966)

<div class="topic-metadata">

**Author:** [@wowblk8](https://openfhe.discourse.group/u/wowblk8)\
**Replies:** 2\
**Last updated:** [March 28, 2025, 12:50pm UTC](https://openfhe.discourse.group/t/innerproduct-question/1966 "2025-03-28T12:50:33Z")

</div>

Hi openfhe team! I would like to know how to determine whether my inner product operation is correct based on the given parameters, ensuring that the calculation results are accurate. Currently, with the given parameter…

---

## [Help with CKKS bootstrapping](https://openfhe.discourse.group/t/help-with-ckks-bootstrapping/1951)

<div class="topic-metadata">

**Author:** [@sp18](https://openfhe.discourse.group/u/sp18)\
**Replies:** 3\
**Last updated:** [March 24, 2025, 7:50pm UTC](https://openfhe.discourse.group/t/help-with-ckks-bootstrapping/1951 "2025-03-24T19:50:50Z")

</div>

I am trying to understand the openFHE implementation of CKKS bootstrapping and understand the time taken by it. I understand the implementation is of Meta-BTS. When I run the repo example of simple bootstrapping here, I …

---

## [CKKS examples fail to run when setting NATIVE\_INT as 32 globally](https://openfhe.discourse.group/t/ckks-examples-fail-to-run-when-setting-native-int-as-32-globally/1913)

<div class="topic-metadata">

**Author:** [@JianmingTong](https://openfhe.discourse.group/u/JianmingTong)\
**Replies:** 11\
**Last updated:** [March 12, 2025, 7:23pm UTC](https://openfhe.discourse.group/t/ckks-examples-fail-to-run-when-setting-native-int-as-32-globally/1913 "2025-03-12T19:23:53Z")

</div>

I have a use case to only use \< 32-bit modulus, therefore I modify the CMakeLists.txt to change NATIVE\_SIZE from 64 into 32, as listed below. if( NOT NATIVE\_SIZE ) set( NATIVE\_SIZE 32 ) endif() Accordingly, I set t…

[Next page](https://openfhe.discourse.group/tag/openfhe-help/11.md?match_all_tags=true&page=1&tags%5B%5D=openfhe-help)
