# Trouble using FHECKKSRNS::EvalLinearTransform

**URL:** <https://openfhe.discourse.group/t/trouble-using-fheckksrns-evallineartransform/2137>\
**Category:** Library Questions\
**Created:** [August 8, 2025, 8:27pm UTC](https://openfhe.discourse.group/t/trouble-using-fheckksrns-evallineartransform/2137 "2025-08-08T20:27:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabrielle.demicheli](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@gabrielle.demicheli](https://openfhe.discourse.group/u/gabrielle.demicheli)\
**Post date:** [August 8, 2025, 8:27pm UTC](https://openfhe.discourse.group/t/trouble-using-fheckksrns-evallineartransform/2137/1 "2025-08-08T20:27:03Z")

</div>

Hello,

I am trying to use the following method in an application: FHECKKSRNS::EvalLinearTransform  
(link: [https://github.com/openfheorg/openfhe-development/blob/v1.3.1/src/pke/lib/scheme/ckksrns/ckksrns-fhe.cpp#L1611](https://github.com/openfheorg/openfhe-development/blob/v1.3.1/src/pke/lib/scheme/ckksrns/ckksrns-fhe.cpp#L1611))

However, I am having trouble with it as it appears like nothing in the FHECKKSRNS type is exposed on any public `CryptoContext<DCRTPoly>` interface.

I have tried `static_pointer_cast`/`dynamic_cast` approaches on both the context and scheme pointers, and downcasting the scheme object itself but nothing worked so far.

Could you advise the recommended way to invoke `EvalLinearTransform` from user code?

Thanks!

---

<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:** [August 11, 2025, 3:05pm UTC](https://openfhe.discourse.group/t/trouble-using-fheckksrns-evallineartransform/2137/2 "2025-08-11T15:05:02Z")

</div>

You are right, currently the `EvalLinearTransform` methods are particularized for the bootstrapping use and only callable in FHECKKSRNS.

I can create an issue to expose it in a later OpenFHE version. But until then, for your application it is probably the easiest to copy the code for `EvalLinearTransform` (and relevant functions such as `MakeAuxPlaintext`, `EvalAddExtInPlace`, etc) and remove the bootstrapping-dependent parts (`m_bootPrecomMap`).

---

<div class="post-metadata">

**Author:** ![gabrielle.demicheli](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@gabrielle.demicheli](https://openfhe.discourse.group/u/gabrielle.demicheli)\
**Post date:** [August 11, 2025, 4:10pm UTC](https://openfhe.discourse.group/t/trouble-using-fheckksrns-evallineartransform/2137/3 "2025-08-11T16:10:10Z")

</div>

Thank you for your answer! I will copy the relevant bits of code then. It would be great to have it available in a future version 🙂
