# Decompose operation of ckks-hybrid-KS

**URL:** https://openfhe.discourse.group/t/decompose-operation-of-ckks-hybrid-ks/716
**Category:** FHE Questions
**Created:** [July 24, 2023, 11:15am UTC](https://openfhe.discourse.group/t/decompose-operation-of-ckks-hybrid-ks/716 "2023-07-24T11:15:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yhh](https://avatars.discourse-cdn.com/v4/letter/y/c57346/32.png) [@yhh](https://openfhe.discourse.group/u/yhh)
#### Post date: [July 24, 2023, 11:15am UTC](https://openfhe.discourse.group/t/decompose-operation-of-ckks-hybrid-ks/716/1 "2023-07-24T11:15:41Z")

</div>

Hi!

Inside the function `KeySwitchHYBRID::EvalKeySwitchPrecomputeCore` in `keyswitch-hybrid.cpp`，I see the comment says `Digit decomposition` only does `Zero-padding and split`.

However in Algo3 Line2 of thesis [Over 100x](https://eprint.iacr.org/2021/508.pdf), there are some constants to multiply by.

I would like to know how does openFHE deal with the constant metioned above?  
i.e. Are they omitted or merged with other constants?

Thanks for your help!

---

<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: [July 24, 2023, 3:08pm UTC](https://openfhe.discourse.group/t/decompose-operation-of-ckks-hybrid-ks/716/2 "2023-07-24T15:08:32Z")

</div>

The constants are not needed. See [KeySwitch keys reuse & optimization for hybrid key switching - #5 by Sijia](https://openfhe.discourse.group/t/keyswitch-keys-reuse-optimization-for-hybrid-key-switching/471/5) for more details. This optimization was originally introduced in Section 3.3 of [An Improved RNS Variant of the BFV Homomorphic Encryption Scheme](https://eprint.iacr.org/2018/117)
