Inferensys

Glossary

Rescaling

In the CKKS scheme, rescaling is the operation that divides a ciphertext by a scale factor after multiplication to maintain a stable scale and manage noise growth, analogous to truncating floating-point precision.
Developer demonstrating multi-agent tool use, agent tool selection interface on laptop, casual tech demo moment.
CKKS NOISE MANAGEMENT

What is Rescaling?

Rescaling is the core operation in the CKKS homomorphic encryption scheme that divides a ciphertext by a scale factor after multiplication to maintain a stable scale and manage noise growth.

In the CKKS scheme, rescaling is the operation that divides a ciphertext by a scale factor Δ immediately after a multiplication. This truncates the ciphertext modulus, reducing the absolute noise magnitude and preventing the scale factor from growing quadratically. It is functionally analogous to truncating the least significant bits of a floating-point number to maintain a fixed precision.

Rescaling consumes one level from the ciphertext's modulus chain, meaning the number of possible rescalings defines the multiplicative depth of a computation. Without rescaling, the scale factor would grow exponentially, exhausting the noise budget and causing decryption failure. This operation is essential for implementing deep encrypted neural networks where successive linear layers require stable numerical precision.

CKKS NOISE MANAGEMENT

Key Characteristics of Rescaling

Rescaling is the fundamental operation in the CKKS scheme that divides a ciphertext by a scale factor after multiplication, maintaining a stable scale and managing noise growth—analogous to truncating floating-point precision in approximate arithmetic.

01

Scale Factor Division

After multiplying two CKKS ciphertexts, the underlying scale factor becomes Δ² (squared). Rescaling divides the ciphertext by Δ, restoring the scale to its original value. This operation is mathematically equivalent to modulus switching in the BGV scheme but specifically adapted for CKKS's approximate fixed-point representation. The division truncates the least significant bits, which correspond to the noisy lower-order digits, simultaneously reducing both the scale and the noise magnitude proportionally.

02

Noise Growth Management

Every homomorphic multiplication in CKKS approximately squares the noise magnitude. Without rescaling, noise would grow exponentially, quickly exceeding the decryption threshold. Rescaling reduces noise linearly with each operation:

  • Before rescaling: Noise ≈ σ² (squared after multiplication)
  • After rescaling: Noise ≈ σ (reduced proportionally with scale) This ensures the noise budget remains stable across multiple multiplication levels, enabling deep circuits like neural network inference with dozens of encrypted layers.
03

Modulus Chain Consumption

Rescaling consumes one modulus level from the ciphertext's modulus chain. A freshly encrypted CKKS ciphertext starts with a chain of prime moduli q₀, q₁, ..., qₗ. Each rescaling operation drops the last modulus, reducing the total modulus Q and the remaining multiplicative depth by one. This creates a direct trade-off:

  • More initial levels = deeper computation capacity
  • Fewer initial levels = smaller ciphertexts and faster operations Circuit designers must pre-allocate levels based on the required multiplication depth.
04

Approximate Precision Preservation

Unlike exact integer schemes like BFV, CKKS treats plaintexts as approximate real numbers with inherent least-significant-bit errors. Rescaling truncates these noisy lower bits rather than rounding, which means:

  • Precision loss is bounded and predictable
  • The operation naturally aligns with floating-point arithmetic semantics
  • After many rescalings, the effective precision decreases gradually This makes CKKS ideal for machine learning workloads where approximate computation is acceptable and the noise floor mimics quantization error in standard inference.
05

Rescaling vs. Bootstrapping

Rescaling and bootstrapping serve distinct but complementary roles in CKKS:

  • Rescaling: Lightweight operation that manages scale and noise after each multiplication, consuming one modulus level
  • Bootstrapping: Heavy cryptographic operation that refreshes the entire ciphertext, restoring consumed modulus levels and resetting the noise budget In practice, rescaling handles routine noise growth during leveled computation, while bootstrapping is invoked only when the modulus chain is exhausted, enabling unlimited-depth computation at significant computational cost.
06

Implementation in Libraries

Major FHE libraries implement rescaling with specific APIs:

  • Microsoft SEAL: evaluator.rescale_to_next() automatically divides by the scale factor and drops the last modulus
  • OpenFHE: EvalMult() followed by Rescale() provides explicit control over the operation
  • Lattigo: Evaluator.Rescale() handles both CKKS and BGV rescaling with scheme-specific logic The operation is typically lazy-evaluated, meaning rescaling may be deferred until the next operation to optimize the modulus chain usage and minimize computational overhead.
NOISE MANAGEMENT COMPARISON

Rescaling vs. Modulus Switching vs. Bootstrapping

A technical comparison of the three primary noise management operations in leveled homomorphic encryption schemes, detailing their mechanisms, triggers, and effects on ciphertext state.

FeatureRescalingModulus SwitchingBootstrapping

Primary Purpose

Maintain scale stability after multiplication

Reduce absolute noise magnitude

Refresh exhausted noise budget

Trigger Condition

After every ciphertext multiplication

Proactively during computation

When noise budget approaches zero

Effect on Modulus

Divides ciphertext by scale factor, reducing modulus

Switches to a smaller modulus

Homomorphically evaluates decryption, resetting to high modulus

Effect on Scale Factor

Restores scale to approximately original value

Scale factor remains proportional

Resets scale to initial parameters

Computational Cost

Low

Low

High

Requires Secret Key

Enables Unlimited Depth

Scheme Compatibility

CKKS

BGV, BFV

CKKS, TFHE, BGV, BFV

RESCALING IN CKKS

Frequently Asked Questions

Clarifying the core mechanism that prevents ciphertexts from becoming unmanageably large and noisy after multiplication in approximate homomorphic encryption.

Rescaling is the operation in the CKKS homomorphic encryption scheme that divides a ciphertext by a scale factor after a multiplication to maintain a stable scale and manage noise growth. It is mathematically analogous to truncating the least significant bits of a floating-point number to prevent precision from exploding. Without rescaling, the scale factor would grow quadratically with each multiplication, quickly exhausting the modulus and corrupting the message. The operation consumes one of the ciphertext's modulus levels, which is why CKKS is a leveled scheme—the number of possible rescaling operations is fixed at encryption time based on the chosen parameter chain.

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.