# EvalChebyshevSeries related detial

**URL:** <https://openfhe.discourse.group/t/evalchebyshevseries-related-detial/1078>\
**Category:** Library Questions\
**Tags:** questions\
**Created:** [February 15, 2024, 5:14pm UTC](https://openfhe.discourse.group/t/evalchebyshevseries-related-detial/1078 "2024-02-15T17:14:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangantian](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@wangantian](https://openfhe.discourse.group/u/wangantian)\
**Post date:** [February 15, 2024, 5:14pm UTC](https://openfhe.discourse.group/t/evalchebyshevseries-related-detial/1078/1 "2024-02-15T17:14:49Z")

</div>

I am wondering if there are papers related to the implementations in functions EvalChebyshevSeries and EvalChebyshevSeries PS?  
What are the differences between the parameters here in [openfhe-development/src/pke/include/scheme/ckksrns/ckksrns-fhe.h at b2869aef5cf61afd364b3eaea748dcc8a7020b9c · openfheorg/openfhe-development · GitHub](https://github.com/openfheorg/openfhe-development/blob/b2869aef5cf61afd364b3eaea748dcc8a7020b9c/src/pke/include/scheme/ckksrns/ckksrns-fhe.h#L294)  
For Chebyshev series coefficients for the SPARSE case and Chebyshev series coefficients for the OPTIMIZED/uniform case

Thanks in advance!

---

<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:** [February 15, 2024, 7:03pm UTC](https://openfhe.discourse.group/t/evalchebyshevseries-related-detial/1078/2 "2024-02-15T19:03:28Z")

</div>

By taking a quick look, I think those are the coefficients of the modular reduction performed in the bootstrapping procedure.

They are precomputed for performance reasons I guess.

I think that two cases are necessary since by using a secret key based on the `SPARSE_TERNARY` distribution, the error in computations is lower, therefore an approximation with a smaller degree is used.

In case on `UNIFORM_TERNARY`, errors are larger, therefore a larger degree is necessary for the Chebyshev approximation of the modular reduction.

This comes from my experience, but I may be wrong 😃

---

<div class="post-metadata">

**Author:** ![wangantian](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@wangantian](https://openfhe.discourse.group/u/wangantian)\
**Post date:** [February 15, 2024, 8:12pm UTC](https://openfhe.discourse.group/t/evalchebyshevseries-related-detial/1078/3 "2024-02-15T20:12:46Z")

</div>

Thanks for the reply, yes, these are the one for bootstrapping.  
While, I was wondering what paper describes the detailed algorithm under the hood, and why use these parameters rather than others.

---

<div class="post-metadata">

**Author:** ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)\
**Post date:** [February 15, 2024, 8:33pm UTC](https://openfhe.discourse.group/t/evalchebyshevseries-related-detial/1078/4 "2024-02-15T20:33:41Z")

</div>

The following papers include further details about your questions. Start with (1) to understand CKKS bootstrapping at a conceptual level. Move to 2 for the Chebyshev Series and the Paterson-Stokmeyer (PS) algorithm. Lastly, move to (3) to understand the effect of secret key distribution on CKKS bootstrapping.

1. [https://eprint.iacr.org/2018/153.pdf](https://eprint.iacr.org/2018/153.pdf)
2. [https://eprint.iacr.org/2018/1043.pdf](https://eprint.iacr.org/2018/1043.pdf)
3. [https://eprint.iacr.org/2022/024.pdf](https://eprint.iacr.org/2022/024.pdf)

---

<div class="post-metadata">

**Author:** ![wangantian](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@wangantian](https://openfhe.discourse.group/u/wangantian)\
**Post date:** [February 15, 2024, 8:44pm UTC](https://openfhe.discourse.group/t/evalchebyshevseries-related-detial/1078/5 "2024-02-15T20:44:45Z")

</div>

Thank you so much in providing detailed literature!
