# Does Large Precision Comparison have any relevant reference papers？Can the current threshold version of CKKS be used for scheme switching FHEW and comparison?

**URL:** <https://openfhe.discourse.group/t/does-large-precision-comparison-have-any-relevant-reference-papers-can-the-current-threshold-version-of-ckks-be-used-for-scheme-switching-fhew-and-comparison/1228>\
**Category:** Library Questions\
**Tags:** questions\
**Created:** [April 24, 2024, 8:13am UTC](https://openfhe.discourse.group/t/does-large-precision-comparison-have-any-relevant-reference-papers-can-the-current-threshold-version-of-ckks-be-used-for-scheme-switching-fhew-and-comparison/1228 "2024-04-24T08:13:10Z")\
**Posts on this page:** 5\
**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:** [April 24, 2024, 8:13am UTC](https://openfhe.discourse.group/t/does-large-precision-comparison-have-any-relevant-reference-papers-can-the-current-threshold-version-of-ckks-be-used-for-scheme-switching-fhew-and-comparison/1228/1 "2024-04-24T08:13:10Z")

</div>

Do Large Precision Comparison have any relevant reference papers？Can the current threshold version of CKKS be used for scheme switching FHEW and comparison?

---

<div class="post-metadata">

**Author:** ![narger](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/narger/32/420_2.png) [@narger](https://openfhe.discourse.group/u/narger)\
**Post date:** [April 24, 2024, 3:50pm UTC](https://openfhe.discourse.group/t/does-large-precision-comparison-have-any-relevant-reference-papers-can-the-current-threshold-version-of-ckks-be-used-for-scheme-switching-fhew-and-comparison/1228/2 "2024-04-24T15:50:59Z")

</div>

AFAIK

- FHEW/TFHE: using “programmable bootstrapping” ([https://eprint.iacr.org/2021/1337.pdf](https://eprint.iacr.org/2021/1337.pdf))
- CKKS: using polynomial approximations of the sign function ([Optimization of Homomorphic Comparison Algorithm on RNS-CKKS Scheme](https://eprint.iacr.org/2021/1215))

---

<div class="post-metadata">

**Author:** ![andreea.alexandru](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/andreea.alexandru/32/378_2.png) [@andreea.alexandru](https://openfhe.discourse.group/u/andreea.alexandru)\
**Post date:** [April 24, 2024, 4:46pm UTC](https://openfhe.discourse.group/t/does-large-precision-comparison-have-any-relevant-reference-papers-can-the-current-threshold-version-of-ckks-be-used-for-scheme-switching-fhew-and-comparison/1228/3 "2024-04-24T16:46:01Z")

</div>

The large precision comparison logic implemented in OpenFHE is described in [https://eprint.iacr.org/2021/1337.pdf](https://eprint.iacr.org/2021/1337.pdf), as @narger wrote.

The scheme switching is not currently implemented in OpenFHE for the threshold case. While you can thresholdize the scheme switching/comparison key generation part for CKKS in OpenFHE, the library does not currently support threshold FHEW (scheme switching also needs a FHEW secret key and bootstrapping key). Threshold FHEW will be added to OpenFHE in the future.

---

<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:** [April 26, 2024, 6:28am UTC](https://openfhe.discourse.group/t/does-large-precision-comparison-have-any-relevant-reference-papers-can-the-current-threshold-version-of-ckks-be-used-for-scheme-switching-fhew-and-comparison/1228/4 "2024-04-26T06:28:52Z")

</div>

So can the threshold version of CKKS be converted to scheme FHEW? Is it not possible?

---

<div class="post-metadata">

**Author:** ![andreea.alexandru](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/andreea.alexandru/32/378_2.png) [@andreea.alexandru](https://openfhe.discourse.group/u/andreea.alexandru)\
**Post date:** [April 26, 2024, 1:56pm UTC](https://openfhe.discourse.group/t/does-large-precision-comparison-have-any-relevant-reference-papers-can-the-current-threshold-version-of-ckks-be-used-for-scheme-switching-fhew-and-comparison/1228/5 "2024-04-26T13:56:18Z")

</div>

It is possible, but it is still an active area of research to obtain efficient threshold FHEW. The reason for that is that the noise flooding required for threshold security leads to a growth of the ciphertext modulus as compared to the single-party version, and the performance of FHEW is much more sensitive to large moduli compared to BGV/CKKS.
