---
# System prepended metadata

title: Understanding Homomorphic Encryption

---

# Understanding Homomorphic Encryption

## Introduction
Fully Homomorphic Encryption (FHE) is a cryptographic scheme that enables computation directly on encrypted data, making applications like privacy-preserving machine learning practical. A server can run a encrypted data through an ML model without ever seeing the underlying plaintext data. Only the owner of secret key can decrypt the input data and inference result.

FHE also enables applications beyond machine learning. For instance, in a confidential blockchain, smart contracts can operate directly on encrypted states and inputs. This capability can further mitigate threats such as Maximal Extractable Value (MEV) attacks. Similarly, FHE supports encrypted query processing, allowing databases to perform search and retrieval over encrypted records without revealing either the user’s query or the returned results to the server. 

However, FHE is not a panacea. A fundamental limitation of all HE schemes is that homomorphic operations can only be performed on ciphertexts that are encrypted under the *same* secret key. Consequently, in systems such as confidential blockchain services (FHEVM), it is infeasible for each user to encrypt data under their own secret key while still enabling joint computation. Such architectures therefore require a centralized or jointly managed key infrastructure. In practice, **multi-party computation (MPC)** is typically employed to distribute trust and reduce the risk of secret-key exposure.

## Goal
This blog is designed to guide newcomers toward a deep, structured understanding of FHE (especially CKKS). I present a comprehensive three-part series that begins from first principles and builds up to the modern FHE schemes.
- **Part 1**: develop the mathematical groundwork, covering Abstract Algebra and the evolution of Homomorphic Encryption.
- **Part 2**: examine the security foundations through Lattice-Based Cryptography and the Learning With Errors (LWE) assumption.
- **Part 3**: This part focuses on CKKS (HEAAN) which is a homomorphic encryption scheme designed for **approximate arithmetic** on real or complex numbers. We focus on this scheme implemented in the Residue Number System (RNS). I will break down its essential building blocks and have an end-to-end understanding of how approximate, privacy-preserving computation is realized in practice.


## Series 
### Part 1: Homomorphic Encryption 
- [I. The Mathematical Foundations of Cryptography: Abstract Algebra](https://hackmd.io/@spockwall/B1tKGkilZl)
- [II. History of Homomorphic Encryptions](https://hackmd.io/@spockwall/r1K5v5FeWl)
### Part 2: Lattice-Based Cryptography
- [III. Introduction of Lattice-Based Cryptography](https://hackmd.io/@spockwall/Skuur2KlZl)
- [IV. Learning With Error (LWE)](https://hackmd.io/@spockwall/rkXBFJogbg)
- [V. Ring Learning With Error (RLWE)](https://hackmd.io/@spockwall/rJ5PXGsxbl)
- [VI. Number Theoretic Transform (NTT)](https://hackmd.io/@spockwall/BJclme13yg)
### Part 3: Fully Homomorphic Encryption: CKKS
- [VII. Message Encoding & SIMD](https://hackmd.io/@spockwall/rJkayU2l-x)
- [VIII. Homomorphic Additive and Multiplicative Ciphertexts](https://hackmd.io/@spockwall/r1WGiTnebg)
- [IX. Modulus Switching](https://hackmd.io/@spockwall/BycK9axZ-l)
- [X. Relinearization](https://hackmd.io/@spockwall/S1F6jTheWg)
- [XI. Rescaling](https://hackmd.io/@spockwall/r1z4_jebbg)
- [XII. Homomorphic Rotation](https://hackmd.io/@spockwall/HJy_3ZNZbx)
- [XIII. Homomorphic Conjugation](https://hackmd.io/@spockwall/HywfKS4Wbx)
- [XIV. Homomorphic Matrix-Vector Multiplication](https://hackmd.io/@spockwall/ByWmkmNZWe)
- [XV. Bootstrapping](https://hackmd.io/@spockwall/S1ZH3p2xZg)
- [XVI. Summary of CKKS Scheme](https://hackmd.io/@spockwall/rJ02sIrWZl)

### Appendix
- [Noise Flooding For Approximate FHE Scheme](https://hackmd.io/6YMLQVqNQsGuqgV9k33jAw)
- [Isomorphism of Canonical Embedding](https://hackmd.io/@spockwall/S1oNc62gbg)



