# Converting Between Packings in SIMD-Style FHE

DevFeed: [Converting Between Packings in SIMD-Style FHE](<https://devfeed.tech/articles/shift-networks-40486.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2024/09/02/shift-networks/>)

Published: 2024-09-02T21:01:03Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [FHE](<https://devfeed.tech/topics/fhe.md>), [homomorphic encryption](<https://devfeed.tech/topics/homomorphic-encryption.md>), [data](<https://devfeed.tech/topics/data.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [compilers](<https://devfeed.tech/tags/compilers.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [github](<https://devfeed.tech/tags/github.md>), [graph-coloring](<https://devfeed.tech/tags/graph-coloring.md>), [heir](<https://devfeed.tech/tags/heir.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [packing](<https://devfeed.tech/tags/packing.md>), [permutation](<https://devfeed.tech/tags/permutation.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rlwe](<https://devfeed.tech/tags/rlwe.md>), [simd](<https://devfeed.tech/tags/simd.md>)

## AI overview

This article explains packing in SIMD-style fully homomorphic encryption and focuses on converting between established packings. It introduces a computational model involving RLWE ciphertext vectors, elementwise operations, cyclic rotations, and differing operation costs.

## Source excerpt

In my recent overview of homomorphic encryption, I underemphasized the importance of data layout when working with arithmetic (SIMD-style) homomorphic encryption schemes. In the FHE world, the name given to data layout strategies is called "packing," because it revolves around putting multiple plaintext data into RLWE ciphertexts in carefully-chosen ways that mesh well with the operations you'd like to perform. By "mesh well" I mean it reduces the number of extra multiplications and rotations required merely to align data elements properly, rather than doing the actual computation you care about.