# Repeating elements along ciphertext

**URL:** <https://openfhe.discourse.group/t/repeating-elements-along-ciphertext/552>\
**Category:** FHE Questions\
**Tags:** questions\
**Created:** [May 15, 2023, 6:34pm UTC](https://openfhe.discourse.group/t/repeating-elements-along-ciphertext/552 "2023-05-15T18:34:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marc-alonso](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@marc-alonso](https://openfhe.discourse.group/u/marc-alonso)\
**Post date:** [May 15, 2023, 6:34pm UTC](https://openfhe.discourse.group/t/repeating-elements-along-ciphertext/552/1 "2023-05-15T18:34:44Z")

</div>

Hey, I was wondering if there was a way to perform this repeat operation:

c: [1, ?, ?, ?, 2, ?, ?, ?, 3, ?, ?, ?, 4, ?, ?, ?]\\ \downarrow\\ c: [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4]

Without using multiplications? Now I am masking positions 0, 4, 8, 12 and i repeat using rotations. ? represents slots with random values that I want to cancel out. I would like to do it without using the product to mask (so I make a shorter circuit). I use CKKS, thank you

---

<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:** [May 18, 2023, 10:01pm UTC](https://openfhe.discourse.group/t/repeating-elements-along-ciphertext/552/2 "2023-05-18T22:01:41Z")

</div>

No, there is not. The multiplication here is needed to clear out the garbage in slots with ?. If you have control over how the input gets generated, maybe you can do the prior computation differently so that the ? items do not appear.
