# What features makes openfhe better than TFHE or NUFHE

**URL:** <https://openfhe.discourse.group/t/what-features-makes-openfhe-better-than-tfhe-or-nufhe/1049>\
**Category:** FHE Questions\
**Created:** [January 27, 2024, 4:56pm UTC](https://openfhe.discourse.group/t/what-features-makes-openfhe-better-than-tfhe-or-nufhe/1049 "2024-01-27T16:56:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pradeep508](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@pradeep508](https://openfhe.discourse.group/u/pradeep508)\
**Post date:** [January 27, 2024, 4:56pm UTC](https://openfhe.discourse.group/t/what-features-makes-openfhe-better-than-tfhe-or-nufhe/1049/1 "2024-01-27T16:56:45Z")

</div>

how to compare two libraries with merits and demerits

---

<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:** [February 1, 2024, 4:26am UTC](https://openfhe.discourse.group/t/what-features-makes-openfhe-better-than-tfhe-or-nufhe/1049/2 "2024-02-01T04:26:52Z")

</div>

It is an involved/complicated question. Key points:

- OpenFHE supports all common schemes, including BGV, BFV, CKKS, FHEW, and TFHE (not just TFHE), and even some switching between them
- OpenFHE uses NTTs rather than FTTs for polynomial multiplication
- CKKS is typically much faster for many ML applications than TFHE

On the other hand, the runtimes are slightly faster in TFHE (because of AVX and FFT) than in OpenFHE’s implementation of TFHE.

---

<div class="post-metadata">

**Author:** ![pradeep508](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@pradeep508](https://openfhe.discourse.group/u/pradeep508)\
**Post date:** [February 1, 2024, 4:53am UTC](https://openfhe.discourse.group/t/what-features-makes-openfhe-better-than-tfhe-or-nufhe/1049/3 "2024-02-01T04:53:55Z")

</div>

NuFHE ls GPU implantation of TFHE which uses NTT instead of FFT. What are the benefits we are getting using of NTT instead of FFT. To be specific where can achieve speedup using of NTT in this library.

---

<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:** [February 1, 2024, 5:14am UTC](https://openfhe.discourse.group/t/what-features-makes-openfhe-better-than-tfhe-or-nufhe/1049/4 "2024-02-01T05:14:35Z")

</div>

Hypothetically speaking, one advantage is when you want to support larger moduli (for example, 128-bit moduli) to get higher plaintext precision or certain leveled operations. In the case of FFT, you would have to work with large-precision floats, quad floats or higher. In the NTT setting, you can trivially use RNS to support larger moduli by working with a product of small primes using CRT, which scale linearly.

Another advantage is a higher granularity in modulus size and use of a smaller distribution parameter, like 3.19.

---

<div class="post-metadata">

**Author:** ![pradeep508](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@pradeep508](https://openfhe.discourse.group/u/pradeep508)\
**Post date:** [February 1, 2024, 6:42am UTC](https://openfhe.discourse.group/t/what-features-makes-openfhe-better-than-tfhe-or-nufhe/1049/5 "2024-02-01T06:42:04Z")

</div>

Thanks for valuable information sir
