Inferensys

Glossary

CKKS Scheme

A leveled homomorphic encryption scheme optimized for approximate fixed-point arithmetic on real numbers, widely used for encrypted neural network inference and machine learning.
Developer testing AI inference on mobile phone in hand, laptop with optimization code visible, casual tech review moment.
HOMOMORPHIC ENCRYPTION

What is CKKS Scheme?

The CKKS scheme is a leveled homomorphic encryption cryptosystem designed for efficient approximate arithmetic on encrypted real numbers, making it the foundational technology for privacy-preserving machine learning inference.

The Cheon-Kim-Kim-Song (CKKS) scheme is a leveled homomorphic encryption cryptosystem that enables computation directly on encrypted floating-point vectors. Unlike exact schemes like BFV, CKKS treats plaintext values as approximations with inherent noise, allowing it to perform approximate fixed-point arithmetic on real numbers. This design makes it uniquely suited for encrypted neural network inference, where operations like matrix multiplication and activation functions tolerate minor precision loss.

CKKS relies on the Ring Learning With Errors (RLWE) hardness assumption and supports ciphertext packing for SIMD parallelism. The scheme manages noise growth through rescaling, which divides the ciphertext by a scale factor after each multiplication, analogous to truncating floating-point precision. Libraries like Microsoft SEAL and OpenFHE implement CKKS, enabling privacy-preserving applications where a model host can process encrypted user data without ever decrypting the sensitive inputs.

APPROXIMATE ARITHMETIC

Core Characteristics of CKKS

The Cheon-Kim-Kim-Song (CKKS) scheme is a leveled homomorphic encryption scheme uniquely optimized for approximate fixed-point arithmetic on real numbers, making it the de facto standard for encrypted neural network inference and privacy-preserving machine learning.

01

Approximate Arithmetic with Rescaling

Unlike exact schemes (BFV/BGV), CKKS treats a ciphertext's inherent noise as an analogue to floating-point rounding error. The critical rescaling operation divides the ciphertext by a scale factor after multiplication, truncating the least significant bits to maintain a stable scale and manage noise growth. This mirrors the behavior of standard floating-point arithmetic, making it ideal for computations that are inherently tolerant of small precision loss, such as deep learning inference.

02

SIMD Batching of Complex Numbers

CKKS natively supports Single Instruction, Multiple Data (SIMD) parallelism by packing up to N/2 complex numbers into a single ciphertext (where N is the ring dimension). A single homomorphic addition or multiplication simultaneously operates on all packed slots. This massively increases amortized throughput, allowing a single encrypted operation to process thousands of data points or neural network neurons in parallel.

03

Leveled Structure & Noise Budget

CKKS is a leveled scheme, meaning it supports computation up to a predetermined multiplicative depth without bootstrapping. Each ciphertext is associated with a level L, and each multiplication consumes one level via rescaling. The noise budget is implicitly managed by the modulus chain; once the lowest level is reached, no further multiplications are possible unless a computationally expensive bootstrapping operation is invoked to refresh the ciphertext.

04

Polynomial Approximation of Non-Linear Functions

CKKS can only natively evaluate polynomial functions (addition and multiplication). To compute non-linear activation functions like ReLU, Sigmoid, or Softmax, these must be replaced with low-degree polynomial approximations (e.g., minimax or Chebyshev approximations). The design of accurate, low-degree polynomial substitutes is a central research challenge for implementing deep neural networks entirely within the CKKS encrypted domain.

05

Key Switching & Galois Keys

Advanced operations rely on key switching to transform ciphertexts between different secret keys. Specifically, Galois keys are public evaluation keys that enable homomorphic rotation of the SIMD slots within a packed ciphertext. These rotations are essential for implementing matrix multiplication and convolutional layers, as they allow the algorithm to align data across different slots without decryption.

06

Foundation for Encrypted Inference

CKKS is the dominant scheme for encrypted inference because its approximate nature aligns perfectly with the noise-tolerant forward pass of neural networks. Frameworks like Microsoft SEAL and OpenFHE provide optimized CKKS implementations. In a typical deployment, a client encrypts their input data, the server evaluates the model homomorphically on the ciphertext, and the client decrypts the encrypted prediction—ensuring the server never sees the raw input.

SCHEME COMPARISON

CKKS vs. Other Homomorphic Encryption Schemes

A technical comparison of the CKKS scheme against BFV, BGV, and TFHE across key dimensions relevant to encrypted machine learning inference.

FeatureCKKSBFV/BGVTFHE

Plaintext Domain

Approximate real numbers (complex)

Exact integers (modular)

Binary bits (boolean)

Arithmetic Type

Fixed-point floating-point

Integer arithmetic

Gate-by-gate boolean

Noise Management

Rescaling (scale reduction)

Modulus switching

Programmable bootstrapping

SIMD Packing Support

Bootstrapping Efficiency

Amortized (batched)

Amortized (batched)

Per-gate (fast individual)

Non-Linear Function Evaluation

Polynomial approximation required

Polynomial approximation required

Lookup table via PBS

Primary Use Case

Encrypted neural network inference

Encrypted integer computation

Arbitrary boolean circuits

Multiplication Depth

Leveled (pre-determined)

Leveled (pre-determined)

Unlimited (gate bootstrapping)

CKKS SCHEME DEEP DIVE

Frequently Asked Questions

Explore the most common technical questions about the Cheon-Kim-Kim-Song (CKKS) homomorphic encryption scheme, covering its mechanics, security, and application in encrypted machine learning inference.

The CKKS scheme (Cheon-Kim-Kim-Song) is a leveled homomorphic encryption scheme optimized for performing approximate arithmetic on encrypted real numbers. Unlike exact schemes like BFV, CKKS treats plaintext data as floating-point values with inherent noise, making it uniquely suited for machine learning inference where minor precision loss is acceptable. It works by encoding a vector of complex numbers into a plaintext polynomial, encrypting it using the Ring Learning With Errors (RLWE) hardness assumption, and enabling homomorphic addition and multiplication. After each multiplication, a rescaling operation truncates the ciphertext to manage the scale factor and noise, effectively implementing fixed-point arithmetic in the encrypted domain. This allows deep neural networks with many layers to be evaluated without decryption.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.