Inferensys

Glossary

CKKS Scheme

A homomorphic encryption scheme optimized for approximate fixed-point arithmetic on real numbers, making it the preferred choice for privacy-preserving machine learning inference where exact precision is not required.
Developer testing AI inference on mobile phone in hand, laptop with optimization code visible, casual tech review moment.
APPROXIMATE HOMOMORPHIC ENCRYPTION

What is CKKS Scheme?

An overview of the Cheon-Kim-Kim-Song scheme, the leading homomorphic encryption approach for privacy-preserving machine learning on real numbers.

The CKKS scheme is a Leveled Fully Homomorphic Encryption scheme optimized for approximate fixed-point arithmetic on real and complex numbers, making it the preferred choice for privacy-preserving machine learning inference where exact precision is not required. Unlike the BFV scheme which operates on integers, CKKS treats encryption noise as part of the approximation error inherent in floating-point computations.

CKKS relies on the Ring Learning With Errors (RLWE) hardness assumption and supports SIMD packing, enabling parallel computation on vectors of encrypted numbers. The scheme manages its noise budget through a mandatory rescaling operation after each multiplication, which divides the ciphertext by a scaling factor to maintain stable precision, analogous to truncating floating-point values.

APPROXIMATE ARITHMETIC

Key Features of CKKS

The CKKS scheme is the workhorse of privacy-preserving machine learning, enabling efficient computation on encrypted real numbers. Its core design trades exact precision for performance, making it ideal for neural network inference.

01

Approximate Fixed-Point Arithmetic

Unlike exact schemes like BFV, CKKS natively operates on approximate real numbers by treating plaintexts as scaled integers. It views a ciphertext as encoding a value with an inherent least significant bit error, similar to floating-point representations. This design choice is critical for machine learning, where operations like sigmoid or ReLU activations produce irrational numbers that cannot be represented exactly. The scheme accepts a small, controllable precision loss in exchange for the ability to perform polynomial approximations of non-linear functions efficiently.

02

Rescaling for Noise Management

CKKS manages noise through a unique operation called rescaling, which is the approximate analogue of modulus switching in exact schemes. After every homomorphic multiplication, the ciphertext modulus is divided by a scaling factor, truncating both the message and the accumulated noise. This maintains a stable scale and prevents exponential noise growth. The process is deeply integrated with the leveled structure of the scheme: each multiplication consumes one level, and the total multiplicative depth of a circuit must be known before encryption.

03

SIMD Packing and Parallelism

CKKS leverages the Chinese Remainder Theorem to pack up to thousands of plaintext values into a single ciphertext. This Single Instruction, Multiple Data (SIMD) packing enables component-wise addition and multiplication on encrypted vectors in parallel. For machine learning, this means an entire layer of neurons can be processed simultaneously, dramatically amortizing the computational cost. A single homomorphic multiplication can evaluate thousands of scalar multiplications at once, making batched encrypted inference highly efficient.

04

Leveled Homomorphic Encryption

CKKS is typically deployed as a leveled scheme, meaning it can evaluate circuits of a predetermined multiplicative depth without the expensive bootstrapping operation. Each multiplication reduces the ciphertext's level, and once the level reaches zero, no further multiplications are possible. This requires the computation—such as the number of layers in a neural network—to be known in advance. The leveled approach avoids the massive computational overhead of bootstrapping, making CKKS the most performant choice for fixed-depth ML inference pipelines.

05

Relinearization for Ciphertext Size Control

A homomorphic multiplication in CKKS increases the ciphertext size from two ring elements to three. Without intervention, subsequent multiplications would cause exponential growth, making computation infeasible. Relinearization is a key-switching procedure that reduces the ciphertext back to two elements after each multiplication. This operation uses a public evaluation key and is essential for maintaining compact ciphertexts and manageable computational overhead throughout deep circuits like convolutional neural networks.

06

Polynomial Approximation of Non-Linear Functions

CKKS natively supports only addition and multiplication on encrypted data. To evaluate non-linear activation functions like ReLU, sigmoid, or tanh, these must be replaced with low-degree polynomial approximations. Techniques like Chebyshev approximation or minimax optimization are used to find polynomials that closely match the target function over a specific input range. The degree of the polynomial directly determines the multiplicative depth consumed, creating a trade-off between approximation accuracy and computational cost.

CKKS SCHEME INSIGHTS

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the CKKS homomorphic encryption scheme, its operational mechanics, and its role in privacy-preserving machine learning.

The CKKS scheme (Cheon-Kim-Kim-Song) is a Leveled Fully Homomorphic Encryption scheme optimized for approximate fixed-point arithmetic on real and complex numbers. Unlike exact schemes like BFV, CKKS treats a ciphertext's inherent noise as an approximation error, similar to floating-point rounding. It works by encoding a vector of real numbers into a plaintext polynomial using the canonical embedding, encrypting it, and then performing homomorphic addition and multiplication. A critical operation is rescaling, which divides the ciphertext by a scaling factor after each multiplication to manage the scale and truncate noise, effectively maintaining a stable precision budget throughout the computation.

SCHEME COMPARISON

CKKS vs. Other Homomorphic Encryption Schemes

A feature-level comparison of the CKKS scheme against BFV, TFHE, and BGV for privacy-preserving machine learning workloads.

FeatureCKKSBFVTFHEBGV

Native Data Type

Approximate real numbers (complex)

Exact integers

Binary gates (bits)

Exact integers

Arithmetic Model

Fixed-point approximation

Modular integer

Boolean circuits

Modular integer

SIMD Packing Support

Bootstrapping

Programmable Bootstrapping

Multiplication Depth

Configurable (leveled)

Configurable (leveled)

Unlimited (gate-by-gate)

Configurable (leveled)

ML Inference Suitability

Optimal (natively handles floats)

Moderate (requires quantization)

Low (bitwise operations)

Moderate (requires quantization)

Ciphertext Expansion Ratio

10x-50x

10x-50x

100x-1000x

10x-50x

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.