# What's the difference between automorphism and rotate

**URL:** <https://openfhe.discourse.group/t/whats-the-difference-between-automorphism-and-rotate/1763>\
**Category:** FHE Questions\
**Created:** [December 6, 2024, 7:15am UTC](https://openfhe.discourse.group/t/whats-the-difference-between-automorphism-and-rotate/1763 "2024-12-06T07:15:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![capibala](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@capibala](https://openfhe.discourse.group/u/capibala)\
**Post date:** [December 6, 2024, 7:15am UTC](https://openfhe.discourse.group/t/whats-the-difference-between-automorphism-and-rotate/1763/1 "2024-12-06T07:15:50Z")

</div>

rotate in the source code calls automorphism

---

<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:** [December 6, 2024, 3:30pm UTC](https://openfhe.discourse.group/t/whats-the-difference-between-automorphism-and-rotate/1763/2 "2024-12-06T15:30:17Z")

</div>

From a developer/user’s perspective, rotate is a library API that enables cyclic rotation through the encrypted vector. Automorphism is the mathematical principle that affects this rotation.

While the user submits `Rotate(ctxt, rotIdx)` to cyclically rotate the encrypted vector in `ctxt` to the left/right by `rotidx`. To affect this functionality, OpenFHE uses an automorphism transform under the hood.

If you would like to learn about automorphism transform in the context of FHE, you can refer to Appendix C in this [paper](https://eprint.iacr.org/2011/566.pdf).
