In CKKS, does OpenFHE always add the noise before decoding?

I saw this in the Readme file:


**DecryptionNoiseMode decryptionNoiseMode (CKKS only)** - NOISE_FLOODING_DECRYPT mode is more secure (provable secure) than FIXED_NOISE_DECRYPT, but it requires executing all computations twice.

**ExecutionMode executionMode (CKKS only)** - The execution mode is only used in NOISE_FLOODING_DECRYPT mode:
- EXEC_NOISE_ESTIMATION - we estimate the noise we need to add to the actual computation to guarantee good security.
- EXEC_EVALUATION - we input our noise estimate and perform the desired secure encrypted computation.
- Although not available for BGV/BFV, EXEC_EVALUATION is used for these schemes internally.

In my understanding, it means if we use FIXED_NOISE_DECRYPT, then the noise flooding will not be applied. But if I check the section here: openfhe-development/src/pke/lib/encoding/ckkspackedencoding.cpp at main · openfheorg/openfhe-development · GitHub If I understand correctly, the noise is always added.

My questions:

  • In CKKS, does OpenFHE always add the noise before decoding? I mean, is there any option to not to do that
  • Is the difference between FIXED_NOISE_DECRYPT and NOISE_FLOODING_DECRYPT only how it calculates the noise?

A small noise is always added (like \sqrt{2} of the current noise) to make it hard to mount a key recovery attack in case the decryption result is accidentally shared (default security safeguard). In the flooding mode, the added noise is much higher (like 30 or so bits above the current noise). See Security Notes for Homomorphic Encryption — OpenFHE documentation for more information. By default, CKKS_M_FACTOR is set to 1 in the CMakeLists.txt.